6
$\begingroup$

The letters have distinct integer values from 1 to 9. The totals vertically and horizontally have been given, for example: Horizontally, (D+C+A+H)=21 and vertically, (D+B+F+C)=20. Solve all the values.

 D  C  A  H  21
 B  J  F  D  18
 F  G  H  B  23
 C  A  J  E  14
20 18 12 26
$\endgroup$
0

3 Answers 3

6
$\begingroup$

Deduction process

  1. The 3rd column is $A+F+H+J=12$, so these four letters must be either $1,2,3,6$ or $1,2,4,5$ in some order.

  2. By comparing the 3rd column and 4th row, we know $C+E=F+H+2$

  3. By comparing the 3rd column and 2nd row, we know $B+D=A+H+6$.

  4. By comparing the 2nd column and 4th row, we know $G=E+4$.

  5. Substituting the result of 4 above into the 4th column, we find $H+D+B+G=26+4=30$, so $H,D,B,G$ must be $9,8,7,6$ in some order. Putting this together with the result of 1 above, we get that

    $H=6$ and $A,F,J$ are $1,2,3$ in some order.

  6. By elimination, the remaining letters $C,E$ must be

    $4,5$ in some order. By the result of 4 above, $G$ must be $8$ or $9$.

  7. The result of 2 above now becomes

    $9=F+8$, i.e. $F=1$.

  8. The result of 3 above now becomes $B+D=A+12$. The right-hand side must be one of $13,14,15$, while $B,D$ are two of $9,8,7$. So

    $A=3$ and $B,D$ are $8,7$ in some order. By elimination, $J=2$ and $G=9$. By the result of 4, $E=5$ and therefore $C=4$.

  9. Finally, the 1st row is $D+C+A+H=21$, so

    $D=8$ and $B=7$.

Final solution

  • $A=3,B=7,C=4,D=8,E=5,F=1,G=9,H=6,J=2$

  • $F=1,J=2,A=3,C=4,E=5,H=6,B=7,D=8,G=9$

  • 8 4 3 6 21
    7 2 1 8 18
    1 9 6 7 23
    4 3 2 5 14
    20 18 12 26

$\endgroup$
5
  • $\begingroup$ Just a few minutes behind you! Can’t you go slower? 😁 $\endgroup$ Dec 15, 2017 at 15:28
  • $\begingroup$ Excellent and insightful deductions! $\endgroup$ Dec 16, 2017 at 0:15
  • $\begingroup$ After posting, I've re-read your solution and think I might have just reproduced it in a different form. Can you please have a look and check? If so, I'll delete mine. Yours is far more elegant in any case. $\endgroup$
    – Lawrence
    Dec 16, 2017 at 6:38
  • 1
    $\begingroup$ @Lawrence I think yours is more elegant, actually :-) Do consider undeleting! $\endgroup$ Dec 16, 2017 at 12:14
  • $\begingroup$ @Randal'Thor With that encouragement - done! $\endgroup$
    – Lawrence
    Dec 16, 2017 at 12:29
4
$\begingroup$

Well, since @Rand al’Thor has told me that it won’t harm me, here’s my answer.


First, let’s simplify this -

      1  2  3  4
5     D  C  A  H  21 
6     B  J  F  D  18
7     F  G  H  B  23
8     C  A  J  E  14
     20 18 12 26

Now that’s done, first

Equating 8 and 2 we get -

E + 4 = G (1)

1 and 6 gives us -

C = J + 2 (2)

With 1 and 5 we have -

1 + B + F = A + H (3)

And 3 and 6 gives us -

B + D = A + H + 6 (4)

Putting (3) and (4) together proves that -

F + 7 = D (5)

2 and 6 with (5) make -

C + G + A = B + 2F + 7 (6)

Then 3 and 4 with (6) give -

F + 4 = E (7)

(1) and (7) tell us that

E can’t be 1,2,3,4,6,7,8,9 or E is 5

Using that at some of our formulae we get

D is 8, F is 1 and G is 9

Let’s fill in these numbers in the places of there respective letters. This eliminates these numbers from being the values of the other letters. Now 2 and 6 give us

B = C + A

Thus eliminating these possibilities for B -

1,2,3,4,5,8,9

2 and 5 give

J + 4 = H

1 and 3 give

C + 2 = H (8)

7 shows

H + B = 13

Adding B to (8) makes

B + C = 11

And putting (2) in there makes

B + J = 9

Now I did some assumptions (one reason why @Rand al’Thor’s answer is better than mine) and got these answers which worked

A is 3, B is 7, C is 4, H is 6 and J is 2


Finally,

A = 3

B = 7

C = 4

D = 8

E = 5

F = 1

G = 9

H = 6

J = 2

$\endgroup$
3
  • $\begingroup$ Well, after an hour it's no longer clear that it was an almost-at-the-same-time answer :-P Still, +1 for a nice alternative method. $\endgroup$ Dec 15, 2017 at 16:40
  • $\begingroup$ @Randal'Thor I solved it with pen and paper at the same time as you, but writing and posting the answer took more time ( I also had to go for my dinner) 😁. $\endgroup$ Dec 15, 2017 at 16:42
  • $\begingroup$ @Randal'Thor I was just looking through the paper on which I did my calculations and realised that another reason for my late post was the difficulty in finding out which calculations led to what formula. $\endgroup$ Dec 16, 2017 at 6:34
1
$\begingroup$

Acknowledgement: this solution is motivated by Rand al'Thor's sum constraints. E.g. if a row sums to 10 and the letters are unique digits, the 4 letters must be $1234$ (dropping commas for convenience; also, the order of mapping is left undetermined in this notation).

The main feature of this solution is the use of the sum constraints as its primary deductive tool.


Observation: C3, R4 and C2 all include A and J. Further, R4 and C2 differ by only 1 letter.

C3 (column 3) maps $AFHJ$ to one of $\{1236,1245\}$.

R4 (row 4) maps $ACEJ$ to one of $\{1238, 1247, 1256, 1346, 2345\}$.

$AJ$ is common to C3 and R4, and the remaining letters $FHCE$ are distinct. Comparing the mappings induced by C3 and R4 then, we cannot have $AFHJ = 1236, ACEJ = 1238$ because then $3$ would be assigned to 2 different letters.

A quick check of the 2x5 possibilities leaves us with 4 cases, denoted $Kn$:

$$ K1: AFHJ=1236, ACEJ=1247 \implies AJ=12 \\ K2: AFHJ=1236, ACEJ=2345 \implies AJ=23 \\ K3: AFHJ=1245, ACEJ=1238 \implies AJ=12 \\ K4: AFHJ=1245, ACEJ=1346 \implies AJ=14 $$

Now consider C2. We need to find mappings that preserve the $AJ$ mappings from before, and have a third common digit between R4 and C2 (because $C$ is also common to those two quartets), while all the other digits must be distinct.

So C2's $ACGJ$ must map to one of $\{1278 (K1,K3), 1467 (K4), 2349 (K2), 2358 (K2)\}$.

Say $ACGJ = 1278$ with case $K3$. We have $AJ=12$, and $C$ is remaining digit common to R4 and C2, so $C=8$ and hence $E=3,G=7$, leaving $FH=45$. Plugging these values into R3, though, gives us $B=3=G$, which violates the unique letter-mapping constraint.

Repeating this exercise eliminates all cases except the two $K2$ possibilities. In each case, we have mapped 8 of the 9 digits, so $D$ can only be the respective case's remaining digit. R2 eliminates the case with $B=9$, so the only possibility left is: $$AJ=23, C=4, E=5, G=9, FH=16, B=7, D=8$$

Use R1 to disambiguate: $A+H=9$, so the final solution is: $$A=3, J=2, C=4, E=5, G=9, H=6, F=1, B=7, D=8$$

In alphabetical order, $(A,B,C,D,E,F,G,H,J) = (3,7,4,8,5,1,9,6,2)$.

This agrees with the solutions of both Rand al'Thor and Napoleon of Puzzling. QED.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.