- 2070 Bhadra · 5+3 marks
Cryptarithmetic WRONG+WRONG=RIGHT
Short answer
Solve as a CSP with column carries. A valid assignment is W=3, R=7, O=0, N=8, G=1, I=4, H=6, T=2 (37081+37081=74162).
Solve the following crypto-arithmetic problem, where different letters denote different integers and identical letters denote the same integer: WRONG + WRONG = RIGHT. Explain the steps that you have followed.
Treat it as a CSP: variables W, R, O, N, G, I, H, T; domain 0-9; all different; W and R (leading letters) not zero.
W R O N G
+ W R O N G
-----------
R I G H T
No carry goes out of the leftmost column, as both numbers have 5 digits.
Column equations (c1...c4 carries)
- G + G = T + 10·c1
- N + N + c1 = H + 10·c2
- O + O + c2 = G + 10·c3
- R + R + c3 = I + 10·c4
- W + W + c4 = R
Steps followed
- Column 5: R = 2W + c4, so R ≥ 2 and R is even when c4 = 0; also R ≤ 9 means W ≤ 4.
- Column 1: T = 2G mod 10, so T is even.
- Pick W = 3, c4 = 1 ⇒ R = 2·3 + 1 = 7.
- Column 4: 7 + 7 + c3 = I + 10 (c4 = 1) ⇒ I = 4 + c3. Take c3 = 0 ⇒ I = 4.
- Column 3: O + O + c2 = G (c3 = 0). Take c2 = 1: G is odd; choose O = 0, G = 1.
- Column 1: G + G = 2 ⇒ T = 2, c1 = 0.
- Column 2: N + N + 0 = H + 10·c2 with c2 = 1 ⇒ 2N = H + 10. Choose N = 8 ⇒ H = 6.
- Check distinct digits: W = 3, R = 7, O = 0, N = 8, G = 1, I = 4, H = 6, T = 2. All different ✓.
Verification
3 7 0 8 1
+ 3 7 0 8 1
-----------
7 4 1 6 2
37081 × 2 = 74162 = RIGHT ✓
Answer: W = 3, R = 7, O = 0, N = 8, G = 1, I = 4, H = 6, T = 2 (37081 + 37081 = 74162).
Note: a computer search shows 21 valid assignments for this puzzle (for example 24153 + 24153 = 48306), so more than one answer is correct.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Cryptarithmetic RIGHT+RIGHT=WRONG · Artificial Intelligence, chapter 2 · asked 3×
- Cryptarithmetic LOGIC+LOGIC=PROLOG · Artificial Intelligence, chapter 2 · asked 3×
- CSP and SWIM+WEAR=RELAX · Artificial Intelligence, chapter 2