From
80 likes | 252 Vues
Tower of Hanoi Discovering the invariant. Contributed to MIT BLOSSOMS By Dr. Fakhar Lodhi Professor National University of Computer and Emerging Technologies ( NUCES) Lahore , Pakistan. Using. From. To. Using. From. To. Using. From. To. Using. From. To. Using. From. To. Using.
From
E N D
Presentation Transcript
Tower of HanoiDiscovering the invariant.Contributed to MIT BLOSSOMS By Dr. FakharLodhiProfessor National University of Computer and Emerging Technologies (NUCES) Lahore, Pakistan
Using From To
Using From To
Using From To
Using From To
Using From To
Using From To
Observations • Every odd numbered move involves the smallest disk. • The smallest disk moves in a cycle: • Anti-clockwise if N is odd • Clockwise if N is even • Every even numbered move is deterministic – there is only one choice