Atelier des rouesLab FR
Objects/Documentation

lecture14.py

I provide this item for checking AT.A12.

Download ↓
"""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

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.