Question: 3. [3] Consider the following program: function f(n) if n> 1 then c=f(n/2) c=c+f(n/2) c=c+f(n/2) return c else c=1 return c end if end function

 3. [3] Consider the following program: function f(n) if n> 1

3. [3] Consider the following program: function f(n) if n> 1 then c=f(n/2) c=c+f(n/2) c=c+f(n/2) return c else c=1 return c end if end function What is the correct recurrence/runtime pair for this program? i. T(n) = 2T (n/3) + O(1) and (nlog32) ii. T(n) = 3T(n/2) + (lgn) and (1922) iii. T(n) = 2T(n/3) + (Ign) and (nlg? 2) iv. T(n) = 3T(n/2) + (nlgn) and (nlog, 3) v. T(n) = 3T(n/2) + (1) and (nlog, 3)

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!