Atelier des rouesLab FR
Objects/Documentation

domaine10.py

I provide the computation for “One bit to recover the original representative”.

Download ↓
"""Readout and reversible extension cost on identical modular inputs."""
import json
from pathlib import Path
from chiffres import simulate
def run():
    # Two sheets [0,p) and [p,2p). Retaining the sheet suffices to invert (x+c) mod p.
    stats={}
    for p in (3,5,7,11):
        for c in range(p):
            enc=[((x+c)%p,x//p) for x in range(2*p)]
            assert len(set(enc))==2*p
            assert all((y-c)%p+s*p==x for x,(y,s) in enumerate(enc))
        stats[p]=dict(states=2*p,minimum_bits=(2*p-1).bit_length(),normalised_states=p,
                      minimum_extra_sheet_bits=1)
    raw=json.loads(Path(__file__).with_name('rapports-08.json').read_bytes())['cores']['signed_pairs8']['standard']['mapped']
    checks=0

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.