Cryptarithms, Sudoku, and more
What are cryptarithms?
Cryptarithms, sometimes known as alphametics, are puzzles where you are given an arithmetical expression where the digits have been replaced by letters, each digit a different letter.
One of the most famous alphametics, spelling out ‘SEND MORE MONEY’, was first published by Henry Dudeney, a British puzzlist, in 1924.
Five rules govern alphametics:
- Identical digits are replaced by the same letter. Different digits are replaced by different letters.
- After replacing all the letters with digits, the resulting arithmetic expression must be mathematically correct.
- Numbers cannot start with 0. For example, the number 0900 is illegal.
- Each problem must have exactly one solution unless stated otherwise.
- The problems will be in base ten unless otherwise specified. This means the letters replace some or all of the ten digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Secret Codes
The mathematical study of secret codes is called Cryptography. Cryptography is a vast topic in math with many day-to-day applications.
Two concise classic secret codes.
A substitution cipher is a secret code where another symbol replaces the letters in a message with a one-to-one correspondence. The symbol may be another letter, a number, or some pictorial sign.
A transposition cipher is a secret code where we encode the entire message by scrambling up the order of the letters in the statement.
Sudoku and similar puzzles
A Latin square is a square grid of size n x n, with a number written in each cell, such that each number between 1 and n appears exactly once in each row and once in each column. Latin squares come in many sizes; the more significant the square, the more solutions it has.
Usually, no additional restrictions are placed on the numbers appearing in Latin squares. However, Latin squares with the extra constraint that the numbers on the diagonals should also be 1 to n are particularly interesting.
Sudoku is a unique 9 x 9 Latin square with an extra constraint.
An efficient method to solve Sudoku puzzles is detecting spaces where a specific number cannot appear. This can be done as follows.
Pick a specific number that appears on the board (for example, the number 5), draw a straight line through all the rows and columns in which that number appears, and check if you are left with any empty spaces (in one of the small 3 x 3 squares) where this number has to appear. Do this for all the numbers from 1 to 9 in turn.
Another way to solve Sudoku is by using logical reasoning. Sometimes we know what numbers should be in some of the squares, but we don’t specifically know which number to put in which square. This, however, may be all the information you need to solve the puzzle!