← All 40 challenges

SOLO-016 · Cryptarithm

EXPERT

The Second Addition

Determine the value of each of the ten letters, then write the two additions in digits.

This page contains the solution.

The answer

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

1995 + 5523 = 7518

5748 + 8657 = 14405

The reasoning

  1. Each column carries a hold of 0 or 1. For an addition of two numbers to four digits, a possible fifth position of the result is a final hold, so is 1.
  2. Write a column equation, from right to left: first-term digit + second-time digit + incoming hold = result digit + 10 × outgoing hold. The same letter must keep its value in both additions.
  3. Addition 1, column 1: G + E + r1_0 = F + 10 × r1_1.
  4. Addition 1, column 2: B + J + r1_1 = D + 10 × r1_2.
  5. Addition 1, column 3: B + G + r1_2 = G + 10 × r1_3.
  6. Addition 1, column 4: D + G + r1_3 = C + 10 × r1_4.
  7. Addition 2, column 1: F + C + r2_0 = G + 10 × r2_1.
  8. Addition 2, column 2: I + G + r2_1 = A + 10 × r2_2.
  9. Addition 2, column 3: C + H + r2_2 = I + 10 × r2_3.
  10. Addition 2, column 4: G + F + r2_3 = I + 10 × r2_4.
  11. In these equations, r1_0 and r2_0 are zero. Each other retention is 0 or 1; the same letter always refers to the same number.
  12. Explore possible pairs of digits in the column of units, calculate the restraint and bar any branch giving the same number to two different letters. Repeat for tens, hundreds and thousands; a letter already affected no longer receives any new choice.
  13. The first addition admits 39 partial assignments respecting these constraints. After assigning letters still absent to free numbers, 234 substitutions are checked against the second addition.
  14. Crossing the two additions is essential: the entire substitution must be transported, not separately resolve each line and then juxtapose two incompatible responses.
  15. Addition 1: DBBG + GGJE = CGDF, i.e. 1995 + 5523 = 7518.
  16. Column 1 from the right: 5 + 3 + carry 0 = 8. Write 8 and carry 0.
  17. Column 2 from the right: 9 + 2 + carry 0 = 11. Write 1 and carry 1.
  18. Column 3 from the right: 9 + 5 + carry 1 = 15. Write 5 and carry 1.
  19. Column 4 from the right: 1 + 5 + carry 1 = 7. Write 7 and carry 0.
  20. Addition 2: GCIF + FHGC = DIIAG, 5748 + 8657 = 14405.
  21. Column 1 from the right: 8 + 7 + carry 0 = 15. Write 5 and carry 1.
  22. Column 2 from the right: 4 + 5 + carry 1 = 10. Write 0 and carry 1.
  23. Column 3 from the right: 7 + 6 + carry 1 = 14. Write 4 and carry 1.
  24. Column 4 from the right: 5 + 8 + carry 1 = 14. Write 4 and carry 1.
  25. False track of the first addition: B=9, C=6, D=4, E=2, F=3, G=1, J=5. It does not extend into any substitution that satisfies the second addition; keeping only an exact first sum would therefore be insufficient.
  26. The solver lists all the deductions and all the injection assignments compatible with the first addition, then tests the second without approximation. Only one complete substitution remains.

Common mistakes and false leads

Show the full search proof

Each branch is independent. The tree records the deductions and contradictions found with the method used here.

{
  "partial_mappings": [
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 2,
        "F": 3,
        "B": 9,
        "J": 5,
        "D": 4,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 2,
        "F": 3,
        "B": 9,
        "J": 6,
        "D": 5,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 2,
        "F": 3,
        "B": 9,
        "J": 7,
        "D": 6,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 3,
        "F": 4,
        "B": 9,
        "J": 6,
        "D": 5,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 3,
        "F": 4,
        "B": 9,
        "J": 7,
        "D": 6,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 4,
        "F": 5,
        "B": 9,
        "J": 7,
        "D": 6,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 5,
        "F": 6,
        "B": 9,
        "J": 3,
        "D": 2,
        "C": 4
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 6,
        "F": 7,
        "B": 9,
        "J": 3,
        "D": 2,
        "C": 4
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 6,
        "F": 7,
        "B": 9,
        "J": 4,
        "D": 3,
        "C": 5
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 7,
        "F": 8,
        "B": 9,
        "J": 3,
        "D": 2,
        "C": 4
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 7,
        "F": 8,
        "B": 9,
        "J": 4,
        "D": 3,
        "C": 5
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 1,
        "E": 7,
        "F": 8,
        "B": 9,
        "J": 5,
        "D": 4,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 1,
        "F": 3,
        "B": 9,
        "J": 5,
        "D": 4,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 1,
        "F": 3,
        "B": 9,
        "J": 6,
        "D": 5,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 5,
        "F": 7,
        "B": 9,
        "J": 4,
        "D": 3,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 6,
        "F": 8,
        "B": 9,
        "J": 5,
        "D": 4,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 9,
        "F": 1,
        "B": 0,
        "J": 3,
        "D": 4,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 9,
        "F": 1,
        "B": 0,
        "J": 4,
        "D": 5,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 2,
        "E": 9,
        "F": 1,
        "B": 0,
        "J": 5,
        "D": 6,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 3,
        "E": 4,
        "F": 7,
        "B": 9,
        "J": 2,
        "D": 1,
        "C": 5
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 3,
        "E": 8,
        "F": 1,
        "B": 0,
        "J": 5,
        "D": 6,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 3,
        "E": 9,
        "F": 2,
        "B": 0,
        "J": 4,
        "D": 5,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 4,
        "E": 1,
        "F": 5,
        "B": 9,
        "J": 3,
        "D": 2,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 4,
        "E": 3,
        "F": 7,
        "B": 9,
        "J": 2,
        "D": 1,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 4,
        "E": 9,
        "F": 3,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 6
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 1,
        "F": 6,
        "B": 9,
        "J": 3,
        "D": 2,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 3,
        "F": 8,
        "B": 9,
        "J": 2,
        "D": 1,
        "C": 7
      },
      "extensions_satisfying_second": 1
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 6,
        "F": 1,
        "B": 0,
        "J": 2,
        "D": 3,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 6,
        "F": 1,
        "B": 0,
        "J": 3,
        "D": 4,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 7,
        "F": 2,
        "B": 0,
        "J": 3,
        "D": 4,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 8,
        "F": 3,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 9,
        "F": 4,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 7
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 5,
        "E": 9,
        "F": 4,
        "B": 0,
        "J": 2,
        "D": 3,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 6,
        "E": 5,
        "F": 1,
        "B": 0,
        "J": 2,
        "D": 3,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 6,
        "E": 7,
        "F": 3,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 6,
        "E": 8,
        "F": 4,
        "B": 0,
        "J": 2,
        "D": 3,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 6,
        "E": 9,
        "F": 5,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 8
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 7,
        "E": 6,
        "F": 3,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 9
      },
      "extensions_satisfying_second": 0
    },
    {
      "first_addition_mapping": {
        "G": 7,
        "E": 8,
        "F": 5,
        "B": 0,
        "J": 1,
        "D": 2,
        "C": 9
      },
      "extensions_satisfying_second": 0
    }
  ]
}
How we verified this answer

Complete search by columns, binary deductions, rotation of unallocated numbers and arithmetic control of both equals.

{
  "first_equation_solutions": 39,
  "complete_substitutions_checked": 234,
  "column_nodes": 1544,
  "solutions": 1
}

Ten letters and two coupled additions require a combination of retention, injectivity and transport of constraints between equations. A first correct equation leaves several assignments: resolution requires a table of deductions and a systematic exploration, not a simple operation to complete.

← Return to puzzle SOLO-016