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

 Numerical Logic (Posted on 2013-05-06)
```
a    b    c    d    e    f
+----+----+----+----+----+----+
A |    |    |    |    |    |    |18
|    |    |    |    |    |    |
+----+----+----+----+----+----+
B |    |    |    |    |    |    |17
|    |    |    |    |    |    |
+----+----+----+----+----+----+
C |    |    |    |    |    |    |22
|    |    |    |    |    |    |
+----+----+----+----+----+----+
D |    |    |    |    |    |    |22
|    |    |    |    |    |    |
+----+----+----+----+----+----+
E |    |    |    |    |    |    |19
|    |    |    |    |    |    |
+----+----+----+----+----+----+
F |    |    |    |    |    |    |28
|    |    |    |    |    |    |
+----+----+----+----+----+----+
18   23   19   18   22   26```
The diagram above should contain the numbers one to six, six times each; the numbers next to the grid itself are the row and column number totals. Using the following 12 clues complete the diagram. (NOP means no other pairs of numbers.)

ACROSS

A: Contains two 1's, NOP, no 4's and the two numbers in cells Ae and Af total 11.

B: Contains two 2's, no 6's and NOP.

C: Contains two 4's, two adjacent 3's and the two numbers in cells Cc and Cd total 5.

D: Contains two 1's and two 5's.

E: Contains two 3's, NOP and no 5's.

F: Contains two 5's, two 6's, no 1's or 3's, the numbers in cells Fd to Ff run consecutively, and the numbers in cells Fa and Fb total 7.

DOWN

a: Contains two 1's and no 4's.

b: Contains two 4's, NOP, and the two numbers in cells Ab and Bb total 7.

c: Does not contain a 1, 3 or 4. Contains four 2's, three of which are adjacent. The two numbers in cells Ec and Fc total 8.

d: Contains two adjacent 1's, two 3's and NOP.

e: Contains two 5's, NOP and no 4's.

f: Contains three 4's but no 1's or 2's.

 No Solution Yet Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 First pencil and paper, then computer Comment 1 of 1

The farthest I got with pencil and paper was:

`    a    b    c    d    e    f  +----+----+----+----+----+----+A |    |    |    |    |  6 | 5  |18     (two in a box indicating  |  1 |  3 |  2 |  1 |  5 | 6  |       possible interchange with  +----+----+----+----+----+----+        the adjacent cell)B |    |    |    |    |    |    |17  |    |  4 |  2 |  1 |    |    |  +----+----+----+----+----+----+C |    |    |    |    |    |    |22  |  6 |  4 |  2 |  3 |  3 |  4 |  +----+----+----+----+----+----+D |    |    |    |    |    |    |22  |    |    |    |    |    |  4 |  +----+----+----+----+----+----+E |    |    |    |    |    |    |19  |    |    |  2 |    |    |  4 |  +----+----+----+----+----+----+F |   2|5   |    |    |    |    |28  |   5|2   |  6 |  4 |  5 |  6 |  +----+----+----+----+----+----+    18   23   19   18   22   26    `

with the blanks in row B being filled by 2, 3 and 5 in some order;
row D by 1, 1, 5, 5 and 6; row E by 1, 3, 3 and 6.

This was enough to make the remaining possibilities manageable for a computer program:

DECLARE SUB permute (a\$)
DATA 132100
DATA 042100
DATA 642334
DATA 000004
DATA 002004
DATA 006456
DIM grid(6, 6)
FOR row = 1 TO 6
FOR col = 1 TO 6
grid(row, col) = VAL(MID\$(r\$(row), col, 1))
NEXT
NEXT row
CLS
FOR Ae = 5 TO 6
grid(1, 5) = Ae: grid(1, 6) = 11 - Ae
rowB\$ = "235": hB\$ = rowB\$
DO
good = 1
IF RIGHT\$(rowB\$, 1) = "2" OR Ae = 5 AND MID\$(rowB\$, 2, 1) = "5" THEN good = 0
IF good THEN
grid(2, 1) = VAL(MID\$(rowB\$, 1, 1))
grid(2, 5) = VAL(MID\$(rowB\$, 2, 1))
grid(2, 6) = VAL(MID\$(rowB\$, 3, 1))

rowD\$ = "11556": hD\$ = rowD\$
DO
good = 1
IF (Ae = 5 OR grid(2, 5) = 5) AND MID\$(rowD\$, 5, 1) = "5" THEN good = 0
IF good THEN
grid(4, 1) = VAL(MID\$(rowD\$, 1, 1))
grid(4, 2) = VAL(MID\$(rowD\$, 2, 1))
grid(4, 3) = VAL(MID\$(rowD\$, 3, 1))
grid(4, 4) = VAL(MID\$(rowD\$, 4, 1))
grid(4, 5) = VAL(MID\$(rowD\$, 5, 1))

rowE\$ = "1336": hE\$ = rowE\$
DO
good = 1
IF grid(4, 1) = 1 AND MID\$(rowE\$, 1, 1) = "1" THEN good = 0
IF good THEN
grid(5, 1) = VAL(MID\$(rowE\$, 1, 1))
grid(5, 2) = VAL(MID\$(rowE\$, 2, 1))
grid(5, 4) = VAL(MID\$(rowE\$, 3, 1))
grid(5, 5) = VAL(MID\$(rowE\$, 4, 1))

FOR Fa = 2 TO 5 STEP 3
grid(6, 1) = Fa
grid(6, 2) = 7 - Fa
good = 1
IF grid(4, 2) = 5 AND grid(6, 2) = 5 THEN good = 0
IF grid(4, 1) <> 1 AND grid(5, 1) <> 1 THEN good = 0
IF grid(4, 4) = 1 OR grid(5, 4) = 1 THEN good = 0
IF grid(4, 4) <> 3 AND grid(5, 4) <> 3 THEN good = 0
FOR row = 1 TO 6
IF grid(row, 3) = 1 THEN good = 0
IF grid(row, 3) = 3 THEN good = 0
IF grid(row, 3) = 4 THEN good = 0
NEXT
REDIM nct(6)
FOR row = 1 TO 6
nct(grid(row, 5)) = nct(grid(row, 5)) + 1
NEXT
IF nct(1) <> 1 OR nct(2) <> 1 OR nct(3) <> 1 OR nct(6) <> 1 THEN good = 0
REDIM nct(6)
FOR row = 1 TO 6
nct(grid(row, 2)) = nct(grid(row, 2)) + 1
NEXT
IF nct(1) > 1 OR nct(2) > 1 OR nct(3) <> 1 OR nct(5) <> 1 OR nct(6) <> 1 THEN good = 0
sum5 = (grid(1, 5) = 5) + (grid(2, 5) = 5) + (grid(3, 5) = 5) + (grid(4, 5) = 5) + (grid(5, 5) = 5) + (grid(6, 5) = 5)
IF ABS(sum5) <> 2 THEN good = 0
REDIM cct(6)
FOR row = 1 TO 6
FOR col = 1 TO 6
cct(col) = cct(col) + grid(row, col)
NEXT
NEXT
IF cct(1) <> 18 OR cct(2) <> 23 OR cct(3) <> 19 OR cct(4) <> 18 OR cct(5) <> 22 OR cct(6) <> 26 THEN good = 0
IF good THEN
FOR row = 1 TO 6
FOR col = 1 TO 6
LOCATE (ct \ 4) * 9 + 1 + row, (ct MOD 4) * 15 + 1 + col * 2
PRINT grid(row, col);
NEXT:
NEXT:
ct = ct + 1
END IF
NEXT Fa

END IF
permute rowE\$
LOOP UNTIL rowE\$ = hE\$

END IF
permute rowD\$
LOOP UNTIL rowD\$ = hD\$

END IF
permute rowB\$
LOOP UNTIL rowB\$ = hB\$
NEXT Ae

which finds

1 3 2 1 6 5
5 4 2 1 2 3
6 4 2 3 3 4
1 1 5 6 5 4
3 6 2 3 1 4
2 5 6 4 5 6

The row totals were not needed in either the analysis or the program. I almost forgot the totals altogether, but without consideration of the bottom (column) totals, there were 8 solutions.

 Posted by Charlie on 2013-05-06 17:10:00

 Search: Search body:
Forums (0)