Atelier des rouesLab FR
Objects/Documentation

pertes11.py

I provide this item to reproduce or inspect AT.V5.

Download ↓
"""Exact common mass under one/two deleted residue classes; product model checks."""
from collections import Counter
from fractions import Fraction as F
from itertools import combinations,product
from math import prod
import json

def kernels(xs,p,h,anchors):
    domain=set(range(p))-{a%p for a in anchors}
    subsets=list(combinations(sorted(domain),h))
    wheel=Counter()
    for blocked in subsets:wheel[tuple(x%p not in blocked for x in xs)]+=F(1,len(subsets))
    independent={m:prod(1-F(h,p) if v else F(h,p) for v in m) for m in product((False,True),repeat=len(xs))}
    return wheel,independent

def variation(a,b):

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.