README.md
8.9 kB · markdown
Automata Census
- Reads the 256 elementary cellular automata as the 256 base-2 designs of
bang dim 3, then measures how much of the design tree survives as dynamics. - The dictionary: Wolfram's rule
Nsends the neighbourhood(l,c,r)to 1 exactly when bit4l + 2c + rofNis set, and the design codeNfills residue corneriexactly when bitiofNis set, with cornericarrying digits(x0,x1,x2)andi = 4 x0 + 2 x1 + x2. So ruleNandbang dim 3, code Nare the same subset of{0,1}^3under(x0,x1,x2) = (l,c,r), bit for bit. - Six groups act on the 256 truth tables and each class count is taken twice, by orbit walk and by Burnside:
Rthe left-right reflection of order 2,H = <reflection, conjugation>of order 4 which is Wolfram's equivalence, the flips-only subgroup of order 8, the permutations-only subgroup of order 6, the cube groupB3of signed axis permutations of order 48, andB3 x Z2of order 96 withZ2the output complement. - One printed line per rule: the
B3,HandB3 x Z2representatives and orbit sizes, popcount,GF(2)degree, genus, the four Walsh level sumsSigma_0..Sigma_3, and the affine flag. Popcount over 8 is Langton'slambda. - Two exact dynamical invariants per rule. Surjectivity is decided by determinising the labelled de Bruijn graph from the full node set and asking whether the empty subset is reachable, which terminates on at most
2^4subsets and needs no word-length bound; it is corroborated by the exact preimage-balance test on every word of length 1 to 12. Injectivity is decided by the pair graph on ordered pairs of de Bruijn nodes with equal output labels, pruned to the nodes lying on bi-infinite paths. - The single-seed census evolves one live cell on a line of width
2T+1+2 padwith constant-0 boundary, crops the central2T+1window and compares only that. Every depth is run atpad = Tandpad = 2Tand the two must agree cell for cell, which is what is asserted; scaling the width withTalone is circular. It counts distinct diagrams as exact sets and up to left-right reflection, records the neighbourhoods each rule ever meets on the whole evolved padded line, and measures how far the occurring key over-separates the diagram. - The gasket section matches rules 60, 102 and 90 against the four base-2 dim 2 codes of fill 3, cell for cell to level 8, under two renderers: one written here and
mrlycore::tensor::Tensor::fractal. - The rule 150 section proves the diagram is an XOR substitution by the
GF(2)identity(1+x+x^2)^(2n) = (1+x^2+x^4)^n, then closes the cell count and the adjacent-pair count of the first2^krows in exact integers, re-deriving what OEIS A087206 and A071053 already state. - Structural laws are asserted; the study exits nonzero if one fails. Headline counts are printed.
RUN
CARGO_BUILD_JOBS=4 cargo run --release -p automata-census- About half a second; prints only, writes nothing, and holds one 256-rule diagram batch at a time, six batches in all,
T = 64, 128, 256atpad = Tandpad = 2T; the batch is about 34 MB atT = 256.
WITNESSES
- Rule
Nandbang dim 3, code Nare the same subset of{0,1}^3, agreeing on all 2048 rule cells over the 256 codes. (Proved by definition; Verified.) - The class counts are 160 under
R, 88 underH, 46 under flips, 80 under permutations, 22 underB3and 14 underB3 x Z2, each taken twice and agreeing. (Verified.) HandB3are incomparable subgroups ofB3 x Z2and meet exactly inR, so the reduction256 -> 88and the reduction256 -> 22are two branches, not a chain, joined only at 14. (Verified; proof on automata.md.)Wis computed on(-1)^f,W(S) = sum_x (-1)^(f(x) + S.x), so the weight-zero sum isSigma_0 = 8 - 2 popcounton all 256 rules;lab/py/life-censususes the0/1convention, whereSigma_0is the fill. (Proved,W(empty)counts zeros minus ones; Verified.)- 16 rules are affine; genus splits
iso 52, axis 18, comp 186over the rules andiso 10, axis 2, comp 10over the 22B3classes, with orbit sizes{1, 2, 4, 6, 8, 12, 24}. (Verified.) - Exactly 30 rules are surjective, by the de Bruijn subset walk. The balance test shrinks
70, 34, 30, 30, ...over word lengths 1 to 12 and equals the walk's set from length 3 on. (Verified, two generators.) - Exactly 6 rules are injective,
15, 51, 85, 170, 204, 240, and every one of them is surjective. (Verified.) - The reversible six are exactly the
B3orbit of 204, the degree-1 single-axis designs. Reversibility IS constant on everyB3orbit, 0 mixed of 22, soB3fails only on surjectivity. (Verified.) - Of the 22
B3classes, 3 are wholly surjective, 18 wholly non-surjective and exactly 1 is mixed: the class of rep 30, of size 24, surjective on30, 45, 75, 86, 89, 101, 106, 120, 135, 149, 154, 166, 169, 180, 210, 225and not on54, 57, 99, 108, 147, 156, 198, 201. So surjectivity is not aB3invariant, with witness pair 30 surjective and 54 not, sharing one orbit. (Proved by witness; Verified.) - Surjectivity is constant on all 88
Hclasses, 0 mixed. (Verified.) - The single seed gives 143 distinct space-time diagrams and 89 up to left-right reflection, with class-size histogram
{1: 118, 2: 13, 4: 4, 8: 4, 16: 4}, identical atpad = Tandpad = 2Tand the same atT = 64, 128and256. (Verified.) - The occurring neighbourhood set is the same at
T = 64, 128and256, with sizes{4: 64, 5: 16, 6: 16, 7: 36, 8: 124}. (Verified.) - The key of a rule is its occurring set, measured on the whole evolved padded line, together with the rule restricted to that set. Equal key implies equal diagram, 0 failures over all 65536 ordered pairs. The converse fails: the key takes 152 values against 143 diagrams, so it over-separates. The 16 rules it splits are
23, 31, 55, 63, 87, 95, 119, 127, which all give the blinking diagram, and151, 159, 183, 191, 215, 223, 247, 255, which all give all ones fromt = 1; they sit in 2 diagram classes carrying 4 and 7 keys, 11 in all. Measured on the cropped window instead the key would be complete, 143 keys, since inside the window either group of eight meets only000, 001, 010, 100, 111and agrees there; the split comes from the boundary neighbourhoods at the ends of the padded line. (Verified for the 152; the 143 on the window is Proved on automata.md.) - Rule 60 read rightward from the seed is
bang dim 2, code 13, rule 102 read leftward isbang dim 2, code 14, and rule 90 in the sheared coordinatej = (t+i)/2isbang dim 2, code 13, each matching cell for cell at levels 1 to 8 and each the unique match among the fill-3 codes7, 11, 13, 14. (Verified, two renderers.) - The rule 150 rows are
(1+x+x^2)^toverGF(2), so row2tis rowtspread by two and row2t+1is row2txor its two unit shifts, checked on rows 0 to 128. The diagram is therefore an XOR substitution. (Proved; Verified.) - The rule 150 row populations for
t = 0..64are OEIS A071053, whose name is the same object. (Verified.) - Let
P(k)be the live cells in rows0..2^k - 1andB(k)the adjacent filled pairs summed over the same rows. Spreading and shifting giveP(k+1) = 4 P(k) - 2 B(k)andB(k+1) = 2 P(k) - 2 B(k), a matrix of trace 2 and determinant-4, soP(k+1) = 2 P(k) + 4 P(k-1)withP(0) = 1, P(1) = 4, henceP(k) = c (1+sqrt5)^k + (1-c) (1-sqrt5)^kwithc = (5 + 3 sqrt5)/10, equivalentlyP(k) = 2^k F(k+2). The growth exponent is exactlylog2(1+sqrt5) = 1.6942419. BothPandBare counted off the evolved diagram and the two-term system is asserted atk = 0..11, withB(0..11) = 0, 2, 4, 16, 48, 160, 512, 1664, 5376, 17408, 56320, 182272. (Verified atk = 0..12,P(12) = 1544192; proof of the system on automata.md.) P(k)over rows0..2^k - 1is OEIS A087206, not a running partial sum of it; A087206%Nalready carriesa(n) = 2 a(n-1) + 4 a(n-2), its%Falready carriesa(n) = 2^n Fibonacci(n+2)and the(1 +- sqrt5)form, and A071053%Falready carriesSum_{k = 0..2^n - 1} a(k) = A087206(n). The study re-derives them; nothing here is new. (Verified.)- The multiset of
|W|at each character weight is aB3invariant on all 256 rules, while the signed level sumsSigma_jare not: theB3orbit of 110 carries 6 distinctSigmavectors. (Verified.) - The
B3orbit of 110 is the 24 rules61, 62, 91, 94, 103, 110, 118, 122, 124, 155, 157, 167, 173, 181, 185, 188, 199, 203, 211, 217, 218, 227, 229, 230, none surjective, none reversible, all of degree 3, popcount 5 and genus compound, with the Walsh amplitude profile constant. None of the invariants computed here separates 110 from a class-mate. (Verified.) - On that orbit the single-seed diagram separates all 24, and the occurring neighbourhood set splits 122 and 218, which meet only the 5 neighbourhoods
00110111, from the other 22, which meet all 8. (Verified.) - The
Hclass of 110 is110, 124, 137, 193with popcounts5, 5, 3, 3, so popcount is not anHinvariant; 137 and 193 are outside theB3orbit of 110. (Verified.)