Optimal difference triangle sets past the published table, explained from the start
A ▲ after a number means it has a note at the foot of this page.
Optimal difference triangle sets with five marks per ruler for six more sizes past the newest published table, which was built partly with special hardware, a chip configured for one task; three of them are perfect. Explained from the first definition, with a checker.
The known optimal difference triangle sets with five marks per ruler now run to 21 rulers instead of 15, past the newest published table, which was built partly with FPGA hardware. Three of the six new sets are perfect.
A difference triangle set is a collection of rulers on which every distance between two marks, across all the rulers, is different. Such sets are the raw material of certain error-correcting codes, and the shorter the longest ruler, the better. There is a simple lower limit on that length. With the newest published table, by Shehadeh, Kingsford and Kschischang (2025), the limit is known to be reached for every number of rulers up to 15 except 2, 3 and 4, where it is known to be out of reach; the table stops there, and part of its search ran on an FPGA, a chip configured for one task. Searches that Claude agents (Anthropic) wrote and ran under my direction, on one laptop, found sets that reach the limit for every number of rulers from 16 to 21. A set that reaches the limit is optimal: nothing shorter can exist. The three with an even number of rulers are perfect: their distances are exactly 1, 2, 3 and so on up to the length, with no gap. For 16 rulers the 2025 paper reports no shortest set: it used sets of length 165, which it calls sub-optimal, to time its hardware against ordinary processors. The 16-ruler set here has length 160, the shortest possible.
Below, every word the story needs is defined in order, each with an example small enough to check by eye. A checker near the end tests any set in the browser, including all six new ones.
- The sets: optimal sets (no shorter set can exist) with 16 to 21 rulers of five marks each; perfect (every distance from 1 up to the length appears) for 16, 18 and 20.
- Before: the newest table stopped at 15 rulers.
- Checking: a few lines of code check a set in seconds, and optimality needs no long proof, only a count of the distances (word 7 below).
- Public: all six sets and the checker in version 2 of a Zenodo record, a public archive that gives each record a permanent address, published on November 9, 2026.
- Status: not peer reviewed, and no paper has been submitted yet. Novelty is provisional: some older sources were not read.
Words first
Read these in order. Each one uses only the words before it. Readers who know difference triangle sets can skip to the short version.
A ruler with marks
Here a ruler is a set of marks at whole-number positions, the first at 0. Its length is the position of its last mark. Only the marks matter; a ruler of length 11 with marks at 0, 1, 4, 9 and 11 has five marks and nothing in between.
Distances on a ruler
Any two marks measure a distance: the larger position minus the smaller. A ruler with five marks has ten pairs of marks, so it measures ten distances, some possibly equal.
The ruler 0, 1, 4, 9, 11 and its ten distances, one arc per pair of marks: 1, 2, 3, 4, 5, 7, 8, 9, 10 and 11, all different. The value 6 is not measured.
Golomb rulers
A ruler whose distances are all different is a Golomb ruler, after the mathematician Solomon Golomb. The ruler above is one. When a Golomb ruler measures every distance from 1 up to its length, each exactly once, it is perfect.
The ruler 0, 1, 4, 6: distances 1, 2, 3, 4, 5 and 6, each once. It is a perfect Golomb ruler. A single ruler with more than four marks can never be perfect, but a set of several rulers with five marks each can, because the distances are shared out across the rulers. With six or more marks per ruler, no set can be perfect.
The difference triangle
A ruler's gaps are the distances between neighbouring marks. Write the gaps in a row, then the sums of two neighbouring gaps under them, then of three, and so on. The result is a triangle holding every distance of the ruler exactly once: the difference triangle, which gives these sets their name.
The difference triangle of 0, 1, 4, 9, 11. Top row, the gaps 1, 3, 5 and 2; then 4, 8 and 7; then 9 and 10; then the length, 11. The checker below draws this triangle for any ruler.
A difference triangle set
A difference triangle set is several rulers with the same number of marks, such that every distance on every ruler, across all the rulers, is different. Mathematicians write for rulers with marks each ( gaps). This page is about : five marks, ten distances per ruler.
Example
The rulers 0, 1, 4, 9, 11 and 0, 2, 7, 13, 22 do not form a difference triangle set: both measure 2, for example (11 minus 9, and 2 minus 0). Load "Two rulers with a clash" in the checker to see every clash.
The scope
The scope of a set is the length of its longest ruler. The question is how small the scope can be for rulers with five marks.
The lower limit
With rulers there are distances, all different whole numbers, so the largest of them is at least ; the largest distance on a ruler is its length, so the scope is at least too. For an odd number of rulers it is at least , for a reason about even and odd numbers worked out below. The newest table records the conjecture that this limit is reached for every number of rulers except 2, 3 and 4.
Example
Three rulers: 30 distances, so the scope is at least 30, and in fact at least 31 because 3 is odd.
Optimal and perfect
A set is optimal when no set with the same number of rulers has a smaller scope. A set whose scope equals the lower limit is optimal, because nothing shorter can exist; for two, three and four rulers the optimal sets are a little longer than the limit (see the small cases below). A set whose distances are exactly 1, 2, …, up to the scope is perfect; a perfect set is always optimal, and with five marks only an even number of rulers can be perfect.
What the sets are for
Difference triangle sets are used to build error-correcting codes, which add redundancy to data so that errors in transmission can be found and fixed: the classical convolutional self-orthogonal codes, and the newer higher-order staircase codes, a family designed for high-speed optical fibre links. In these codes the scope bounds how much the encoder must remember, so a smaller scope gives a code with a shorter memory. No code was built here; the sets are the raw material.
FPGA, Zenodo, DOI
An FPGA is a chip that can be configured to run one task, here a search, very fast in hardware. Zenodo is a public research archive, and each record there gets a DOI, a permanent web address. The six sets are in a Zenodo record.
The short version
- A difference triangle set is rulers on which all the distances are different (word 5); with five marks per ruler the scope is at least , or for odd (word 7).
- That limit is conjectured to be reached for every except 2, 3 and 4; the newest published table confirmed it up to 15 rulers.
- Searches that Claude agents wrote and ran under my direction, on one laptop, found sets that reach it for every from 16 to 21, so each is optimal, and the three with even are perfect.
- Anyone can check a set in seconds. The six sets are public; novelty is provisional, because some older sources were not read.
Small cases by hand
One ruler
With one ruler of five marks the limit is , and the ruler 0, 1, 4, 9, 11 of word 2 reaches it: it is optimal, with 6 as its one unused value. No ruler of five marks can be perfect.
Why an odd number of rulers costs one more
Add up the ten distances of a ruler with marks . Each mark is counted with a plus sign as many times as it is the larger end of a pair and with a minus sign as many times as it is the smaller end: the last mark 4 times plus, three times plus and once minus, the middle mark twice each way (so it drops out), and once plus and three times minus. That gives : always an even number. So the distances of any set, added up, give an even total. A perfect set with rulers would have the distances , which add up to an odd number whenever is odd. So for odd no set is perfect, and the scope is at least .
| What is added | Sum | Total | Even or odd |
|---|---|---|---|
| Ten distances of 0, 1, 4, 9, 11 | 1 + 4 + 9 + 11 + 3 + 8 + 10 + 5 + 7 + 2 | 60 | even |
| The same sum from the marks: 4 × 11 + 2 × 9 − 2 × 1 | 44 + 18 − 2 | 60 | even |
| 1 + 2 + … + 10 (one ruler would need these if perfect) | 10 × 11 / 2 | 55 | odd |
| 1 + 2 + … + 30 (three rulers) | 30 × 31 / 2 | 465 | odd |
Computed on this page. The ten distances of 0, 1, 4, 9, 11 add up to 60, and so does the formula from the marks. One ruler would need 1 to 10 for a perfect set, which adds up to 55, odd; three rulers would need 1 to 30, which adds up to 465, odd. So neither can be perfect.
The same count says more. A set with an odd number of rulers that reaches the limit has distances among the values 1 to , so exactly one value is left unmeasured, and the even total forces that value to be even.
Two, three and four rulers
For two, three and four rulers the limit (20, 31 and 40) cannot be reached: the shortest scopes are 22, 32 and 41, according to the online tables of James B. Shearer. Those are the three exceptions to the conjecture. Six rulers is the smallest perfect case, with scope 60.
Preciselythe exact statement, for readers who want it
An difference triangle set is sequences whose differences () are distinct. Its scope is the largest mark, and is the least possible scope. For : for even and for odd . If a set with odd has scope and omits the value , then , where is the sum of all differences; both terms are even, so is even.
The six sets
All six reach the limit, so all six are optimal. The table checks each one on this page as it is built, from the sets in the record.
| Rulers | Distances, all different | Scope | Lowest possible | Unused up to the scope | Verdict |
|---|---|---|---|---|---|
| 16 | 160 | 160 | 160 | none | optimal and perfect |
| 17 | 170 | 171 | 171 | 166 | optimal |
| 18 | 180 | 180 | 180 | none | optimal and perfect |
| 19 | 190 | 191 | 191 | 176 | optimal |
| 20 | 200 | 200 | 200 | none | optimal and perfect |
| 21 | 210 | 211 | 211 | 190 | optimal |
Computed on this page from the six set files of the record: every distance distinct, the scope against the limit, and the unused values. The record's README lists the same scopes and the unused values 166, 176 and 190.
Together with the published verification up to 15 rulers, the limit is now reached for every number of rulers up to 21 other than 2, 3 and 4. That statement does not depend on whether the sets are new.
Preciselythe exact statement, for readers who want it
The perfect set, four rulers per line, in the order of the record:
0 6 64 144 160 0 24 77 126 159 0 26 89 131 158 0 2 92 153 157
0 13 84 116 156 0 7 57 108 152 0 11 94 129 150 0 1 74 120 149
0 5 43 128 147 0 10 55 121 146 0 14 48 100 141 0 9 79 115 133
0 8 68 107 130 0 12 88 110 125 0 3 81 112 140 0 17 47 114 134Each perfect set also gives a perfect difference family (the rulers as base blocks modulo ), here with ; the novelty caveat applies to these too.
How the search works
A plain search tries rulers one mark at a time and backs up when two distances clash. At these sizes that is very slow: for 14 rulers, the 2025 paper reports that its own optimized software search found none in more than 70 days on a 16-core processor, and its FPGA took 10 days. The search used here fixes most of each set before testing anything, using an identity from the paper on higher-order staircase codes.
Step 1: split each ruler's distances
Write a ruler by its four gaps (reversed if needed so that ). Its ten distances fall into two groups. Four are large: the middle span plus , , and , a block of four values with a fixed pattern, which the search calls a tile. Six are small: , , , , and , and they add up to twice the ruler's length. This split is the identity taken from the staircase-code paper.
The ruler 0, 1, 4, 9, 11
Gaps 1, 3, 5, 2, so , , . Tile: 8, 9, 10, 11. Small values: 1, 2, 3, 5, 4, 7, which add up to 22, twice the length 11.
Step 2: choose the small values first
Because the small values add up to twice the lengths, short rulers need their small values to be as small as possible. The search assumes, without proof, that some optimal set uses small values close to , picks such a collection of small values at random, and only then fills in the rest. The assumption limits which sets the search can reach, never whether an output is valid, since every output is checked as an ordinary set.
Step 3: tile the rest, then assign the gaps
The remaining values up to the target scope are covered by tiles, one per ruler, like fitting blocks into the gaps of a number line; then each ruler's two inner gaps, and , are chosen so that the small values come out exactly as picked. The second step tries every way of choosing the inner gaps for a given tiling; the first step looks for tilings with random restarts and a time limit, so a fit that exists for a choice of small values can be missed. A miss costs only time, since every set found is checked in full.
Step 4: calibrate, then run
Before any new size, the search had to find sets at the published optimal scopes for 12, 13 and 14 rulers; it did, in seconds to minutes on one processor thread. For 14 rulers the search found an optimal set in 34 seconds on one processor thread; the 2025 paper reports that its FPGA search took 10 days, after its software search on a 16-core processor had found none in more than 70 days. The searches look in different places (this one only among sets with a small sum of ruler lengths), so the times compare methods, not machines. Then four worker threads on one shared laptop ran on the new sizes overnight. The first new set, for 17 rulers, came 280 seconds into the run, at 11:15 p.m. on November 7, 2026 (Pacific time); the last, for 21 rulers, at 9:59 a.m. the next morning.
Try it
Paste rulers, one per line, or load a preset. The checker lists every distance, marks any value that occurs twice, compares the scope with the limit of word 7, and colours every value from 1 to the scope by how often it is measured. It runs the test of the short Python checker in the record (each ruler starts at 0, all distances different, the scope) in the browser, and adds the comparison with the limit; it also asks for each ruler's marks in increasing order, which the Python checker sorts for itself.
- Rulers
- 16, with 5 marks each
- Distances
- 160
- Scope
- 160
- Lower bound
- 160 (the count of distances)
- Verdict
- A perfect set: the distances are exactly 1 to 160, each once.
Every value from 1 to the scope
once unused more than once
Load "16 rulers (perfect)": all 160 squares are filled once. Then change one mark and watch a clash or a gap appear.
What was checked
| Check | What it tested | Result |
|---|---|---|
| Calibration | sets at the published optimal scopes for 12, 13 and 14 rulers | Passed |
| The search's own checker | marks start at 0, all distances distinct, the scope, perfectness | Passed, all six |
| Two further checkers | one written separately by the main Claude session that coordinated the agents, and the checker in the record | Passed, all six |
| This page | all six sets rechecked as the page is built, against the record's scopes and unused values | Passed |
| Optimality | each scope equals the limit of word 7 | Passed, all six |
| Novelty | the newest table and the papers citing it, arXiv, Crossref and Shearer's archived tables | Partial: some older sources not read |
| Peer review | a journal referee | Not yet; no paper submitted |
All the checkers were written by Claude, but the property they test is elementary and every set is public, so anyone can check one without trusting the search or the checkers.
Who did what
Solomon Golomb gave his name to the single-ruler problem. James B. Shearer's online tables record the known difference triangle sets for small sizes. M. Shehadeh, F. R. Kschischang, A. Y. Sukmadji and W. Kingsford found optimal sets for 12 and 13 rulers with a software search in their paper on higher-order staircase codes, which also supplied the identity the search here uses; M. Shehadeh, W. Kingsford and F. R. Kschischang then found those for 14 and 15 rulers, the 14-ruler set with an FPGA search, taking the optimal range for five marks to 15 rulers in 2025. On November 7, 2026 I asked for a problem that could give a real result; a Claude agent proposed this one, and I approved the search. Claude agents, working under my direction, wrote and ran the search code and the checking code, checked the results and the literature, and helped with the writing. I reviewed and published both versions of the record.
Where things stand
- All six sets are public in version 2 of the Zenodo record (version 1, with the first four, is here), with a checker.
- They are optimal, which anyone can verify. Whether they are new is provisional: I have not read Shearer's Handbook chapter (2007) or his IBM report (2008), among other older sources, and any of them could hold sets of these sizes.
- Nothing here is peer reviewed, and no paper on the sets has been submitted yet.
What it is part of
- The result page: Optimal difference triangle sets for k = 4, with the novelty search source by source and the search details for specialists.
- The record: Zenodo, version 2: the six set files and
check_dts.py. - The days it came from: this was one of seven new results found in under two days with Claude agents in November 2026.
- Design theory and coding theory: difference triangle sets sit between Golomb rulers, perfect difference families and the convolutional and staircase codes built from them.
- Search: an identity about the rulers fixed most of each candidate before any testing, which is how one laptop got past a table built partly with special hardware.
Sources
- M. Shehadeh, W. Kingsford and F. R. Kschischang, New difference triangle sets by a field-programmable gate array-based search technique, Journal of Combinatorial Designs 34(1), 37 to 50 (online 2025): doi.org/10.1002/jcd.22009; arXiv:2502.19517.
- M. Shehadeh, F. R. Kschischang, A. Y. Sukmadji and W. Kingsford, Higher-order staircase codes, IEEE Transactions on Information Theory (2025): doi.org/10.1109/TIT.2025.3544168; arXiv:2312.13415.
- J. B. Shearer, Difference triangle sets, online tables (IBM Research), read in Internet Archive copies.
- J. B. Shearer, Difference triangle sets, in C. J. Colbourn and J. H. Dinitz (eds.), Handbook of Combinatorial Designs, 2nd ed., 2007 (not read).
- T. S. Orden, Six optimal difference triangle sets for k = 4, Zenodo, version 2 (2026): doi.org/10.5281/zenodo.24096220; version 1: doi.org/10.5281/zenodo.24064865.
Notes on numbers used on this page
Each number marked ▲ on this page has its note here.
- Seconds the calibration search took to find an optimal (14,4) set of scope 140, on one processor thread: 34. Wall-clock time on a shared machine; three other parameter settings ran 240 seconds each without a find first.
- Largest number of rulers among the six optimal k = 4 difference triangle sets in version 2 of the record: 21. Novelty is provisional: Shearer’s Handbook of Combinatorial Designs entry, his later research report, the papers of Wild and of Kotzig and Turgeon, other papers the 2025 table cites for earlier bounds, and the older literature on perfect systems of difference sets and perfect difference families have not been read.
These notes appear in every version of this page.
Revision history
- 2026-11-20 · revised
The page now gives the times for the largest calibration size: the calibration search on one processor thread, and the two searches the 2025 paper reports; the times compare methods, not machines.
- 2026-11-20 · corrected
Optimal now means the shortest possible for its number of rulers, and the single unused value is stated only for sets that reach the limit; the search method is described as it ran, with a time limit on finding tilings; the credit for the newest published table now says which sets came from software and which from the FPGA; and the 2025 paper is quoted as calling its longer sets sub-optimal.
- 2026-11-16 · created
Written as a from-the-start explainer of the optimal difference triangle sets, with worked tables and a checker.
How to cite this
Tyler Satchel Orden (2026). Optimal difference triangle sets past the published table, explained from the start. Cyborg Mathematics. https://cyborgmathematics.com/writing/difference-triangle-sets-from-zero (updated November 20, 2026)
This page has no DOI of its own. Cite the URL and the date; the revision history above keeps a dated citation meaningful.
BibTeX
@misc{orden2026differencetrianglesetsfromzero,
author = {Tyler Satchel Orden},
title = {Optimal difference triangle sets past the published table, explained from the start},
year = {2026},
howpublished = {Cyborg Mathematics},
url = {https://cyborgmathematics.com/writing/difference-triangle-sets-from-zero}
}See also
- Difference triangle sets for k = 4 that meet the lower bound at each of the next six sizes past the newest published table, which was built partly with an FPGA-based search, so each is optimal: no set with that many rulers can be shorter. Three of the sets are perfect, with no distance left unused.Optimal difference triangle sets for k = 4, extended six sizes past the newest published table
- I pushed the complete check of an Erdős conjecture from 1987 three sizes past the old limit, and not one tree broke it. Every word explained from zero, with small trees worked by hand, the method step by step and a tree builder that computes the counts in the browser.An Erdős conjecture on trees and my complete check of it, explained from the start
- I disproved a conjecture a 2024 paper listed as open, with a small shape of squares, and checked every benzenoid up to three sizes past where a 2018 census stopped.Clar and Fries structures, explained from the start: a disproved conjecture and a census of benzenoids
- The first exact values of the eighth, ninth and tenth virial coefficients (the numbers that describe how a gas of parallel hard squares or cubes behaves as it gets crowded), past an exact frontier that had stood since 1962, explained from the first definition.Exact virial coefficients of hard squares and cubes, explained from the start