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 .
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
Find a recurrence relation and .
Solve for the problem to find (The book did this):
Solve for the problem to find (I did this):
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 ?
The rules for moving the disks are:
You can move disks from pole to pole via Pole you can't move disks directly to Pole from Pole .
Same rule goes for pole . You can't move disk directly from pole to Pole . You've to go via Pole .
You can move disks directly from Pole to pole . Also you can move disks directly from Pole to pole
You can move disks from Pole to Pole or to Pole directly . And you can't move larger disks on smaller disks.
You said that:
Now because if you have disk in pole it will take moves to move disk from pole to pole via pole . you can't move a disk from pole to pole directly according to the rule stated above.
if you look at the Figure 1 you need minimum moves to move disks from pole to pole but you said
If we plug in the value of we get:
So shouldn't ?
The same goes for
You said that
Base condition is because to move a disk from pole to pole you need minimum move according to the rules above.
Then if you look at Figure 1 it takes minimum moves to move disks from pole to pole . So
If we replace with according to your equation:
You can't take move to move disks from pole to pole . It's impossible according to the rules stated above.
Can you kindly shed light what you said? Sorry I didn't get it. Also is it possible to get an answer to my question I posted first in this thread?