README.md
17.9 kB · markdown
Memory Census
- The memory dial: a design accepts a digit word when every window of
kconsecutive digits is allowed, andk = 1is the memoryless design of the same code. - The census of every width-
krule at base 2 for(dim, k)in{(1,1), (1,2), (1,3), (1,4), (2,1), (2,2)}: class counts under two groups, Perron roots as exact algebraic numbers, and the memory numberkappa.
THE DIAL
- The alphabet is the
2^dimdigit vectorsd in {0,1}^dim, each read as the corner integerc = sum_i d[i] 2^iwith axision biti. - A width-
krule is a setWof windows(d_1, ..., d_k); the window integer isw = sum_(j=1..k) c_j 2^(dim (k - j)), the first digit most significant. - The rule code has bit
wset iff windowwis allowed, so a rule at(dim, k)is a code in[0, 2^(2^(k dim))):4, 16, 256, 65536rules atdim 1andk = 1..4,16and65536atdim 2andk = 1, 2. - A word
d_1 d_2 ... d_levelis read coarsest digit first and is accepted iff every window ofkconsecutive digits is allowed; every word of lengthlevel < kis accepted. N_W(level)is the number of accepted words of lengthlevel, and#Wthe number of allowed windows.- At
k = 1the code is a bang code and the accepted words of lengthlevelare the cells of the design of that code at that level, so the memory dial atk = 1is the plain design. Verified (memory-census, the(dim,1)rows ofcensus.csv). mrlymath::bang::universe::corners(dim)emits the corner vector row first andcorner_indexfolds it most significant first, so a crate design's corner integer atdim 2isc = x + 2y, bit0the column: the same map this census uses, and no code label moves. Verified (themrlydemotestwidth_one_is_the_plane_design_cell_for_cellpins codes11and13, which the axis swap exchanges and whose designs differ).
THE TRANSFER MATRIX
- The states are the
2^(dim(k-1))windows of widthk - 1;A_W[s][t] = 1iffsandtoverlap ink - 2digits and thek-window they form is allowed. Atk = 1there is one state andA_W = [#W]. N_W(level) = 1^T A_W^(level-k+1) 1forlevel >= k - 1. Proved (a word of lengthlevelis a path oflevel - k + 1steps: its width-(k-1)windows in order are the states, each consecutive pair forms one width-kwindow, and every such path is an accepted word).rho(W)is the Perron root, the spectral radius ofA_W; it is a root of the characteristic polynomial and dominates every eigenvalue in modulus. Proved (Perron-Frobenius for a nonnegative matrix).lim_level N_W(level)^(1/level) = rho(W)wheneverrho(W) > 0. Proved (max_(s,t) (A^n)[s][t] <= 1^T A^n 1 <= S^2 max_(s,t) (A^n)[s][t]withSthe number of states, and the spectral radius is the limit of then-th root of the matrix norm).log_2 rho(W)is the growth exponent ofN_W(level), which is what this study measures. That it is also the Hausdorff dimension per axis of the accepted set is Conjecture here, not proved and not cited.
THE MEMORY NUMBER
kappa(W) = log_2(#W) / k - log_2 rho(W), defined whenrho(W) > 0; a rule withrho(W) = 0accepts finitely many words and is called dead, and the empty ruleW = {}is dead with#W = 0, so no dead rule carries akappa. The crate returns0.0on the empty rule as a convention, not as a value of the formula.kappa(W) >= 0for every rule. Proved (an accepted word of lengthmksplits intomdisjoint allowed windows, soN_W(mk) <= #W^m; takem-th roots and the limit to getrho^k <= #W).kappa(W) = 0whenW = F^kis a product withFa non-empty set of digit vectors, the memoryless case. Proved (every word overFis accepted, soN_W(level) = #F^level,rho = #F >= 1and#W = #F^k). AtF = {}the rule is dead andkappais not defined.- So
kappameasures how much of the window budget the rule wastes: zero means the windows compose freely, and the further above zero, the more the rule forbids by interference rather than by banning digits. - In the whole census
kappa(W) = 0holds on exactly the non-empty product classes and on nothing else:2classes at every(1,k)and5at every(2,k), with0counterexamples over19563live classes. Verified (memory-census,census.csvcolumnsclasses_kappa0andkappa0_nonproduct; the test is exact,kappa = 0iff the minimal polynomial ofrhodividesx^k - #W). - For
k >= 2the largestkappain the census is attained atrho = 1, by the largest rule of zero entropy, and the maximum is a tie over1, 3, 4classes at(1,2), (1,3), (1,4)and3at(2,2). Verified (memory-census,census.csvcolumnskappa_max,kappa_max_code,kappa_max_ties). - At
k = 1every live rule is a product,kappais identically0, and the maximum is attained on every live class at once, the full rule atrho = 2^dimincluded. Verified (memory-census, the(dim,1)rows). kappa_max = 0atk = 1,log_2(3)/2 = 0.792481at(1,2)on code11,log_2(6)/3 = 0.861654at(1,3)on code175,log_2(13)/4 = 0.925110at(1,4)on code49071, andlog_2(10)/2 = 1.660964at(2,2)on code36079, each the least code of its tie. Verified (memory-census,census.csv).- The window budget of zero entropy, the largest
#Wa live class withrho = 1carries, is1, 3, 6, 13atdim 1andk = 1..4and1, 10atdim 2: a rule may allow that many windows and still accept subexponentially many words, and code11at(1,2), which allows00, 01, 11, accepts every0^a 1^bat run lengthsa, b >= 0,N_W(level) = level + 1. Verified (memory-census,census.csvcolumnrho1_windows).
THE GROUP
G_(dim,k)isB_dim, the signed permutations of thedimaxes, acting by the same element on every digit of a window, together with window reversal(d_1, ..., d_k) -> (d_k, ..., d_1).- Every element preserves
N_W(level)for everylevel. Proved (a diagonalB_dimelement relabels the digit alphabet by a bijection, which relabels the states and conjugatesA_Wby a permutation matrix; reversal sends a word to its reverse, a bijection of accepted words, and transposesA_W). - Reversal therefore fixes the characteristic polynomial as well, since
AandA^Tshare it. - A width-
krule atdimaxes is the same object as a subset of thek dim-cube: the same censuses of thek dim-cube counted with a smaller group.#G_(dim,k) = 2^(dim+1) dim!fork >= 2against#B_(k dim) = 2^(k dim) (k dim)!; atk = 1reversal is trivial and#G_(dim,1) = 2^dim dim!. - The distinct window permutations are
2, 4, 4, 4atdim 1andk = 1..4(reversal is trivial atk = 1) and8, 16atdim 2andk = 1, 2. Verified (memory-census,census.csvcolumnsgroup_G,group_B). G_(1,4) < G_(2,2) < B_4as permutation groups of the4-cube: flipping all four bits is diagonalB_2flipping both axes in both blocks, and the(1,4)reversal is the(2,2)block swap composed with the diagonal axis swap. Proved (the generators are exhibited), and the class counts nest as16960 > 4660 > 402. Verified (memory-census;402is A000616 at4).
THE CENSUS
- One row per
(dim, k)incensus.csv, one row per distinct Perron minimal polynomial inclasses.csv. - Classes under
G_(dim,k):3, 9, 88, 16960atdim 1andk = 1..4;6, 4660atdim 2andk = 1, 2. Verified (memory-census, orbit walk, agreeing with an independent Burnside average on every row). - Classes under diagonal
B_dimalone, no reversal:3, 10, 136, 32896atdim 1;6, 8548atdim 2. Verified (memory-census, same two verbs). - At
k = 1the two groups agree and the counts are A000616 atdim:3atdim 1and6atdim 2, the design census reproduced. Verified (memory-census, the(dim,1)rows). - At
dim 1and no reversal the count is2^(2^k - 1) + 2^(2^(k-1) - 1). Proved (Burnside on the group of order 2: the flip acts on the2^kwindows asw -> 2^k - 1 - w, all2^(k-1)two-cycles, so(2^(2^k) + 2^(2^(k-1)))/2). - Against A000616 at
k dim, the ratio of classes underG_(dim,k)is1, 3/2, 4, 42.19...atdim 1andk = 1..4and1, 11.59...atdim 2: the groups agree atk = 1and the smaller group splits cube classes fromk = 2on. Verified (memory-census,census.csvcolumna000616). - Burnside extends the class counts past the orbit walk at no cost: under
G_(1,k)fork = 1..8they are3, 9, 88, 16960, 1074036736, 4611686053860868096, 85070591730234617055658644612208132096, 28948022309329048855892746252171977006958709724020498949042189405102555529216. Verified (memory-census, Burnside extension). - The
G_(1,k)count has the closed forma(2m) = 2^(2^(2m)-2) + 2^(2^(2m-1)-2) + 2^(2^(2m-1)+2^(m-1)-1)form >= 1anda(2m+1) = 2^(2^(2m+1)-2) + 2^(2^(2m)-1) + 2^(2^(2m)+2^m-2)form >= 0. Proved (Burnside over the order-4 group: the digit flip fixes no window, reversal fixes the2^ceil(k/2)palindromes, and flip-reversal fixes the2^(k/2)antipalindromes at evenkand none at oddk; memory-census, verbburnside, where the cycle index and the closed form agree atk = 1..11). - Under
G_(2,k)fork = 1..4:6, 4660, 1152921592116822016, 7237005577332262213973186563042994284449319951280334537682043176672785596416. Verified (memory-census, Burnside extension). - Dead classes, those with
rho = 0:1, 2, 13, 2093atdim 1and1, 53atdim 2. Verified (memory-census,census.csvcolumndead_classes).
THE PERRON ROOTS
- Every distinct transfer matrix is batched into one
gp -qscript: characteristic polynomial from an exact integer Faddeev-LeVerrier in Python, thenfactoroverQandpolrootsrealon each factor in PARI; the factor carrying the largest real root is the minimal polynomial ofrho. - Distinct characteristic polynomials:
3, 6, 23, 431atdim 1andk = 1..4;5, 333atdim 2. Distinct minimal polynomials ofrho:3, 4, 10, 177atdim 1;5, 185atdim 2. Verified (memory-census,census.csv). - At
dim 1andk >= 2every transfer matrix has determinant in{-1, 0, 1}, so the constant term of every characteristic polynomial is0,1or-1. Proved (rowssands + 2^(k-2)are both supported on the columns2sand2s+1taken modulo2^(k-1), and those column pairs partition the columns assruns over0..2^(k-2)-1, so the matrix is a row permutation of a block diagonal matrix with2^(k-2)blocks of size2 x 2over{0,1}; memory-census, verblemmas, where the determinant and the signed block product agree and land in{-1, 0, 1}over all16, 256, 65536rules atk = 2, 3, 4). - Distinct minimal polynomials of
rhoare distinctrho, so the minimal polynomial count is a count of growth rates. Proved (every conjugate ofrho(W)is a root of the characteristic polynomial ofA_Wand so an eigenvalue ofA_W, hence at mostrho(W)in modulus, so two conjugate Perron roots are equal in modulus and, both being nonnegative, equal; memory-census, verblemmas, where no conjugate exceedsrhoon any of the463characteristic polynomials atdim 1andk = 1..4and the3, 4, 10, 177minimal polynomials carry3, 4, 10, 177distinctrho). - The golden ratio
x^2 - x - 1,rho = 1.618033988749, is the Perron root of code7at(1,2), the rule forbidding the window11. Verified (memory-census,classes.csv). - At
(1,3)the four named roots land on the four expected codes, each the least code of its class:x^3 - x^2 - x - 1tribonacci1.839286755214on code127,x^2 - x - 1golden on code55,x^3 - x^2 - 1supergolden1.465571231876on code23,x^3 - x - 1plastic1.324717957244on code54. Verified (memory-census,classes.csv). - Their class counts at
(1,3)are1, 7, 5, 4and their rule counts2, 16, 14, 12; at(1,4)the same four polynomials carry7, 193, 526, 696classes. Verified (memory-census,classes.csv). - At
(2,2)the same four occur on codes327, 19, 323, 326with121, 588, 54, 48classes, so the named roots are not adim 1accident. Verified (memory-census,classes.csv). - The two largest non-integer roots at
(1,4)arex^4 - x^3 - x^2 - x - 1at1.927561975482on code32767andx^4 - 2x^3 + x^2 - 2x + 1at1.883203505913on code64511; at(2,2)they arex^2 - 3x - 3at3.791287847477on code32767andx^2 - 4x + 1at3.732050807568on code49151. Verified (memory-census,classes.csv). - Every Perron root at width
koccurs again at widthk + 1:0missing on all four tested steps. Proved (W' = {(d_1..d_(k+1)) : (d_1..d_k) in W and (d_2..d_(k+1)) in W}accepts the same words of lengthk + 1and above, which is allrhoneeds; atlevel = kexactlyW'has no window and accepts every word) and Verified (memory-census, thenestlines). - A root is strict when every conjugate is smaller in modulus; the decision is numeric, PARI's complex roots against a
1e-20gap, not exact, and thestrictcolumn is empty on the dead rowx. The non-strict roots are12of177at(1,4)and5of185at(2,2), and every one of them isp(x^m)for somem >= 2withpthe minimal polynomial of a strict root already in the census. Verified (memory-census,census.csvcolumnsweak_perron_polys,weak_are_radicals). - That identification is a census observation, not a theorem here: the peripheral spectrum of a nonnegative matrix is
rhotimes roots of unity, and the step from there to a minimal polynomial inx^mneeds the conjugate set ofrhostable underx -> zeta x, which this study does not argue, and these transfer matrices are reducible in general. - So every root of a live rule is either
1or a radical of a strict Perron number in(1, 2^dim]; the dead rules carryrho = 0, on1, 2, 13, 2093classes atdim 1and1, 53atdim 2, and0is a radical of nothing. Witnesses:x^2 - 2,x^3 - 2andx^4 - 2at(1,4), andx^4 - x^2 - 1andx^6 - x^3 - 1, the golden ratio's square and cube roots. Verified (memory-census,classes.csv).
OEIS
3, 10, 136, 32896, 2147516416, thedim 1count with no reversal, greps three hits in the local dump: A055708, A056006, A191363. All three are lists of integers with asigmaproperty and the agreement is a coincidence of the closed form2^(m-1)(2^m + 1)atm = 2^(k-1); none is this census. Verified (grep,3,10,136,32896in the local dump, then the name of each hit read at source).3, 9, 88, 16960(classes underG_(1,k)),6, 4660(underG_(2,k)),3, 4, 10, 177(distinct Perron minimal polynomials atdim 1) and3, 6, 23, 431(distinct characteristic polynomials atdim 1) each grep to zero hits. Verified (grep,3,9,88,16960,,6,4660,,,3,4,10,177,,,3,6,23,431,in the local dump).- Each grep is a comma-prefixed consecutive run against the local dump, so a zero hit is the absence of that run from the dump, not the absence of the sequence from OEIS.
RUN
python3 research/lab/py/memory-census/memory.pyfrom the repository root; the standard library andgponly, no third-party package.- Writes
census.csvandclasses.csvbeside this file. - Runtimes on a laptop: orbit walk
0.04sat(1,4)and0.14sat(2,2), characteristic polynomials3.61sat(1,4), PARI0.17sat(1,4)and0.06sat(2,2), Burnside extension0.01s, whole study4.3s. python3 research/lab/py/memory-census/memory.py burnsideprints the class count underG_(1,k)atk = 1..11from the cycle index of the order-4 group on the2^kwindows, checks the closed form against every term, and prints the orbit count of the same group on the windows themselves, A005418 atk;0.07s.python3 research/lab/py/memory-census/memory.py lemmaschecks the determinant lemma over every rule atk = 2, 3, 4against a Bareiss determinant and against the signed block product, and the Perron lemma over every characteristic polynomial atk = 1..4;13.4s.
WITNESSES
- beneath, The census - the six-row table of rules, classes under both groups, dead classes and minimal polynomials, and the
19563live classes:census.csvand thelive classesline of the run. - beneath, The coupling -
kappa = 0on exactly the non-empty product classes,2at every(1,k)and5at every(2,k), with0counterexamples:census.csvcolumnsclasses_kappa0andkappa0_nonproduct. - beneath, The coupling - the maxima
log_2(3)/2,log_2(6)/3,log_2(13)/4andlog_2(10)/2on the least codes11,175,49071and36079, with ties of1, 3, 4, 3:census.csvcolumnskappa_max,kappa_max_code,kappa_max_ties. - beneath, The famous constants are one notch in - the four named roots on the least codes
7,23,54,127atdim 1and19,323,326,327at(2,2):classes.csv. - beneath, What the dial buys - the distinct minimal polynomials of
rho,3, 4, 10, 177atdim 1and5, 185atdim 2, against3, 6, 23, 431and5, 333characteristic polynomials:census.csv. - beneath, The memory dial - the closed form for the classes under
G_(1,k)atk = 1..11, the determinant lemma atdim 1andk = 2, 3, 4, and the Perron lemma atk = 1..4: the verbsburnsideandlemmas.
COLUMNS
census.csvone row per(dim, k): rules, classes under both groups, group orders, polynomial counts, thekappaextremes with the least code attaining the maximum, the size of that tie, the windows it allows and the zero-entropy window budget, the weak-root counts, the Burnside cross-check, dead classes and per-verb runtimes.classes.csvone row per distinct minimal polynomial ofrho: degree,rhoto 12 digits, class and rule counts, the least code carrying it, its window count, thekapparange over its classes, strictness (empty on the dead rowx) and the name when the polynomial proves one.