3 ms·
I like how simple the deciding process becomes but I’m afraid there might be a problem. This solution works when the odd ball is always heavier, but it could e
by expensive_news 4y ago
I like how simple the deciding process becomes but I’m afraid there might be a problem. This solution works when the odd ball is always heavier, but it could either be heavier or lighter, and you don’t know which.
For example, say ball 7 is heavier. From top to bottom, the weightings would result in: 120. However, if ball 19 was lighter you would obtain the same weighing sequence 120.
I believe that there is another condition that must be imposed on the matrix - namely, the column must be unique, but also -1*column must not be another column.
I created the following matrix, which can identify the ball and if it is heavier or lighter. However, this does not line up neatly, and would require a table to decode the output of the weighings.
-1 -1 -1 -1 1 1 1 1 0 0 0 0
-1 -1 0 1 0 -1 -1 0 1 1 0 1
0 1 -1 0 -1 1 -1 0 1 0 1 -1
For example, the sequence 001 means the first ball is heavier. The sequence 221 means the first ball is lighter. Etc.
- deleted 4y ago[deleted]
- SideQuark 4y agoYou might be right. I didn't check as carefully as when I did it decades ago. This is all from memory, and the matrix above I sketched out over dinner by hand :) The idea works. When I solved it before I cider it up to test
- thaumasiotes 4y agoI don't understand how SideQuark is distinguishing negative results from positive results. But using the representation he suggested to me sidethread, it isn't possible to have the result be positive whenever the misweighted ball is heavy and negative whenever it's light.