Atelier des rouesLaboratoire EN
Objets/Documentation

preimages.py

Je fournis le calcul pour « Quand plusieurs preuves couvrent la même phase ».

Télécharger ↓
"""Compare union counts with individual proof-path preimages on a finite wheel."""
from itertools import product
from collections import Counter
import json


def experiment():
    periods=(3,5,7)
    paths=((1,2),(2,4),(4,8))
    def survives(path,phase):
        return all(x%p!=a for x in path for p,a in zip(periods,phase))
    counts=[0]*len(paths)
    multiplicity=Counter()
    first=[0]*len(paths)
    for phase in product(*(range(p) for p in periods)):
        matches=[survives(path,phase) for path in paths]

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.