This notebook has data for Sparse Rulers up to length 600. Here it is.
The Data
The Data
In[]:=
sparsedata=UncompressNormal;
The number of known solutions for a given ruler varies widely. Up to length 213, all sparse rulers that matter are known. For certain lengths up to 213, such as 135, there may be more than the 32617 given solutions. In total, 392755 solutions are given in the notebook. For the attached text version, the number of solutions for a given length is limited to 8835, so data is incomplete for lengths {59,135,136,149,150,164,165,179,180,195,196}.
In[]:=
perfectcounts=Length/@sparsedata;ListLogPlot[perfectcounts]
Out[]=
How many marks are needed for a sparse ruler? , where is the ruler excess, which has been proven to be 0 or 1 for all positive integers (or maybe -1). Here are the first 600 values. Nothing above the 213th value is proven.
Round[
3n+9/4
]+E
n
E
n
In[]:=
rulerexcess={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,1,0,0};
The Functions
The Functions
The Background
The Background
For length 214, here’s a sample sparse ruler that can measure all lengths up to 214:
In[]:=
SplittoRuler[sparsedata[[214,1]]]
Out[]=
{0,1,2,3,4,5,6,7,107,110,113,116,119,127,135,143,151,159,167,175,183,191,199,204,209,214}
Here are a few more:
In[]:=
Column[rulerpic[SplittoRuler[#],Green,Dot@@#]&/@Take[sparsedata[[214]],10],Spacings->-4]
Out[]=
Here’s how the rulers are represented:
In[]:=
Grid[Take[sparsedata[[214]],10]]
Out[]=
{1,100,3,8,5} | {7,1,4,10,3} |
{1,100,5,8,3} | {7,1,3,10,4} |
{1,3,7,15,8,1} | {4,1,2,11,3,4} |
{1,3,10,21,11,1} | {4,2,5,4,6,4} |
{1,4,7,15,8,1} | {3,1,3,9,6,3} |
{1,4,7,15,8,1} | {4,1,3,10,4,3} |
{1,4,9,19,10,1} | {5,1,3,7,4,5} |
{1,5,9,19,10,1} | {4,1,4,5,7,4} |
{1,5,9,19,10,1} | {5,1,4,6,5,4} |
{1,5,10,21,11,1} | {5,1,5,4,6,4} |
My major discovery was that it’s easy to tweak these bins of numbers in various ways that *maybe* give new solutions. With a maybe, a computer can try a lot of things. I basically let an old laptop run for a few months and solved the problem by randomly moving numbers around and keeping track of which methods were more successful.
Below, dark black indicates that the best known solution has Excess=1. Gray means Excess=0. Up to 213, all values are correct, but past that improvements are possible.
In[]:=
Grid[Append[Transpose[Table[PadLeft[Take[Style[If[rulerexcess[[#]]1,Style[#,Black,Bold,13],Style[#,Gray,10]]]&/@Range[327],{WichmannValues[[n]]+1,WichmannValues[[n+1]]}],20,""],{n,30-1}]],Range[3,31]],Spacings{.2,.2},Dividers{False,-2Blue}]
But really, the point of this post is the data at the top. I want to make it available for people to analyze and create new solutions. Alternatively, for all of the nearly 3 million sparse rulers I collected to length 17753, get the zip from my mathpuzzle site.