Atelier des rouesLab FR
Objects/Documentation

choix10.py

I provide the computation for “Two proof paths for the same frequency”.

Download ↓
"""Two derivations of one wheel frequency, with checked side conditions and costs."""
from fractions import Fraction as F
from itertools import combinations
from transport09 import counts

def run():
    src=(3,2,1,0)
    small=counts(src,True)[0];large=counts(src,False)[0]
    assert large==[8*n for n in small]
    rules=[('full',('case',),'full_table',40320),('read_full',('full_table',),'goal',1),
           ('pinned',('case',),'pinned_table',5040),('rotation',('case',),'equal_fibres',8),
           ('transfer',('pinned_table','equal_fibres'),'goal',1)]
    def optimum(unit):
        solutions=[]
        for n in range(len(rules)+1):
            for subset in combinations(rules,n):

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.