ExplorationsWhere the ring length decides the ending

Differences Around a Circle

Exhaustively checkeddifferencescyclesparitycurious

Write non-negative whole numbers in a ring. Replace every entry at once by its absolute difference from the clockwise neighbour, using only the old ring to calculate the new one. Four entries always reach all zeroes, but three entries can repeat forever: the ring 0, 1, 1 through 1, 0, 1 and 1, 1, 0 before returning.

Current view: The ring

The circle itself, with the numbers on the rim and each subtraction on a chord.

The ring · 4 places0, 0, 0, 0
00000000

The numbers on the rim are this row; the number on each chord is the distance between the two places it joins, which is what the first of those places will hold next. Read them clockwise and the ring becomes 0, 0, 0, 0. The chord from the last place back to the first is drawn apart, because that wrap is the only thing that makes this a ring rather than a row.

After 5 steps of 5.

place
one position on the rim, holding one number
the chord
the distance between two neighbouring places, which one of them takes next
the wrap
the chord from the last place back to the first

Each number sits at its own place on the rim, and the chord drawn from it to the next place clockwise is labelled with the distance between them. That distance is what the place will hold on the next step, so the chords are not decoration: they are the whole rule, drawn once per pair. The wrap from the last place back to the first is one chord like any other, and it is the only thing separating this from an ordinary row of differences.

4 places, and the ring reaches all zeroes in 5 steps.

Places
4
Steps
5
Ending
all zeroes

The ring

The same numbers 0, 1, 2, … at four different lengths. 4 is a power of two, and this ring reaches zero.

Step by step

Use Step for one change you can inspect, or Run to watch the changes accumulate.

Speed
Advanced parameters
Entry ceiling for the sweep

How large an entry the by-length sweep considers. It fixes the finite box that gets checked, and the counts can never say anything about rings outside it. Longer rings drop out of the chart as the ceiling rises, because the box outgrows what this page will run.

Cases worth seeing

Try this

Run 0 1 2 3 and then 10 11 12 13. Why are the two runs identical from the first step onwards?

1/3

What is going on

Each explanation begins with a worked example and follows the same operation through intuition, formal statements and proofs. Later sections distinguish what is established from questions that remain open, so you can follow the level of detail useful to you.

Worked by handZero, one, two, three around a ring, taken down to all zeroes in five steps. The marked column is the wrap, where the last place meets the first.
The ring
0123
Step 1
|0−1|1|1−2|1|2−3|1|3−0|3
Step 2
|1−1|0|1−1|0|1−3|2|3−1|2
Step 3
|0−0|0|0−2|2|2−2|0|2−0|2
Step 4
|0−2|2|2−0|2|0−2|2|2−0|2
Step 5
|2−2|0|2−2|0|2−2|0|2−2|0

The laboratory draws the same five steps on an actual circle, with the numbers on the rim and each subtraction written along the between the two places it joins, so the wrap is a chord like any other rather than a special case tucked on the end.

Nothing in that calculation cared what the numbers were. Add a hundred to all four of them and every row below the first is identical, because each entry is a distance and a shift common to both ends of it cancels. What the calculation did care about is that there were four places. Take one away and the same rule, on the same kind of numbers, stops finishing.

01

What you are seeing

A plain description of the process

Write non-negative whole numbers around a ring. For each position, find the absolute difference between its value and the value immediately clockwise, subtracting the smaller from the larger. The last position is compared with the first. Calculate every difference from the old ring, then replace all the entries together.

For 0, 1, 2, 3, the four comparisons give 1, 1, 1, 3. Subsequent rings are 0, 0, 2, 2; then 0, 2, 0, 2; then 2, 2, 2, 2; and finally 0, 0, 0, 0. The ring still has four places, but every value is zero after five steps.

The four-place rule always reaches all zeroes. With three places, a different outcome is possible: 0, 1, 1 becomes 1, 0, 1, then 1, 1, 0, then 0, 1, 1 again. Once an entire ring repeats, the same calculations repeat forever.

02

Why it starts to make sense

Intuition, before any algebra

Two observations get you most of the way, and both of them are things you can see in the plate above.

The largest entry cannot increase. Every entry of a new row is a distance between two entries of the old one, so if the largest number in the ring is 9, no distance can exceed 9. The ring is therefore trapped: there are only finitely many rows it can ever hold, and it has infinitely many steps to take. So it must eventually revisit a row. And the rule looks only at the row it is given, so the moment a row recurs, everything after it recurs too. Every run either lands on all zeroes or ends up going round in a loop. There is no third possibility, and no run can wander forever.

Only matters for a while. If you are wondering whether an entry is odd or even, the subtraction is easier than it looks: odd minus even is odd, even minus odd is odd, and like with like is even. That is the same table as addition. So if you throw away everything except the parity of each entry, the rule becomes "add the two neighbours" - and that rule you can follow with , because after steps each place is the sum of the entries places along weighted by .

Put those together and you can see where the ring length gets its say. In a ring of four, after four steps the binomial weights are 1, 4, 6, 4, 1, and the four in the middle are all even; only the two ends survive, and both of them point at the same place, because going four steps round a ring of four is going nowhere. They cancel. Every entry is even. Halve the whole ring and start again with smaller numbers, and repeat until there is nothing left.

In a ring of three that never happens, and 0, 1, 1 is the reason why: it is odd in two places, and every row it produces is odd in two places too.

03

The key idea

What the length decides, and what it does not

The sentence worth carrying away is this one.

The ring length decides whether the rule finishes. The numbers only decide how long it takes.

That is unusual. For nearly every other on this site, the interesting variation is in the starting value: some Collatz climb and some fall, some reverse-and-add starts land in three steps and one has never landed at all. Here the starting value barely matters. Shift the whole ring by a constant and the run is identical from the first step; double it and the run is the same run with everything doubled. The behaviour lives in the shape of the ring, and the crudest fact about that shape is how many places it has.

Two things are being claimed on this page and they are not the same claim.

  • This laboratory ran all ten thousand rings of four single digits and every one reached zero. That is a complete check of a finite box. It is a about those ten thousand rings and about nothing else, and if you raise the entries above 9 it covers none of them.
  • Every ring whose length is a reaches zero, from any start at all. That is a , it is cited here, and this page does not prove it. What the page can do is show you the mechanism behind it, which is the argument in layer 5.

The failure cases go the other way round. To show that 0, 1, 2 never reaches zero you do not need a search at all: you need five rows and the observation that the fifth is the third. That is a , and the ledger marks it as one.

04

Formal statement

Precisely what is being claimed

Let be a ring of non-negative , with indices read , and define the Ducci map

Write for applications, and call vanishing if for some .

  1. for every . Proved.
  2. Consequently every is : it reaches or enters a . Proved.
  3. and for every constant . Proved.
  4. Every is vanishing, and . Exhaustively checked over exactly that set.
  5. Every is vanishing if and only if is a . Proved, and cited rather than reproduced here.
  6. is not vanishing. Proved, by exhibiting its .

Statement 5 is the one that makes the exploration; statements 4 and 6 are what this page can establish on its own, and they are consistent with 5 without being evidence for the half of it that quantifies over every length.

05

Proof

Of the parts that admit one

Entries never grow. Let . Each is a distance between two numbers in , so it lies in itself. ∎

Every is . By the above the orbit stays inside the finite set , which has elements. An infinite in a finite set repeats a value, and is a of its argument alone, so from the first repeat onwards the sequence is periodic. If the repeated row is the orbit has vanished; otherwise it . ∎

, and therefore never vanishes. Two steps give , and then . The fourth of those rows is the first, so the three rows repeat forever, and none of them is . ∎

Why the length matters: the argument. 2, , so over the map is linear: , where is the cyclic shift . Hence

Take and . By Kummer's , is odd only for and when is a , so the sum collapses to . Shifting a ring of places times is the identity, so over : after steps every entry is even, whatever the ring was. ∎

That is the engine of the full . The remaining move is that , so a ring all of whose entries are even can be halved without changing the shape of the run; each block of steps halves the maximum entry, and after at most blocks there is nothing left. This page states that final assembly rather than developing it, and cites the theorem.

What is not proved here. The exhaustive sweep is a about its own box and no more. Ten thousand rings of four digits all reaching zero would remain true even if some ring of four five-digit numbers did not, and the reason no such ring exists is the argument above rather than the sweep. Symmetrically, the loops shown for lengths 3, 5, 6 and 7 prove only that some ring of each of those lengths fails. Plenty of rings at those lengths do vanish - any ring of equal numbers vanishes in one step.

06

Limits and frontier

Where this page stops being able to help

What this laboratory computes. Rings of 2 to 12 places, entries from 0 to 9,999, with a ceiling of 200 steps per run. The arithmetic is ordinary exact arithmetic, and that is enough forever: entries can never grow, so a run that starts inside the safe range stays inside it. The exhaustive sweeps run every ring in a stated box and stop at 300,000 rings, which is why the by-length view uses entries of only 0 and 1 once the ring gets long.

A finite sweep does not become a by being large. The most seductive thing on this page is that its two strongest statements agree. Every ring of four digits vanishes, and every ring of power-of-two length vanishes. The first was checked and the second was proved, and the checking did not contribute to the at all. If you want to feel the difference, raise the entry ceiling: the box grows, the answer does not change, and nothing has been learned about the ring of four entries that happens to be a million.

Where the mathematics is still moving. The two-outcome result and the power-of-two settle the question for rings of non-negative whole numbers, but the same rule can be run on other things: , something, elements of an arbitrary abelian group. lengths in those settings are studied and are considerably less tidy than the picture here, and this page neither computes nor claims anything about them.

Read this next to Gilbreath's difference field. It is the same operation - absolute differences of neighbours - performed on a line rather than a ring. A line of numbers has differences, so it narrows by one at every row and cannot help but run out. Closing the line into a circle keeps the width fixed forever, and that single change is what makes , loops and the whole question of an ending possible at all.

What is actually established

Every statement on this page, with its status, its exact scope, and the date that status was last checked.

Exhaustively checked

All 10,000 rings of four single digits reach all zeroes, and none of them takes more than eight steps.

Scope
Rings of exactly four places whose entries are whole numbers from 0 to 9. Every one of the 10,000 was run in this browser. Nothing here covers rings with larger entries or with a different number of places.
Why
The slowest cases take eight steps, and 0, 1, 4, 9 is one of them. This is a complete check of a finite box and it is a proof about that box, which is not the same thing as a proof about rings of four numbers in general. The general statement is the one this page cites rather than computes.
Computation (exact)
All 10,000 rings of four entries drawn from 0 to 9, run in exact whole-number arithmetic with a ceiling of 200 steps per ring. Entries can never grow, since each is a distance between two entries of the row above, so nothing here can overflow. Recomputed in the test suite. Algorithm ducci-1.
Status checked
Proved

A ring reaches all zeroes from every starting choice exactly when the number of places is a power of two.

Scope
Every ring whose length is a power of two, and every choice of non-negative whole numbers placed on it. Proved in the literature and cited here; this page checks two instances of it and proves neither.
Why
Working modulo 2, taking a distance and taking a sum are the same operation, so one step is the linear map I + S with S the shift around the ring. After k steps the map is (I + S) raised to the k, whose coefficients are the binomial coefficients. When the ring has n places and n is a power of two, every binomial coefficient in row n except the two ends is even, so after n steps the map collapses to I + S^n. Shifting a ring of n places n times puts everything back where it started, so S^n is the identity and I + S^n is I + I, which is zero modulo 2: after n steps every entry is even. Halving the whole ring changes nothing about the run, the largest entry never grows, and so the ring is forced down to zero. The laboratory’s cross-check reproduces the parity half of this argument; the rest is the citation’s.
Status checked
Proved

The ring 0, 1, 2 never reaches all zeroes: after two steps it enters a loop of 3 rows and repeats them forever.

Scope
The single starting ring 0, 1, 2, over all of the infinitely many steps the rule allows.
Why
A complete argument, and a short one. Two steps take the ring to 0, 1, 1, and three more steps bring it back to 0, 1, 1 through 1, 0, 1 and 1, 1, 0. The rule depends on nothing but the row it is given, so a row that has occurred twice must go on occurring, and none of the three rows is all zeroes. Exhibiting the loop is the proof; no search is involved and no step limit is being trusted.
Status checked
Proved

For each of the lengths 3, 5, 6 and 7 there is at least one starting ring that never reaches all zeroes.

Scope
An existence statement about those four lengths, established by exhibiting one looping ring at each of them. It is not a statement about every ring of those lengths, and some rings of every length do reach zero: a ring of equal numbers reaches zero in one step at any length.
Why
Deliberately narrow. The looping rings this page shows are 0, 1, 2 at length 3, then 0, 1, 2, 3, 4 at length 5 and 0, 1, 2, 3, 4, 5 at length 6, each of which is checked to return to a row it has already produced. Length 7 has no preset of its own; its witness is 0, 0, 0, 0, 0, 0, 1, which enters a loop of 7 rows after a single step and is checked in the test suite rather than shown in a figure. That is enough to prove some ring of each of the four lengths fails, and it is not enough to prove anything about all of them. The general statement about every length that is not a power of two is the cited theorem, not this computation.
Status checked
Proved

No step can produce an entry larger than the largest entry already in the ring.

Scope
Every ring, of every length, holding any non-negative whole numbers.
Why
Each new entry is the distance between two old ones, and a distance between two numbers in the range 0 to M is itself in the range 0 to M. So the run is confined to a finite set of rows from the first step onwards, which is why every run must either reach zero or repeat a row. It also means ordinary whole-number arithmetic is exact here for the whole run, with nothing for arbitrary precision to buy.
Status checked

Sources

Review notes show which bibliographic details Mathomaly has checked and which remain unresolved. Checking a publication record does not independently verify its proof.

  1. C. Ciamberlini, A. Marengoni, Su una interessante curiosità numerica, Periodico di Matematiche, 1937. Link

    Citation details remain unresolved after review by Mathomaly.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: unresolved.

    Later journal references support the initials, title and 1937 attribution, but the original article or its publisher's record was not located. Removed unsupported expanded author names; publication details remain unresolved.

  2. Amos Ehrlich, Periods in Ducci’s n-number game of differences, The Fibonacci Quarterly 28(4), pp. 302–305, 1990. Link

    The result stated for general ring lengths: a ring reaches all zeroes for every starting choice exactly when its length is a power of two, and otherwise there are starting rings that fall into a cycle. Cited for the theorem this page does not prove.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: source text.

    Journal scan identifies Amos Ehrlich, correcting Amnon; volume 28(4), pages 302–305.

  3. Florian Breuer, Ducci sequences over abelian groups, Communications in Algebra 27(12), pp. 5999–6013, 1999. Link

    Studies Ducci sequences and the finite-field mechanism. Modulo 2 the difference rule becomes I + S; for a ring of power-of-two length, this linear map is nilpotent.

    Bibliographic record checked. This is not an independent verification of the proof.

    Bibliographic review:

    AI-assisted bibliographic audit. Evidence type: publisher record.

    Publisher gives 1999 print issue, not the 1998 received date or 2007 online date.

Connected by how they work, not by sharing a topic label.