You are given 12 identical-looking weights, and an old-fashioned pair of balance scales. Either side of the scales is large enough to hold up to 12 weights.
Now, eleven of the weights are indeed identical, but one is different from the rest - either heavier or lighter, but you do not know which.
Your task is to use the balance scales to discover (a) which of the weights is the odd one out, and (b) whether it is heavier or lighter than the others.
Your challenge is to discover this information in the smallest possible number of weighings. What is the minimum number of weighings required? Can you explain why?
You can do it in 3 weighings, even with 13 weights, twelve of which are the same. In general, you can do it for (3^n-1)/2 weights in n weighings.
The three is there basically because any weighing has 3 possible outcomes: left higher, even, or right higher; and the 2 is there because the
outlier could be one of 2 things: heavier or lighter.
That formula seems right, but with 13 weights you won't be able to ensure that both sides of the scale have the same number of weights for all 3 weighings.