Maths Olympiad Prep

Library / /61 of 96

, 2021

Combinatorics Difficulty 8.5 Shortlist Prove it Baltic Way

During one test a service dog smells a pile of coins and barks if there is a fake coin in it. If a dog is sick, whether it barks or not does not depend on the presence of fake coin, it happens randomly. Suppose k2sk \le 2^s and that we have 2k2^k coins, exactly one of which is fake. Assume that we have an excess number of service dogs, one of them is sick but we do not know which one. Device a strategy to find the fake coin using at most k+s+2k+s+2 tests.

Solution

Number the coins by kk-digit binary numbers from 00000\ldots0 to 11111\ldots1. Let AiA_i be the set of coins which have 00 in ii-th position of the binary number. The first kk tests we perform with the help of kk different dogs. In the ii-th test we determine whether the set AiA_i contains the fake coin. Without loss of generality we may assume that the dogs determined that all the digits in the number of the fake coin are 00'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 11.

In the next test we let a new dog determine whether the coin 00000\ldots0 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 kk dogs must be healthy. In this case the coin 00000\ldots0 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 kk dogs were healthy, implying that the coin 00000\ldots0 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 kk dogs gave a wrong verdict. In this case we have kk possible candidates for the fake coin. We can find the fake coin using the last dog and ss tests using binary search.

It follows that no more than k+s+2k + s + 2 tests are needed. \square

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.