Sets as blocks of cells
Sets as blocks of cells
Wolfram Institute • 2026
System 3 stores a set of integers as a block of 2^w cells, 1s and 2s. A scan of the block from left to right replaces each cell by the running parity of the 2s so far; the parity of the whole block after k scans says whether k is in the set. The block of a set is built from the rows of the rule 60 cellular automaton: a scan takes row i to row i - 1, so the XOR of the rows of the elements counts down to each of them.
A scan
A scan
A block is a list of cells 1 and 2; read 2 as a bit 1 and 1 as a bit 0. A scan replaces each cell by the parity of the 2s up to and including it. That is what System 3's head does when it passes over a block in state B: the state it leaves in is the parity of the whole block.
One-element sets
One-element sets
The blocks are built from the rows of the rule 60 cellular automaton started from a single 2 followed by 1s: each row is the previous one XOR itself shifted right by one cell, so cell of row is the binomial coefficient mod 2. The rows at width 32, 2 drawn dark:
j
i
C(i,j)
In[1]:=
ArrayPlot[CellularAutomaton[60,{{1},0},{31,{0,31}}],ImageSize->300]
Out[1]=
A scan takes row back to row (by Pascal's rule, the prefix XOR of row is row ), and only row 0, a single 2, has odd parity. So after scans row has odd parity exactly when : the row counts down to its index.
i
i-1
i
i-1
k
i
k=i
Any set
Any set
Scans and parities are linear, so the XOR of the rows of the elements of a set has, after scans, odd parity exactly when is in the set. Smith's block for the set adds the all-2 row, which is the last row of the window of , and when the block would not start with a 2 also the row before it. The block of at width :
k
k
2^w
{0,2}
2^3
In[2]:=
ParityBlock[{0,2},3]
Out[2]=
{2,2,1,2,2,2,2,2}
Its successive scans, a 2 drawn dark, one scan per row:
In[3]:=
ArrayPlot[NestList[Mod[Accumulate[#],2]&,ParityBlock[{0,2},3]-1,7],Mesh->All,ImageSize->200]
Out[3]=
The parity of each row is the membership of 0, 1, 2, … in :
{0,2}
In[4]:=
Mod[Total/@NestList[Mod[Accumulate[#],2]&,ParityBlock[{0,2},3]-1,7],2]
Out[4]=
{1,0,1,0,0,0,0,1}
Those two added rows count down from the end of the window, so they change only the parities of the last two of the scans; the sets of the emulation never get there, because the width is chosen above the length of the run. The block of , for comparison:
2^w
{1}
In[5]:=
Mod[Total/@NestList[Mod[Accumulate[#],2]&,ParityBlock[{1},3]-1,7],2]
Out[5]=
{0,1,0,0,0,0,1,1}