FA-65005 / Epidemic compartment models / Member archive
Two-group next-generation matrix R0: target-group size weighting · case 05
Small high-contact groups dominate R0 even when few susceptibles are in them.
Case contract
K[i][j] = contact[i][j]*sizes[i]/sum(sizes)/gamma[j] (infections in group i caused by one infective in j); R0 is the dominant eigenvalue of the 2x2 K; lead group is the larger component of its eigenvector (ties and decoupled ties to group 0); return [flattened K rounded 6, R0 rounded 6, lead] or None for empty population or non-positive gamma.
Why this case matters
Compartmental epidemic calculations drive outbreak forecasts, vaccine targets and hospital planning; a single wrong flow, rate conversion or boundary silently changes every downstream number.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: asymmetric core group | [[1.333333, 0.9, 0.333333, 1.35], 1.889453, 0] | [[1.333333, 0.1, 3.0, 1.35], 1.889453, 1] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗