Question: Let A be an unsorted array of n numbers FindMin[A] If size of A is at most 5 then return the minimum value in this

 Let A be an unsorted array of n numbers FindMin[A] If

Let A be an unsorted array of n numbers FindMin[A] If size of A is at most 5 then return the minimum value in this array. Else {Partition A into three arrays A1, A2, A3 such that each subarray has size n x=FindMin[A1] y=FindMin[A2] z = FindMin[A3] Return (Minimum of x, y, z)} State the recurrence for the running time of FindMin[A], i.e. T(n)=... State what the above recurrence resolves to in terms of n i.e. T(n) is theta (...). You do not need to prove your answer. Prove by induction on the size of A that FindMin[A] correctly finds the minimum value in A. (You get 1 mark for proving the base case, 1 mark for stating the inductive hypothesis and 2 marks for proving the inductive step.)

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!