research/lab/rs/memory-meter
1 directory and 2 files in research/lab/rs/memory-meter.
memory-meter
- The Mobius meter of a memory rule:
M_W(x) = sum of mu(n)over the integersn <= xwhose binary digit word the rule accepts, against that set's own massA_W(x). - Every width-
1, width-2and width-3rule at dim1, base2is read:4,16and256codes,276rules in all, the width-1codes being the memoryless row. - An integer
n >= 1is its minimal base-2word, coarsest digit first, no leading zero;0is excluded from every sum. The rule reading ismrlynum::memory::Rule: a window ofkdigits isw = sum_j c_j 2^(k - j), bitwof the code is set when that window is allowed, a word is accepted when every one of itsk-windows is allowed, and a word shorter thankis accepted. - No exponent is fitted. Printed per rule and phase are
A_W(x),M_W(x),max abs M_W(t)overt <= x, the ratiosM_W/sqrt(A_W)andmax abs M_W/sqrt(A_W), withkappa,rhoandcard Wfrom the crate.
THE METHOD
- One ascending pass over
n <= 2^30carrying the window profile ofn, the bitmask of the2^3windows its word contains, byprofile(n) = profile(n >> 1) | bit(n mod 8)forn >= 4;nis accepted byWexactly whenprofile(n)is a subset ofW. - The width-
2and width-1profiles are induced from the width-3one: for a word of three digits or more every2-window is a prefix or a suffix of some3-window and every digit lies in one, so oneu8perncarries all three widths. The words of one and two digits are entered by hand. - The mass per profile is a
256-bucket count andA_Wis its subset-sum transform at each phase; the meter is carried per rule so the running maximum is exact, and the subset-sum transform of the per-profilemusums is asserted equal to it at every phase. - Phases are
x = floor(2^(level + j/4))forlevel 8..30andj = 0..3,89of them,2^30last. muismrlynum::factor::mobius_sieve, the crate's linear Mobius sieve;mrlynum::sievecarries the Sierpinski word and no Mobius, so nothing there is reused.rhoandkappacome frommrlynum::memory::perronandkappa, which split the digraph into strongly connected components and make each component's Perron root exact against its integer characteristic polynomial, so every printed root is an algebraic integer of the right minimal polynomial.
THE CONTROLS
- The full line,
k = 1code3, is the Mertens function: its meter reads-1, 1, 2, -23, -48, 212, 1037, 1928at10^1..10^8, asserted, which is A084237. - The memoryless base-
3designs are enumerated directly from the same sieve and asserted against mobius-designs: digits{0,1}read(M, max abs M) = (11, 105)atlevel 14,(149, 173)atlevel 16and(-30, 312)atlevel 18, digits{1,2}read(-1461, 1582)atlevel 18. Digits{0,2}atlevel 20wants3^20, past2^30, so it is printed atlevel 14, 16, 18and not pinned. The four pinned pairs are read at source in design-meter, which computes them and cites mobius-designs as their census. - The profile recurrence is asserted against a direct digit recount on all
276rules below2^20, and profile containment againstRule::acceptson all276rules below2^12. - Code
7atk = 2, the golden rule forbidding11, opens1, 2, 4, 5, 8, 9, 10, 16, 17, 18, 20, 21, which is A003714 without its zero, and its mass is the Fibonacci number. Code11, forbidding10, opens exactly the Mersenne numbers A000225 without its zero, one per level. - Leading zeros: a rule is zero-closed when prepending one zero to the word changes no membership below
2^20. Both masses are printed per rule and the criterion is asserted code for code.
RUN
CARGO_BUILD_JOBS=4 cargo run --release -p memory-meter- About thirty seconds on one thread,
23sof it the sieve; peak resident set about2.15 GB, onei8and oneu8per integer. Prints only, writes nothing. - An optional depth argument runs a shallower table at the same phases:
-p memory-meter -- 28takes about seven seconds and0.6 GB, and its rows are the first81phases of the deep run verbatim.
READS
- Every ratio below is a reading at a named phase, never a fit and never a sweep-wide claim unless it says so.
rhoandkappaare read off the transfer matrix of the word language whileAandMare read off the integer set; on a rule that is not zero-closed those are different objects, and the columns sit side by side for that reason. - The census is the
53rules of all three widths holding at least10^4integers below2^30; the floor is part of the census and is fixed before any reading. The same rules under a floor of64number106. - The full line at phase
30.00:A = 1073741824,M = -10374,max abs M = 11173,M/sqrt(A) = -0.316589,max abs M/sqrt(A) = 0.340973. Three codes carry it,k = 1code3,k = 2code15andk = 3code255. - The golden rule,
k = 2code7,kappa = 0.098239,rho = 1.618033989:A = 2178309,M = 551,max abs M = 716, ratios0.373329and0.485125at phase30.00. Code14, forbidding00, readsA = 3524576,M = -466, ratios-0.248218and0.454355. - The three named
k = 3least codes at phase30.00:23supergolden,kappa = 0.115204,A = 125492, ratios-0.448837and0.731125;54plastic,kappa = 0.260981,A = 13579, ratios-0.360425and0.677943;127tribonacci,kappa = 0.056639,A = 98950096, ratios-0.432878and1.239625. - The normalised peak over the census at phase
30.00spans[0.293624, 1.239625], least onk = 3code125and largest onk = 3code127. Over all89phases the same quantity spans[0.500000, 2.169240], the top onk = 3code232at phase16.75; a last-phase span is not a sweep-wide span. - Read against the full line at the same phase, the factor over the census is
[0.861136, 3.635552]at phase30.00and reaches6.375774onk = 3code190at phase12.75over all phases. - Grouped by
kappaover the census the means read0.340973on[0, 10^-9)with3rules, then0.622171on6,0.581446on14,0.644840on12and0.645966on18for the bands[10^-9, 0.1),[0.1, 0.2),[0.2, 0.3)and[0.3, 0.5). Every band of positive coupling sits above thekappa = 0band, and among them the means are not monotone inkappa, so the coupling does not order the spread. Restricted tok = 3the same bands read0.340973, 0.698386, 0.581446, 0.644840, 0.645966on1, 4, 14, 12, 18. - The full line's own normalised peak runs
[0.272410, 0.500000]over the grid, the ceiling at phase8.00, which is the grid's first point. That ceiling is a property of where the grid starts and not of the full line: below the grid the same ratio reads1.000000atx = 1,0.894427at5,0.832050at13,0.718421at31and0.565685at200. Every band statement is therefore read beside the same-phase factor, which needs no grid. - The falsification fires. Five of the
53census rules never enter that band at any phase where they hold10^4elements, all of them above it:k = 3codes159,182,190,218and250, holding211116,13607,31535,59860and4126645integers. Under the floor of64the count is32, the other27all holding under500elements. 16of the53census rules attain their sweep-wide normalised peak in the last quarter of the phases, from24.75on. No rule at any width with at least1000elements has either ratio rise at every one of the last eight phases; that test asksmax abs Mto grow about9%per quarter-level across two levels, so an empty answer carries little, and the late-peak count is the informative statistic.- Zero-closed under one prepended zero:
3of4,8of16and64of256, exactly the codes allowing the digit0together with the empty code, the codes allowing01, and the codes allowing both010and011. Under any number of prepended zeros the word language agrees with the integer set on2of4,4of16and16of256codes, so atk = 3the two readings part company on240of256. - Equal mass is not the same set.
k = 2code14andk = 3code126both hold28655integers below2^20and both carryrho = 1.618033989, but they share only1077: the symmetric difference is55156, and4is the least integer in code126and not in code14.
WITNESSES
- beneath, The memory meter - the meter table, the control band, the
kappabands and the zero-closed criterion. - research/claims/ the memory-meter rows.
COLUMNS
controlthe pinned lines;classesandrepsthe88orbit representatives at(1,3)underG_(1,3);ruleone line per code withcard W,rho,kappa, the zero-closed flag and both masses, the last-phase reading and a track of the normalised peak atlevel 8, 12, 16, 20, 24, 28, 30;rowone line per code and phase;top,bottom,span,factor,latepeak,kappaband,bandandrhothe printed bands at two mass floors,gridstartthe full line below the grid,pairthe two equal-mass rules,readingthe word language against the integer set;climbingthe monotone scan;runthe depth and the runtimes.
- src/1 item
- Cargo.toml123 B
- README.md9.3 kB