Objets/Documentation
lecture14.py
Je fournis cette pièce pour vérifier AT.A12.
Télécharger ↓"""Exact prefix-oracle control and paired observation trials on products p × 5."""
from fractions import Fraction as F
from itertools import combinations
from math import comb,lcm
from random import Random
from time import perf_counter
import argparse,json
from bruit12 import hist,matrix
AUX={0,1,3}
def prefix_table(mask,p,v=1,w=1):
target={v*x%p for x in mask};other={w*x%5 for x in AUX}
table=[0]
for x in range(5*p):table.append(table[-1]+int(x%p in target and x%5 in other))
return table