mirror of
https://github.com/frida/tinycc
synced 2024-11-28 10:33:07 +03:00
72 lines
1.5 KiB
Plaintext
72 lines
1.5 KiB
Plaintext
Solution of Tower of Hanoi Problem with 4 Disks
|
|
|
|
Starting state:
|
|
A: 1 2 3 4
|
|
B: 0 0 0 0
|
|
C: 0 0 0 0
|
|
------------------------------------------
|
|
|
|
|
|
Subsequent states:
|
|
|
|
A: 0 2 3 4
|
|
B: 0 0 0 0
|
|
C: 0 0 0 1
|
|
------------------------------------------
|
|
A: 0 0 3 4
|
|
B: 0 0 0 2
|
|
C: 0 0 0 1
|
|
------------------------------------------
|
|
A: 0 0 3 4
|
|
B: 0 0 1 2
|
|
C: 0 0 0 0
|
|
------------------------------------------
|
|
A: 0 0 0 4
|
|
B: 0 0 1 2
|
|
C: 0 0 0 3
|
|
------------------------------------------
|
|
A: 0 0 1 4
|
|
B: 0 0 0 2
|
|
C: 0 0 0 3
|
|
------------------------------------------
|
|
A: 0 0 1 4
|
|
B: 0 0 0 0
|
|
C: 0 0 2 3
|
|
------------------------------------------
|
|
A: 0 0 0 4
|
|
B: 0 0 0 0
|
|
C: 0 1 2 3
|
|
------------------------------------------
|
|
A: 0 0 0 0
|
|
B: 0 0 0 4
|
|
C: 0 1 2 3
|
|
------------------------------------------
|
|
A: 0 0 0 0
|
|
B: 0 0 1 4
|
|
C: 0 0 2 3
|
|
------------------------------------------
|
|
A: 0 0 0 2
|
|
B: 0 0 1 4
|
|
C: 0 0 0 3
|
|
------------------------------------------
|
|
A: 0 0 1 2
|
|
B: 0 0 0 4
|
|
C: 0 0 0 3
|
|
------------------------------------------
|
|
A: 0 0 1 2
|
|
B: 0 0 3 4
|
|
C: 0 0 0 0
|
|
------------------------------------------
|
|
A: 0 0 0 2
|
|
B: 0 0 3 4
|
|
C: 0 0 0 1
|
|
------------------------------------------
|
|
A: 0 0 0 0
|
|
B: 0 2 3 4
|
|
C: 0 0 0 1
|
|
------------------------------------------
|
|
A: 0 0 0 0
|
|
B: 1 2 3 4
|
|
C: 0 0 0 0
|
|
------------------------------------------
|