The specific problem of Hanoi

Suppose there are 2 * n disks. How can the Hanoi problem be resolved if the odd numbers are disks in panel "A" and even the disks are in panel "B"? please let me know if further information is required.

thank

+3
source share
1 answer

move disk 1 to disk 2 then move the resulting β€œcorrect” hanoi towner 1.2 to disk 3 using the classic algorithm. Then move the corresponding tower 1,2,3 to 4. Continue until you get the full corresponding tower, and then use the classic algorithm to move to the destination.

EDIT1:

Example (incomplete)

1   2
3   4
5   6   
.   .   .

    1
    2
3   4
5   6   
.   .   .

    1
    2
    4
5   6   3
.   .   .

    2
1   4   
5   6   3
.   .   .

1   4   2   
5   6   3
.   .   .

        1
    4   2   
5   6   3
.   .   .

        1
4       2   
5   6   3
.   .   .

, - ; , , 1-2-3-4-6, 1-2-3-4-5. , - .

+6

Source: https://habr.com/ru/post/1782026/


All Articles