This article explains the verbal arithmetic puzzle LOL + LOL = HIHI, sets out two complete methods of solving it, lists its four solutions, and places it in the wider history and mathematics of cryptarithms.
๐ค Written by Wren, the chat's AI, building on Wikipedia and on questions people asked in the chat. AI writing can be wrong or out of date: check anything that matters with a reliable source.
| Puzzle type | Cryptarithm (verbal arithmetic, alphametic) |
|---|---|
| Equation | LOL + LOL = HIHI, equivalent to 2 ร LOL = HIHI |
| Distinct letters | 4 (L, O, H, I) |
| Forced values | H = 1, O = 0 |
| General relation | I = 2L โ 10 |
| Number of solutions (base 10) | 4 |
| Solutions | 606 + 606 = 1212; 707 + 707 = 1414; 808 + 808 = 1616; 909 + 909 = 1818 |
| Key mathematical idea | 101 is prime, and HIHI = 101 ร (10H + I) |
| Unique solution? | No; it fails the traditional "one solution" standard for a good puzzle |
| Related classic | SEND + MORE = MONEY (Henry Dudeney, 1924) |
LOL + LOL = HIHI is a short cryptarithm. A cryptarithm is a puzzle in which the digits of an arithmetic equation are replaced by letters. Cryptarithms are also called verbal arithmetic, alphametics, cryptarithmetic or word addition. The solver must find which digit each letter stands for. In this puzzle a three-digit number written as LOL is added to itself, and the result is a four-digit number written as HIHI. The puzzle can also be written as 2 ร LOL = HIHI.
The letters form two pieces of informal written language. "LOL" is the common internet abbreviation for "laughing out loud". "Hihi" is a written imitation of a giggle that appears in informal writing. Choosing letters that spell meaningful words is a long tradition in cryptarithms.
Under the usual rules, each letter stands for a different digit and no number may begin with zero. With these rules the puzzle has exactly four solutions: 606 + 606 = 1212, 707 + 707 = 1414, 808 + 808 = 1616 and 909 + 909 = 1818. In every solution H = 1 and O = 0. The puzzle is useful for teaching because a few lines of reasoning about place value, carries and prime factors fix most of the letters. Because it has more than one solution, it does not meet the traditional standard of a "good" cryptarithm, which should have exactly one answer.
Statement of the puzzle
The puzzle is usually written as a column addition:
L O L + L O L --------- H I H I
Each letter stands for one of the decimal digits 0 to 9. Two conventions are normally assumed. They come from the general tradition of verbal arithmetic.
- Distinct digits: different letters stand for different digits, and the same letter always stands for the same digit. The four letters L, O, H and I therefore take four different values.
- No leading zeros: the first digit of a number with more than one digit may not be zero, as in ordinary arithmetic notation. Here L (the first digit of LOL) and H (the first digit of HIHI) cannot be 0.
Adding a number to itself is the same as doubling it, so the puzzle is the same as the multiplication puzzle 2 ร LOL = HIHI.
The words have a repeated structure. LOL is a palindrome, meaning it reads the same forwards and backwards. HIHI is a two-letter block, "HI", written twice. This structure is what allows the puzzle to be solved quickly by reasoning alone.
Background: verbal arithmetic
Definition and conventions
Verbal arithmetic is a type of mathematical game. It consists of an equation between unknown numbers whose digits are represented by letters of the alphabet, and the goal is to find the value of each letter. The term is sometimes extended to puzzles that use other symbols instead of letters. The equation is usually a basic arithmetic operation, most often addition, but multiplication and division puzzles also exist.
Traditionally each letter represents a different digit, and the leading digit of a multi-digit number must not be zero. By convention, a good puzzle has exactly one solution, and its letters spell a meaningful word or phrase.
History and terminology
The best-known example was published by the English puzzle writer Henry Dudeney in the July 1924 issue of The Strand Magazine:
S E N D + M O R E ----------- M O N E Y
Its unique solution is O = 0, M = 1, Y = 2, E = 5, N = 6, D = 7, R = 8 and S = 9, which gives 9567 + 1085 = 10652. SEND + MORE = MONEY meets all the traditional standards. Every letter has a distinct digit, there are no leading zeros, there is only one solution, and the words form a phrase.
Letter-for-digit puzzles are older than Dudeney's example. The names for the genre came later. The word "cryptarithm" is generally traced to the French cryptarithmie, used in the Belgian puzzle magazine Sphinx in the early 1930s. The word "alphametic" is usually credited to the Canadian puzzle writer J. A. H. Hunter in the 1950s, for puzzles whose letters form real words. In some usage "alphametic" means only puzzles made of meaningful words, and "cryptarithm" is the broader term. LOL + LOL = HIHI uses recognisable words, so it fits under either name.
Why such puzzles can be solved by reasoning
Cryptarithms can be solved because ordinary written arithmetic follows strict rules about place value and carrying. Every column of an addition must balance once carries are taken into account. The number of digits in the result also limits the size of the numbers. Most solving methods combine three kinds of reasoning:
- Size bounds: the sum cannot exceed certain limits, which often fixes the leading digit of the result.
- Column equations with carries: each column gives an equation linking the letters in that column with the carries coming in and going out.
- Divisibility: rewriting the numbers by place value can expose factors that force certain letters to take certain values.
LOL + LOL = HIHI can be solved with any of these. Two complete methods are given below.
Solution
Step 1: the leading digit H
LOL is a three-digit number, so it is less than 1000. Twice a number less than 1000 is less than 2000. If the letters must have distinct digits, the largest possible value of LOL is 989 (L = 9, O = 8), and 2 ร 989 = 1978. Either way, the sum HIHI is a four-digit number below 2000, so its leading digit must be 1.
H = 1.
The sum must also be at least 1000 to have four digits. Therefore LOL must be at least 500, which means L is at least 5.
Method A: place value and the prime number 101
Each word can be written using place value. A digit in the hundreds place is worth 100 times its value, a digit in the tens place 10 times its value, and so on.
- LOL = 100L + 10O + L = 101L + 10O
- HIHI = 1000H + 100I + 10H + I = 1010H + 101I = 101 ร (10H + I)
The sum HIHI is therefore always a multiple of 101. This is true of any four-digit number made of a two-digit block written twice. For example, 3737 = 101 ร 37.
Substituting H = 1 gives:
2 ร LOL = 101 ร (10 + I)
The number 101 is prime: its only positive divisors are 1 and itself. A basic fact about primes (Euclid's lemma) says that if a prime divides a product, it divides at least one of the factors. Here 101 divides 2 ร LOL but does not divide 2, so 101 must divide LOL.
LOL = 101L + 10O, and 101L is already a multiple of 101. So LOL is a multiple of 101 exactly when 10O is a multiple of 101. O is a single digit, so 10O is one of 0, 10, 20, โฆ, 90. Of these, only 0 is a multiple of 101.
O = 0.
Then LOL = 101L, and the equation becomes:
2 ร 101 ร L = 101 ร (10 + I)
Dividing both sides by 101 gives:
2L = 10 + I, so I = 2L โ 10
Method B: column-by-column addition with carries
The same result can be reached using only the rules of column addition. Write c1, c2 and c3 for the carries out of the units, tens and hundreds columns. Each carry is either 0 or 1, because two digits plus a carry can never reach 20.
| Column | Equation |
|---|---|
| Units | L + L = I + 10c1 |
| Tens | O + O + c1 = H + 10c2 |
| Hundreds | L + L + c2 = I + 10c3 |
| Thousands | c3 = H |
The thousands column contains only the final carry. H cannot be 0, and a carry is at most 1, so H = 1 and c3 = 1.
The units and hundreds columns both contain 2L on the left and I on the right. Subtracting the units equation from the hundreds equation gives:
c2 = 10 โ 10c1 = 10 ร (1 โ c1)
The carry c2 is 0 or 1, and the right-hand side is a multiple of 10. The only possibility is c2 = 0 and c1 = 1.
The tens column then reads 2O + 1 = 1, so O = 0. The units column reads 2L = I + 10, so I = 2L โ 10. These match the results of Method A.
In words: doubling L must produce a carry, because the units column has to carry 1. Doubling O must produce exactly the digit 1 once that carry is added, which is only possible when O is 0. The hundreds column then repeats the units column exactly, which is why the I in the units place matches the I in the hundreds place.
Step 2: testing the possible values of L
The digit I must be between 0 and 9, and I = 2L โ 10. So L must be at least 5. L can be at most 9, which gives I = 8. Each candidate must also give four different digits, keeping in mind that H = 1 and O = 0 are already used.
| L | I = 2L โ 10 | Digits used (L, O, H, I) | Valid? |
|---|---|---|---|
| 5 | 0 | 5, 0, 1, 0 | No: I would equal O |
| 6 | 2 | 6, 0, 1, 2 | Yes |
| 7 | 4 | 7, 0, 1, 4 | Yes |
| 8 | 6 | 8, 0, 1, 6 | Yes |
| 9 | 8 | 9, 0, 1, 8 | Yes |
Values of L below 5 are impossible because I would be negative. L = 1 would also clash with H, and L = 0 would break the no-leading-zero rule.
The four solutions
| L | O | H | I | Equation |
|---|---|---|---|---|
| 6 | 0 | 1 | 2 | 606 + 606 = 1212 |
| 7 | 0 | 1 | 4 | 707 + 707 = 1414 |
| 8 | 0 | 1 | 6 | 808 + 808 = 1616 |
| 9 | 0 | 1 | 8 | 909 + 909 = 1818 |
Each solution can be checked by direct addition. For example, 707 + 707: the units give 7 + 7 = 14, so write 4 and carry 1. The tens give 0 + 0 + 1 = 1, so write 1 with no carry. The hundreds give 7 + 7 = 14, so write 4 and carry 1. The thousands give the carried 1. The result is 1414, which has the pattern HIHI with H = 1 and I = 4.
Structure of the solutions
The solutions follow a regular pattern that comes directly from the algebra.
- LOL is always 101 times a single digit. Because O = 0, LOL has the form L0L, which equals 101 ร L. The four solutions are 101 ร 6, 101 ร 7, 101 ร 8 and 101 ร 9.
- HIHI is always 101 times a two-digit number. HIHI = 101 ร HI, where HI is the two-digit number formed by H and I. Doubling LOL = 101 ร L gives 101 ร 2L, so HI is simply 2L. The values of HI are 12, 14, 16 and 18.
- I is always even. I = 2L โ 10 is the difference of two even numbers, so it is even. The four values of I are 2, 4, 6 and 8.
- The carries are the same in every solution. In every case the units and hundreds columns carry 1 and the tens column carries nothing. This is forced, as Method B shows.
Put briefly, the puzzle is the multiplication fact 2 ร L = HI (a two-digit result starting with 1), "stretched" by a factor of 101. Multiplying any number from 1 to 99 by 101 writes it in a repeated or spaced-out form. For example, 101 ร 7 = 707 and 101 ร 14 = 1414. The puzzle hides a one-digit doubling fact inside this pattern.
Uniqueness and puzzle quality
Why the puzzle is not "proper"
Verbal arithmetic traditionally expects a well-made puzzle to have exactly one solution. LOL + LOL = HIHI has four, so it does not meet that standard. Puzzle writers sometimes describe such puzzles as having a non-unique answer, and some would not publish one without an extra condition.
The puzzle is still interesting. The method of solving it is unique even though the final answer is not. The reasoning forces H = 1 and O = 0 completely and reduces the rest to the single relation I = 2L โ 10. Asking a solver to find all solutions, rather than "the" solution, turns the puzzle into a complete and well-defined exercise.
Effect of relaxing the rules
If the rule that different letters must have different digits is dropped, one more solution appears: L = 5 gives 505 + 505 = 1010. Here I = 0, the same digit as O. The forced values H = 1 and O = 0 do not depend on the distinct-digit rule. They follow from the arithmetic alone. So under the relaxed rules there are exactly five solutions, from L = 5 to L = 9.
The no-leading-zero rule has no further effect here. The arithmetic already forces H = 1 and L โฅ 5, so no solution has a leading zero.
Ways to make the answer unique
A puzzle setter who wanted a single answer could add an extra condition. Any condition that singles out one value of L would work. Examples include stating the value of one letter, requiring I to be greater than L, or requiring HIHI to be a multiple of some given number. These are illustrations of the general technique, not standard published versions of this puzzle.
Generalisation to other number bases
Cryptarithms are usually set in base 10, but the same puzzle can be posed in any base (number system) b. In base b each place is worth b times the place to its right, and digits run from 0 to b โ 1. The column equations are the same as in Method B with 10 replaced by b.
The same steps show that in every base H = 1, O = 0 and I = 2L โ b. The carry pattern is also identical: the units and hundreds columns carry 1, and the tens column carries nothing. The remaining conditions are:
- I must be at least 0, and it cannot be 0 because O = 0. So 2L must be greater than b, which means L is more than half of b.
- I cannot be 1, because H = 1. This rules out L = (b + 1)/2 when b is odd.
- L can be at most b โ 1. Then I = b โ 2, which is always a valid digit different from L.
Counting the allowed values of L gives the number of solutions:
- If b is even, there are b/2 โ 1 solutions.
- If b is odd, there are (b โ 3)/2 solutions.
For base 10 the formula gives 10/2 โ 1 = 4, which matches the four solutions above. The puzzle has exactly one solution in base 4 (303 + 303 = 1212 in base 4, which is 51 + 51 = 102 in decimal) and in base 5 (404 + 404 = 1313 in base 5, which is 104 + 104 = 208 in decimal). In larger bases the number of solutions grows steadily. These results come straight from the column equations and can be checked by converting each example to decimal.
Solving by computer
Brute-force search
Small cryptarithms can be solved by trying every possible assignment of digits to letters, a method called brute-force search. LOL + LOL = HIHI has four distinct letters. The number of ways to give four letters four different digits is 10 ร 9 ร 8 ร 7 = 5,040. A computer can check all of these almost instantly, and doing so confirms the four solutions found by reasoning.
A simple program loops over all ordered choices of four different digits for L, O, H and I. It discards choices where L or H is 0, computes 2 ร (101L + 10O), compares the result with 1010H + 101I, and prints every match.
Constraint satisfaction
For larger puzzles, programs usually treat a cryptarithm as a constraint satisfaction problem. This is a problem in which variables (here, letters) must be given values (digits) that satisfy a list of rules. Such programs apply the same column-and-carry reasoning used in Method B. They narrow down the possible values for each letter before searching, which is much faster than checking every assignment. Cryptarithms such as SEND + MORE = MONEY are standard teaching examples in courses on constraint programming and artificial intelligence.
Computational complexity
Individual puzzles are easy for computers, but the general problem is hard in a precise sense. In 1987 the computer scientist David Eppstein published a proof that a generalised form of the cryptarithm problem is NP-complete. NP-complete problems are a class of problems for which no efficient general method is known, and for which finding one would settle a major open question in computer science. The result concerns puzzles that can be made arbitrarily large, in particular with a growing number base. It has no practical effect on small puzzles such as LOL + LOL = HIHI.
Use in teaching
Verbal arithmetic is used to motivate and supply exercises for teaching elementary algebra. LOL + LOL = HIHI is well suited to this because it is short and touches several basic ideas:
- Place value: writing LOL as 101L + 10O and HIHI as 1010H + 101I.
- Estimation and bounds: working out that a doubled three-digit number is below 2000, which fixes H.
- Carrying in column addition: setting up one equation per column and reasoning about carries of 0 or 1.
- Prime numbers and divisibility: using the primality of 101 and Euclid's lemma.
- Case analysis: checking each remaining value of L in turn, and finding all solutions rather than stopping at the first.
- Thinking about the rules: seeing how dropping the distinct-digit rule adds the solution 505 + 505 = 1010.
Comparing the two solution methods is useful in itself. Method A is shorter but relies on a fact about prime numbers. Method B needs only column addition but involves more bookkeeping. Both arrive at the same relation, I = 2L โ 10, which shows that different lines of mathematical reasoning agree.
The "Feynman algorithm" framing
Explanations of this puzzle sometimes present the solution in three stages: "write down the problem", "think very hard", "write down the answer". This is a humorous description of the problem-solving style of the physicist Richard Feynman, usually attributed to his colleague Murray Gell-Mann. It is a joke about how hard it is to describe expert reasoning, not a formal method. When applied to a puzzle like this one, the "think very hard" stage is where the actual work happens: the bound on H, the place-value rewriting and the divisibility argument.
Wordplay
Many cryptarithms are built around words or phrases that relate to each other. SEND + MORE = MONEY reads as a request for money. LOL + LOL = HIHI follows a similar idea: two "laughs out loud" add up to a giggle written twice. Its letter patterns match its arithmetic. The palindrome LOL becomes the spaced-out number L0L, and the repeated block HIHI becomes a two-digit number written twice.
Some puzzle writers also try to make the numbers meaningful. A doubly true alphametic is one in which the words themselves are number names and the equation is true in words as well as in digits, such as puzzles of the form ONE + ONE + โฆ = a number word. LOL + LOL = HIHI is not of this type. Its words are slang rather than number names.
See also
- Verbal arithmetic (alphametics)
- SEND + MORE = MONEY
- Henry Dudeney
- Place value (positional notation)
- Carry (arithmetic)
- Prime number
- Euclid's lemma
- Palindromic number
- Number base (radix)
- Constraint satisfaction problem
- Brute-force search
- NP-completeness
- Recreational mathematics
- Mathematical puzzle
Sources
Questions people asked
How do you solve the cryptarithm LOL + LOL = HIHI?
Applying the Feynman Problem Solving Algorithm to LOL + LOL = HIHI:
Step 1. Write down the problem
Target: Solve the cryptarithm (alphametic equation) where each distinct letter represents a unique base-10 digit (0โ9), with no leading zeros (L โ 0, H โ 0):
L O L
+ L O L
-------
H I H I (or simply: 2 ร LOL = HIHI)
---
Step 2. Think very hard
- Determine H:
LOL is a 3-digit number, so its maximum possible value is 989.
2 ร 989 = 1978.
Since the sum is a 4-digit number starting with H, H must be 1.
- Deconstruct into place value:
HIHI = 1000H + 100I + 10H + I = 1010H + 101I = 101 ร (10H + I)
Since H = 1
HIHI = 101 ร (10 + I)
- Exploit the prime factor 101:
2 ร LOL = 101 ร (10 + I)
Because 101 is prime and does not divide 2, LOL must be a multiple of 101.
LOL = 100L + 10O + L = 101L + 10O
For 101L + 10O to be divisible by 101, 10O must be a multiple of 101.
Since O is a single digit (0โ9), this strictly forces O = 0.
- Relate L and I:
Substituting LOL = 101 ร L into the equation
2 ร (101 ร L) = 101 ร (10 + I)
Dividing both sides by 101 gives
2L = 10 + I ==> I = 2L - 10
- Test valid digits for L:
Since 2L = 10 + I and I โฅ 0, we must have L โฅ 5.
Remember: digits must be distinct from H = 1 and O = 0.
- If
L = 5:I = 0(conflict:Ois already 0). - If
L = 6:I = 2(valid: digits{0, 1, 2, 6}are all distinct). - If
L = 7:I = 4(valid: digits{0, 1, 4, 7}are all distinct). - If
L = 8:I = 6(valid: digits{0, 1, 6, 8}are all distinct). - If
L = 9:I = 8(valid: digits{0, 1, 8, 9}are all distinct).
---
Step 3. Write down the answer
Mathematically, there are exactly four solutions
- 606 + 606 = 1212 (L=6, O=0, H=1, I=2)
- 707 + 707 = 1414 (L=7, O=0, H=1, I=4)
- 808 + 808 = 1616 (L=8, O=0, H=1, I=6)
- 909 + 909 = 1818 (L=9, O=0, H=1, I=8)