Atelier des rouesLab FR
Objects/Documentation

compositions.py

Reproducible material from the experimental kit.

Download ↓
"""Shortest words in a fixed library of two small, fully specified transformations."""
from collections import deque
from itertools import product
import json


def experiment():
    p = 5
    identity = tuple(range(8))
    gates = [tuple((2*x+b)%p if x<p else x for x in identity) for b in (0,1)]

    def evaluate(word):
        table = identity
        for b in word:
            table = tuple(gates[b][x] for x in table)
        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.