Tower of Hanoi
This presentation is the property of its rightful owner.
Sponsored Links
1 / 20

Tower of Hanoi PowerPoint PPT Presentation


  • 226 Views
  • Uploaded on
  • Presentation posted in: General

Tower of Hanoi. Group Member. 1.Kittituch Laokajornboon M.2/8 No.34. 2.Khaochao Prasertsuti M.2/8 No.43. 3.Pasan Kuptnirattisaikul M.2/8 No45. 4.Worawit Narachram M.2/8 No.49. 5.Sarit Kuchaiyanon M.2/8 No.51. Rule of the game.

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Tower of hanoi

Tower of Hanoi


Tower of hanoi

Group Member

1.Kittituch Laokajornboon M.2/8 No.34

2.Khaochao Prasertsuti M.2/8 No.43

3.Pasan Kuptnirattisaikul M.2/8 No45

4.Worawit Narachram M.2/8 No.49

5.Sarit Kuchaiyanon M.2/8 No.51


Tower of hanoi

Rule of the game


Pseudo codes

Step1 Move coin 1 to the tower B and move coin 2 to the tower C.

Step 2 Move coin 1 to the tower C on top of coin2.

Step 3 Move coin 3 to the tower B.

Step 4 Move coin 1 to the tower A on top of coin4

Step 5 Move coin 2 from tower C to the tower B on top of coin 3.

Pseudo codes


Pseudo codes1

Step 6 Move coin 1 from tower A to tower B on top of coin 2 and 3.

Step7 Move coin 4 from tower A to tower C.

Step 8 Move coin 1 to tower C on top of coin 4 and move coin 2 to tower A.

Step 9 Move coin 3 to tower B.

Step 10 Move coin 1 to tower A on top of coin 2.

Pseudo codes


Pseudo codes2

Step 11 Move coin 3 to tower C on top of coin 4 and move coin 1 to tower B.

Step 12 Move coin 2 to the tower C on top of coin 3 and 4 then move coin 1 to the tower C on top of coin 2,3 and 4

Pseudo codes


Tower of hanoi

START

There are 3 tower and 4 ring

Move coin 1 to tower B and move coin 2 to tower C

Move coin 1 to the tower C on top of coin2.


Tower of hanoi

Move coin 3 to the tower B.

Move coin 1 to the tower A on top of coin4

Move coin 2 from tower C to the tower B on top of coin 3.

Move coin 1 from tower A to tower B on top of coin 2 and 3.


Tower of hanoi

Move coin 4 from tower A to tower C.

Move coin 1 to tower C on top of coin 4 and move coin 2 to tower A.

Move coin 3 to tower B.


Tower of hanoi

Move coin 1 to tower A on top of coin 2.

Move coin 3 to tower C on top of coin 4 and move coin 1 to tower B.

Move coin 2 to the tower C on top of coin 3 and 4 then move coin 1 to the tower C on top of coin 2,3 and 4

end


Tower of hanoi

Thank you


  • Login