Without the missing digit, there would be 25 solutions:
1 5 7 2 1 5 6 3 1 5 6 3 1 6 6 2 1 4 7 3
2 1 2 3 3 1 1 3 2 1 2 3 2 1 2 3 2 2 1 3
8 7 1 4 7 7 2 4 9 7 1 3 8 7 1 4 8 7 1 4
9 9 5 6 9 9 6 5 8 9 6 6 9 8 6 6 9 9 6 5
1 6 5 3 1 4 6 4 1 5 6 3 1 5 5 4 1 6 5 3
2 1 2 3 2 2 1 3 2 2 1 3 3 1 1 3 3 1 1 3
9 7 1 3 9 7 1 3 8 7 1 4 8 7 2 3 7 7 2 4
8 8 7 6 8 9 7 5 9 8 7 5 8 9 7 5 9 8 7 5
1 7 5 2 1 5 5 4 1 8 4 2 1 7 4 3 1 5 4 5
2 1 2 3 2 2 1 3 2 1 2 3 2 1 2 3 3 1 1 3
8 7 1 4 9 7 1 3 8 7 1 4 9 7 1 3 9 7 2 2
9 7 7 6 8 8 8 5 9 6 8 6 8 7 8 6 7 9 8 5
1 6 5 3 1 6 4 4 1 7 4 3 1 7 3 4 1 8 3 3
2 2 1 3 3 1 1 3 3 1 1 3 3 1 1 3 3 1 1 3
8 7 1 4 8 7 2 3 7 7 2 4 8 7 2 3 7 7 2 4
9 7 8 5 8 8 8 5 9 7 8 5 8 7 9 5 9 6 9 5
1 6 4 4 1 7 4 3 1 8 3 3 1 9 3 2 1 6 3 5
2 2 1 3 2 2 1 3 2 1 2 3 2 1 2 3 3 1 1 3
9 7 1 3 8 7 1 4 9 7 1 3 8 7 1 4 9 7 2 2
8 7 9 5 9 6 9 5 8 6 9 6 9 5 9 6 7 8 9 5
Note that several solutions have a 6 in the smudge position. The same holds true for 7, 8 and 9. The only number in that position that would make the solution unique is 5, so the sought solution is the first one shown above.
' 20
'
' a b c d 1 b c d 15
' e f g h e f g 3 8
' i j k l i 7 k l 20
' m n o p m n o p 29
' 20 22 15 15
' 9
a = 1: j = 7: h = 3
FOR e = 1 TO 3
FOR f = 1 TO 4 - e
g = 5 - e - f
FOR k = 1 TO 7 - f
p = 8 - f - k
FOR c = 1 TO 14 - g - k
o = 15 - c - g - k
FOR d = 1 TO 13 - c
b = 14 - c - d
l = 12 - d - p
i = 13 - k - l
m = 13 - d - g
n = 29 - m - o - p
IF a + e + i + m = 20 AND b + f + j + n = 22 AND c + g + k + o = 15 AND d + h + l + p = 15 THEN
IF a + b + c + d = 15 AND e + f + g + h = 8 AND i + j + k + l = 20 AND m + n + o + p = 29 THEN
IF m + j + g + d = 20 AND a + f + k + p = 9 THEN
if a>0 and b>0 and c>0 and d>0 and e>0 and f>0 and g>0 and h>0 and i>0 and j>0 and k>0
and l>0 and m>0 and n>0 and o>0 and p>0 then
if a<10 and b<10 and c<10 and d<10 and e<10 and f<10 and g<10 and h<10 and i<10 and j<10 and k<10
and l<10 and m<10 and n<10 and o<10 and p<10 then
PRINT a; b; c; d, e; f; g; h, i; j; k; l, m; n; o; p
ct = ct + 1
endif
endif
END IF
END IF
END IF
NEXT d
NEXT c
NEXT k
NEXT f
NEXT e
PRINT ct
The original output from the program was one line per solution, and it was then sorted by the column representing the missing digit.
first row second row third row fourth row
x
|
V
1 5 7 2 2 1 2 3 8 7 1 4 9 9 5 6
1 5 6 3 3 1 1 3 7 7 2 4 9 9 6 5
1 5 6 3 2 1 2 3 9 7 1 3 8 9 6 6
1 6 6 2 2 1 2 3 8 7 1 4 9 8 6 6
1 4 7 3 2 2 1 3 8 7 1 4 9 9 6 5
1 6 5 3 2 1 2 3 9 7 1 3 8 8 7 6
1 4 6 4 2 2 1 3 9 7 1 3 8 9 7 5
1 5 6 3 2 2 1 3 8 7 1 4 9 8 7 5
1 5 5 4 3 1 1 3 8 7 2 3 8 9 7 5
1 6 5 3 3 1 1 3 7 7 2 4 9 8 7 5
1 7 5 2 2 1 2 3 8 7 1 4 9 7 7 6
1 5 5 4 2 2 1 3 9 7 1 3 8 8 8 5
1 8 4 2 2 1 2 3 8 7 1 4 9 6 8 6
1 7 4 3 2 1 2 3 9 7 1 3 8 7 8 6
1 5 4 5 3 1 1 3 9 7 2 2 7 9 8 5
1 6 5 3 2 2 1 3 8 7 1 4 9 7 8 5
1 6 4 4 3 1 1 3 8 7 2 3 8 8 8 5
1 7 4 3 3 1 1 3 7 7 2 4 9 7 8 5
1 7 3 4 3 1 1 3 8 7 2 3 8 7 9 5
1 8 3 3 3 1 1 3 7 7 2 4 9 6 9 5
1 6 4 4 2 2 1 3 9 7 1 3 8 7 9 5
1 7 4 3 2 2 1 3 8 7 1 4 9 6 9 5
1 8 3 3 2 1 2 3 9 7 1 3 8 6 9 6
1 9 3 2 2 1 2 3 8 7 1 4 9 5 9 6
1 6 3 5 3 1 1 3 9 7 2 2 7 8 9 5
There are more than one solution when the smudged digit is 6, 7, 8 or 9, but only one solution when the missing digit is 5, so that must be the solution:
1 5 7 2
2 1 2 3
8 7 1 4
9 9 5 6
From "The Missing Link", Enigma No. 1441, by Susan Denham, New Scientist, 5 May 2007. (Yes, including the stuff about the smudged digit.)
|