David and Goliath live on an island Geeksland. One day they both start fighting over an algorithm and realize both of them cannot live together. They want to kill each other. Geeksland has seven poisoned wells, numbered from 1 to 7. If you drink from a well, you can only save yourself by drinking from a higher numbered well.
If you drink water from well number 3 and follow it up by drinking water from any one of wells 4,5,6 or 7, it acts as anti-venom and you are saved.
Well 7 is located at the top of Geeks mountain. Only Goliath is able to reach well number 7. This means David can access wells 1-6 and Goliath has access to wells 1-7.
They decide that to resolve this issue each of them will bring a glass of water. They will exchange their glasses and drink the water. After the duel, David lives and Goliath dies.
What strategy did David use to survive?
HINT: Think not only outside the box but outside the island.
Solution: Goliath knew that David cannot reach well number 7. So he would get water from well 6 or 7 for David. As a result, he thinks David would die.
David knew that no matter from which well he gives the water, Goliath will go and drink water from well 7 and live.
The problem statement clearly mentions that both of them live on an island.
So, David got sea water for Goliath and before duel drank water from well number 1. When they exchanged glasses and drank water, Goliath rushed to well 7 and drank poison from it, thinking that it would cure the poison he just drank (but he drank sea water), so Goliath died.
David on the other hand already had poison from well 1 so what Goliath gave him effectively cured him. So he lived.
This article is contributed by Ankit Jain. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Puzzle 34 | (Prisoner and Policeman Puzzle)
- Puzzle 85 | Chain Link Puzzle
- Puzzle 81 | 100 people in a circle with gun puzzle
- Puzzle 15 | (Camel and Banana Puzzle)
- Puzzle | 3 Priests and 3 devils Puzzle
- Puzzle 39 | (100 coins puzzle)
- Puzzle 28 | (Newspaper Puzzle)
- Puzzle | Elevator Puzzle
- Puzzle 33 | ( Rs 500 Note Puzzle )
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle 24 | (10 Coins Puzzle)
- Puzzle 27 | (Hourglasses Puzzle)
- Puzzle 29 | (Car Wheel Puzzle)
- Puzzle 36 | (Matchstick Puzzle)
- Puzzle 38 | (Tic Tac Toe Puzzle)
- Puzzle | The symbols
- Puzzle | The Pot of Beans
- Puzzle | The neighbour
- Puzzle | Handshakes