How do you solve a recurrence with a functin through induction?

31 Views Asked by At

I found the answer in part-A by substitution, as O(n) from; T(n/2^k) = T(1).... n/2^k = 1..... so k = 1og2(n)..... T(log2(n)) = T(n/n)+5.... so O(n) IS THE ANSWER, Correct me if am wrong because am new to proofs.

c) I don't know how to do part (c) by induction, its not a normal recurrence where RHS is like 3^n - 1 where you can prove the first term, then substitute n+1. This has a "T" which won't go away. help

http://oi62.tinypic.com/2nksao5.jpg

enter image description here

1

There are 1 best solutions below

0
On

$T(n)=T(\frac{n}{2})+5=T(\frac{n}{4})+5+5=...=T(1)+5log_2n=1+5logn$

proof by induction that $T(n)=1+5logn$, assume that $n=2^k$:

$k=0$ : $T(1)=T(2^0)=1+5log1 = 1$

assume that it holds for k-1, then for k: $T(n)=T(2^k) = T(2^{k-1})+5 =_{i.a} 1 + 5(k-1)+5 = 1+5k = 1+5logn$