Answer to Question #224202 in Engineering for Reyad

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)=2^{n+1}-2"

For the base case n = 1

"T(1)=2^{1+1}-2= 4-2=2"

Induction hypothesis,

n=k

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

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

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


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


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


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


"=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!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS