Zip Puzzle Solver

Numbers: tap squares in order, 1 first; tap a number to remove it. Walls: tap a square close to the side where the wall is.

How to use the Zip solver

Set the grid's width and height. In Numbers, tap the numbered squares in order: the first tap places 1, the next 2, and so on; tap a number to take it away. If your puzzle has walls, switch to Walls and tap each square close to the side the wall is on; tap again to remove it. Then press Next number to see the path from 1 to the next number, and keep pressing to draw it a stretch at a time, or Show the whole path. It also checks the path is the only one.

It solves the Zip puzzles that appear daily in apps such as LinkedIn's; Greg Puzzles is not affiliated with LinkedIn.

The rules of Zip

Draw one continuous line that starts at 1, passes through every numbered square in order, ends on the highest number, and visits every square of the grid exactly once, moving up, down, left or right and never through a wall. It is what mathematicians call a Hamiltonian path, with the numbers as checkpoints.

How to solve Zip puzzles

Corners and dead ends first. A square with only two ways in must be passed straight through using both, and a square with only one way in has to be where the line ends. Corners and squares boxed in by walls are where to start. Do not cut the grid in two. Whatever line you draw, the squares not yet visited must stay connected, or the line can never come back for them. Count the gap. Between two numbers, the line has to cover every square it will not reach later, so a long detour is often forced. The solver uses exactly these three ideas to rule out paths, and searches the rest.

How it was checked

On 80 small random puzzles its count of paths matched a brute-force search through every possible line. Then it solved 24 puzzles from 5 by 5 to 8 by 8, each made from a random path with walls added until only one answer was left, and found exactly that path every time.

More path puzzles

The knight's tour is the same kind of puzzle with a knight's moves, and our daily Numberlink joins pairs of numbers with lines that fill the grid. For a puzzle you hold in your hands, see our brain teasers. There are more solvers on the puzzle tools page.

Puzzles you can hold

The puzzles our customers buy most, for when you want one you can hold.

Frequently Asked Questions

How do you solve a Zip puzzle?

Start where the line has least choice: corners, and squares boxed in by walls. A square with only two ways in must be passed straight through, and one with a single way in is where the line ends. Never cut the unvisited squares into two pieces, because the line could not come back for one of them.

What are the rules of Zip?

Draw one line from 1 to the highest number, through the numbers in order, visiting every square of the grid exactly once, moving up, down, left or right and never through a wall.

Does this work for LinkedIn's daily Zip?

Yes. Enter the numbers and walls from the daily puzzle and the solver draws the path, one numbered stretch at a time. Greg Puzzles is not affiliated with LinkedIn.

Does every Zip puzzle have one solution?

A well-made one does, and the solver checks: if the numbers and walls you entered allow more than one path, it says so.

What kind of puzzle is Zip?

A Hamiltonian path puzzle: a route that visits every square once, with the numbers as checkpoints it must pass in order.