Skip to content

C9.2 — Monte-Carlo & finite-range checks for weighted Collatz (1,1) parity probabilities#18

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/run-monte-carlo-fin-range-checks
Draft

C9.2 — Monte-Carlo & finite-range checks for weighted Collatz (1,1) parity probabilities#18
Copilot wants to merge 2 commits into
mainfrom
copilot/run-monte-carlo-fin-range-checks

Conversation

Copilot AI commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Replaces the non-functional stub in scripts/collatz_c9_2_sampling.py with a complete weighted Monte-Carlo pipeline that measures the decorrelation of Collatz parity orbits under the contact-form weight w(n) = 1/log(n).

Core sampling (collatz_c9_2_sampling.py)

  • Samples odd n ≥ 33 uniformly from a configurable window [start, end]
  • Applies w(n) = 1/log(n) to each draw
  • "11 event": n odd and T(n) = (3n+1)//2 odd — equivalent to n ≡ 3 (mod 4); p11 is the weighted mean of this indicator
  • Records the full Collatz parity orbit b_0…b_{depth-1} per draw, with correct 1-cycle continuation (1→4→2→1 → parity 1,0,0,…)
  • ACF anchored at orbit position 2 (positions 0 and 1 are degenerate: always 1 and 0 for odd starts)
  • Convergence checkpoints every M/100 draws
  • Outputs reproducible CSV (raw draws) + JSON summary
python scripts/collatz_c9_2_sampling.py \
    --start 33 --end 1000000 --M 1000000 --depth 20 --seed 42 \
    --output scripts/out
# p11 (weighted) = 0.498429  |  deviation = -0.001571

Plot generation (collatz_c9_2_plots.py)

  • Convergence: running p11 vs. sample count with 0.5 reference
  • ACF: Cor(b₂, b₂₊lag) bars with ±1.96/√M CI band
  • Marginals: P(b_k = 1) per orbit position
  • Multi-window overlay: comparison across experiments

Documentation (C9_2_README.md)

Covers mathematical background (half-step map, "11 event", weight definition), reproduction steps, and interpretation of each plot including limitations (finite-window bias, numerical evidence only).

Committed outputs (scripts/out/)

JSON summaries and PNG plots for M=10⁵ and M=10⁶ windows. Large CSVs excluded via .gitignore.
Results: p11 ≈ 0.498, ACF decays into the 95% CI band by lag ~8 — consistent with the decorrelation hypothesis.

Copilot AI changed the title [WIP] Add scripts for Monte-Carlo and finite-range checks of probabilities C9.2 — Monte-Carlo & finite-range checks for weighted Collatz (1,1) parity probabilities Apr 3, 2026
Copilot AI requested a review from TOTOGT April 3, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C9.2 — Run refined Monte‑Carlo and finite‑range checks for consecutive (1,1) probabilities (weighted by w(n))

2 participants