One Line Around Every Dot

A Chokwe storyteller smooths the sand, presses a lattice of dots into it with the fingertips, and then draws, without lifting the finger and without stopping the story, a single line that loops every dot and returns to where it began. How many lines it takes is settled before the drawing starts. Below, that number is traced for 1,600 grids in your browser. Then the harder fact: a lecture handout ends by asking for "another symmetrical arrangement" on the four-by-four grid that draws as one line, and it sits directly under a fourfold-symmetric figure. Read that way, all 729 fourfold-symmetric wall sets are enumerated here, every one of them gives an even number of lines, and there is nothing to find. Read loosely, as any symmetry at all, a left-to-right mirror on the same grid has 512 answers. The parity argument that separates those two is proved rather than asserted.

The drawings are called sona (singular lusona), and they belong to the Chokwe (also written Tshokwe or Cokwe) and neighbouring peoples of eastern Angola, north-western Zambia and southern Congo. They are not puzzles. They were drawn at meeting places, by men who had learned them as part of a body of knowledge, to carry a fable, a proverb, a riddle or the description of an animal, and the drawing and the telling happened together. Paulus Gerdes spent more than twenty-five years on them; the mathematical description used on this page is his and that of the people who followed him, and the drawings are not.

A large class of sona, the class this page is about, obeys one strict rule. Imagine the dots sitting at the centres of the cells of a square grid. A ray of light starts at the middle of one cell edge, travels at forty-five degrees, and reflects off the outer boundary of the rectangle and off short mirror walls that the artist places between cells but never draws. The line the ray leaves behind is the lusona. Every dot ends up embraced by it. Gerdes calls these regular mirror curves, and the walls are legible in the finished drawing to anyone who knows to look, which is why a drawing of this kind can be reconstructed from a photograph.

Put your hand on it

Choose a grid. The page traces the ray and draws what it leaves behind, one colour per closed line. Click near an internal cell edge to drop a wall there, click it again to turn the wall through ninety degrees, a third time to take it away. Watch the count.

The sand

Tracing.

The number is fixed before the drawing starts

With no internal walls at all, a grid of a by b dots takes exactly gcd(a, b) lines to cover. This is the first thing anyone notices about sona and it is elementary; Gerdes has it, Chavey hands it to fourth-graders as an experiment, and Radovic sets it as a proof exercise with five worked cases: two by two gives 2, four by two gives 2, five by two gives 1, six by two gives 2, six by three gives 3. The tracer reproduces all five. The corpus already has a page where the same greatest common divisor decides whether a woven cloth hangs together, so the mechanism is not the news here.

What is worth doing with it is this. Trace every grid from one by one up to forty by forty and count how many draw as a single line. That count is the number of coprime pairs below 40, and coprime pairs have density 6/π². So a census of sand drawings measures π. Of the 1,600 grids, 979 draw as one line, which is 61.19% against the limiting 60.79%, and turning that fraction around gives π = 3.1314, off by 0.3%. The tracer knows nothing about arithmetic: it bounces a ray. The number it hands back is checked against 2 × Σφ(k) − 1 = 979, computed from the totient function by code that never sees a grid.

The census

and again on demand

Queued.

The exercise that has no fourfold answer

Now the walls. Radovic's lecture notes on mirror curves walk the reader through the four-by-four grid, which starts as four separate lines, and show that dropping a wall at a crossing between two different lines merges them. Then comes a figure with four walls in fourfold rotational positions, which fails, and then this:

In Figure 10 the mirrors are not symmetric, so the resulting mirror curve is asymmetric as well. Figure 11 shows a symmetric arrangement of four internal mirrors according to a rotation of order 4, so the resulting drawing has the cyclic rotational symmetry of the group C4. However, we have not completely followed the rule about pairing components of different colors, and so we obtained a 4-component (imperfect) mirror curve. Try to make another symmetrical arrangement of internal mirrors in the same 4×4 grid resulting in a perfect (monolinear) mirror curve.

Ljiljana Radovic, Mirror Curves, undated lecture notes, hosted at the New Jersey Institute of Technology.

The invitation is warm, and "another symmetrical arrangement" can be read two ways, so the page settles both. Read strictly, as the sentence stands directly after a figure carrying the fourfold symmetry of C4, it asks for another C4 arrangement; the whole space of those on that grid is 729 configurations, the page walks every one, and there is nothing to find. Read at its loosest, as any symmetry at all, it does have answers, and those are shown below too. What separates the two readings is not how much symmetry is demanded. It is whether the symmetry contains the half turn.

What a reader who already knows this material says here

Nothing has happened yet. The line count is gcd of the sides. Each wall dropped at a crossing between two different lines merges them, so gcd minus one walls is all you ever need, and it is a budget problem. Demanding symmetry just means spending the walls in matched groups instead of one at a time, so you overshoot the budget by a wall or two. On a four-by-four you need three merges and a fourfold orbit hands you four walls at once. That is slack, not an obstruction. Search harder.

That account makes a prediction, and a reasonable one: bigger grids need more merges, so they are harder. Under a quarter turn the five-by-five starts at five lines and needs four merges, against the four-by-four's three. So the five-by-five should be the difficult one. Set the search below to 4 x 4 and then to 5 x 5, under the quarter turn, and see which of the two has an answer.

The whole space, walked

then

Choose a space and press the button.

Under the quarter turn, the four-by-four space is 729 wall sets and 0 of them give one line. The best that space can do is two lines, reached by 320 of the 729. Restricted to the wall placement the Chokwe actually used, walls lying along cell edges rather than across them, it is 0 of 64. Widen the demand from a quarter turn to a half turn, a far weaker constraint offering 531,441 configurations, and the answer is still 0. Meanwhile the five-by-five, which the budget account calls harder, has 14,368 monolinear quarter-turn solutions out of 59,049, the smallest using 8 walls; and the three-by-three has 12 out of 27, the smallest using 4. The dismissal has the ordering exactly backwards.

Sharper still: on the same four-by-four grid, with walls confined to cell edges, demand a left-to-right mirror instead of a half turn and 512 of the 16,384 wall sets are monolinear, the smallest using 3 walls, which is the unrestricted minimum. Same grid, same vocabulary, same budget. One symmetry forbids a single line forever, the other costs nothing at all.

There is one refinement of the budget account that does separate those two, and it deserves to be named rather than waved past, because on this grid it gets the right answer. Under the half turn every orbit of wall positions has size two, so a symmetric wall set always carries an even number of walls; under the left-to-right mirror the four positions on the mirror line are orbits of size one, so an odd number is available. If one wall were one merge, three merges would need three walls, and only the mirror can spend three. That is a real argument, and the page's own rows kill it, because a wall is not a merge. The three-by-three quarter turn needs two merges and pays 4 walls for 2 merges. The five-by-five needs four and pays 8 walls for 4 merges. On the four-by-four itself the best a quarter turn ever manages is two lines from four, which is 8 walls for 2 merges. Once a wall can buy nothing, counting walls predicts nothing, and the wall-parity argument is left with no reason to hold. What survives is a parity carried by the line count itself, and that is the next section.

Why the half turn is fatal

Here is the argument, short enough to check. Write O for the centre of the grid and σ for the half turn about it.

1. The ink is always the same. Put the grid in coordinates so that each dot sits at the centre of a two-by-two cell. Inside each cell, the four short diagonal segments joining the midpoints of its edges form a small diamond around the dot. Every one of those segments is used exactly once by the drawing, wherever the walls are, because a wall only changes which segment continues into which. So as a set of points on the paper the finished drawing is always the union of the same a × b diamonds. Walls decide how the ink is cut into lines. They never decide where the ink is.

2. Only the symmetric lines matter. If the wall set is unchanged by σ then σ permutes the lines. Lines that σ moves come in pairs, so they contribute an even number. The parity of the total is the parity of the number of lines that σ maps to themselves.

3. A symmetric line goes round the centre an odd number of times. Take a line C with σ(C) = C, and suppose O is not on it. Walking C gives a parametrisation, and σ sends it to itself. It cannot reverse the walking direction, because a direction-reversing involution of a loop has two fixed points and the only point σ fixes is O. So σ acts as a shift by half a lap. Half a lap therefore ends diametrically opposite where it began, which is an odd multiple of half a turn about O, so a full lap is an odd number of whole turns. The winding number is odd.

4. Count the ink instead. Lines with even winding number contribute nothing modulo two. Lines with odd winding number that σ moves come in pairs. So, modulo two, the number of lines equals the total winding number of the whole drawing about O, and by step 1 that total is fixed by the grid alone: it is the number of diamonds that contain O.

5. Count the diamonds. If a and b are both odd then O is a dot, and exactly one diamond contains it. If both are even then O is a corner where four cells meet, and no diamond contains it. Either way the answer is gcd(a, b) modulo two, which the wall-free case confirms.

The theorem. On an a × b grid with a + b even, every wall set unchanged by the half turn gives a number of lines congruent to gcd(a, b) modulo two. In particular, if a and b are both even there is no centrally symmetric single-line drawing at all, at any number of walls. Four by four is both even. A quarter turn contains the half turn, so the strict reading of Radovic's exercise, another C4 arrangement, asks for something that does not exist. The loose reading, any symmetry at all, does not: a single mirror line contains no half turn, and the 512 wall sets above are answers to it.

Where the argument stops, exactly. Step 3 needs the centre not to lie on the drawing, and the centre lies on the drawing precisely when a + b is odd. That is not a technicality to wave through: when a + b is odd the conclusion is false. Set the search to 3 x 2 or 4 x 3 under the half turn and both parities turn up. The hypothesis is sharp, and the page shows you it is sharp rather than asking you to believe it.

Recomputed in your browser on load, by walking each space in full. A mismatch turns the check panel red and the page stops reporting.
Gridgcdlines, no wallsa+b half-turn parities seenone line?

This is not a new theorem, and here is who has it

The obstruction is known. Darrah Chavey, writing about strip symmetries of sona in the Bridges 2010 proceedings, describes a companion paper of his own like this:

That paper classifies exactly when a grid of dots with symmetry group C2, C4, D1, or D2 has an arrangement of walls that determines a lusona with the same symmetries (almost always, except when a parity argument shows it to be impossible).

Darrah Chavey, "Strip Symmetry Groups of African Sona Designs", Bridges 2010, p. 113, citing his "Constructing Symmetric Chokwe Sand Drawings", Symmetry: Culture and Science 21(1-3), 191-206, 2010.

We could not obtain that paper. It is on no open archive we could reach on 2026-08-30, the journal's own site returned nothing usable, and the ResearchGate record answers 403. So we do not know how its parity argument is stated or how far it reaches, and this page claims no priority of any kind: the sentence above is enough to establish that somebody got there first and published it. What is here is a re-derivation from scratch, a proof written out with its hypothesis pinned to the point where it fails, and the space walked in front of you. If you have that paper, we would like to read it.

The craft, kept straight

Three things this page is careful about, because they are where a mathematical page about somebody else's art goes wrong.

The walls here are not all Chokwe. A wall can lie along an internal cell edge, or across it, perpendicular, at the edge's midpoint. Chavey is explicit that Chokwe artists used the first kind almost exclusively, and that the perpendicular kind is "often implicit in Celtic knots" and only occasional in Chokwe art. Both are offered here because the enumeration is richer with both, and every figure above is given for the two vocabularies separately. The impossibility does not depend on the choice: 0 of 64 on cell edges alone, 0 of 729 with both.

The recorded corpus is a transcription record, not an archive of originals. What survives is largely what Portuguese and missionary collectors wrote down in the middle of the twentieth century, chiefly Mario Fontinha and Eduardo dos Santos, with Emil Pearson and Gerhard Kubik alongside, and then Gerdes's long reconstruction work on top of that. Chavey reports that Fontinha's collection is about 80% symmetric in some way, and that Gerdes found 61% of 141 sona monolinear while arguing that several of the failures are an informant's imperfect recall of an older artist's design rather than the design itself. Those two percentages are quoted from those sources. They are not computed here, and this page has not counted a single real lusona.

The artists were not confined to a rectangle. Real sona abut rectangles, overlap them, erase corner dots, and hang heads and tails off the finished curve to make the leopard a leopard. This page handles one rectangle with walls in it, which is the case the theorem is about, and nothing here says what a Chokwe artist could or could not draw. It says what a centrally symmetric wall set on a single rectangle can do.

One last thing, which is why the fourfold case matters rather than being a curiosity. Chavey reports that a large majority of extant symmetric sona have central symmetry, 79% in one sample, with C4 and D2 particularly common. Both of those groups contain the half turn, and a single mirror line does not. So the two symmetry types he names as commonest among the recorded drawings are exactly the two that carry the obstruction, on any grid whose sides are both even. That is a statement about which wall sets exist, not about what any artist attempted.

The check

Running.

Two engines, two algorithms

Engine A walks the ray as a directed billiard and counts orbits, which is literally the pen you watched. Engine B never moves anything: at each waypoint it pairs up the incident segment ends from the local wall rule, then runs a union-find over the pairings. Different data structure, different notion of a component. They share build(), which lays out the waypoints and marks the boundary, and nothing else: the rule that turns a wall into a re-pairing is written out twice, once in each. Both run here on every member of every wall space this page puts a number on, except the 531,441 of the half turn, which is spot-checked, and the value that reaches the page is the one they agree on. Two figures are engine A alone: the census of 1,600 grids, which has a stronger check than engine B in the totient closed form that never sees a grid, and the search for the fewest walls of any shape, which the Python re-run repeats offline. They were written by one author, which is the weaker form of independence, and that is what the caveat below is for.

What is asserted

Free choices and things not settled