Atelier des rouesLaboratoire EN
Objets/Documentation

futurs13.py

Je fournis le matériel du contrôle AT.P16.

Télécharger ↓
"""Finite future partitions for three square-free cyclic sieve words."""
from math import gcd
import json
def run():
    cases=[]
    for R in (30,210,2310):
        bits=bytes(gcd(x,R)==1 for x in range(R));seq=bits*2;prev=list(bits);saved={}
        for h in range(1,R+1):
            codes={};labels=[]
            for x in range(R):
                pair=(prev[x],bits[(x+h-1)%R]);labels.append(codes.setdefault(pair,len(codes)))
            if h in (1,2,4,8) or len(codes)==R:
                seen={};witness=None
                for x in range(R):
                    key=seq[x:x+h]
                    if key in seen and witness is None:

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.