Stone Weighing Problem

I will refer to the to sides of the scale as + and -.

Lemma: Given n coins, where exactly one is fake, k uses of a scale, and a reference coin you know is genuine, the fake can be found if and only if n ≤ (3k + 1)/2. You can additionally determine whether the fake is heavy or light iff n ≤ (3k - 1)/2.

Proof: Given a strategy which succesfully find a fake, associate to each coin, c, a sequence s of +'s, -'s, and 0's, where the ith symbol indicates whether that coin was weighed on the + or - side of the scale on the ith wieghing, or not weighed at all. Let -s be the vector obtained from s by replacing each + with a - and vice versa. If c fake and heavy, then the results of the weighings will be given by s. If c is fake and light, they will be given by -s. Since the strategy distinguishes the fake coin, for any coins c1 and c2, their sequences s1 and s2 will sataisfy s1 ≠ s2 and s1 ≠ - s2.

At most one of the coins the coins is assigned the zero sequence s = 00...0, while all others are assigned a different pair of sequences s and -s. This means that 1+2(n-1) ≤ 3k, so that n ≤ (3k + 1)/2.

Conversely, if n ≤ (3k + 1)/2, then assign to each coin a distinct sequence which has an even number of +'s. The number of such sequence is (3k + 1)/2, so this is possible. On the ith weighing, weigh all coins whose ith symbol is + versus those with a -. The only problem is that each weighing puts (3k-1 + 1)/2 on the + side, but only (3k-1 - 1)/2 on the - side. To fix this, also put the reference coin on the - side.

If you need to determine whether the fake is heavy or light as well, then there are 2n possible situations you need to distinguish, and 3k weighing sequences you can observe, so 2n ≤ 3k , which since n is an integer implies n ≤ (3k - 1)/2. Conversely, if n satsifies this, then associate to each coins a nonzero sequence with an even number of +'s. If coin c is heavy, you will observe its sequence, and if c is light, you will observe its negative.

/r/mathriddles Thread Parent