-
Notifications
You must be signed in to change notification settings - Fork 0
Home
shubham vernekar edited this page Dec 25, 2018
·
1 revision
The Tower of Hanoi or Towers of Hanoi is a mathematical game or puzzle. It consists of three stands, and a number of plates of different sizes which can be put over each other on any stand.
The puzzle starts with the plates stacked in order of size on one stand we call source, smallest at the top, making a pyramid shape.
The object of the game is to move the entire stack to another stand (destination), obeying the following rules:
- Only one disc may be moved at a time.
- No disc may be placed on top of a smaller disc.
Label the stands Src, Intr, Dest.
Let n be the total number of discs.
Number the discs from 1 (smallest, topmost) to n (largest, bottommost).
To move n discs from stand Src to stand Dest:
Move n-1 plates from Src to Intr. This leaves plate #n alone on plate Src.
Move plate #n from Src to Dest.
Move n-1 plates from Intr to Dest so they sit on plate #n.
For more details refer report of project. The report of project is along with project