Sparse ruler explained

A sparse ruler is a ruler in which some of the distance marks may be missing. More abstractly, a sparse ruler of length

L

with

m

marks is a sequence of integers

a1,a2,...,am

where

0=a1<a2<...<am=L

. The marks

a1

and

am

correspond to the ends of the ruler. In order to measure the distance

K

, with

0\leK\leL

there must be marks

ai

and

aj

such that

aj-ai=K

.

A complete sparse ruler allows one to measure any integer distance up to its full length. A complete sparse ruler is called minimal if there is no complete sparse ruler of length

L

with

m-1

marks. In other words, if any of the marks is removed one can no longer measure all of the distances, even if the marks could be rearranged. A complete sparse ruler is called maximal if there is no complete sparse ruler of greater length with

m

marks. Complete minimal rulers of length 135 and 136 require one more mark than those of lengths 124-134, 137 and 138. A sparse ruler is called optimal if it is both minimal and maximal.

Since the number of distinct pairs of marks is

m(m-1)/2

, this is an upper bound on the length

L

of any maximal sparse ruler with

m

marks. This upper bound can be achieved only for 2, 3 or 4 marks. For larger numbers of marks, the difference between the optimal length and the bound grows gradually, and unevenly.

For example, for 6 marks the upper bound is 15, but the maximal length is 13. There are 3 different configurations of sparse rulers of length 13 with 6 marks. One is . To measure a length of 7, say, with this ruler one would take the distance between the marks at 6 and 13.

A Golomb ruler is a sparse ruler that requires all of the differences

aj-ai

be distinct. In general, a Golomb ruler with

m

marks will be considerably longer than an optimal sparse ruler with

m

marks, since

m(m-1)/2

is a lower bound for the length of a Golomb ruler. A long Golomb ruler will have gaps, that is, it will have distances which it cannot measure. For example, the optimal Golomb ruler has length 17, but cannot measure lengths of 14 or 15.

Wichmann rulers

Many optimal rulers are of the form

W(r,s)=1r,r+1,(2r+1)r,(4r+3)s,(2r+2)(r+1),1r,

where

ab

represents

b

segments of length

a

. Thus, if

r=1

and

s=2

, then

W(1,2)

has (in order):
1 segment of length 1,
1 segment of length 2,
1 segment of length 3,
2 segments of length 7,
2 segments of length 4,
1 segment of length 1.

A minor variant is

w(r,s)=1r,r+1,(2r+1)(r+1),(4r+3)s,(2r+2)r,1r,

, with a length one less than

W(r,s)

.

W(1,2)

gives the ruler, while

w(1,2)

gives . The length of a Wichmann ruler is

4r(r+s+2)+3(s+1)

and the number of marks is

4r+s+3

. Note that not all Wichmann rulers are optimal and not all optimal rulers can be generated this way. None of the optimal rulers of length 1, 13, 17, 23 and 58 follow this pattern. That sequence ends with 58 if the Optimal Ruler Conjecture of Peter Luschny is correct. The conjecture is known to be true to length 213.[1]

Asymptotics

For every

n

let

l(n)

be the smallest number of marks for a ruler of length

n

. For example,

l(6)=4

. The asymptotic of the function

l(n)

was studied by Erdos, Gal[2] (1948) and continued by Leech[3] (1956) who proved that the limit

\limn\toinfty{l(n)2}/n

exists and is lower and upper bounded by

2+\tfrac{4}{3\pi}=2.424...<2.434...=max0<\theta<2\pi2(1-\tfrac{\sin(\theta)}{\theta})\le\limn\toinfty

l(n)2\le
n
375
112

=3.348...

Much better upper bounds exist for

n

-perfect rulers. Those are subsets

A

of

N

such that each positive number

k\len

can be written as a difference

k=a-b

for some

a,b\inA

. For every number

n

let

k(n)

be the smallest cardinality of an

n

-perfect ruler. It is clear that

k(n)\lel(n)

. The asymptotics of the sequence

k(n)

was studied by Redei, Renyi[4] (1949) and then by Leech (1956) and Golay[5] (1972). Due to their efforts the following upper and lower bounds were obtained:

max0<\theta<2\pi2(1-\tfrac{\sin(\theta)}{\theta})\le\limn\toinfty

k(n)2
n=inf

n\inN

k(n)2=2.6571...<
n\le1282
6166
83.

Define the excess as

E(n)=l(n)-\lceil\sqrt{3n+\tfrac{9}{4}}\rfloor

. In 2020, Pegg proved by construction that

E(n)

≤ 1 for all lengths

n

.[6] If the Optimal Ruler Conjecture is true, then

E(n)=0|1

for all

n

, leading to the ″dark mills″ pattern when arranged in columns, OEIS A326499.[7] All of the windows in the dark mills pattern are Wichmann rulers. None of the best known sparse rulers

n>213

are proven minimal as of Sep 2020. Many of the current best known

E=1

constructions for

n>213

are believed to non-minimal, especially the "cloud" values.

Examples

The following are examples of minimal sparse rulers. Optimal rulers are highlighted. When there are too many to list, not all are included. Mirror images are not shown.

LengthMarksNumberExamplesList FormWichmann
1 2 1 II
2 3 1 III
3 3 1 II.I W(0,0)
4 4 2 III.I
II.II

5 4 2 III..I
II.I.I

6 4 1 II..I.I W(0,1)
7 5 6 IIII...I
III.I..I
III..I.I
II.I.I.I
II.I..II
II..II.I





8 5 4 III..I..I
II.I...II
II..I.I.I
II...II.I



9 5 2 III...I..I
II..I..I.I

-
W(0,2)
10 6 19 IIII..I...I
11 6 15 IIII...I...I
12 6 7 IIII....I...I
III...I..I..I
II.I.I.....II
II.I...I...II
II..II....I.I
II..I..I..I.I
II.....II.I.I






-
-
-
-
-
W(0,3)
-
13 6 3 III...I...I..I
II..II.....I.I
II....I..I.I.I


14 7 65 IIIII....I....I
15 7 40 II.I..I...I...II
II..I..I..I..I.I

W(1,0)
W(0,4)
16 7 16 IIII....I...I...I
17 7 6 IIII....I....I...I
III...I...I...I..I
III.....I...I.I..I
III.....I...I..I.I
II..I.....I.I..I.I
II......I..I.I.I.I





18 8 250 II..I..I..I..I..I.I W(0,5)
19 8 163 IIIII....I....I....I
20 8 75 IIIII.....I....I....I
21 8 33 IIIII.....I.....I....I
22 8 9 IIII....I....I....I...I
III.......I....I..I..II
II.I.I........II.....II
II.I..I......I...I...II
II.I.....I.....I...II.I
II..II......I.I.....I.I
II....II..I.......I.I.I
II....I..I......I.I.I.I
II.....II........II.I.I








-
-
-
W(1,1)
-
-
-
-
-
23 8 2 III........I...I..I..I.I
II..I.....I.....I.I..I.I

24 9 472 IIIIII......I.....I.....I
25 9 230 IIIIII......I......I.....I
26 9 83 IIIII.....I....I.....I....I
27 9 28 IIIII.....I.....I.....I....I
28 9 6 III..........I....I..I..I..II
II.I.I.I..........II.......II
II.I..I..I......I......I...II
II.I.....I.....I.....I...II.I
II.....I...I........I..I.II.I
II.......II..........II.I.I.I





29 9 3 III...........I...I..I..I..I.I
II.I..I......I......I...I...II
II..I.....I.....I.....I.I..I.I


-
W(1,2)
-
35 10 5 III..............I...I..I..I..I..I.I
II.I..I..I......I......I......I...II
II.I..I..I.........I...I......I...II
II..II..........I.I......I.I.....I.I
II..I.....I.....I.....I.....I.I..I.I




36 10 1 II.I..I......I......I......I...I...II W(1,3)
43 11 1 II.I..I......I......I......I......I...I...II W(1,4)
46 12 342 III..I....I....I..........I.....I.....I.....III W(2,1)
50 12 2 IIII...................I....I...I...I...I...I..I..I
II.I..I......I......I......I......I......I...I...II

-
W(1,5)
57 13 12 III..I....I....I..........I..........I.....I.....I.....III
II.I..I......I......I......I......I......I......I...I...II

W(2,2)
W(1,6)
58 13 6 IIII.......................I....I...I...I...I...I...I..I..I
III...I.I........I........I........I........I..I......I..II
III.....I......II.........I.........I.........I..I...I.I..I
II.I..I..........I..I......I.......I.........I...I...I...II
II.I..I..........I......I..I..........I......I...I...I...II
II...I..I...I........I........I........I........I....II.I.I





68 14 2 III..I....I....I..........I..........I..........I.....I.....I.....III
III.....I......II.........I.........I.........I.........I..I...I.I..I

W(2,3)
-
79 15 1 III..I....I....I..........I..........I..........I..........I.....I.....I.....III W(2,4)
90 16 1 III..I....I....I..........I..........I..........I..........I..........I.....I.....I.....III W(2,5)
101 17 1 III..I....I....I..........I..........I..........I..........I..........I..........I.....I.....I.....III W(2,6)
112 18 1 III..I....I....I..........I..........I..........I..........I..........I..........I..........I.....I.....I.....IIIW(2,7)
123 19 2 IIII...I......I......I......I..............I..............I..............I..............I.......I.......I.......I.......IIIIIII..I....I....I..........I..........I..........I..........I..........I..........I..........I..........I.....I.....I.....III
W(3,4)
W(2,8)
138 20 1 IIII...I......I......I......I..............I..............I..............I..............I..............I.......I.......I.......I.......IIII W(3,5)

Incomplete sparse rulers

A few incomplete rulers can fully measure up to a longer distance than an optimal sparse ruler with the same number of marks.

\{0,2,7,14,15,18,24\}

,

\{0,2,7,13,16,17,25\}

,

\{0,5,7,13,16,17,31\}

, and

\{0,6,10,15,17,18,31\}

can each measure up to 18, while an optimal sparse ruler with 7 marks can measure only up to 17. The table below lists these rulers, up to rulers with 13 marks. Mirror images are not shown. Rulers that can fully measure up to a longer distance than any shorter ruler with the same number of marks are highlighted.
Marks Length Measures up to Ruler
7 24 18
7 25 18
7 31 18
7 31 18
8 39 24
10 64 37
10 73 37
11 68 44
11 91 45
12 53 51
12 60 51
12 73 51
12 75 51
12 82 51
12 83 51
12 85 51
12 87 51
13 61 59
13 69 59
13 69 59
13 82 59
13 83 59
13 88 59
13 88 59
13 90 59
13 91 59
13 92 59
13 94 59
13 95 59
13 96 59
13 101 59
13 108 59
13 113 61
13 133 60

See also

References

Notes and References

  1. Robison, A. D. Parallel Computation of Sparse Rulers. Intel Developer Zone. https://web.archive.org/web/20210330141047/https://software.intel.com/content/www/us/en/develop/articles/parallel-computation-of-sparse-rulers.html
  2. Erdös, P.; Gál, I. S. On the representation of

    1,2,,N

    by differences. Nederl. Akad. Wetensch., Proc. 51 (1948) 1155--1158 = Indagationes Math. 10, 379--382 (1949)
  3. Leech, John. On the representation of

    1,2,,n

    by differences. J. London Math. Soc. 31 (1956), 160--169
  4. Redei, L.; Ren′i, A. On the representation of the numbers

    1,2,,N

    by means of differences. (Russian) Mat. Sbornik N.S. 24(66), (1949). 385--389.
  5. Golay, Marcel J. E. Notes on the representation of

    1,2,\ldots,n

    by differences. J. London Math. Soc. (2) 4 (1972), 729--734.
  6. Pegg, E. Hitting All the Marks: Exploring New Bounds for Sparse Rulers and a Wolfram Language Proof. https://blog.wolfram.com/2020/02/12/hitting-all-the-marks-exploring-new-bounds-for-sparse-rulers-and-a-wolfram-language-proof/
  7. A326499.