Missionary & Cannibal

18
Missionary & Cannibal

description

Missionary & Cannibal. Members in group. Napatr Tansutiraphong M.2/1 No.2(Introduction) Puriphat Rongjitprapas M.2/1 No.9(Conclusion ) Thayat Thanomkul M.2/1 No.15(Present) Thanakorn Liumpitak M.2/1 No.24(Pseudo Code) Watcharin Sirinaovakul M.2/1 No.30(Present). Start. - PowerPoint PPT Presentation

Transcript of Missionary & Cannibal

Page 1: Missionary & Cannibal

Missionary & Cannibal

Page 2: Missionary & Cannibal

Members in group

Napatr Tansutiraphong M.2/1 No.2(Introduction)Puriphat Rongjitprapas M.2/1 No.9(Conclusion)Thayat Thanomkul M.2/1 No.15(Present)Thanakorn Liumpitak M.2/1 No.24(Pseudo Code)Watcharin Sirinaovakul M.2/1 No.30(Present)

Page 3: Missionary & Cannibal

Start

3 Missionary & 3

Cannibal

Chosen

1 missionary and 1

cannibal

2 Cannibals

Correct

Wrong

2 Cannibals

1 Cannibals back

Page 4: Missionary & Cannibal

Start

1 Missionary and 1

Cannibal

3 missionary and

3 cannibal

Chosen

Move 1 missionary to

the boat.

Move 1 cannibal to the boat.

Correct

Wrong

2 Cannibals

1 Cannibals back

Page 5: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

Move 1 missionary to

the boat.Move 2 cannibal to

the land and move 2 missionary to the

boat.

Correct

Wrong

2 missionary

1 Cannibal and1 missionary

back

Page 6: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

1 missionary out and 1

cannibal come in

1 cannibal out and 1 missionary come in

Correct

Wrong

2 missionary on the boat

Page 7: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

1 missionary out and 1

cannibal come in

2 missionaries out and 1 cannibal come in

Correct

Wrong

1 cannibal on the boat

Page 8: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

1 cannibal comes in

2 cannibals on the boat

Page 9: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

1 cannibal out and 1

missionary in

1 cannibal out

Correct

Wrong

1 cannibal on the boat

Page 10: Missionary & Cannibal

Start

3 Missionary and 3

Cannibal

Chosen

1 cannibal out

2 cannibals on the boat

End

Page 11: Missionary & Cannibal

Pseudo CodeChoose 2 cannibals to come in the boat land 1 1 cannibal out of the boat land 2 1 cannibal comes on the boat in land 1 1 cannibal out of the boat land 2 1 cannibal out of the boat and 2 missionary come in the

boat land 1 1 missionary out of the boat and 1 cannibal come in the

boat land 2 1 cannibal out of the boat and 1 missionary come in the

boat land 1 2 missionary out of the boat and 1 cannibal come in the

boat land 2 1 cannibal comes in the boat land 1 1 cannibal out of the boat land 2 1 cannibal comes in the boat land 1 Out of the boat all

Page 12: Missionary & Cannibal

Overall Picture1

Page 13: Missionary & Cannibal

Overall Picture2

Page 14: Missionary & Cannibal

Overall Picture3

Page 15: Missionary & Cannibal

Overall Picture4

Page 16: Missionary & Cannibal

Overall Picture5

Page 17: Missionary & Cannibal

Overall Picture6

Page 18: Missionary & Cannibal

Thank You for your attention