Find a changed number with two checks

An original arithmetic puzzle. This is not Reed–Solomon coding or a QR decoder. Assume the check totals are intact, the three slots stay in order and exactly one data value changed.

Stored and received information
ItemValue
Original ordinary total13
Original weighted total: slot 1 + 2×slot 2 + 3×slot 324
Received values, in order4, 9, 2
  1. Calculate the received ordinary total. Subtract 13 to find its change.
  2. Calculate the received weighted total. Subtract 24 to find its change.
  3. Divide the weighted change by the ordinary change. Which slot does that identify under the single-error assumption?
  4. Correct that slot and check both stored totals.
Check the result

The received total is 15, a change of +2. The weighted total is 28, a change of +4. The ratio 4÷2=2 identifies slot 2 under the stated assumptions. Subtract 2 from 9 to restore 7. The values 4, 7, 2 satisfy both totals.

Break the assumption

Now receive 6, 7, 4. Both outer values changed. The ordinary total is 17 and the weighted total is 32. Their changes are +4 and +8, which misleadingly suggest slot 2. Subtracting 4 there yields 6, 3, 4: both checks pass, but the original 4, 7, 2 has not been recovered.

A correction method has a designed error model. Passing these two checks is not proof against arbitrary multiple changes or damaged checks.

Notes remain in this page while it is open; print to retain them. Nothing is sent.

Explore Incoprea