homework-5 Version 0 |
|
👤 Author: by 1720650158qqcom 2018-11-05 14:40:51 |
suppose n rings on the first peg.
first :move (n-1) rings to the second peg behind the third peg and the first peg change each other.
second:move the largest to the third peg.
third:move(n-1) rings from the second peg behind the third peg and the first peg change each other.
like the textbook,there are three rings on the first peg.
1.move the smallest to the third peg.
2.move the middle to the second peg.
3.move the smallest to the first.
4.move the smallest to the third.
5.move the smallest to the third.
6.move the biggest to the second.
7.move the smallest to the first.
8.move the middle to the second.
9,move the smallest to the second.