The mathematical foundation of every one-stroke puzzle — explained simply
An Euler path (also called an Eulerian trail) is a path through a graph that visits every edge exactly once. You can think of it as drawing every line in a figure without lifting your pen and without retracing any line.
A --- B | | C --- D Start: A → End: D (different) Visits every edge once
Starts and ends at different vertices. Requires exactly 2 odd-degree vertices.
A / \ B---C \ / D Start: A → End: A (same) Visits every edge once
Starts and ends at the same vertex. Requires 0 odd-degree vertices.
The key difference: an Euler path starts at one vertex and ends at another. An Euler circuit starts and ends at the same place — it's a complete loop.
Euler proved a simple but powerful set of rules for determining whether a graph can be traced in one stroke:
| Odd-Degree Vertices | Result | Type |
|---|---|---|
| 0 | Traceable — start anywhere, end where you started | Euler Circuit |
| 2 | Traceable — must start at one odd vertex, end at the other | Euler Path |
| 4, 6, 8... | Not traceable in one stroke | Impossible |
That's it. Count the odd-degree vertices. If there are 0 or 2, the puzzle is solvable. If there are more, it's impossible. This is called the odd/even vertex rule.
The degree of a vertex is simply the number of edges (connections) touching it. If a vertex has 3 edges, its degree is 3 (odd). If it has 4 edges, its degree is 4 (even).
Example: A house shape
A (degree 2 ✓ even)
/ \
B---C B (degree 3 ✗ odd)
| | C (degree 3 ✗ odd)
D---E D (degree 2 ✓ even)
E (degree 2 ✓ even)
2 odd-degree vertices (B and C)
→ Euler PATH exists: start at B, end at C✓ Yes — Euler circuit. Start anywhere, end where you started.
✓ Yes — Classic one-stroke challenge. Has exactly 2 odd-degree vertices.
✗ No — 4 odd vertices. Euler proved this impossible in 1736.
✓ Yes — Euler circuit. All vertices even, so you can start anywhere and return.
When the One Stroke app generates a new puzzle, it doesn't randomly create grids and hope they're solvable. Instead, it uses Euler's theorem to construct graphs that are mathematically guaranteed to have a solution.
The procedural generation algorithm ensures every puzzle has either 0 or 2 odd-degree vertices — meaning an Euler path or circuit always exists. This is why the game can promise infinite solvable puzzles: it's not luck, it's math.
When you're stuck on a puzzle in One Stroke, try applying Euler's rules:
An Euler path is a trail in a graph that visits every edge exactly once. It starts at one vertex and ends at a different vertex. A graph has an Euler path if and only if it has exactly two vertices with an odd degree.
An Euler path starts and ends at different vertices, visiting every edge once. An Euler circuit starts and ends at the same vertex, also visiting every edge once. An Euler path requires exactly 2 odd-degree vertices; an Euler circuit requires 0.
One-stroke puzzles are essentially Euler path problems. The puzzle asks you to trace every edge exactly once — which is the definition of an Euler path or circuit. Games like One Stroke use Euler's theorem to guarantee every puzzle has a valid solution.
No. An Euler path visits every edge exactly once. A Hamiltonian path visits every vertex exactly once. They're related but different concepts. Euler paths have a simple test (count odd vertices); Hamiltonian paths are much harder to determine (it's an NP-complete problem).
Infinite puzzles. Adaptive difficulty. No forced ads.