Objects/Documentation
resolutions13.py
I provide the material for check AT.V11.
Download ↓"""Coarsened wheel histories, typed Poisson counts and survivor-weighted localisation."""
from collections import defaultdict
from fractions import Fraction as F
from itertools import product
from math import comb, exp, factorial, log, prod
import json
from localiser12 import tv, push
def poisson(base,other,limit=44):
# Enumerate all compositions of each total. Its omitted mass has a geometric tail bound.
def words(k,d):
if d==1:yield (k,);return
for x in range(k+1):
for rest in words(k-x,d-1):yield (x,)+rest
def pmf(mu,x):return exp(-sum(mu))*prod(r**n/factorial(n) for r,n in zip(mu,x))
lo=min(log(b/a) for a,b in zip(base,other));hi=max(log(b/a) for a,b in zip(base,other))