← All 40 challenges

SOLO-027 · Hamiltonian path

EXTREME

The Maze Without Walls

Number all boxes from 1 to 36 to form a single orthogonal path without repetition.

This page contains the solution.

The answer

The full numbering below determines the only compatible route.

Coordinates: lines from top to bottom, columns from left to right.
L / C123456
15678910
242322212011
332425261912
42128271813
5353629301714
6343332311615

The reasoning

  1. From marker 1 to marker 17, the portion retained is: 1 (L4C2) → 2 (L4C1) → 3 (L3C1) → 4 (L2C1) → 5 (L1C1) → 6 (L1C2) → 7 (L1C3) → 8 (L1C4) → 9 (L1C5) → 10 (L1C6) → 11 (L2C6) → 12 (L3C6) → 13 (L4C6) → 14 (L5C6) → 15 (L6C6) → 16 (L6C5) → 17 (L5C5). Check each orthogonal shift, then mark the boxes already consumed before continuing.
  2. From marker 17 to marker 23, the portion retained is: 17 (L5C5) → 18 (L4C5) → 19 (L3C5) → 20 (L2C5) → 21 (L2C4) → 22 (L2C3) → 23 (L2C2). Check each orthogonal shift, then mark the boxes already consumed before continuing.
  3. From marker 23 to marker 32, the portion retained is: 23 (L2C2) → 24 (L3C2) → 25 (L3C3) → 26 (L3C4) → 27 (L4C4) → 28 (L4C3) → 29 (L5C3) → 30 (L5C4) → 31 (L6C4) → 32 (L6C3). Check each orthogonal shift, then mark the boxes already consumed before continuing.
  4. From marker 32 to marker 33, the portion retained is: 32 (L6C3) → 33 (L6C2). Check each orthogonal shift, then mark the boxes already consumed before continuing.
  5. From marker 33 to marker 36, the portion retained is: 33 (L6C2) → 34 (L6C1) → 35 (L5C1) → 36 (L5C2). Check each orthogonal shift, then mark the boxes already consumed before continuing.
  6. The exploration of all compatible continuations gives 5682 states. It rejects 1042 separations of the remaining cells and 856 violations of distance or parity. Only one complete visit remains.
  7. To reproduce this proof on paper, starting from 1, try each free neighbour in the order high, low, left, right, and keep a tree. Immediately reject a path that reaches a marker in the wrong rank, isolate an unvisited area or cannot reach the next marker in as many steps as required. The last complete path is that displayed; the validator provided performs exactly this exploration.

Common mistakes and false leads

How we verified this answer

DFS comprehensive simple paths, with necessary controls of connection, benchmarks, distance and parity; comparison of all solutions up to two.

{
  "nodes": 5682,
  "dead_ends": 102,
  "connectivity_rejections": 1042,
  "distance_rejections": 856
}

Coordinate the intervals between markers, the separations of regions and the constraints of parity. The solver must explore 5682 prefixes; the level reflects this combined exploration, without automatically absorbing time of calculation and human difficulty.

← Return to puzzle SOLO-027