Question: Quaternary search is like binary search, but divides the array into four parts instead of two. After quarterly dividing the array, the four divisors are

Quaternary search is like binary search, but divides the array into four parts instead of two. After quarterly dividing the array, the four divisors are compared to the input value. If it matches the index is returned. If not the algorithm is recursively called on the subarray that contains the value. (a) What design technique is this algorithm based on? (b) Set up a recurrence for the number of key comparisons in the worst case. You may assume that n =4k, for some none (c) Solve the recurrence for n =4k. (d) Compare this algorithms efficiency with that of binary search.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!