Suppose we are given 5 pairs of balls in 5 colours, such that all the balls have the same weight.
Now we are told that someone has put two 1 gram diamonds in one of the 5 pairs of balls, so that now there is exactly one pair of balls having same colour, where the two balls each are 1 gram heavier than the other balls.
You are given a scale with two pans, marked as the 'left pan' and the 'right pan', and a digital display which shows the signed difference in the weights (in grams) between the 'left pan' and the 'right pan'.
So if we put 3 grams in the 'left pan' and 5 grams in the 'right pan' it will show -2 grams, and if we swap the weights it will show +2 grams.
You can put as many balls into each of the pan as you like.
What is the minimum number of weighings that you need to take in order to determine the colour of the balls containing the diamonds?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let us denote the colours as 1,2,3,4,5.
Then we will take (1,2,2) in the 'left pan' and (3,4,4) in the 'right pan'.
If we get 0 it means that all the balls in the 'left pan' have the same weight as those in the 'right pan' so the diamonds must be in the balls not present here, namely balls coloured 5.
If we get 1 it means there is one ball in the 'left pan' which is heavier, so it must be 1.
If we get 2 it means that there are two balls in the 'left pan' which are heavier, so it must be 2.
Similarly -1 and -2 would simply mean that 3 and 4 are respectively the heavier balls.
Thus we can determine the heavier set of balls in one weighing only.