Baltic Way 2021 · Problem 8
Combinatorics
We are given a collection of coins, where is a non-negative integer. Exactly one coin is fake. We have an unlimited number of service dogs. One dog is sick but we do not know which one. A test consists of three steps: select some coins from the collection of all coins; choose a service dog; the dog smells all of the selected coins at once. A healthy dog will bark if and only if the fake coin is amongst them. Whether the sick dog will bark or not is random.
Devise a strategy to find the fake coin, using at most tests, and prove that it works.
When you’re ready
Review material becomes available with the next Daily.
Review
Topics
Games and strategies · Pigeonhole and extremal arguments
Solutions
Solution
Number the coins by -digit binary numbers from to . Let be the set of coins which have 0 in -th position of the binary number. The first tests we perform with the help of different dogs. In the -th test we determine whether the set contains the fake coin. With out loss of generality we may assume that the dogs determined that all the digits in the number of the fake coin are 0 's. Due to the possible presence of the sick dog in these tests, it means in fact that the binary number of the fake coin contains at most one 1 .
In the next test we let a new dog determine whether the coin is genuine. If the new dog barks then the coin is really fake, for otherwise two dogs had given us a false answer. If the new dog does not bark we find a dog we have not used before to test the suspected coin.
(i) If the last two dogs disagree one of them must be sick and hence the first dogs must be healthy. length
In this case the coin is the fake one.
(ii) If the last two dogs agree (by not barking) it follows that both of them are healthy. The reason is that if one of the last two dogs was sick and did not bark, it would mean that the first dogs were length
healthy, implying that the coin is fake, but then the other of the last two dogs is healthy and did not bark at the fake coin, a contradiction.
Therefore one of the first dogs gave a wrong verdict. In this case we have possible candidates for the fake coin. We can find the fake coin using the last dog and tests using binary search.
It follows that no more than tests are needed.
Contest context
Results from Baltic Way 2021
12 teams
- Mean score
- 3.4 / 5
- Scores of 4 or 5
- 8 / 12
- Estonia
- 5 / 5
Score distribution
All team scores
| Team | Score |
|---|---|
| St. Petersburg | 5 / 5 |
| Estonia | 5 / 5 |
| Germany | 5 / 5 |
| Latvia | 5 / 5 |
| Lithuania | 1 / 5 |
| Poland | 0 / 5 |
| Denmark | 4 / 5 |
| Norway | 1 / 5 |
| Finland | 5 / 5 |
| Sweden | 5 / 5 |
| Iceland | 5 / 5 |
| Ireland | 0 / 5 |