Tower of Hanoi Problem and skipping a move
The Tower of Hanoi problem:
According to legend, a certain Hindu temple contains three thin diamond poles(
,
,
and
is closer to
and
is closer to
but
is not closer to
) on one of which, at the time of creation, God placed
golden disks that decrease in size as they rise from the base.
The priests of the temple work unceasingly to transfer all the disks one by one from the first pole to one of the others, but they must never place a large disk on top of a smaller one and they are allowed to move disks from one tower to only adjacent pole. Let
![a_n = \left[ \begin{array}{c} \text{the minimum number of moves} \\ \text{needed to transfer a tower of n} \\ \text{ disks from pole A to pole C} \end{array} \right ]](http://latex.codecogs.com/png.latex? a_n = \left[ \begin{array}{c} \text{the minimum number of moves} \\ \text{needed to transfer a tower of n} \\ \text{ disks from pole A to pole C} \end{array} \right ] )
![b_n = \left[ \begin{array}{c} \text{the minimum number of moves} \\ \text{needed to transfer a tower of n} \\ \text{ disks from pole A to pole B} \end{array} \right ]](http://latex.codecogs.com/png.latex? b_n = \left[ \begin{array}{c} \text{the minimum number of moves} \\ \text{needed to transfer a tower of n} \\ \text{ disks from pole A to pole B} \end{array} \right ] )
Find a recurrence relation
and
.
Solve for the problem to find
(The book did this):
 } +\\ &\nonumber 1 \text{ (move to move the bottom disk from pole A to pole B) } + \\ & \nonumber a_{n-1} \text{ (moves to move the top disks from pole C to pole A) } + \\ & \nonumber 1 \text{ (move to move the bottom disk from pole B to pole C) } + \\ & \nonumber a_{n-1} \text{ (moves to move the top disks from pole A to pole C) } \\ \nonumber =& 3a_{n-1} + 2 \end{align*} )
Solve for the problem to find
(I did this):
 } +\\ & \nonumber 1 \text{ (move to move the bottom disk from pole A to pole B } + \\ & \nonumber b_{n-1} \text{ (moves to move the top disks from pole C to pole B) } \\ \nonumber =& 2b_{n-1} + 1 \end{align} )
Why my solution of
is wrong? For finding
I did the same thing as done in finding
which is skipping the move from
to
when moving from
to
. I calculated this move as
like the book did it.
So why am I wrong?
Also my question is why in finding
to move the disks from
to
they skipped to calculate the move to move the disks first from
to
?
Re: Tower of Hanoi Problem and skipping a move
Unless the rules contains some restriction that takes into account how close the poles are,
should be equal to
. The recurrence equation is
, and similarly for
.
1 Attachment(s)
Re: Tower of Hanoi Problem and skipping a move
Re: Tower of Hanoi Problem and skipping a move
Sorry, I missed the adjacency requirement. It's not in the standard Towers of Hanoi rules.
The equation for
should be
since the first part is moving disks from A to C, which takes
moves.
Re: Tower of Hanoi Problem and skipping a move
Quote:
Originally Posted by
emakarov
Sorry, I missed the adjacency requirement. It's not in the standard Towers of Hanoi rules.
The equation for

should be

since the first part is moving disks from A to C, which takes

moves.
I know the subject should be "Modified Tower of Hanoi Problem....." Sorry for misunderstanding.
And thanks for the answer.