What is Mathdoku?
Mathdoku, also called Calcudoku, is a Latin square puzzle: put the numbers 1 to N once in every row and column of an N×N grid, and make every bold-outlined group of cells (a cage) produce its printed target with the printed operation (+ − × ÷). The rules are the same as the well known trademarked puzzle from Japan; Mathdoku and Calcudoku are the generic names.
Unlike ordinary sudoku there are almost no given numbers. Instead each cage carries a small label such as "7+", "2÷", "12×" or "1−": the numbers in a plus or times cage add or multiply to the target, and in a two-cell minus or divide cage the larger number minus or divided by the smaller one equals the target. A single-cell cage holds exactly the printed number, which gives you a first foothold.
What are the exact rules?
There are only three. No repeated number in a row, no repeated number in a column, and every cage must produce its target. Inside a cage a number may appear twice as long as the two cells do not share a row or a column.
| Rule | Meaning |
|---|---|
| Row | Each row holds 1 to N once. On a 5×5 board that is 1, 2, 3, 4, 5 |
| Column | Each column also holds 1 to N once |
| Plus + | The cage numbers add up to the target. A two-cell "7+" is 3·4, 2·5 or 1·6 |
| Times × | The cage numbers multiply to the target. A three-cell "12×" is 1·3·4 or 2·2·3 (1·2·6 from 6×6 up) |
| Minus − | Two cells only. The larger number minus the smaller one equals the target, in either order |
| Divide ÷ | Two cells only. The larger number divided by the smaller one equals the target. "2÷" is 1·2, 2·4 or 3·6 |
| Single cell | A cage with a number and no operation holds that number |
| Finish | All cells filled and nothing breaks the three rules |
Which cage combinations should I know?
The fastest route is to fill the cages that have only one possible combination first. The table lists common labels and the sets of numbers that fit them on a 5×5 board; larger boards add combinations with 6 and 7.
| Label | Cells | Possible sets | Tip |
|---|---|---|---|
| 3+ | 2 | 1·2 | Fixed at once. Rows and columns decide which cell is the 1 |
| 4+ | 2 | 1·3 | 2·2 is impossible because the cells share a row or column |
| 9+ | 2 | 4·5 | The largest two-cell sum on 5×5 |
| 6+ | 3 | 1·2·3 | Fixed at once when the three cells sit in one line |
| 2÷ | 2 | 1·2, 2·4 | 3·6 joins from 6×6 up |
| 3÷ | 2 | 1·3 | 2·6 joins from 6×6 up |
| 4÷ · 5÷ | 2 | 1·4 · 1·5 | One of the cells must be 1 |
| 1− | 2 | 1·2, 2·3, 3·4, 4·5 | Two neighbouring numbers. Match against what the row and column still need |
| 4− | 2 | 1·5 | Fixed at once on 5×5 |
| 2× | 2 | 1·2 | Fixed at once |
| 10× | 2 | 2·5 | 1·10 does not exist, so it is fixed |
| 20× | 2 | 4·5 | Fixed at once |
| 12× | 3 | 1·3·4, 2·2·3 | 2·2·3 only when the two 2s are in different rows and columns |
| 60× | 3 | 3·4·5 | Fixed at once on 5×5 |
| 40× | 3 | 2·4·5 | 1·5·8 does not exist, so it is fixed |
- Start with single cells and one-combination cages. Labels such as "3+", "2×", "20×" and "60×" have a fixed set of numbers; pencil them in and the row and column eliminations begin.
- Factorise big products. "105×" can only be 3·5·7, and a four-cell "48×" has just a few options such as 2·3·4·2 or 1·3·4·4. A prime factor of 7 pins the 7 to that cage.
- Every row has the same sum. A 5×5 row adds up to 15. Add the targets of the plus cages that sit entirely inside one row, subtract from 15, and you have the sum of the remaining cells.
- Division needs a small number. "4÷" and "5÷" force a 1 into one of their cells, so the 1 can be struck from the rest of that row and column.
- Stuck? Press Check. Cages whose arithmetic is wrong and cells repeated in a row or column turn red. Hint fills one cell that can be deduced from the current board.
How do the sizes differ?
4×4 uses only plus and times and is a warm up, 5×5 is the classic size, and 6×6 and 7×7 call for factorising and pencil marks. Bigger boards have more cages and group up to four cells in one cage.
| Size | Operations | Cages | Target time |
|---|---|---|---|
| Easy 4×4 | + × and single cells | 6 to 8 | Under a minute |
| Normal 5×5 | + − × ÷ | 9 to 11 | About 3 minutes |
| Hard 6×6 | + − × ÷ | 13 to 16 | About 7 minutes |
| Expert 7×7 | + − × ÷ | 17 to 21 | 12 minutes or more |
Every board can be finished by pure deduction. Boards that would force a guess are never shown.
How are the boards made?
The game shuffles a random Latin square, groups neighbouring cells into cages of one to four cells, then picks an operation for each cage. A two-cell cage becomes a division when the numbers divide evenly, otherwise one of minus, plus or times; cages of three or more cells become plus or times. A solver then counts the answers by propagation and branching, and the board is accepted only when exactly one exists.
If there is more than one answer, a loose plus cage is switched to times or divide and the count is repeated; if that still fails, the board is partitioned again. All of this finishes within a second, so a new board appears without waiting. The share link carries the board number, so a friend who opens it gets the very same board to race on.
What is the daily puzzle?
The daily puzzle is a 5×5 board that changes every day and is the same for everyone on that day. It rolls over at midnight Korean time, and finishing it is recorded on your attendance streak.
Best times are stored separately for each size. If you leave in the middle of a board, the Continue button brings you back to the same spot.
Controls
- Phone and mouse: tap a cell to select it (blue outline) and its cage lights up softly. Tap a number button below the board (to the right in landscape) to enter it, and tap the same number again to erase. With Memo on, numbers are pencilled in small as candidates.
- Keyboard: digits 1 to N enter, Backspace, Delete or 0 erase, arrow keys move, N toggles memo, H hint, Z undo, C check.
- On screen: when a cage's arithmetic works out, a light green fill rises through it and the label turns green. Wrong cages show red after Check. A golden wave crosses the board when it is solved.
Records and unfinished boards are kept only in this browser and never sent to a server. Clearing browser data clears them too.