Puzzle | Strict Pill Schedule Problem
Puzzle: You are on a strict medical regimen that requires you to take two types of pills each day. You must take exactly one A pill and exactly one B pill at the same time. The pills are very expensive, and you don’t want to waste any. So you open the bottle of A pills and tap one out into your hand. Then you open the bottle of B pills and do the same thing – but you make a mistake, and two B pills come out into your hand with the A pill. But the pills are all exactly identical. There is no way to tell A pills apart from B pills. Is it possible to satisfy your regimen and take exactly one of each pill at the same time, without wasting any pills?
- Step 1: Cut each pill in half.
- Step 2: Take one half from each pair and form two pairs, say Pair A and pair B.
- Step 3: Take another pill from the bottle A, cut it in half.
- Step 4: Put each half into both the pairs. Now, each pile contains two halves from each type of pill, so you just take one of the piles (and the other the next day).
This article is contributed by Mohit Gupta_OMG 😀. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.