Part I · The puzzle · Lesson 1
Differences on a circle
What a difference set is, and why searching for one by hand quickly becomes hopeless.
You’ll learn: how to do arithmetic on a clock, what a difference set is, and why finding one by trial and error stops working almost at once.
A clock with seven hours
Picture a clock with only seven hours, numbered 0 to 6. Mark three of them: 0, 1, and 3. Now measure the distance between two marks by counting steps forward (clockwise) from one to the other. From 0 forward to 1 is 1 step; from 1 forward to 3 is 2 steps; from 3 forward to 0 is 4 steps, because you pass 4, 5, 6 and arrive at 0.
Click any two of the points below to count the steps both ways.
Going from one mark to another and back again is a full trip around the clock, so the two distances always add up to 7.
Arithmetic that wraps around
Counting around a clock is ordinary arithmetic with one twist: after 6 comes 0 again. Walk 10 steps forward from 0 and you go once around (7 steps) and then 3 more, landing on 3. Walk one step backward from 0 and you land on 6. Try any whole number, positive or negative, and watch where it lands:
The pattern is the division you learned in school: divide n by 7 and keep the remainder. For 10 that is , so 10 lands on 3. For it is , so lands on 6. The remainder is always one of 0, 1, …, 6, which is why every number lands on one of the seven points.
The differences of a set
The difference of two marks is exactly the forward step count from to , worked out mod . With marks 0, 1, and 3 on the seven-hour clock there are six ways to pick an ordered pair of different marks, and here are their six differences:
Every distance from 1 to 6 shows up, and each one shows up exactly once. That is unusual. Most sets of three marks miss some distances and repeat others.
Here is a workbench for trying sets yourself. Click points to add or remove them. The bar chart counts how often each difference appears; the dashed line shows how often each one should appear for the counts to come out even. Hover over a bar to see which chords make that difference.
Try clicking 3 to remove it and 2 to add it. The set 0, 1, 2 has the difference 1 twice ( and ), and never makes 3 or 4.
Difference sets
Now some names, so we can talk about this in general. Curly braces list the members of a set: is the set whose members are 0, 1, and 3. We write for the set of marks.
A difference set is a set of points on a -hour clock such that every nonzero residue occurs as a difference of two members of exactly times.
The symbol is the Greek letter lambda. We use the same three letters everywhere on this site:
- is the number of points on the clock (the modulus),
- is the number of points in ,
- is how many times each nonzero difference occurs.
So is a difference set. The workbench has more examples: is a difference set, and is an difference set, where every difference turns up exactly twice.
A quick count
A set of points has ordered pairs of different points: choices for the first and for the second. Each pair gives one difference. In a difference set those differences are shared out evenly, apiece, among the nonzero residues, so
Check it: for , . For the set, .
The sets with , where every difference occurs exactly once, are the ones this site is about. They are called planar difference sets, for a reason that will become clear in Lessons 3 and 4. With the count says . Writing , that is
For this gives clocks with points and sets of points.
Why not just search?
For you can find by fiddling. A computer could fiddle systematically: list every way to choose of the points, and check each one. How many are there?
The number of ways to choose things from is written and read ” choose ”. To count them, pick the points one at a time: choices for the first, for the second, and so on down to for the last. Each set has been counted once for every order its points could have been picked in, and there are such orders. So
Thirty-five candidates is nothing. But watch the table below as grows. The last column assumes a computer that checks a billion sets every second.
Run the search for : it checks all 35 subsets and finds 14 difference sets, starting with . For it has to check 736,281 subsets, which still takes only a moment. But by , with , the count is in the hundreds of trillions, and by no computer that could ever be built would finish. (Smarter searches prune most of these candidates, but they still grow far too fast.)
Yet in 1938 James Singer wrote down a planar difference set for every that is a prime or a power of a prime, with no search at all. The rest of this site explains how. The first clue comes from turning the clock: that’s the next lesson.
Try it
Find every way to fill in the blank so that is a difference set. Use the workbench, or reason it out: which differences do 0 and 1 already use?
Show the answer
The pair 0, 1 already uses the differences and . A third point adds four more: , , , and , and these must be exactly 2, 3, 4, 5 in some order. Trying each from 2 to 6, only (adding 3, 4, 2, 5) and (adding 5, 2, 4, 3) work. So the answers are and .
Explore further in the difference set workbench, which handles clocks with up to 64 points.