Atelier des rouesLaboratoire EN
Objets/Documentation

lecteurs21.py

Je fournis le code pour cette étude. Le coût exact d’une alarme sans date

Télécharger ↓
"""Nested alarms read from the first seeded XXVII system. Exact distributions."""
from fractions import Fraction as F
from math import prod,comb
import json
from deficience21 import certificate,tv,push,bounds


def study():
    n=9;risks=[F(1,10),F(1,45),F(1,15),F(1,10)]
    # Bins: quiet through 3, first death by step 1, first death at step 2 or 3.
    def bins(no1,no3):return [no3,1-no1,no1-no3]
    q=bins((1-risks[0])**n,prod(1-b for b in risks[:3])**n)
    p=bins(1-n*risks[0],prod(1-n*b for b in risks[:3]))
    # Independent forward propagation of the death count and first alarm.
    def forward(exclusive):
        states={(0,0):F(1)}

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.