One-Stroke Drawing Puzzles: How to Solve Them by Counting Lines
This article was written with AI and may contain mistakes. Found one? Tell us.
To solve a one-stroke drawing puzzle, count how many lines meet at every dot of the figure. If every dot has an even count, you can draw the whole figure in one closed loop from any dot; if exactly two dots have an odd count, you must start at one of those two and finish at the other; if more than two dots are odd, the figure cannot be drawn in one stroke at all.
That single count tells you whether a figure is possible and where to put your pencil before you draw anything. This guide explains why the count works, gives a step-by-step drawing method, walks through a full example, covers the one-way version with arrows and ends with practice puzzles and their answers.
What is a one-stroke drawing puzzle?
You are given a figure made of dots joined by lines. The task is to trace every line of the figure in one continuous movement. You may not lift the pencil, and you may not go over any line a second time.
You are allowed to pass through a dot as often as you like. You are also allowed to cross a line you have already drawn, as long as you do not travel along it again. The only things that matter are the dots and the lines between them, so the size and the exact shape of the figure make no difference.
What counts as a dot and what counts as a line?
Before you count anything, read the figure carefully.
- A dot is any point where a line ends, or where two or more lines meet and you are allowed to turn. Corners are dots.
- A line is one stretch between two dots. A long straight stroke with a dot in its middle is really two lines.
- A crossing with no dot is not a dot. If two lines simply pass over each other, you go straight across and cannot turn there.
- Curves count the same as straight lines. A curved arc between two dots is one line.
When a puzzle is unclear about a crossing, ask whether you may turn there. If you may, treat it as a dot and count its lines.
Why does counting the lines at each dot work?
Think about any dot that is neither your starting dot nor your finishing dot. Every time your route passes through it, you arrive along one line and leave along another. Each visit uses up a pair of lines.
So the lines at a middle dot are always used in pairs, and the count at that dot must be even. A dot with an odd count always has one line left over, and that leftover line can only be the very first line of the route or the very last.
That is why odd dots can only be the start or the finish. A route has one start and one finish, so a figure can have no odd dots, or exactly a pair of odd dots, and nothing else. When every dot is even, the route has to come back to where it began, which makes it a closed loop.
One more condition: the figure must be in one piece. Two separate shapes can never be drawn in one stroke, whatever the counts say.
What does the counting rule tell you?
| Dots with an odd count | Can it be drawn in one stroke? | Where to start | Where you finish |
|---|---|---|---|
| None | Yes | Any dot | Back at the same dot |
| Exactly a pair | Yes | One of the two odd dots | The other odd dot |
| More than a pair | No | Not possible | Not possible |
You will never meet a figure with just one odd dot. Every line has two ends, so the counts over the whole figure always add up to an even total, and odd dots always come in pairs.
How do you draw the route once you know where to start?
Knowing the start is half the job. You still have to avoid getting stuck halfway. Follow these steps.
- Count. Write the number of lines next to every dot.
- Choose the start. If there is a pair of odd dots, pick one. If all are even, pick any dot.
- Draw one line at a time. As you use a line, cross it out or shade it, and lower the counts at both of its ends.
- Do not cut yourself off. Before you take a line, ask whether the lines you have not yet drawn would still be connected to where you will be standing. If taking a line would leave some undrawn part stranded, choose another line. Only take such a line when there is no other choice.
- Expect to end at the other odd dot. If you started at an odd dot, the route will finish at the other one. You may pass through it on the way, as long as it still has an unused line to leave by.
- Check. When you stop, every line should be crossed out. If one is left, go back to the last place where you had a choice and try the other line.
Step four is the one that matters most. A common way to fail is to wander into a small corner of the figure and leave a whole section behind with no way back.
How does the method work on a worked example?
Take the classic house shape: a square with a triangular roof and both diagonals drawn inside the square. Label the dots like this:
- A is the peak of the roof.
- B is the top left corner of the square and C the top right.
- D is the bottom left corner and E the bottom right.
The lines are AB and AC (the roof), BC (the top of the square), BD and CE (the walls), DE (the floor) and the two diagonals BE and CD. The diagonals cross in the middle of the square, but there is no dot there, so you cannot turn at that point.
Step 1: count.
| Dot | Lines meeting there | Even or odd |
|---|---|---|
| A | 2 | Even |
| B | 4 | Even |
| C | 4 | Even |
| D | 3 | Odd |
| E | 3 | Odd |
Step 2: choose the start. There is exactly a pair of odd dots, D and E. So the house can be drawn, but only by starting at one bottom corner and finishing at the other. Starting at the roof peak or at either top corner always fails.
Step 3: draw. Start at D.
- Go up the left wall from D to B.
- Go up the roof from B to A, then down the roof from A to C.
- Go along the top of the square from C back to B.
- Take the diagonal from B down to E.
- Go along the floor from E to D.
- Take the other diagonal from D up to C.
- Go down the right wall from C to E.
The route is D, B, A, C, B, E, D, C, E. It uses all eight lines once and finishes at E, the other odd dot, just as the count promised.
Step 4: check. Every line is used once, and the route ends at E. Along the way you had several free choices. At the end of step 2, for example, going from C straight down the wall to E also leads to a complete route, because E still has lines left to leave by. Passing through the finishing dot early is fine. The only real danger is a line that cuts off part of the figure you have not drawn yet.
A computer check of every possible route agrees with the counting rule: every route that draws the house starts at D or E and finishes at the other.
What happens when the lines have arrows?
Some puzzles add a twist. Each line has an arrow, and you may only travel along it in that direction. Now you count two things at each dot: arrows coming in and arrows going out.
The rule changes in a simple way. For a closed loop, every dot needs exactly as many arrows in as arrows out. For an open route, one dot may have a single extra arrow out, and that is where you must start. One other dot may have a single extra arrow in, and that is where you will finish. Every other dot must be balanced. As before, the figure must also be one connected piece.
A paper published on 18 June 2021 about long routes in balanced one-way networks uses, as a technical step, the nearly balanced case in which every dot is balanced except two, one with a single extra arrow out and one with a single extra arrow in [1].
The same paper notes that this nearly balanced network can be made fully balanced by adding one arrow from the dot with the extra arrow in back to the dot with the extra arrow out [1].
That is exactly the link between the open and the closed one-way puzzle. Add that one missing arrow, and your open route becomes a closed loop.
The paper also points out that in a fully balanced one-way network, every connected piece lets you travel from any dot to any other dot along the arrows [1]. For a solver, that is reassuring: in a balanced figure that is all in one piece, you can never be trapped in a corner with no arrow back out.
A small one-way example. Four dots P, Q, R and S have these arrows: R to P, P to Q, Q to R, R to S and S to Q.
| Dot | Arrows in | Arrows out | Result |
|---|---|---|---|
| P | 1 | 1 | Balanced |
| Q | 2 | 1 | One extra in, so finish here |
| R | 1 | 2 | One extra out, so start here |
| S | 1 | 1 | Balanced |
Start at R. One route is R, P, Q, R, S, Q. The only other route is R, S, Q, R, P, Q. Both start at R and finish at Q, and no route starts anywhere else.
How do you handle figures that cannot be drawn?
When a figure has more than a pair of odd dots, no amount of clever drawing will help. Stop trying and count instead. This saves a lot of wasted pencil work.
Some puzzles then ask a follow-up question: how few strokes does it take? Each additional pair of odd dots needs at least one more stroke, because every stroke can use up at most one pair of odd dots as its two ends. So a figure with two pairs of odd dots needs at least two strokes.
Other puzzles ask which single line you could add to make the figure possible. Joining two odd dots with a new line makes both of them even, which removes one pair at a time.
Why do mathematicians care about drawings like these?
One-stroke puzzles sit inside a large part of mathematics that deals with dots joined by lines. One branch asks how many different ways there are to join the corners of a flat many-sided shape using straight lines that never cross each other. Counting such drawings is an old subject in mathematics, as a paper published on 1 January 2012 explains [2].
Puzzle figures are different, because their lines often cross. Here is a pleasing example. Take a five-sided shape and join every corner to every other corner, so the inside fills with crossing lines. Each corner then has four lines, an even count, so the whole figure can be drawn in one closed loop, starting from any corner.
What are the most common mistakes?
- Counting a plain crossing as a dot. If you cannot turn there, it is not a dot.
- Starting at an even dot when there are two odd ones. The route will always fail, however carefully you draw.
- Forgetting the figure must be in one piece. Separate shapes always need separate strokes.
- Using a line that strands part of the figure. Look ahead before every choice.
- Ignoring arrow directions. In a one-way puzzle, count arrows in and arrows out separately.
Can you solve these practice puzzles?
Part one. Each figure uses the corners of a square, labelled A top left, B top right, C bottom right and D bottom left, unless stated otherwise.
- The square with both diagonals, AC and BD. The diagonals cross in the middle with no dot there.
- The square with only one diagonal, AC.
- Two triangles that touch at one corner, like a bow tie. The dots are A, B, C, D and E, and the lines are AB, BC, CA, CD, DE and EC.
Exactly one of these figures cannot be drawn in one stroke. Which one? For the other two, where must you start? Any working route will do; the answer is the starting dot.
Part two. Four dots K, L, M and N have these one-way arrows: K to L, L to M, M to K, K to N, N to M and M to L. Where must the route start, where does it finish, and how many different routes are there?
Count first, then draw. Try both parts before reading the answers.
What are the answers?
Part one. Figure 1 is the impossible one. Every corner of the square has three lines: two sides and one diagonal. That makes two pairs of odd dots, so it needs two strokes.
Figure 2 can be drawn. A and C each have three lines, while B and D have two. Start at A and finish at C, or the other way round. One route is A, B, C, D, A, C.
Figure 3 can be drawn as a closed loop. C has four lines and every other dot has two, so all counts are even and you may start anywhere. One route is A, B, C, D, E, C, A.
Part two. K has two arrows out and one in, so the route starts at K. L has two arrows in and one out, so it finishes at L. M and N are balanced. There are exactly three routes, and all of them run from K to L: K, L, M, K, N, M, L, then K, N, M, K, L, M, L, and K, N, M, L, M, K, L.
Ready for a live one-way challenge? This riddle asks you to follow a trail of arrows from a marked start, one step at a time, and read off the word it spells. Treat each arrow as a one-way line and keep track of where you are.
References
- Knierim, C., Larcher, M., & Martinsson, A. (2021, June 18). Note on Long Paths in Eulerian Digraphs. The Electronic Journal of Combinatorics, 28(2), P2.37. DOI 10.37236/10297
- de Mier, A., & Noy, M. (2012, January 1). Extremal Statistics on Non-Crossing Configurations. Discrete Mathematics and Theoretical Computer Science, DMTCS Proceedings, 24th International Conference on Formal Power Series and Algebraic Combinatorics (FPSAC 2012), 631-642. DOI 10.46298/dmtcs.3069