How numberlink puzzles work

Thread Link is a numberlink puzzle: pairs of equal numbers on a grid have to be joined by paths that never cross. The idea is more than a century old, it hides a problem computers find hard, and a few simple habits make it much easier to solve.

A linen puzzle board with coloured threads joining pairs of numbered buttons
A linen puzzle board with coloured threads joining pairs of numbered buttons

The rules

The board is a square grid with some numbers on it, each number exactly twice. Join every pair with a path that moves from square to neighbouring square, horizontally or vertically. Paths may turn as often as they like, but no two paths may share a square, so they never cross, and a path cannot run over a number that is not its own. In Thread Link, as in most modern versions, the puzzle is only finished when the paths also cover every square of the board.

A puzzle with a long history

Path puzzles of this kind go back to the nineteenth century: Sam Loyd printed a version in 1897, and Henry Dudeney's Amusements in Mathematics of 1917 has one about motorists who must reach their garages without their routes crossing. The Japanese publisher Nikoli made the grid form popular as Number Link, and as Arukone with letters instead of numbers. The puzzle later became a favourite on phones, where drawing a path with a finger feels natural.

Why it is hard for computers

Joining pairs of points in a grid without crossings is the same task an engineer faces when routing wires on a circuit board, and in general it is NP-complete: no known method solves every large case quickly, although checking a given answer is easy. Small boards are no problem for a computer that tries routes and backtracks, but the number of possibilities grows explosively with the size of the board. People solve numberlink puzzles with patterns and logic instead of trying everything.

How Thread Link makes its puzzles

The game first finds a random path that visits every square exactly once, a Hamiltonian path. It starts from a simple back-and-forth path and reshapes it thousands of times with a move called a backbite. Then it cuts the path into pieces of at least three squares, rejecting cuts where the two ends of a piece touch, and puts a number on both ends of every piece. Because the pieces cover the whole grid, every puzzle has a solution that fills the board. A seeded random number generator ties each puzzle to its size and number.

Tips for solving

Start along the edges and in the corners: a pair whose numbers sit on the same edge can often hug it. Look for squares with only one free neighbour, because a path has to go in there and come out the same way, which only works if a number is there. Never leave a pocket of empty squares that no path can reach. If two numbers of one pair are close together, link them early and short, so they do not block others. And when the board is full of linked pairs but a few squares are empty, one thread can usually make a detour through them.

Frequently asked questions

Is numberlink the same as connect the dots?

No. In connect the dots you join numbered dots in order to draw a picture. In numberlink you join pairs of equal numbers, and the challenge is that the paths may not cross and, in most versions, must fill the board.

Does every puzzle have only one solution?

Puzzles in newspapers and books are usually checked to have exactly one. Thread Link makes its puzzles on the spot, so some have more than one way to fill the board; the game accepts every valid solution.

Which board size should I start with?

5×5 or 6×6 to learn the moves, 7×7 or 8×8 for a quick puzzle, and 10×10 or 12×12 when you want a longer one. Bigger boards have more pairs and longer paths, so they take more planning.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Play Thread Link