OlyPrep

§ TOOLS / CIPHER LAB / CRYPTARITHM

Cryptarithm puzzle

A cryptarithm is an arithmetic problem in disguise: a completed addition or subtraction in which every digit has been replaced by a letter, the same letter for the same digit throughout, and the task is to work out which digit each letter hides. It is the one Science Olympiad Codebusters question solved by logic about numbers rather than about letters, and it rewards a method.

Free on every planNo sign-in to tryThe lab below runs this cipher only

§ THE CIPHER

What a cryptarithm is

In a cryptarithm, usually called an alphametic when the letters spell real words, ten letters at most stand for the ten digits. Each letter always means the same digit, two different letters never share a digit, and a number never starts with zero. A well-set puzzle has exactly one solution. The famous example reads SEND plus MORE equals MONEY, and the five-letter answer with four-letter addends gives the first deduction away: the extra column on the left can only be filled by a carry, and a carry from adding two digits is never more than one, so M is 1.

Puzzles of this kind have been printed in newspapers and puzzle magazines since the nineteenth century, and the word alphametic is commonly credited to a puzzle editor of the mid twentieth century. They sit at the border of cryptography and recreational mathematics: nothing is encrypted in the cipher sense, but the discipline of fixing one symbol’s meaning everywhere at once is exactly the discipline an Aristocrat asks for, which is probably why Codebusters includes them.

The method is column by column from the right, with the carry tracked at every step. The right-hand column has no carry in, so it is a plain sum of two digits; whether it exceeds nine decides the carry into the next column. A letter added to itself that gives itself, with no carry, is zero. A column whose answer letter equals one of its addends, with a carry in, is also telling you something. Every digit fixed is written into the whole puzzle before moving on, and the earlier columns are re-read, because a new digit usually settles another.

The mistakes are of two kinds. One is forgetting a rule: letting two letters share a digit, or giving a leading letter the value zero. The other is losing the carry, especially in the middle columns where a carry in and a carry out both apply. Keeping a written list of the ten digits and crossing each off as it is assigned prevents the first; writing the carry above each column as it is decided prevents the second. A subtraction is handled by rewriting it as the addition it came from: if TOP minus BOTTOM equals RESULT, then RESULT plus BOTTOM equals TOP.

§ THE METHOD

How to solve a Cryptarithm puzzle

A completed addition or subtraction problem where every digit 0–9 has been replaced by a letter — the same letter always hides the same digit. The goal is to work out which digit each letter stands for. No table helps here; the tool is column-by-column arithmetic logic.

  1. A letter that appears as an extra leftmost digit of the answer is 1 — a carry out of the top column can only ever be 1.
  2. Leading letters of any number can't be 0.
  3. Work right to left, column by column, tracking carries: each column is a small equation with at most a carry of 1 coming in.
  4. A letter added to itself giving itself (with no carry) is 0.
  5. Every deduction is permanent — the same letter is the same digit EVERYWHERE. Re-scan earlier columns after each new digit; they usually give up another one.
  6. Two different letters never share a digit — if a candidate digit is taken, cross it off.
  7. Some puzzles have more than one answer. When a tournament allows that, any answer that fits every rule is right: HEN + HEN = EGG has one (372 + 372 = 744), OWL + OWL = HILL has two (650 + 650 = 1300 and 850 + 850 = 1700).
§ WORKED EXAMPLE

A worked example

SEND + MORE = MONEY (the classic)

  S E N D
+ M O R E
---------
M O N E Y

The answer has FIVE letters but the addends have four —
so M is a carry, and a carry can only be 1: M = 1.

Then S + M(1) must carry into the new column, so S + 1 ≥ 10:
S = 8 or 9 … and each column narrows the next.
(Full solution: O = 0, R = 8, S = 9, E = 5, N = 6, D = 7, Y = 2.)
§ ON THE TEST

Cryptarithm in Codebusters

On the Science Olympiad Codebusters papers OlyPrep has read that include it, the cryptarithm is commonly among the higher-value questions, below only the Aristocrat, and it is scored differently from the letter ciphers: the rule sets OlyPrep has read give no allowance for errors on a cryptarithm, so a solved puzzle has every digit right. Most puzzles are set to have exactly one solution, but not all: Bay Area ESO has said some of its puzzles will have more than one set of digits that works, and that those score fewer points. Division B’s version commonly adds a step, a short word or phrase to be decoded from the digit mapping once it is found.

That zero-error rule changes the strategy. On a letter cipher a student can bank most of the points with a near miss; on a cryptarithm a single wrong digit is a wrong answer, so the habit to build is checking the finished arithmetic by adding the numbers back up before writing the answer down. It is also the question most worth leaving for later if the paper has quicker points elsewhere, and most worth finishing if time remains, because the points are large.

The lab on this page runs Cryptarithm alone. It is not in the open lab’s default set of chips: it appears there for a signed-in student whose tournament’s rules include it, and on this page for anyone. Every puzzle on this page comes from a bank OlyPrep has checked to have exactly one solution, some shown as additions and some as subtractions, and the key line gives one foothold, the carry digit or a single anchor letter. In the full Cipher Lab, a signed-in Bay Area ESO student also gets short three-letter puzzles on Easy, some with two or three answers, because that tournament has said some of its puzzles will have more than one solution; Check there accepts any answer that works. The answer is written in digits, as the equation the letters hide, and Check accepts it only when every digit is right.

§ PRACTICE

Practice the Cryptarithm puzzle

The lab below is set to the Cryptarithm puzzle alone. Pick a difficulty, generate a challenge, decode it, then check your answer or reveal the solution. It runs in your browser, needs no account, and is unlimited on every OlyPrep plan.

Scoped to Cryptarithm · 1 cipher type. Generate a challenge, solve it, and we'll track what you've cracked.

Letters hide digits — logic finds them
§ PAST CHALLENGES

Your first decode is the hardest.

Pick a cipher above and give it a shot — we'll keep track of what you've solved.

§ WHERE IT IS TESTED

Where the Cryptarithm puzzle is tested

The Science Olympiad rule sets OlyPrep has read that name this cipher:

Bay Area ESO never asks teams to encode; five to ten of its twenty questions are multiple choice or fill-in on how the ciphers work.

Cipher lists change with each season’s rules; a tournament’s own rulebook is the authority on what it tests.

§ ABOUT THE CRYPTARITHM PUZZLE

Questions about the Cryptarithm puzzle.

Q·01What is the first thing to look for in a cryptarithm?
An answer that is one letter longer than the numbers being added. That extra left-hand letter must be a carry, and a carry from two digits can only be 1, so that letter is 1. If there is no extra column, look instead for a letter added to itself that gives itself, which is 0 when there is no carry in.
Q·02Can two letters stand for the same digit?
No. Each letter hides one digit and each digit belongs to at most one letter, so once a digit is assigned it is crossed off for every other letter. A number also never begins with 0, which rules that digit out for every leading letter.
Q·03How does the OlyPrep lab check a cryptarithm?
You type the equation in digits, for instance 9567 + 1085 = 10652, and the lab checks that it fits the puzzle: the right number of digits, the same letter the same digit, different letters different digits, no number starting with zero, and the sum right. Spacing and commas do not matter and the two numbers being added may be written in either order, but every digit must be right; a puzzle with one wrong digit is not solved. When a puzzle has more than one answer that works, any of them is accepted. Reveal shows the equation, or every equation that works, and which digit each letter was.
Q·04Is OlyPrep part of Science Olympiad?
No. OlyPrep is independent and is not affiliated with Science Olympiad, Inc. or any state or regional Science Olympiad organization. Which tournaments include cryptarithms, and how they score them, is set by each tournament’s own rules.