Question #224202

Derive the recurrence for double tower of Hanoi problem. Find the closed form for it.


1
Expert's answer
2021-08-23T04:49:23-0400

Let total number of plates be 2n

As per the hypothesis T(n)=2n+12T(n)=2^{n+1}-2

For the base case n = 1

T(1)=21+12=42=2T(1)=2^{1+1}-2= 4-2=2

Induction hypothesis,

n=k

T(k)=2k+12T(k)=2^{k+1}-2

Now, by induction step n=k+1n=k+1

T(k+1)=2k+22T(k+1)=2^{k+2}-2


T(k+1)=2T(k)+2\Rightarrow T(k+1)=2T(k)+2


=2(2k+12)+2=2(2^{k+1}-2)+2


=2k+1+14+2=2^{k+1+1}-4+2


=2k+22=2^{k+2}-2



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS