2

I'm working on solving some recurrence relations and following along with a couple of example solutions. One is my lecture notes. The other which closely matches in form is answered in this post: How to solve this recurrence $T(n) = 2T(n/2) + n\log n$

In this step...

$= 2[2W(k-2) + (k-1)2^{k-1}] + k2^k\\= 2^2W(k-2)+(k-1)2^k+ k2^k$

... $(k-1)2^{k-1}$ is simplified to $(k-1)2^k$ and it leaves me trying to figure out how that exponent is changing from $k-1$ to $k$. I'm looking at it like the $2$ multiplies across and I get $(2k-2)2^{k-1}$.

Can $(2k-2)2^{k-1}$ be simplified to $(k-1)2^k$?

ThisClark
  • 145

3 Answers3

3

Something like this:

$$(2k-2)2^{k-1} =2(k-1)\frac{2^k}{2} = (k-1)2^k$$

RajSharma
  • 534
1

Hint: $$a\cdot (b+c)=a\cdot b+a\cdot c=b\cdot a+c\cdot a=(b+c)\cdot a$$ $$a\cdot a^p=a^{p+1}$$

Cameron Buie
  • 102,994
0

Reordering as in Cameron's hint brought me to the solution.

$2^{k-1}(2k-2) = 2k2^{k-1} - 2^12^{k-1}(k-1) = 2^k(k-1)$

ThisClark
  • 145