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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/10/6704012ee151f_6946704012e8392d.jpg)
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
Get step-by-step solutions from verified subject matter experts
