By: |
Thm* n:, a,z:, m:{a...z-1}, s1:({a...m}{1...n}Peg), Thm* s2:({m+1...z}{1...n}Peg). Thm* (k:{1...n}. Moving disk k of n takes s1(m) to s2(m+1)) Thm* Thm* s1 is a Hanoi(n disk) seq on a..m Thm* Thm* s2 is a Hanoi(n disk) seq on m+1..z Thm* Thm* (s1 @(m) s2) is a Hanoi(n disk) seq on a..z |
1 |
Moving disk k of n takes (s1(?) {to n-1} f {to n})(m) to (s2(?) {to n-1} g {to n})(m+1) | 13 steps |
2 |
| 1 step |
3 |
| 1 step |
About: