Flat-folding

The arc that arrived twice

Which of two panels a crease calls its near one is decided by the order a face walk happened to number them, and the mirrored record is the same relation. Except on one sheet, where it is not — and that sheet turned out to be the one whose folded state comes back the other way up, which is how a duplicate in a graph became a diagnosis.

Assumes A loop that goes somewhere and Nothing slides past anything.

A folded state’s layer relations are a graph: an arc from one panel to another means the second lies over the first. The search that looks for a consistent lettering explores that graph, and the graph is derived from the drawing by walking its faces.

One crease of a glued sheet was contributing two arcs, on half the objects measured, and the duplicate turned out to be a diagnosis rather than a defect.

Where an arc comes from

Take a glued cell. Its panels have been identified in pairs — a panel at the left edge and its partner at the right are one panel of the sheet — and its creases likewise.

For each crease, the two panels either side of it are found, mapped to their classes on the glued sheet, and an arc is recorded: near panel, far panel, the crease, and the lattice step between them.

The certificate for the square cell's loopsEach row is one step of the argument that no closed walk in this lettering's layer arcs has its lattice steps adding to zero. A direction on which no loop descends removes every arc with slack to spare; what remains splits into smaller strongly connected pieces and the next direction is asked of those. 2 directions empty it.ruling out the square cell's loops, one direction at a timewhat is left splits248 arcs go, 24 remaindirection (1, 0)102 arcs go, 10 remainwhat is left splits010 arcs go, 0 remaindirection (-1, 0)102 arcs go, 10 remainwhat is left splits010 arcs go, 0 remainthe bar is how many arcs are still in play after the step
Fig. 1 The decision that a glued sheet’s relations need. Where a disc’s test looks for any cycle, this one looks for a closed walk whose lattice steps add to nothing — because a walk that ends one cell over is a stack that climbs rather than a contradiction.

A crease appears in the drawing as several pieces, one per place it crosses the cell. Each piece produces the same arc, so the arcs are deduplicated: the same crease class between the same panel classes with the same step is recorded once.

The duplicate

Which panel is near and which is far is decided by the order the face walk numbered them, and the face walk numbers them arbitrarily.

So the same relation can be recorded two ways: near-to-far with a step, or far-to-near with the opposite step. Those are one arc written twice, and the deduplication was keying on the direction, so both survived.

What joining the edges does to the countsOne row per glued cell: how many panels the drawing shows and how many the sheet has, how many crease pieces are drawn and how many creases those are, how many vertices there are, and Euler's number. Every one of the 9 cells gives V − E + F = 0, which is what a torus gives.gluing a cell's opposite edges, on five tilingspiecespanelsdrawncreasesverticesV−E+Fsquare ×19412840square ×225164032160square ×349368472360triangular ×123123424120triangular ×2694811696480triangular ×31391082462161080hexagonal ×123123424120hexagonal ×2694811696480hexagonal ×31391082462161080a torus has V − E + F = 0, and these three counts are made three different ways
Fig. 2 Counts on glued cells at three sizes. The arc count should equal the crease count, and on five of the ten twist patches measured it exceeded it — by one, two, three or six.

On the square twist the arc count equalled the crease count exactly. On the triangular, hexagonal, elongated and rhombille tilings it exceeded it, by amounts from one to six.

Why it was harmless

The two records of one arc are equivalent on most sheets, and it is worth seeing why, because the reason is what makes the exception interesting.

An arc’s direction depends on the letter and on whether the near panel is face-up. The two panels either side of a crease always have opposite orientation — crossing a crease turns the paper over — so the mirrored record has the opposite near panel and therefore the opposite orientation flag.

Those two differences cancel. Both records give the same arc, pointing the same way, for every letter.

So a duplicate is a redundancy: the graph has one edge listed twice, acyclicity is unaffected, and no verdict moves. Removing the duplicates changed no published number.

Two tests on a sheet with no edgeFor each tiling, one 2×2 glued cell searched twice. The middle column applies the collection's own rule that a cycle in the layer arcs is a contradiction, and it exhausts with nothing found. The right column asks instead whether a cycle's lattice steps add to zero, and finds a lettering.the same 2×2 glued cell, searched under two rulesa cycle is a contradictiona cycle whose steps add to zero isand what the loops dothe square gridnothing, in 359 nodesevery loop travels (2 directions)the triangular gridnothing, in 12,143455 nodesevery loop travels (2 directions)the honeycombnothing, in 9,6191,043 nodesevery loop travels (3 directions)the elongated triangular tilingnothing, in 9,123162 nodesevery loop travels (5 directions)the rhombille tilingunfinished at 200,000unfinished at 200,000“nothing, in n” is an exhausted search: a proof that the pattern has no consistent lettering, which is false
Fig. 3 Verdicts on glued cells. Every one of these is unchanged by the deduplication, because the duplicate arcs were pointing the same way as the arcs they duplicated.

Where it was not

On one family the two records did not have opposite orientation flags. They had the same flag, so they gave arcs pointing in opposite directions — an immediate two-cycle for every letter, and a search that exhausts on every lettering.

That family was the grid, glued at an odd number of periods.

The two ways a gluing failsFor each drawing, size and direction, whether the gluing closes and — where it does not — which of the two failures it is. A gluing can bring the paper back the other way up, which is a parity and kills the two-colouring; or it can bring it back turned through an angle, which means the drawing's period is not the folded state's. No sheet here does both.the two ways a gluing failsthe grid ×1 xflipcomes back turned over — 1 creases crossedthe grid ×1 yflipcomes back turned over — 1 creases crossedthe grid ×2 xclosesthe grid ×2 yclosesthe grid ×3 xflipcomes back turned over — 3 creases crossedthe grid ×3 yflipcomes back turned over — 3 creases crossedone is a parity and the other is an angle, and one number was reporting both
Fig. 4 The grid’s cells at three sizes, glued each way. Odd cells come back turned over, and it is exactly those cells on which the two records of one arc disagreed.

The reason is what the whole thing was diagnosing. The orientation flag on a panel is well defined only when the panel graph is bipartite — when the paper’s two faces can be consistently assigned. On a sheet where a loop returns the paper the other way up, the two panels being identified have the same flag rather than opposite ones, because the identification joined a face-up piece to a face-down one.

So the duplicate arcs pointing opposite ways were the sheet’s non-orientability, showing up in the last place anybody would look for it.

The three steps of derivation

The gap between the symptom and the cause is worth laying out, because it explains why the diagnosis was slow.

Step one: the drawing. A rectangle of pattern, with creases in it, cut so that its edges miss every vertex. Nothing here is wrong at any point in the story.

Step two: the folded state. The panels are given motions by composing reflections along a spanning tree of the face graph. Each panel gets an orientation flag — whether its motion turns the paper over — and that flag is well defined because the panel graph of a flat-foldable drawing is bipartite.

Step three: the identification. Panels at opposite edges are joined. Here is where it goes wrong: the identification can join a panel whose flag says face-up to one whose flag says face-down, and when it does, the flag stops being a property of the glued sheet’s panels.

Step four: the arcs. Built from the flags. If the flags are inconsistent, the arcs are.

So the failure is at step three and the symptom is at step four, and steps three and four are in different functions written months apart. That is a very ordinary distance for a cause and a symptom to be separated by, and it is why the first instinct — fix the arcs — was so natural.

What a two-cycle means

The concrete failure was a pair of arcs pointing opposite ways between the same two panels, which is a two-cycle in the relation graph.

A cycle in the layer relations is a contradiction: panel A is under B, B is under A, and no arrangement of paper satisfies both. A search finding one prunes that branch.

A two-cycle is the smallest possible one and it is present for every letter, since the two arcs’ directions both flip together when a letter changes. So the search prunes every branch immediately and exhausts in a handful of nodes, reporting that no consistent lettering exists.

That report is not obviously wrong. Plenty of sheets have no consistent lettering, and the grid’s odd cells genuinely do not. What gave it away was that the same drawing glued the other way reported differently, and nothing about the drawing distinguished the two directions.

So the bug produced the right answer for the wrong reason on some sheets and the wrong answer on others, which is the least helpful combination available.

Why the twists never showed it

Five of the ten twist patches carried duplicate arcs and none of them misbehaved, and it is worth being precise about the difference.

A twist tessellation’s cell is always orientable: a path round it crosses an even number of creases, because a twist polygon’s pleats come in pairs, one entering and one leaving.

So the identification always joins panels of opposite orientation, the flags are consistent, the mirrored records are equivalent, and the duplicates are pure redundancy.

That is why the whole gluing apparatus was built and used for a long time before the problem appeared. The family it was built on cannot exhibit it, and the families that can arrived later — because gluing anything other than a twist tessellation needed a plane drawing and a stated period, which is machinery of its own.

A construction validated on its easiest case is a construction validated on the case that cannot fail, which is a general hazard and is worth naming as one.

What the fix cost

Both halves are small and it is worth saying so, since a finding of this kind can read as though it required a rewrite.

Deduplicating up to direction is one extra key in a set lookup. Two lines.

Refusing a non-orientable quotient is comparing the determinants of two motions per identified pair, which the code was already computing for a different purpose, and reporting the count separately from the count of rotated pairs. About ten lines, and it produced a second finding on its own, because the number it split had been reporting two different facts.

No published number moved. The twist tessellations’ costs are identical before and after — three, nine, six hundred and twenty-five and fifty-six thousand seven hundred and seventy-two on the square cells, and the same on the others — because on those sheets nothing was wrong.

What moved is that three families can now be glued correctly, and one of them refuses half its sizes for a reason that is now stated rather than being an asymmetric verdict.

The symptom and the disease

The symptom was an asymmetric verdict: a three-period grid cell reported as having a consistent lettering when glued one way and not when glued the other, on a drawing symmetric between its two directions.

Folding a twist tessellation flat is one similarityThe long pair of arrows is a cell of the flat sheet's lattice; the short pair is where that cell goes when the sheet is folded. The folded lattice is the flat one scaled by 0.410373 and turned by 36.62 degrees, and the same two numbers come off all five tilings to eight decimal places.one similarity, three tilingslong: a cell of the flat sheet · short: where it lands foldedthe square grid ×0.41037344the triangular grid ×0.41037344the honeycomb ×0.41037344turned 36.62°, the same on every onethe scale is a property of the pleat, and the tiling does not enter it
Fig. 5 The folded sheet’s own lattice vector on three glued cells. An arc’s lattice step is a step of this, and the step is the part of the record that a disc’s machinery never had to carry.

That asymmetry is impossible for the object and possible for the code, so it was a bug. What it was a bug about took longer: the arcs were the visible layer, the orientation was the cause, and the two are separated by three steps of derivation.

The repair, in two halves

Both halves were needed and neither would have been enough.

Deduplicate up to direction. The mirrored record of an arc is the same arc, so keying the deduplication on the unordered pair and the signed step removes it. That is correct on every sheet and it removes the redundancy.

Refuse a non-orientable quotient before building arcs at all. A sheet whose identification returns the paper the other way up has no consistent notion of which panel lies over which, so its relation graph does not represent anything. Building one and searching it is asking the wrong question, and the answer it gives is not wrong so much as meaningless.

The lettering that was proved impossible, checked on paper with an edgeEach bar is one clipped patch carrying the periodic lettering, its length the number of creases. Every patch passes all four vertex conditions and has no forced loop in its layer order, on 2 tilings and at 2 sizes.the impossible lettering, on ordinary patchessquare ×140 creases16 vertices · every condition holds · no forced loopsquare ×2144 creases64 vertices · every condition holds · no forced looptriangular ×1116 creases48 vertices · every condition holds · no forced looptriangular ×2424 creases192 vertices · every condition holds · no forced loopthe bar is the crease count; the note is what the ordinary checks said
Fig. 6 One periodic lettering written back onto ordinary patches at two sizes. Checking a glued sheet’s answer on code that has never heard of a gluing is what catches an arc structure that has gone wrong.

Doing only the first would have produced a tidy graph representing nothing. Doing only the second would have left a redundancy that costs nothing and looks like sloppiness.

An arc, described properly

Since the essay is about a record in a data structure, the record deserves a description.

An arc has four parts. The near panel class and the far panel class, which are panels of the glued sheet rather than pieces of the drawing. The crease class, likewise. And the lattice step — how many cells across and up the far panel sits from the near one.

The step is the part that only exists on a glued sheet, and it is the part that makes the consistency test different: a closed chain of arcs whose steps add to nothing is a contradiction, and one whose steps add to a nonzero vector is a stack that climbs.

The orientation flag is not part of the arc. It is used to build the arc — to decide which way it points, given a letter — and then discarded. That is why the flag’s inconsistency showed up as two arcs rather than as a flag that looked wrong: by the time anything was inspected, the flag was gone and only its consequence remained.

Keeping the flag on the record would have made the diagnosis immediate. It is not kept, because on an orientable sheet it carries no information the arc does not already have.

The numbers

For the record, since the essay’s evidence is a set of small integers.

Arc counts against crease counts, on the twist tessellations’ torus cells at one and two periods: the square gives eight against eight and thirty-two against thirty-two — no duplicates. The triangular gives twenty-four against twenty-four and ninety-eight against ninety-six — two duplicates. The hexagonal gives twenty-five against twenty-four and ninety-eight against ninety-six. The elongated gives forty-one against forty and one hundred and sixty-two against one hundred and sixty. The rhombille gives fifty-one against forty-eight and one hundred and ninety-eight against one hundred and ninety-two.

Every one of those duplicates was checked and every one was harmless: the two records had opposite orientation flags and gave the same arc.

On the grid, at three periods glued across, one crease class contributed two arcs with the same flag. That is the harmful case, it produced an immediate two-cycle, and the search exhausted in fifteen nodes reporting no consistent lettering — while the same drawing glued along reported a lettering in fourteen.

Two verdicts on a symmetric drawing is impossible for the object, and that is the whole of the evidence that something was wrong.

What was checked afterwards

A finding that changes a derived structure has to be checked against everything built on it, and the check is worth reporting.

The twist tessellations’ costs were re-measured after the deduplication, on all five tilings at every size that finishes: the square cells at one, two, three and four periods, the triangular and hexagonal at one, two and three, the elongated at one, two and three.

Every node count is identical to the number published before. The square cells still cost three, nine, six hundred and twenty-five and fifty-six thousand seven hundred and seventy-two under the correct test, and three, thirty-five, three thousand four hundred and fifty-five and more than two hundred thousand under the disc’s.

Only the arc counts moved, and they moved to equal the crease counts, which is what they were supposed to be.

The check that now runs

The situation is asserted rather than remembered, which is the collection’s usual response to a finding of this shape.

Every glued sheet built here reports how many identified panel pairs have motions differing in the sign of the determinant, and how many differ otherwise. The first count refuses the sheet before any arc is built. The second is the turn and refuses it for a different reason.

And the arc count is compared against the crease count: they have to be equal, since each crease of the glued sheet contributes one relation. A run where they differ is a run where the deduplication has missed something, and it stops the figure being drawn.

Neither check would have caught the original problem on its own — the arc count was legitimately wrong before the deduplication, and the orientation count did not exist. Together they cover both halves, which is the point of having two.

Why redundancy is not the same as being wrong

There is a temptation, on finding a duplicate, to treat the structure as untrustworthy in general, and it is worth resisting.

A graph with an edge listed twice represents the same relation as the graph with it listed once. Acyclicity is unaffected. Reachability is unaffected. Every question the search asks of the graph has the same answer.

So the duplicate cost nothing on the sheets where it was a duplicate, and the results computed with it are results computed on the right object. Nothing has to be recomputed and nothing was.

The exception is the sheet where the two records were not the same relation — and there the problem is not that the structure had a duplicate, it is that the flag it was built from had stopped meaning anything. Calling that a duplicate is already a misdescription.

Which is the useful distinction to carry: a redundancy is harmless and a contradiction wearing the shape of a redundancy is not, and telling them apart means looking at what the two records say rather than counting them.

The general shape, once

The collection has a phrase for this class of thing and it fits: an anomaly in a derived quantity is a message about an assumption in the derivation.

Here the derived quantity was an arc count, the assumption was that two panels either side of a crease have opposite orientation, and the assumption is true on a sheet with two sides and false on one without.

The same shape produced a test imported without its hypothesis, a closure condition compared against a constant and an enumeration that starts from a bottom layer. Four instances, all of them the same sentence going unwritten because it said nothing on the objects available.

Which suggests a habit rather than a fix: when a derived structure comes out with a count that is not the count it should be, the first question is which property of the source the derivation was relying on, and whether the source still has it.

What to take from it

A duplicate in a derived structure has a cause, and the cause is not always the derivation.

The general lesson is about which layer to look at. An arc count exceeding a crease count is a fact about the arc-building code and it was tempting to fix it there — deduplicate harder and move on. That fix would have been correct, would have removed the symptom, and would have hidden the finding.

What made the difference was asking why the mirrored record disagreed, which is a question about orientation rather than about deduplication, and the answer was a property of the sheet that nothing else in the collection was measuring.

Every derived structure carries assumptions from the thing it was derived from. An anomaly in the structure is a message about one of them, and reading it as untidiness discards the message.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

The objects this essay names

Each one links to every other essay that touches it.

CertificateCrease assignmentFace graphGluingLayer multiplicityLayer orderOrientabilityPanel