Answer to Question #5260 in MatLAB | Mathematica | MathCAD | Maple for Mana Nabati

Question #5260
In searching for the placement of a key x ̄ in a sorted array x(i), i = 1,2,...,n, binary search partitions the current search domain into two subdomains by always selecting the mid-point index n/2 (or (n+1)/2, if n is odd) of the array. Clearly, binary search does not take into consideration the key value x ̄ in selecting this mid-point.
A simple variation of binary search, called interpolation search, is based on partitioning the current search domain such that the “mid-point” index is guessed by assuming a linear interpolation of the indices between the first key value x(1) and last key value x(n).
create a new function isearch which implements the
interpolation search algorithm.
1
Expert's answer
2012-07-20T08:45:52-0400
Unfortunately, your question requires a lot of work and cannot be done for free.
Submit it with all requirements as an assignment to our control panel and we'll assist you.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS