Kakuro (popularly known as the number crossword) is one of the world’s most popular logic puzzles. It shares with Sudoku the placement of digits on a grid without repeating them within each block of cells, but replaces permutations with arithmetic combinatorics: each group of cells must add up to a given amount.
Unlike conventional Sudoku, where the objective focuses on digit permutations, Kakuro requires analyzing numerical combinations that sum to an exact amount without repeating any digit within the same block of cells.
Despite its apparent mathematical complexity, the game does not require supernatural skills, but rather deductive logical reasoning, data structuring, and basic combinatorics.
Formal description of the problem
The game is played on a grid made up of white cells (empty), black cells (blocked), and colored cells (with clues):
You must fill each white cell with a single digit from 1 to 9 inclusive.
Each continuous block of white cells (horizontal or vertical) has an associated sum clue located in the colored cell immediately to its left or above.
The sum of the numbers in each block must equal exactly the assigned clue.
No digit can be repeated within the same continuous block of white cells.
To determine the correct assignment, we have the following initial board:
Would you like to try solving it logically before looking at its mathematical formulation?
Challenge solution
By solving the Kakuro, the following unique digit assignment is obtained:
Result: There is a unique valid solution that simultaneously satisfies horizontal and vertical sums without repeating digits in each block.
This puzzle can be formulated as a binary linear optimization model. Do you dare to try it?
To solve Kakuro systematically and automatically, we can formulate it as a binary linear optimization model.
Index sets
\(\mathcal{R}\): Set of rows.
\(\mathcal{C}\): Set of columns.
\(\mathcal{W} \subset \mathcal{R} \times \mathcal{C}\): Set of white cells.
\(\mathcal{K} = \{1, 2, \dots, 9\}\): Set of possible numerical values.
\(\mathcal{H}\): Set of horizontal blocks. For each \(h \in \mathcal{H}\), \(\mathcal{S}_h \subset \mathcal{W}\) is the set of its cells.
\(\mathcal{V}\): Set of vertical blocks. For each \(v \in \mathcal{V}\), \(\mathcal{S}_v \subset \mathcal{W}\) is the set of its cells.
Parameters
\(V_h\): Target sum of cell values in row block \(h \in \mathcal{H}\).
\(V_v\): Target sum of cell values in column block \(v \in \mathcal{V}\).
Decision variables
\(x_{rck} = 1\) if white cell \((r,c) \in \mathcal{W}\) takes digit \(k \in \mathcal{K}\), and \(0\) otherwise.
Since we are solving a logical feasibility problem, the objective function can be a constant:
Objective function
\[\min z = 0\]
We now define the rules of Kakuro as linear constraints:
Martín-Campo, F. Javier (2026). The harmony of digits in solving Kakuro. https://www.fjmartincampo.com/blog/2026/kakuro/
As a BibTeX entry:
@misc{martín-campo2026the-harmony-of-digits-in-solving-kakuro,title={The harmony of digits in solving Kakuro},author={Martín-Campo, F. Javier},year={2026},month={sep},url={https://www.fjmartincampo.com/blog/2026/kakuro/}}