離散數學›Ch5 遞迴關係
第 8 題/共 18 題
◀ LS 8/18
8. 遞迴關係、河內塔、經典應用問題
#LS-05-008難遞迴關係河內塔經典應用問題
  1. (25 points) Consider the game of Hanoi-Tower, where on a board with three erected pegs pile of disks of different sizes are initially stacked at one of the pegs, in a size-ordered manner with the largest disk being at the bottom and on top the smallest.

The player is required to relocate the disk pile to any of the rest two pegs, in compliance with the following rules at any time during the play:

  • moving one disk at a time from one peg to another;
  • when moving a disk to a peg already piled with disks, the disk must be smaller than any in the pile (which would entail that, during the game, a disk pile at any peg will be size-ordered with smaller ones on top of larger ones);

a. (2 points) Suppose that H3(n)H^3(n) is the number of moves required to relocate a pile of nn disks at a peg to any of the rest two pegs. How would you formulate H3(n)H^3(n) in a recursive manner? And H3(n)=?H^3(n) = ?

b. (3 points) The game can be extended to the case of 4-peg. Suppose that H4(n)H^4(n) denotes the number of moves needed to relocate a pile of nn disks at a peg to any of the rest three pegs. How would you formulate H4(n)H^4(n) in a recursive manner? And H4(n)=?H^4(n) = ? Is there any connection that you see between H3(n)H^3(n) and H4(n)H^4(n)?

c. (10 points) Let H5(n)H^5(n) be the number of moves for relocating a pile of nn disks in 5-peg situation. Are there any connections that you see among H3(n)H^3(n), H4(n)H^4(n) and H5(n)H^5(n)?

d. (10 points) What can you tell about Hm(n)H^m(n) in the case of an mm-peg Hanoi-Tower game? And the connections between Hm1(n)H^{m_1}(n) and Hm2(n)H^{m_2}(n)?

📄 交大111
跳轉到第題
▤完整推導請見《WH 資工筆記 · 離散數學》Ch5 遞迴關係
本章題號 · 1–18 / 18