Puzzle guide
One line puzzles, solved with one rule
Trace every line of a shape in one stroke, without lifting your finger and without going over a line twice. It looks like trial and error, but it is not. One quick count tells you whether a shape can be drawn at all, and exactly where you have to start.
Try three shapes
Tap a point to start, then tap the next point or a line to draw it. Lines you can draw right now glow blue. One of the three shapes is impossible. Can you tell which before you try?
The rule: count the odd points
For every point in the shape, count how many lines meet there. Call a point odd if that number is odd. Then:
0 odd points: the shape can be drawn. Start anywhere, and you will end where you began.
2 odd points: the shape can be drawn. Start at one odd point, and you will end at the other.
4 or more odd points: the shape cannot be drawn in one line. No route exists.
There is no case with exactly one or three odd points. Every line has two ends, so the counts over all points always add up to an even number, and odd points always come in pairs.
Applied to the three shapes above: the house has two odd points, its bottom corners, so you must start down there. The crossed square has four corners with three lines each, so it is impossible. In the star in a pentagon every point has four lines, so you can start anywhere and finish where you started.
Why it works
Think about a point somewhere in the middle of your route. Every time you pass through it, you arrive on one line and leave on another, so you use up its lines two at a time. If a point has an even number of lines, they can all be used up that way. If it has an odd number, one line is always left over, and the only way to use it is to begin or end your stroke there.
A stroke has only two ends, so it can take care of at most two odd points. That is the whole proof. Leonhard Euler worked it out in 1735 for the bridges of a real city, and it is still called an Euler path today. The story of that city is in our article on the Seven Bridges of Königsberg.
In Between Stars, every level of the Bridges mode is a one line puzzle drawn in stars: 15 tutorial levels, then 100 geometric patterns and 101 animal constellations. A solver checks every level before it ships, so there are no impossible shapes, and there is no timer.
The most famous one line puzzle
The house in the first shape is a children's puzzle known across Germany, Austria and Switzerland as Das Haus vom Nikolaus, the house of Saint Nicholas. You draw it while saying "Das ist das Haus vom Ni-ko-laus", which has eight syllables, one for each line. In the Netherlands the same figure is called huis met een kruis, a house with a cross, and in France it is known as the envelope problem, because it also looks like an envelope with its flap open. English has no fixed name for it.
We counted every possible route by computer. From each bottom corner there are exactly 44 ways to draw the house, 88 in total, and only 10 routes from a bottom corner end in a dead end. From the three other points there is no solution at all: you never get further than seven of the eight lines. There is more about the house, in German, on our page about das Haus vom Nikolaus.
What to do with an impossible shape
If a shape has more than two odd points, the question changes from "how?" to "how many strokes?". The answer is simple: half the number of odd points. A connected shape with four odd points needs two strokes, one with six needs three. The crossed square has four odd corners, so two strokes are enough. For example, the first stroke goes from the top left corner diagonally to the bottom right, up to the top right and diagonally down to the bottom left. The second stroke draws the three remaining sides: top right, top left, bottom left, bottom right.
Tips for harder levels
- Count first, draw second. Find the odd points before you touch anything. If there are two, one of them is your start.
- Don't burn your bridges. Never draw a line that would split the unused part of the shape into two separate pieces, unless it is the only line left at that point. This is Fleury's algorithm from 1883, and following it means you can never get stuck.
- Leave dead ends for last. A point with a single line has to be the start or the end of your stroke. Decide which early.
- Fix a near miss. If you finish with a few lines left over, they often form a small loop that touches your route. Redo the route and take that loop the moment you reach the point where it attaches. This is the idea behind Carl Hierholzer's 1873 method for finding Euler paths.
Lines once, or dots once?
Puzzle games use two rules that sound alike but behave very differently. Drawing every line once is the Euler path problem from this page: a simple count decides it, and a computer solves it in an instant even for huge shapes. Visiting every dot once, using whichever lines you like, is the Hamiltonian path problem. There is no simple rule for it, and in general it is NP-complete, one of the 21 problems Richard Karp listed in 1972 as among the hardest in computer science.
Between Stars has both. Bridges asks you to cross every connection once. Starwalk asks you to visit every star once, the rule of William Rowan Hamilton's Icosian game from 1856 and of the knight's tour in chess.
Draw lines between the stars
Between Stars is a calm puzzle game for iPhone with two modes: Bridges, the one line puzzle from this page, and Starwalk, where every star is visited once. No ads, no timers, and you can undo any move. Every level is guaranteed to be solvable.
Free to download for iPhone with iOS 16 or later. No ads, no subscription.
Questions
What is a one line puzzle?
A shape made of points and lines that you have to trace in a single continuous stroke, without lifting your finger or pencil and without going over any line twice. You may pass through a point as often as you like. The same idea also goes by names like one stroke drawing, one touch drawing or draw without lifting.
How do I know where to start a one line puzzle?
Count the lines at every point. If exactly two points have an odd number of lines, start at one of them, and you will finish at the other. If every point has an even number, you can start anywhere and will end where you began.
Can every shape be drawn in one line?
No. If more than two points have an odd number of lines, no route exists, however clever it is. A square with both diagonals is the simplest example: all four corners have three lines, so it cannot be done in one stroke.
How many strokes does an impossible shape need?
Half the number of odd points. A connected shape with four odd points needs two strokes, one with six odd points needs three. The square with both diagonals therefore needs exactly two.
Why do some levels feel hard even when I know the rule?
The rule tells you where to start, not which way to go. You can still get stuck by using a line that cuts the rest of the shape into two separate parts. Avoid that whenever you have another choice and you will never get stuck.
Is connecting every dot once the same kind of puzzle?
No. Visiting every point exactly once, rather than every line, is a different problem called a Hamiltonian path. There is no simple counting rule for it, and in general it is one of the hardest problem types known in computer science, which is why those puzzles need more trial and error.
Sources
- Eulerian path (Euler's rule, Fleury's algorithm, Hierholzer 1873) – Wikipedia
- Seven Bridges of Königsberg – Wikipedia
- Haus vom Nikolaus – German Wikipedia
- House of Santa Claus – Mathematische Basteleien
- Hamiltonian path problem – Wikipedia
- Karp's 21 NP-complete problems – Wikipedia
The route counts for the house (44 per bottom corner, 10 dead ends, none from the top) come from our own exhaustive search of every possible route.