---
title: "Cryptarithmetic ONE+ONE+TWO=FOUR"
subject: "Artificial Intelligence"
chapter: 2
key: "semester_6/artificial_intelligence:cryptarithmetic-one-one-two-four"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/cryptarithmetic-one-one-two-four
site: BCT Engineering
---

# Cryptarithmetic ONE+ONE+TWO=FOUR

Artificial Intelligence · Chapter 2: Problem Solving

- Asked in: 2071 Magh, 7 marks; 2073 Bhadra, 7 marks (asked 2 times)
- Video: [Cryptarithmetic  puzzle in Artificial Intelligence|| TWO +TWO =FOUR](https://www.youtube.com/watch?v=zVBoRxpvZzk) — Anchal Soni lectures 
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/cryptarithmetic-one-one-two-four
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-2

## Question

Solve the following cryptarithmetic problem with necessary steps (each letter is assigned a unique digit 0-9): ONE + ONE + TWO = FOUR.

## Short answer

Treat as a CSP: assign distinct digits with leading O, T, F non-zero and column carries. One valid solution is O=6, N=4, E=2, T=3, W=8, F=1, U=7, R=0 (642+642+386=1670).

## Answer

This is a CSP with variables O, N, E, T, W, F, U, R, domain {0..9}, all values different, and leading letters O, T, F non-zero.

```text
      O N E
      O N E
    + T W O
    -------
    F O U R
```

#### Column equations (c1, c2, c3 = carries)
1. E + E + O = R + 10·c1
2. N + N + W + c1 = U + 10·c2
3. O + O + T + c2 = O + 10·c3  ⇒  O + T + c2 = 10·c3
4. F = c3

#### Reasoning
- **F = 1:** F is only a carry. O + T + c2 ≤ 9 + 8 + 2 = 19, so c3 ≤ 1, and F ≠ 0 means F = 1.
- Then O + T + c2 = 10, so T = 10 − O − c2.
- Choose O = 6. Column 1 becomes 2E + 6 = R + 10·c1.
  - Try E = 2: 4 + 6 = 10 ⇒ **R = 0, c1 = 1**.
- Column 2 can give a carry c2 of 0, 1 or 2; try c2 = 1. Then T = 10 − 6 − 1 = 3.
- Column 2: 2N + W + 1 = U + 10 (c2 = 1). Choose N = 4: 8 + W + 1 = U + 10 ⇒ U = W − 1. Take **W = 8, U = 7** (digits 7 and 8 are still unused).
- Check that all digits differ: O = 6, N = 4, E = 2, T = 3, W = 8, F = 1, U = 7, R = 0. Yes, all eight are different.

#### Verification
```text
      6 4 2
      6 4 2
    + 3 8 6
    -------
    1 6 7 0
```
642 + 642 + 386 = 1670 ✓

**Answer: O = 6, N = 4, E = 2, T = 3, W = 8, F = 1, U = 7, R = 0** (642 + 642 + 386 = 1670).

*Note:* F = 1 and O + T + c2 = 10 hold in every solution, but the other letters are not forced uniquely. A computer search finds 107 valid assignments (distinct digits, no leading zero). Other correct answers are 392 + 392 + 563 = 1347, 428 + 428 + 574 = 1430 and 658 + 658 + 376 = 1692. Any assignment that satisfies all constraints is correct.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why must F = 1 in ONE + ONE + TWO = FOUR?
   A. F is the first letter alphabetically
   B. 1 is the only free digit
   C. F is only a carry from the third column, at most 1, and non-zero
   D. T = 1
   Answer: C. O + T + c2 <= 19 so the carry is at most 1, and F as a leading letter cannot be 0. (Key point: Why F = 1)

2. What does column 3 (O + O + T + c2 = O + 10*c3) simplify to?
   A. O = T
   B. T = c2
   C. O + T = 9
   D. O + T + c2 = 10*c3 = 10
   Answer: D. Cancelling O gives O + T + c2 = 10 once c3 = 1. (Key point: Column 3 simplification)

3. With O = 6 and E = 2, what is R?
   A. 0, with carry 1
   B. 4, with carry 0
   C. 6, with carry 1
   D. 1, with carry 0
   Answer: A. 2*2 + 6 = 10, so R = 0 and the carry is 1. (Key point: Using column 1)

4. Is the solution unique?
   A. Yes, exactly one solution
   B. No, many valid assignments exist and any satisfying all constraints is correct
   C. No solution exists
   D. Only two solutions exist
   Answer: B. A computer search finds 107 valid assignments. (Key point: Uniqueness)

## Related in Artificial Intelligence

- [Cryptarithmetic LOGIC+LOGIC=PROLOG](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Acryptarithmetic-logic-prolog) — Artificial Intelligence, chapter 2, asked 3×
- [Cryptarithmetic RIGHT+RIGHT=WRONG](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Acryptarithmetic-right-right-wrong) — Artificial Intelligence, chapter 2, asked 3×
- [Cryptarithmetic WRONG+WRONG=RIGHT](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Acryptarithmetic-wrong-wrong-right) — Artificial Intelligence, chapter 2
- [Problem space; BASE+BALL=GAMES](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aproblem-space-base-ball-games) — Artificial Intelligence, chapter 2

## Related in other subjects

- [Poker test, 1000 four-digit numbers (2070 Magh)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2070-magh) — Simulation and Modeling, chapter 6, asked 3×
- [Poker test, 1000 four-digit numbers (2069)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2069-bhadra) — Simulation and Modeling, chapter 6, asked 3×
- [Poker test, 1000 four-digit numbers (2073)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2073-magh) — Simulation and Modeling, chapter 6
- [Poker test, 1000 four-digit numbers (2072 Magh)](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Apoker-test-numerical-2072-magh) — Simulation and Modeling, chapter 6
