Reading the bag off wolfram23
Reading the bag off wolfram23
Wolfram Institute • 2026
When wolfram23 is back at the left end of its tape in state B, the cells from the head to the first 0 are the blocks of the leading sets of System 4. Their XOR, read by parity scans, is the parity set, and its even elements x are the System 5 bag elements x/2 + 1.
The tape
The tape
A small System 5 program, as a System 4 tape with :
f=1
In[1]:=
tape4=System5ToSystem4[System5[{1,3},{{1},{}}],1]
Out[1]=
System4
Its wolfram23 tape has blocks of width and a left end of 120 zeros; its length in cells:
2^7
In[2]:=
Length[Flatten[Rest[System3ToWolfram23[System4ToSystem3[tape4,7,120]]]]]
Out[2]=
1404
The run of wolfram23, one row every 150 steps; the head is colored by the state:
In[3]:=
Wolfram23EvolutionPlot[System3ToWolfram23[System4ToSystem3[tape4,7,120]],60000,ImageSize->420]
Out[3]=
The decoder
The decoder
At a time when wolfram23 is back at the left end of the tape in state B, the decoder takes the cells from the head up to the first 0, cuts them into blocks of , XORs the blocks, reads the parity after each of the first scans (see the companion notebook on sets as blocks) and turns every even with odd parity into the bag element . The System 4 tape decoded at its own left-end turns:
2^7
x
x/2+1
In[4]:=
System4ToSystem5[#,20]&/@Values[System4Evolution[tape4,1000,#["Active"]==0&&#["State"]==="B"&]]
Out[4]=
{{1,3},Missing[NotAnEncoding],Missing[NotAnEncoding],{2},Missing[NotAnEncoding],Missing[NotAnEncoding]}
wolfram23 decoded at its first six returns to the left end in state B, 123 cells from the edge (the left end has 120 zeros and ):
221
In[5]:=
Wolfram23ToSystem5[#,7,20]&/@Values[Take[Wolfram23Evolution[System3ToWolfram23[System4ToSystem3[tape4,7,120]],50000,#1==2&==123&],6]]
Out[5]=
{{1,3},Missing[NotAnEncoding],Missing[NotAnEncoding],{2},Missing[NotAnEncoding],Missing[NotAnEncoding]}
The two agree, including the returns at which the leading sets are not a bag.