FA-94556 / Exam timetabling constraints / Open access
First of the final periods not treated as late · case 01
A large exam in the earliest avoided period is not penalised.
ROOT CAUSE
The late-period test is strict.
THE FAILURE
The late-period test is strict.
Unsuccessful approach: Subtracting one more extends the avoided range by a period.
Case contract
sizes exam -> candidates, period exam -> period index, n_periods, big = how many largest exams are front-loaded (ranked by size descending, ties by id), last = how many final periods to avoid. Return the sorted front-loaded exams scheduled in the final last periods and their count.
Why this case matters
Front-loading large exams gives markers time; it is a standard soft constraint.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sizes, period, n_periods, big, last):
ranked = sorted(sizes, key=lambda e: (-sizes[e], e))[:big]
bad = sorted(e for e in ranked if period[e] > n_periods - last)
return [bad, len(bad)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: final period boundary 1', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 20},
{'MATH101': 4, 'MATH101H': 7, 'PHYS110': 5, 'CHEM120': 4}, 8, 3, 3],
[['MATH101H', 'PHYS110'], 2]),
('partial repair guard 3',
[{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 20, 'BIO130': 120, 'HIST140': 80},
{'MATH101': 3, 'MATH101H': 2, 'PHYS110': 3, 'CHEM120': 7, 'BIO130': 4, 'HIST140': 1}, 8, 2, 3],
[[], 0]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('normal control 5',
[{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 4, 'PHYS110': 2}, 8, 1, 2],
[[], 0]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 0, 'MATH101H': 4, 'PHYS110': 3}, 10, 2, 3],
[[], 0]),
('normal control 7',
[{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 50}, {'MATH101': 0, 'MATH101H': 2, 'PHYS110': 2}, 8, 3, 3],
[[], 0]),
('normal control 8',
[{'MATH101': 120, 'MATH101H': 50, 'PHYS110': 80}, {'MATH101': 0, 'MATH101H': 3, 'PHYS110': 5}, 6, 2, 3],
[['PHYS110'], 1])],
[('regression: final period boundary 1',
[{'MATH101': 20, 'MATH101H': 80, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 5, 'PHYS110': 3}, 8, 1, 3],
[['MATH101H'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],
[['PHYS110'], 1]),
('partial repair guard 3',
[{'MATH101': 120, 'MATH101H': 80, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80},
{'MATH101': 2, 'MATH101H': 4, 'PHYS110': 5, 'CHEM120': 0, 'BIO130': 0}, 6, 3, 3],
[[], 0]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),
('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 200, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 80},
{'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 7, 'BIO130': 1, 'HIST140': 9}, 10, 1, 2],
[[], 0]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80, 'HIST140': 80},
{'MATH101': 0, 'MATH101H': 1, 'PHYS110': 3, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 8}, 10, 3, 2],
[['HIST140'], 1]),
('normal control 8',
[{'MATH101': 50, 'MATH101H': 120, 'PHYS110': 120}, {'MATH101': 8, 'MATH101H': 4, 'PHYS110': 0}, 10, 1, 2],
[[], 0])],
[('regression: final period boundary 1',
[{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 120, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 120},
{'MATH101': 5, 'MATH101H': 2, 'PHYS110': 5, 'CHEM120': 4, 'BIO130': 5, 'HIST140': 3}, 6, 2, 3],
[['CHEM120', 'HIST140'], 2]),
('regression variant: final period boundary 2',
[{'MATH101': 20,
'MATH101H': 80,
'PHYS110': 20,
'CHEM120': 80,
'BIO130': 120,
'HIST140': 200,
'ECON150': 80},
{'MATH101': 0, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 2, 'BIO130': 8, 'HIST140': 8, 'ECON150': 3}, 10, 3,
2],
[['BIO130', 'HIST140'], 2]),
('partial repair guard 3',
[{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 200, 'HIST140': 80},
{'MATH101': 4, 'MATH101H': 3, 'PHYS110': 6, 'CHEM120': 6, 'BIO130': 3, 'HIST140': 5}, 10, 2, 3],
[[], 0]),
('boundary control 4', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),
('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),
('normal control 6',
[{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 120, 'CHEM120': 80, 'BIO130': 20, 'HIST140': 80},
{'MATH101': 0, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 4, 'BIO130': 4, 'HIST140': 6}, 8, 1, 3],
[[], 0]),
('normal control 7',
[{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],
[['PHYS110'], 1]),
('normal control 8',
[{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 20}, {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 9}, 10, 3, 2],
[['PHYS110'], 1])],
[('regression: final period boundary 1',
[{'MATH101': 80,
'MATH101H': 120,
'PHYS110': 120,
'CHEM120': 80,
'BIO130': 200,
'HIST140': 20,
'ECON150': 80},
{'MATH101': 4, 'MATH101H': 0, 'PHYS110': 4, 'CHEM120': 5, 'BIO130': 0, 'HIST140': 2, 'ECON150': 0}, 6, 3,
2],
[['PHYS110'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 20,
'MATH101H': 50,
'PHYS110': 50,
'CHEM120': 120,
'BIO130': 80,
'HIST140': 50,
'ECON150': 20},
{'MATH101': 5, 'MATH101H': 1, 'PHYS110': 1, 'CHEM120': 1, 'BIO130': 3, 'HIST140': 0, 'ECON150': 2}, 6, 3,
3],
[['BIO130'], 1]),
('partial repair guard 3',
[{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 50, 'BIO130': 80, 'HIST140': 80, 'ECON150': 50},
{'MATH101': 4, 'MATH101H': 1, 'PHYS110': 0, 'CHEM120': 6, 'BIO130': 5, 'HIST140': 2, 'ECON150': 3}, 8, 3,
3],
[['BIO130'], 1]),
('boundary control 4', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('boundary control 5', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),
('normal control 6',
[{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 50},
{'MATH101': 4, 'MATH101H': 0, 'PHYS110': 6, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 5}, 8, 3, 3],
[['BIO130'], 1]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 80, 'PHYS110': 80, 'CHEM120': 200, 'BIO130': 50},
{'MATH101': 1, 'MATH101H': 3, 'PHYS110': 4, 'CHEM120': 6, 'BIO130': 7}, 10, 3, 2],
[[], 0]),
('normal control 8',
[{'MATH101': 200, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2}, 6, 3, 2],
[[], 0])],
[('regression: final period boundary 1',
[{'MATH101': 50, 'MATH101H': 200, 'PHYS110': 50}, {'MATH101': 5, 'MATH101H': 3, 'PHYS110': 0}, 6, 2, 3],
[['MATH101', 'MATH101H'], 2]),
('regression variant: final period boundary 2',
[{'MATH101': 50, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 6, 'MATH101H': 9, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7, 'HIST140': 4}, 10, 2, 3],
[['BIO130'], 1]),
('partial repair guard 3',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 200, 'CHEM120': 50, 'BIO130': 20},
{'MATH101': 6, 'MATH101H': 1, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7}, 10, 2, 3],
[['PHYS110'], 1]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('boundary control 5', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80},
{'MATH101': 3, 'MATH101H': 1, 'PHYS110': 8, 'CHEM120': 0, 'BIO130': 9}, 10, 1, 2],
[['BIO130'], 1]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 80}, {'MATH101': 1, 'MATH101H': 0, 'PHYS110': 5}, 6, 2, 2],
[['PHYS110'], 1]),
('normal control 8',
[{'MATH101': 200, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 80, 'BIO130': 20},
{'MATH101': 6, 'MATH101H': 6, 'PHYS110': 7, 'CHEM120': 3, 'BIO130': 4}, 8, 3, 2],
[['MATH101', 'PHYS110'], 2])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: final period boundary 1 | [[], 0] | [['A'], 1] | Failed |
| regression variant: final period boundary 2 | [['MATH101H'], 1] | [['MATH101H', 'PHYS110'], 2] | Failed |
| partial repair guard 3 | [[], 0] | [[], 0] | Passed |
| boundary control 4 | [['A', 'B'], 2] | [['A', 'B'], 2] | Passed |
| normal control 5 | [[], 0] | [[], 0] | Passed |
| normal control 6 | [[], 0] | [[], 0] | Passed |
| normal control 7 | [[], 0] | [[], 0] | Passed |
| normal control 8 | [['PHYS110'], 1] | [['PHYS110'], 1] | Passed |
SHA-256 / cf99e85103a711f9b82260f8f6c5ee26fd5209892d602b11b24b29f4d709a1fc
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sizes, period, n_periods, big, last):
ranked = sorted(sizes, key=lambda e: (-sizes[e], e))[:big]
bad = sorted(e for e in ranked if period[e] >= n_periods - last - 1)
return [bad, len(bad)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: final period boundary 1', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 20},
{'MATH101': 4, 'MATH101H': 7, 'PHYS110': 5, 'CHEM120': 4}, 8, 3, 3],
[['MATH101H', 'PHYS110'], 2]),
('partial repair guard 3',
[{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 20, 'BIO130': 120, 'HIST140': 80},
{'MATH101': 3, 'MATH101H': 2, 'PHYS110': 3, 'CHEM120': 7, 'BIO130': 4, 'HIST140': 1}, 8, 2, 3],
[[], 0]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('normal control 5',
[{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 4, 'PHYS110': 2}, 8, 1, 2],
[[], 0]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 0, 'MATH101H': 4, 'PHYS110': 3}, 10, 2, 3],
[[], 0]),
('normal control 7',
[{'MATH101': 50, 'MATH101H': 80, 'PHYS110': 50}, {'MATH101': 0, 'MATH101H': 2, 'PHYS110': 2}, 8, 3, 3],
[[], 0]),
('normal control 8',
[{'MATH101': 120, 'MATH101H': 50, 'PHYS110': 80}, {'MATH101': 0, 'MATH101H': 3, 'PHYS110': 5}, 6, 2, 3],
[['PHYS110'], 1])],
[('regression: final period boundary 1',
[{'MATH101': 20, 'MATH101H': 80, 'PHYS110': 80}, {'MATH101': 7, 'MATH101H': 5, 'PHYS110': 3}, 8, 1, 3],
[['MATH101H'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],
[['PHYS110'], 1]),
('partial repair guard 3',
[{'MATH101': 120, 'MATH101H': 80, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80},
{'MATH101': 2, 'MATH101H': 4, 'PHYS110': 5, 'CHEM120': 0, 'BIO130': 0}, 6, 3, 3],
[[], 0]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),
('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 200, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 80},
{'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 7, 'BIO130': 1, 'HIST140': 9}, 10, 1, 2],
[[], 0]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80, 'HIST140': 80},
{'MATH101': 0, 'MATH101H': 1, 'PHYS110': 3, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 8}, 10, 3, 2],
[['HIST140'], 1]),
('normal control 8',
[{'MATH101': 50, 'MATH101H': 120, 'PHYS110': 120}, {'MATH101': 8, 'MATH101H': 4, 'PHYS110': 0}, 10, 1, 2],
[[], 0])],
[('regression: final period boundary 1',
[{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 120, 'CHEM120': 200, 'BIO130': 50, 'HIST140': 120},
{'MATH101': 5, 'MATH101H': 2, 'PHYS110': 5, 'CHEM120': 4, 'BIO130': 5, 'HIST140': 3}, 6, 2, 3],
[['CHEM120', 'HIST140'], 2]),
('regression variant: final period boundary 2',
[{'MATH101': 20,
'MATH101H': 80,
'PHYS110': 20,
'CHEM120': 80,
'BIO130': 120,
'HIST140': 200,
'ECON150': 80},
{'MATH101': 0, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 2, 'BIO130': 8, 'HIST140': 8, 'ECON150': 3}, 10, 3,
2],
[['BIO130', 'HIST140'], 2]),
('partial repair guard 3',
[{'MATH101': 20, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 200, 'BIO130': 200, 'HIST140': 80},
{'MATH101': 4, 'MATH101H': 3, 'PHYS110': 6, 'CHEM120': 6, 'BIO130': 3, 'HIST140': 5}, 10, 2, 3],
[[], 0]),
('boundary control 4', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),
('boundary control 5', [{'A': 80, 'B': 80, 'C': 20}, {'A': 1, 'B': 9, 'C': 9}, 10, 1, 2], [[], 0]),
('normal control 6',
[{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 120, 'CHEM120': 80, 'BIO130': 20, 'HIST140': 80},
{'MATH101': 0, 'MATH101H': 0, 'PHYS110': 2, 'CHEM120': 4, 'BIO130': 4, 'HIST140': 6}, 8, 1, 3],
[[], 0]),
('normal control 7',
[{'MATH101': 200, 'MATH101H': 200, 'PHYS110': 200, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 3, 'MATH101H': 0, 'PHYS110': 7, 'CHEM120': 7, 'BIO130': 0, 'HIST140': 7}, 10, 3, 3],
[['PHYS110'], 1]),
('normal control 8',
[{'MATH101': 20, 'MATH101H': 120, 'PHYS110': 20}, {'MATH101': 6, 'MATH101H': 1, 'PHYS110': 9}, 10, 3, 2],
[['PHYS110'], 1])],
[('regression: final period boundary 1',
[{'MATH101': 80,
'MATH101H': 120,
'PHYS110': 120,
'CHEM120': 80,
'BIO130': 200,
'HIST140': 20,
'ECON150': 80},
{'MATH101': 4, 'MATH101H': 0, 'PHYS110': 4, 'CHEM120': 5, 'BIO130': 0, 'HIST140': 2, 'ECON150': 0}, 6, 3,
2],
[['PHYS110'], 1]),
('regression variant: final period boundary 2',
[{'MATH101': 20,
'MATH101H': 50,
'PHYS110': 50,
'CHEM120': 120,
'BIO130': 80,
'HIST140': 50,
'ECON150': 20},
{'MATH101': 5, 'MATH101H': 1, 'PHYS110': 1, 'CHEM120': 1, 'BIO130': 3, 'HIST140': 0, 'ECON150': 2}, 6, 3,
3],
[['BIO130'], 1]),
('partial repair guard 3',
[{'MATH101': 80, 'MATH101H': 50, 'PHYS110': 50, 'CHEM120': 50, 'BIO130': 80, 'HIST140': 80, 'ECON150': 50},
{'MATH101': 4, 'MATH101H': 1, 'PHYS110': 0, 'CHEM120': 6, 'BIO130': 5, 'HIST140': 2, 'ECON150': 3}, 8, 3,
3],
[['BIO130'], 1]),
('boundary control 4', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('boundary control 5', [{'A': 100, 'B': 50}, {'A': 7, 'B': 9}, 10, 1, 2], [[], 0]),
('normal control 6',
[{'MATH101': 20, 'MATH101H': 200, 'PHYS110': 20, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 50},
{'MATH101': 4, 'MATH101H': 0, 'PHYS110': 6, 'CHEM120': 1, 'BIO130': 5, 'HIST140': 5}, 8, 3, 3],
[['BIO130'], 1]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 80, 'PHYS110': 80, 'CHEM120': 200, 'BIO130': 50},
{'MATH101': 1, 'MATH101H': 3, 'PHYS110': 4, 'CHEM120': 6, 'BIO130': 7}, 10, 3, 2],
[[], 0]),
('normal control 8',
[{'MATH101': 200, 'MATH101H': 20, 'PHYS110': 20}, {'MATH101': 2, 'MATH101H': 0, 'PHYS110': 2}, 6, 3, 2],
[[], 0])],
[('regression: final period boundary 1',
[{'MATH101': 50, 'MATH101H': 200, 'PHYS110': 50}, {'MATH101': 5, 'MATH101H': 3, 'PHYS110': 0}, 6, 2, 3],
[['MATH101', 'MATH101H'], 2]),
('regression variant: final period boundary 2',
[{'MATH101': 50, 'MATH101H': 50, 'PHYS110': 80, 'CHEM120': 120, 'BIO130': 80, 'HIST140': 20},
{'MATH101': 6, 'MATH101H': 9, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7, 'HIST140': 4}, 10, 2, 3],
[['BIO130'], 1]),
('partial repair guard 3',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 200, 'CHEM120': 50, 'BIO130': 20},
{'MATH101': 6, 'MATH101H': 1, 'PHYS110': 7, 'CHEM120': 1, 'BIO130': 7}, 10, 2, 3],
[['PHYS110'], 1]),
('boundary control 4', [{'A': 80, 'B': 80, 'C': 20}, {'A': 9, 'B': 9, 'C': 9}, 10, 2, 2], [['A', 'B'], 2]),
('boundary control 5', [{'A': 100, 'B': 50}, {'A': 8, 'B': 9}, 10, 1, 2], [['A'], 1]),
('normal control 6',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 20, 'CHEM120': 80, 'BIO130': 80},
{'MATH101': 3, 'MATH101H': 1, 'PHYS110': 8, 'CHEM120': 0, 'BIO130': 9}, 10, 1, 2],
[['BIO130'], 1]),
('normal control 7',
[{'MATH101': 80, 'MATH101H': 20, 'PHYS110': 80}, {'MATH101': 1, 'MATH101H': 0, 'PHYS110': 5}, 6, 2, 2],
[['PHYS110'], 1]),
('normal control 8',
[{'MATH101': 200, 'MATH101H': 80, 'PHYS110': 200, 'CHEM120': 80, 'BIO130': 20},
{'MATH101': 6, 'MATH101H': 6, 'PHYS110': 7, 'CHEM120': 3, 'BIO130': 4}, 8, 3, 2],
[['MATH101', 'PHYS110'], 2])]]
for label, args, expected in fixtures[N-1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: final period boundary 1 | [['A'], 1] | [['A'], 1] | Passed |
| regression variant: final period boundary 2 | [['MATH101', 'MATH101H', 'PHYS110'], 3] | [['MATH101H', 'PHYS110'], 2] | Failed |
| partial repair guard 3 | [['BIO130'], 1] | [[], 0] | Failed |
| boundary control 4 | [['A', 'B'], 2] | [['A', 'B'], 2] | Passed |
| normal control 5 | [[], 0] | [[], 0] | Passed |
| normal control 6 | [[], 0] | [[], 0] | Passed |
| normal control 7 | [[], 0] | [[], 0] | Passed |
| normal control 8 | [['PHYS110'], 1] | [['PHYS110'], 1] | Passed |
SHA-256 / 72e3fdbd02469c54190782ab46820bba6606bb7d8bdfe490ab73fab97137eb46
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Stipulated toy exam-timetabling rule set for a bounded model; it does not claim conformance with any institution's regulations or a benchmark specification, and it performs no search or optimisation. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-29T14:52:05.444426+00:00.
Case digest / 1cb215fc319153ca2e511890ed2ae599c9189ceadeb3869919f8faa0d03de437