My Question is that I have a Tower of Hanoi with 5 pegs but movement is limited to
Start -> Aux1 <-> Aux2 <-> Aux3 -> Destination
- Start can only move out
- Only Aux1, Aux2, Aux3 can exchange disks
- Once a disk arrive Destination, it cannot go back
How can I expand the algorithm from 3 peg to 5 peg version with n disks?
n = 1:
- Aux1 -> Aux2
- Aux2 -> Aux3
n >= 2 :
- Hanoi(Aux1,Aux2,Aux3,n-1)
- Aux1 -> Aux2
- Hanoi(Aux3,Aux2,Aux1,n-1)
- Aux2 -> Aux3
- Hanoi(Aux1,Aux2,Aux3,n-1)