All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic
Missing Digit (Posted on 2007-06-04) Difficulty: 4 of 5
Susan was about to have her puzzle published as New Scientist's Enigma for the week when she discovered that one of the numbers she had pre-filled in was smudged beyond recognition. It looked like this:

"Fill in each of the empty spaces with a non-zero digit so that the rows, columns and diagonals add up to the totals shown:

20

1

15

3

8

7

20

X

29

20

22

15

15

9

please send the completed grid."

where the numbers at the bottom represent the sums of the columns in the 4x4 grid; those at the right represent the totals of the rows; the 9 at the lower right is the sum of the main diagonal and the 20 at the upper right represents the total of the diagonal going from lower left to upper right.

The x represents the smudged digit.

The puzzle Susan had in mind had only one solution. Can you find that solution?

  Submitted by Charlie    
Rating: 3.6667 (3 votes)
Solution: (Hide)
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.)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
Sol.Sachin2007-07-09 17:33:24
re(2): Solution (by hand)Guest2007-06-05 16:42:33
Some Thoughtsre: Solution (by hand)Dej Mar2007-06-05 00:28:31
Solution (by hand)Guest2007-06-04 19:10:42
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (4)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information