Puzzle PicnicBlog

Path Puzzle Strategies: Corners, Dead Ends and Parity

The deductions that solve one-line path puzzles like Trail and Zip. Corners, numbers in order, dead ends, chessboard parity, plus a full 5x5 solve.

The strongest path puzzle strategies are local and certain. Look for squares with only two exits, such as corners, because the line must use both. Never join two numbers that are not next in order. After every move, check that no empty square is left with a single way in, and that the empty squares are still in one piece. Then use chessboard parity to check pockets and stretches. This guide covers those strategies with a full 5x5 solve.

It is written for players who know the rules of Trail or a similar one-line puzzle and want to stop guessing. Everything here also works in LinkedIn's Zip and most "connect the numbers" path games, and much of it in Numbrix.

How path puzzles work

A one-line path puzzle asks you to draw a single line through every square of a grid, visiting each square exactly once. In Trail, the version in Puzzle Picnic, the line starts on 1, passes the numbers in order, ends on the highest number, moves up, down, left or right, never crosses itself and cannot pass through thick walls. LinkedIn's Zip uses the same rules. Introducing it in March 2025, GM Puzzles listed them as a path through all cells, horizontal and vertical moves only, no crossing itself or any wall, from 1 through the numbers in ascending order to the highest value.

The older number-placing puzzles are close cousins. In Hidato, created by the Israeli mathematician Gyora Benedek, you fill the grid with consecutive numbers that may touch diagonally as well as side by side (Wikipedia: Hidato). Numbrix, by Marilyn vos Savant for Parade, is the same idea without diagonal moves, usually on a 9 by 9 grid filled with 1 to 81 (Macworld: Numbrix).

PuzzleMovesWhat a number means
Trail (Puzzle Picnic)Up, down, left, rightA checkpoint: pass them in order
Zip (LinkedIn)Up, down, left, rightA checkpoint: pass them in order
NumbrixUp, down, left, rightThe exact step count of that square
HidatoAlso diagonallyThe exact step count of that square

Trail adds walls on its Hard and Expert levels, and some Zip puzzles have walls too. The difference in the third column matters more. In Numbrix a 14 means "this is the 14th square". In Trail and Zip a 4 means "the fourth checkpoint", and the number of squares between 3 and 4 is something you work out. The strategies below are written for checkpoint puzzles, with notes where step-count puzzles let you go further.

To talk about squares, this guide uses a short code: R2C3 is the square in row 2 (counting from the top) and column 3 (counting from the left).

Corners, and every square with two exits

A corner square has only two neighbours, so unless the line starts or ends there, the line must come in through one neighbour and leave through the other. That is the corner rule, and it is the first thing to apply on any empty board. You do not need to know which way the line travels to know that both links exist.

Part of a board, the top-left corner. The corner square R1C1 has only two neighbours (marked n). If R1C1 is not 1 or the last number, the line must run n, corner, n.

The rule is bigger than corners. Count the exits of any square: the neighbours the line could still use. An exit disappears when a neighbour is already a middle square of the line (it has both its links) or when a wall stands in between. A square in the middle of the board starts with four exits, an edge square with three, a corner with two.

  • Two exits, and the square is not an end: both exits are links of the line. This is the corner rule in general form.
  • One exit: the square must be 1 or the last number. If it is neither, something has gone wrong.
  • 1 and the last number: they need exactly one link each, so as soon as one exit is taken, the others are closed.

Corners stay two-exit squares all game, but ordinary squares become two-exit squares as the line grows around them. That is why the corner rule keeps paying out: every new piece of line lowers the exit count of its neighbours. A habit worth building is to look at the squares next to your newest link after every move and count again.

Numbers in order, and no early loops

The numbers give you two more rules that cut away wrong links. The first is order: two numbered squares can only be joined directly if their numbers are next to each other, like 3 and 4. A 3 sitting right beside a 6 is not a hint that they connect. The line has to visit 4 and 5 in between, so the link between 3 and 6 is impossible and the 3 and the 6 must use their other neighbours.

The same rule works on longer pieces. If you have worked out a stretch of line that runs into 3, the square 1 cannot join that stretch at its other end, because then 3 would come straight after 1 and 2 would be skipped. When you join two pieces, read the numbers along the joined piece. They must run in order, with none missing in between.

The second rule is about loops. The answer is a single line with two ends, so a link that would close a circle is always wrong. It comes up whenever the two open ends of one piece finish side by side: joining them would make a ring, so each end has to go somewhere else.

A related trap is the line reaching its end too early. In Trail the last number only fits as the very last square, so if a link would join the piece from 1 to the piece ending on the highest number while empty squares remain, that link is wrong too.

A worked 5x5 solve

This puzzle uses only the rules above: two exits, numbers in order, and no loops. It is the size of an Easy board in Puzzle Picnic, and it has exactly one solution.

A 5x5 Trail-style puzzle with seven numbers. Draw one line from 1 to 7 through all 25 squares, passing 2 to 6 in order.

Work through it in this order. Each row of the table is certain before you move on.

StepSquareReasonResult
1R1C5 (the 4)A corner that is not an endLine runs R1C4, 4, R2C5
2R5C1An empty cornerLine runs R4C1, R5C1, 3
33 and 6They touch, but 4 and 5 come between themNo link between 3 and 6
4R5C2 (the 3)Its last free exit is R4C2Line runs R5C1, 3, R4C2
5R5C3 (the 6)Two exits left: R4C3 and R5C4Line runs R4C3, 6, R5C4
6R4C1R4C2 would close a small loopR4C1 links up to R3C1
7R4C2R4C3 would join 3 straight to 6R4C2 links up to R3C2
8R3C1R3C2 would close a loopR3C1 links up to R2C1
91R2C1 leads into 3, which would skip 21 links right to 2
10R2C1Its only exit left is R2C2R2C1 links to R2C2

After step 10 one long piece runs R2C2, R2C1, R3C1, R4C1, R5C1, 3, R4C2, R3C2. The rest follows the same way:

  1. R3C2 cannot link to R2C2 (that closes the piece into a loop), so it links to R3C3.
  2. R3C3 cannot link down to R4C3, because that would run 3 into 6. So R4C3 has only R4C4 left, and links there.
  3. R4C4 cannot link down to R5C4 (a loop around 6), so R5C4 has only 7 left: the line ends R5C4, 7. Now 7 has its one link, so R4C5 cannot use it, and R4C5 must link to R3C5 and R4C4.
  4. R2C5, below the 4, cannot link to R3C5: that piece leads to 6, and 5 would be skipped. So R2C5 links to 5, and R3C5 takes its last exit, R3C4.
  5. R1C4 cannot link to 5 (a loop with the 4), so it links to R1C3. Then 2 cannot link to R1C3 (2 would run straight into 4), so 2 links down to R2C2.
  6. R1C3 has one exit left, so it links down to R2C3. R2C3 cannot link to 5, because that would close a loop through the 4, so it links to R3C3. Finally 5 takes its last exit, R3C4, and every square is on the line.
The solution. Each arrow shows which way the line leaves that square; a number with an arrow is a checkpoint the line passes. Follow it from 1 at R1C1 to 7 at R5C5.

No step needed a guess or a look-ahead. Every link came from counting exits or from refusing a link that broke order or closed a loop. Many small path puzzles fall to these three rules alone.

Dead ends and split boards

Most wrong lines fail in one of two ways: they leave a square that can no longer be reached properly, or they cut the empty squares into two parts. Both are easy to see once you know to look, and both are worth checking after every move you draw.

A dead end is an empty square with only one free neighbour. The line can enter it but never leave, so it must be the last square. In Trail the last square is the highest number, so any other dead end means the line is already wrong. The usual way to make one is to run the line one square away from an edge.

Part of a board, top-left corner. The line, shown by arrows, runs down column 2. The corner R1C1 (highlighted) now has one free neighbour, R2C1, so the line could only reach it as its final square.

The same thing happens to a whole strip. Column 1 in that picture is now a corridor, one square wide and closed at the top. The line can go into it from the bottom, but then it has to finish at R1C1. If the last number is somewhere else, that line is wrong, so undo it. Strips of empty squares along an edge are the clearest warning sign in the genre.

A split board is the larger version. Picture a 4x4 board where the line runs from 1 at R1C2 straight down to R4C2. The empty squares now form two groups: column 1, and columns 3 and 4. The head of the line can step into one group, but the line can never return to the other, because the only way back is through squares already used.

A 4x4 board. The line runs from 1 down column 2; o marks its head at R4C2. Column 1 and columns 3 and 4 are now cut off from each other, so the line cannot cover both.

The check is simple to say: after each move, all empty squares must still join up with each other, and the head must touch them. If they fall into two groups, at most one of them can be finished, so undo.

Chessboard parity

Colour the grid like a chessboard and every step of the line moves from one colour to the other, because squares that share a side always have different colours. That one fact, called parity, gives you three checks that the numbers alone do not.

A 5x5 board coloured like a chessboard. The 13 dark squares (#) include all four corners; the other 12 squares are light.

Where the line starts and ends. A line through all 25 squares of a 5x5 board alternates colours, so it uses 13 of one colour and 12 of the other, starting and ending on the colour there are more of. Both ends sit on the corner colour. The same holds on 7x7. On boards with an even number of squares, such as 6x6 and 8x8, the two ends are on different colours. Trail shows you both ends, so this is a check rather than a deduction, and it is why a line through every square of a 3x3 board can never start on the middle of an edge. Colour conditions like this are part of the rules for when a path exists in a rectangular grid, worked out by Itai, Papadimitriou and Szwarcfiter in 1982 and restated in later papers (arXiv: Hamiltonian Paths in Two Classes of Grid Graphs).

Pockets. When the line passes through a group of squares in one go, it alternates colours inside that group. So a group covered in a single pass can have at most one more square of one colour than the other. If you see a pocket of empty squares with two more dark squares than light ones, the line cannot cover it in one pass. It needs at least two, and one of them can be the stretch that starts at 1 or the one that ends on the last number. A T-shape of four squares (a centre and three arms) is the smallest example: three squares of one colour, one of the other, and no single pass covers it.

Stretches between numbers. The number of steps between two consecutive checkpoints is even when they are on the same colour, and odd when they are on different colours. In the worked solve, 2 at R1C2 and 3 at R5C2 are both light, and the line takes six steps between them. In step-count puzzles like Numbrix this becomes strong: odd and even numbers always fall on different colours, a property Hanson and Nash point out in their study of Numbrix clue counts (arXiv: Minimal and maximal Numbrix puzzles). If 10 is on a dark square, 11 must be on a light one.

Distance between numbers, and what walls add

The distance between two consecutive numbers sets the shortest possible stretch of line between them, but it says little about how long that stretch actually is. Count distance as steps across plus steps down (no diagonals). The line from 3 to 4 needs at least that many steps, and it has the same parity as that distance, so it can only be longer by an even number of steps.

Stretch in the worked solveShortest distanceColoursSteps actually used
1 to 21Different1
2 to 34Same6
3 to 47Different7
4 to 52Same2
5 to 64Same6
6 to 72Same2

The steps add up to 24, one for every square after the first. The table shows how to think about it: every square on the board belongs to exactly one stretch between consecutive numbers. When an area of the board is far from every number, ask which stretch is going to cover it. Often only one pair of numbers sits close enough, and that tells you where the line has to make its detour.

In Numbrix and Hidato you get the length for free. If 10 and 14 are given, the stretch is exactly four steps, so 11, 12 and 13 can only sit on squares whose distance from 10 plus distance to 14 is at most four.

Walls change the counting. A wall between two squares removes one exit from each, so squares next to walls become two-exit squares the way corners are. A short run of walls can turn an open area into a one-square-wide corridor that the line must follow end to end. In Puzzle Picnic, Trail's Hard level is 7x7 with walls, and Expert is 8x8 with more walls and fewer numbers: the walls do work that numbers did on the smaller boards. Walls in Trail covers corridors, forced turns and gaps in long fences in detail.

When you get stuck

Being stuck in a well-made path puzzle means you have missed a step, very often a two-exit square. It never means you have to guess. Every Puzzle Picnic puzzle has exactly one solution, and a solver checks that before you ever see it, so there is always a next certain step. This routine finds it.

  1. Recount exits around the newest pieces. Squares next to a recent link are the most likely to have dropped to two exits.
  2. Work from the last number backwards. The highest number has one link. Often its neighbourhood is more constrained than the area around 1.
  3. Check every pair of touching numbers. If they are not consecutive, the link between them is ruled out, which removes an exit from both.
  4. Look for strips along the edges. An empty strip one square wide that is open at only one end must hold the last number. If it does not, the move that made the strip was wrong.
  5. Count colours in any pocket. A pocket with two extra squares of one colour needs at least two passes.

If you have drawn into a corner, take the line back to the last move you were sure of. In Trail you drag back to undo steps, or tap a square on the line to cut it there. Do not undo to the start: the pieces you were sure of are still right.

For a longer look at why these puzzles work this way, the maths behind one-line puzzles explains Hamiltonian paths, and how Trail compares with Hidato and Numbrix covers the history of the number-path puzzles. Puzzle Picnic also has three free hints a day if you want a nudge.

Frequently asked questions

What is the best first move in a path puzzle?

Start at the corners. A corner that is not 1 or the last number forces the line through both of its neighbours, so you can draw two links for free. Then check any numbers that touch but are not consecutive, because those links are ruled out.

Do I have to work from 1 in order?

You draw the line from 1, but you can reason anywhere. Most solvers find pieces around corners and walls first, in their head, then draw from 1 once those pieces join up. Working back from the last number is often easier than working forward.

Is guessing ever needed in Trail?

No. Every Puzzle Picnic puzzle has exactly one solution and can be solved by logic alone. If you feel you need a guess, look again for a square with only two exits or a dead end the line would create.

What does parity mean in a path puzzle?

Parity means colouring the grid like a chessboard. Every step of the line changes colour, so a line through an odd number of squares starts and ends on the same colour, and a pocket covered in one pass can only have one extra square of either colour.

Are these strategies the same for LinkedIn's Zip?

Yes. Zip uses the same rules as Trail: one line through every cell, numbers in ascending order, horizontal and vertical moves, no crossing and no passing through walls. Corners, dead ends, splits and parity all work the same way.

Where to go next

Practise the corner rule and the dead-end check on small boards until you do them without thinking, then move up a size. On Puzzle Picnic that means a few Easy 5x5 boards, then Medium 6x6, then Hard 7x7, where walls start to do the work. Read how to play Trail for the rules in full, what changes at each level for the sizes, and the Trail topic page for every guide. When you are ready, a fresh board is waiting on the Trail page.

Sources