347 views

1 Answer

0 votes
0 votes
By substituting we get  f(2) = 2 ;

f(4) = 3 ;

f(8) = 4 ;

and so on

therefore  f(2^k ) = k+1 ;

and f(n) = log n + 1

hence function complexity = O(log n )

Related questions

0 votes
0 votes
1 answer
1
admin asked May 9, 2020
1,178 views
Solve the recurrence relation for the number of rounds in the tournament described in question $14.$
0 votes
0 votes
1 answer
2
admin asked May 9, 2020
511 views
How many rounds are in the elimination tournament described in question $14$ when there are $32$ teams?
0 votes
0 votes
1 answer
4
admin asked May 9, 2020
537 views
Give a big-O estimate for the function $f$ given below if $f$ is an increasing function.$f (n) = 2f (n/3) + 4 \:\text{with}\: f (1) = 1.$