History, asked by garimamohindhru7231, 8 months ago

Write a recurrence relation of the problems tower of hanoi

Answers

Answered by atiya12
1

Answer:

First they move the ( n -1)-disk tower to the spare peg; this takes M ( n -1) moves. Then the monks move the n th disk, taking 1 move. And finally they move the ( n -1)-disk tower again, this time on top of the n th disk, taking M ( n -1) moves. This gives us our recurrence relation, M ( n ) = 2 M ( n -1) + 1.

Similar questions