More actions
imported>Unknown No edit summary |
(Repair batch-0003 pages from live compare) |
||
| Line 1: | Line 1: | ||
==== Recurrent Problems - The Tower of Hanoi ==== | ==== Recurrent Problems - The Tower of Hanoi ==== | ||
T | T<sub>n</sub> is the minimum number of moves that will transfer n disks from one peg to another under Lucas's rules. | ||
===== small cases ===== | ===== small cases ===== | ||
T | T<sub>0</sub> = 0, T<sub>1</sub> = 1, T<sub>2</sub> = 3 ..... | ||
===== mathematical expression ===== | ===== mathematical expression ===== | ||
'''T | '''T<sub>0</sub> = 0, T<sub>n</sub> = 2T<sub>n - 1</sub> + 1, for n > 0''' | ||
===== closed form ===== | ===== closed form ===== | ||
'''T | '''T<sub>n</sub> = 2<sup>n</sup> - 1, for n >= 0''' | ||
Latest revision as of 00:29, 27 March 2026
Recurrent Problems - The Tower of Hanoi
Tn is the minimum number of moves that will transfer n disks from one peg to another under Lucas's rules.
small cases
T0 = 0, T1 = 1, T2 = 3 .....
mathematical expression
T0 = 0, Tn = 2Tn - 1 + 1, for n > 0
closed form
Tn = 2n - 1, for n >= 0