Maybe I should have presented Puzzle #1 like this: BLC CPRE. :roll:
While you’re thinking about it, here’s my next puzzle.
#4
You have \(\displaystyle N\) balls, all identical in appearance except that one is much heavier than the others. What is the minimum number of times you need to weigh them on a scale balance to find the heavy one?
N must be an integer > 1, or the problem makes no sense.
\(\displaystyle Let\ W = the\ number\ of\ weighings\ required.\)
\(\displaystyle M\ an\ integer \ge 1\ and\ 2^M \le N < 2^{(M+1)} \implies 1 \le W \le M.\)
Procedure. If N is even, weigh N/2 against N/2. If one pan sinks, that pan contains the heavier ball. If N is odd, weigh (N - 1)/2 against
(N - 1)/2. If one pan sinks, that pan contains the heavier ball, but if the pans balance, the heavier ball is the one not weighed. Repeat as many times as needed. Because the number remaining to be tested is reduced by at least half on each test, the number of tests required cannot be as high as M + 1.
Edit: The problem is not that hard for those who have coded binary searches. The problem would be harder if it was not specified whether the ball that differs from the others is heavier or lighter. Since it is known that, with twelve balls, you can find the odd ball in at most three weighings, the answer may be the same as for this problem, but it makes my head ache to think of designing the algorithm to solve that for general N.