1 / 16

Tower of Hanoi

Tower of Hanoi. Rules. Members. 1.Siriroat Anantchokakul M. 2/6 No. 2 2.Pavarit Nimitpanya M. 2/6 No. 7 3.Namchew Sanguandikul M. 2/6 No. 16 4.Suphachai Isranusorn M. 2/6 No. 20 5.Jirun Techawichein M.2/6 No. 30. Start. There are 5 rings and 3 bars.

liliha
Download Presentation

Tower of Hanoi

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tower of Hanoi

  2. Rules

  3. Members 1.Siriroat Anantchokakul M. 2/6 No. 2 2.Pavarit Nimitpanya M. 2/6 No. 7 3.Namchew Sanguandikul M. 2/6 No. 16 4.Suphachai Isranusorn M. 2/6 No. 20 5.Jirun Techawichein M.2/6 No. 30

  4. Start There are 5 rings and 3 bars Move ring 1 to bar C

  5. Move ring 2 to bar B Move ring 1 to bar B Move ring 3 to bar C

  6. Move ring 1 to bar A Move ring 2 to bar C Move ring 1 to bar C

  7. Move ring 4 to bar B Move ring 1 to bar B Move ring 2 to bar A

  8. Move ring 1 to bar A Move ring 3 to bar B Move ring 1 to bar C

  9. Move ring 2 to bar B Move ring 1 to bar B Move ring 5 to bar C

  10. Move ring 1 to bar A Move ring 2 to bar C Move ring 1 to bar C

  11. Move ring 3 to bar A Move ring 1 to bar B Move ring 2 to bar A

  12. Move ring 1 to bar A Move ring 4 to bar C Move ring 1 to bar C

  13. Move ring 2 to bar B Move ring 1 to bar B Move ring 3 to bar C

  14. Move ring 1 to bar A Move ring 2 to bar C Move ring 1 to bar C

  15. All therings are in bar C End

  16. For an even number of rings: make the legal move between bars A and B make the legal move between bars A and C make the legal move between bars B and C repeat until complete For an odd number of rings: make the legal move between bars A and C make the legal move between bars A and B make the legal move between bars B and C repeat until complete Pseudo Code

More Related