Question: Below is a bizarre algorithm. It is not important what it does. This question is solely concerned with computing an asymptotic running time for the

 Below is a bizarre algorithm. It is not important what it

Below is a bizarre algorithm. It is not important what it does. This question is solely concerned with computing an asymptotic running time for the algorithm (9 notation) in terms of the size of the range of the input array A. You may assume that a call to process(A, i,i) takestim e quadratic in the size of the range. In other words it takes time (n-) where n j- i Make sure to show and explain all your work and any assumptions you make! Bizarre(A, i, j) if (i 3 j) /* if there are fewer than 4 items*/ then return /* compute mi dpoint rounded down*/ /* compute 4 of range rounded down /*preprocess everything */ mid - (i + j)/2 fourth (j -i / 4 process(A, i, j) Bizarre(A, i, mid) Bizarre(A, mid fourth, mid + fourth) /middle half / Bizarre(A, mid, j) /left half * /* right half */ What is the -notation for the worst case running time of the call Bizarre(A, 1, n) where n is the size of the array A? You m ust show your work by writing a recurrence relation for the running time, T(n), and then solve the recurrence to get a -notation answer. Show your work for solving the recurrence

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!