[net.puzzle] the two weight coin problem

gjerawlins@watdaisy.UUCP (Gregory J.E. Rawlins) (04/19/85)

[David's article heavily edited]
>Suppose that all coins come in one of two different weights, and that
>you know what these weights are. [....]
>Then in 3 weighings determine the following numbers:
>        x1   +   x2    +    x3    +    x4
>                 x2    +    x3        
>        x1   +              x3
>Then the sum of the results of all of the weighings is
>       2x1   +  2x2    +   2x3    +    x4
>Under the assumption above, this must be a non-negative integer; if it
>is odd, then x  must be 1, otherwise it must be 0.
>David G. Cantor UUCP: ...!{ihnp4, randvax, sdcrdcf, ucbvax}!ucla-cs!dgc

	First, the sum of all the weighings should have a multiple of
3 not 2 for x3. Secondly even if all the multiples except the last 
are even then the reasoning will fail if both "heavy" and "light" 
weigh an even number of grams, since any linear combination of these 
weights will be even. If the weights are of distinct parity then
it would be possible to gather some extra information by such a
technique.
	greg.
-- 
Gregory J.E. Rawlins, Department of Computer Science, U. Waterloo
{allegra|clyde|linus|inhp4|decvax}!watmath!watdaisy!gjerawlins