log() = log base 2 of ()
log()^2 = log^2 base 2 of ()
I'm stuck with this induction proof. I have the following recurrence relation
T(n) = T(n/2) + Theta(log(n))
I have to prove that T(n) = O(log(n)^2)
making the constants explicit:
T(n) = T(n/2) + clog(n)
I know that for O's definition I must find k > 0 and n' > 0 so that t(n) <= k(log(n)^2) for every n >= n'
T(n) = O(log(n)^2) supposed true for every m < n I have that t(m) <= k(log(m)^2) is true :
given
T(n) <= k(n/2)(log(n/2)^2) + c log(n) =
= k(n/2)(log(n)^2 - 1) + c log(n)
= k(n/2)(log(n)^2)) - kn/2 + c log(n) .
So
k(n/2)(log(n)^2) - kn/2 + c log(n) <=? k(log(n)^2) <--- that's where I'm stuck
I can't find any k nor n that will make this works, where am I doing wrong ?