Math 2.0

General and overarching topics Example

Tower of Hanoi

Example

The Tower of Hanoi is a puzzle with three rods and nn discs of different sizes. At the start, all discs are on one rod, in order of size, with the largest at the bottom. A move takes the top disc of one rod and puts it on top of another rod. No move may put a disc on a smaller disc. The aim is to move all discs to another rod.

Let TnT_n be the minimum number of moves for nn discs. Then T0=0T_0 = 0 and Tn=2Tn−1+1T_n = 2 T_{n-1} + 1 for n≥1n \ge 1. This recurrence relation has the solution Tn=2n−1T_n = 2^n - 1.

Remarks

The recurrence comes from the largest disc. Before it moves, the other n−1n - 1 discs must be on the third rod. After it moves, they must come back on top of it. Values: T1=1T_1 = 1, T2=3T_2 = 3, T3=7T_3 = 7 and T4=15T_4 = 15. The French mathematician Édouard Lucas invented the puzzle and presented it in 1883.

Further reading

  1. Web https://en.wikipedia.org/wiki/Tower_of_Hanoi, Recursive solution
About this page
Tag0906Z03EMN
URIm2://0906Z03EMN
Kindexample
WritingW2 usable
MSC00A08
Instance ofRecurrence relation
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W3

  • a person confirmed each agent-written section: rule P04 (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.