FA-94516 / Exam timetabling constraints / Open access
Student at exactly the daily limit reported · case 01
Students with exactly the allowed number of exams in a day are listed.
ROOT CAUSE
The limit comparison is inclusive.
THE FAILURE
The limit comparison is inclusive.
Unsuccessful approach: Counting all of a student's exams ignores the window.
Case contract
sits [student, exam, start minute] (rows may repeat an exam). A student violates the limit if more than limit distinct exams start inside some half-open 24-hour window [t, t + 1440). Return [student, maximum count] for violators, by student.
Why this case matters
Maximum-exams-per-day rules are stated as rolling windows; calendar bucketing and inclusive windows both misreport.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sits, limit):
by = {}
for st, ex, t in sits:
by.setdefault(st, {})[ex] = t
out = []
for st in sorted(by):
ts = sorted(by[st].values())
best = 0
j = 0
for i in range(len(ts)):
while ts[i] - ts[j] >= 1440:
j += 1
best = max(best, i - j + 1)
if best >= limit:
out.append([st, best])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: limit comparison 1', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('regression variant: limit comparison 2',
[[['s1', 'PHYS110', 540], ['s2', 'PHYS110', 900], ['s2', 'HIST140', 600], ['s1', 'ECON150', 1800],
['s1', 'CHEM120', 540]],
2],
[['s1', 3]]),
('partial repair guard 3',
[[['s2', 'BIO130', 600], ['s2', 'MATH101H', 2760], ['s1', 'ECON150', 3420], ['s2', 'ECON150', 2040],
['s1', 'BIO130', 4861], ['s2', 'ECON150', 2040], ['s1', 'MATH101', 540], ['s2', 'PHYS110', 1860]],
2],
[['s2', 3]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'A', 600], ['s1', 'B', 900]], 1], [['s1', 2]]),
('normal control 5',
[[['s5', 'BIO130', 3420], ['s5', 'PHYS110', 540], ['s4', 'MATH101H', 840], ['s4', 'MATH101', 540],
['s5', 'MATH101', 4680]],
2],
[]),
('normal control 6', [[['s4', 'CHEM120', 1800], ['s4', 'ECON150', 540], ['s4', 'ECON150', 540]], 2], []),
('normal control 7',
[[['s2', 'PHYS110', 2699], ['s2', 'MATH101', 1260], ['s2', 'ECON150', 540], ['s5', 'HIST140', 6899],
['s5', 'MATH101H', 3299], ['s5', 'PHYS110', 1860], ['s2', 'MATH101H', 540], ['s2', 'PHYS110', 2699],
['s5', 'CHEM120', 6179], ['s5', 'MATH101', 600]],
3],
[]),
('normal control 8',
[[['s3', 'BIO130', 5220], ['s3', 'HIST140', 1860], ['s2', 'BIO130', 720], ['s3', 'ECON150', 4920],
['s2', 'MATH101H', 3600], ['s3', 'MATH101H', 600], ['s5', 'MATH101H', 600], ['s3', 'CHEM120', 4740],
['s5', 'HIST140', 1440], ['s2', 'HIST140', 540]],
3],
[])],
[('regression: limit comparison 1', [[['s1', 'A', 540], ['s1', 'B', 1979], ['s1', 'C', 1990]], 2], []),
('regression variant: limit comparison 2',
[[['s3', 'PHYS110', 600], ['s3', 'MATH101H', 2280], ['s3', 'HIST140', 1440], ['s3', 'MATH101', 5160]], 2],
[]),
('partial repair guard 3',
[[['s2', 'CHEM120', 600], ['s1', 'HIST140', 780], ['s3', 'HIST140', 2040], ['s1', 'MATH101H', 2520],
['s1', 'CHEM120', 600], ['s2', 'ECON150', 5941], ['s2', 'BIO130', 900], ['s2', 'HIST140', 5221],
['s3', 'PHYS110', 600], ['s2', 'PHYS110', 3780], ['s1', 'PHYS110', 1080]],
2],
[['s1', 3]]),
('normal control 4', [[['s4', 'ECON150', 600], ['s4', 'MATH101H', 780], ['s4', 'PHYS110', 3660]], 2], []),
('normal control 5',
[[['s1', 'HIST140', 6600], ['s1', 'ECON150', 6300], ['s1', 'CHEM120', 540], ['s1', 'MATH101', 6300],
['s1', 'HIST140', 6600], ['s1', 'BIO130', 3420]],
1],
[['s1', 3]]),
('normal control 6',
[[['s2', 'CHEM120', 2041], ['s3', 'BIO130', 540], ['s3', 'MATH101', 1380], ['s3', 'MATH101H', 3661],
['s2', 'MATH101', 3301], ['s1', 'MATH101H', 600], ['s3', 'CHEM120', 2220], ['s2', 'MATH101H', 4021],
['s3', 'BIO130', 540], ['s1', 'PHYS110', 600], ['s1', 'CHEM120', 780], ['s2', 'PHYS110', 600],
['s2', 'HIST140', 600]],
3],
[]),
('normal control 7',
[[['s3', 'MATH101H', 600], ['s3', 'HIST140', 5761], ['s3', 'PHYS110', 2041], ['s3', 'CHEM120', 4921]], 2],
[]),
('normal control 8', [[['s4', 'CHEM120', 1800], ['s4', 'ECON150', 540], ['s4', 'ECON150', 540]], 2], [])],
[('regression: limit comparison 1', [[['s5', 'PHYS110', 1380], ['s5', 'CHEM120', 540]], 2], []),
('regression variant: limit comparison 2',
[[['s2', 'MATH101', 1440], ['s1', 'HIST140', 720], ['s4', 'HIST140', 600], ['s1', 'MATH101H', 540],
['s1', 'CHEM120', 900], ['s2', 'CHEM120', 1440], ['s1', 'MATH101', 2341], ['s2', 'PHYS110', 2881],
['s2', 'MATH101H', 600], ['s4', 'ECON150', 780]],
2],
[['s1', 3], ['s2', 3]]),
('partial repair guard 3',
[[['s5', 'MATH101', 3481], ['s5', 'PHYS110', 600], ['s5', 'MATH101', 3481], ['s1', 'ECON150', 540],
['s5', 'BIO130', 2040], ['s1', 'BIO130', 1380], ['s5', 'MATH101H', 1860], ['s5', 'CHEM120', 600]],
3],
[]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'B', 600], ['s1', 'C', 900]], 2], [['s1', 3]]),
('normal control 5',
[[['s2', 'HIST140', 4860], ['s2', 'MATH101', 5160], ['s3', 'BIO130', 3060], ['s2', 'MATH101H', 1980],
['s3', 'HIST140', 2760], ['s3', 'ECON150', 600], ['s2', 'ECON150', 5460], ['s3', 'MATH101H', 3240],
['s3', 'PHYS110', 1320], ['s2', 'CHEM120', 540], ['s2', 'MATH101', 5160]],
3],
[]),
('normal control 6',
[[['s4', 'BIO130', 4920], ['s4', 'CHEM120', 2040], ['s4', 'MATH101H', 600], ['s4', 'HIST140', 6359],
['s4', 'PHYS110', 2040]],
2],
[]),
('normal control 7',
[[['s2', 'BIO130', 600], ['s2', 'HIST140', 6179], ['s2', 'ECON150', 3480], ['s2', 'HIST140', 6179],
['s2', 'MATH101H', 2041], ['s2', 'PHYS110', 4919]],
1],
[['s2', 2]]),
('normal control 8',
[[['s2', 'PHYS110', 2880], ['s2', 'HIST140', 600], ['s2', 'MATH101', 2880], ['s2', 'BIO130', 1440]], 2],
[])],
[('regression: limit comparison 1',
[[['s3', 'HIST140', 2039], ['s3', 'BIO130', 600], ['s3', 'HIST140', 2039], ['s3', 'MATH101', 3299]], 2],
[]),
('regression variant: limit comparison 2',
[[['s3', 'BIO130', 540], ['s5', 'PHYS110', 1320], ['s4', 'BIO130', 1980], ['s3', 'PHYS110', 1380],
['s5', 'BIO130', 600], ['s4', 'ECON150', 540]],
1],
[['s3', 2], ['s5', 2]]),
('partial repair guard 3',
[[['s3', 'PHYS110', 3059], ['s4', 'MATH101H', 1320], ['s3', 'HIST140', 900], ['s4', 'BIO130', 600],
['s3', 'BIO130', 1620], ['s3', 'MATH101H', 600], ['s4', 'PHYS110', 1500]],
3],
[]),
('boundary control 4', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2], [['s1', 3]]),
('normal control 5',
[[['s1', 'CHEM120', 540], ['s4', 'MATH101', 3422], ['s4', 'PHYS110', 1981], ['s4', 'ECON150', 540],
['s2', 'MATH101H', 540], ['s2', 'BIO130', 1680], ['s1', 'MATH101', 540], ['s1', 'MATH101H', 720],
['s2', 'HIST140', 1380]],
3],
[]),
('normal control 6',
[[['s2', 'BIO130', 600], ['s2', 'HIST140', 6179], ['s2', 'ECON150', 3480], ['s2', 'HIST140', 6179],
['s2', 'MATH101H', 2041], ['s2', 'PHYS110', 4919]],
1],
[['s2', 2]]),
('normal control 7',
[[['s5', 'CHEM120', 4500], ['s2', 'PHYS110', 3300], ['s5', 'MATH101H', 600], ['s2', 'HIST140', 6180],
['s5', 'PHYS110', 1440], ['s2', 'ECON150', 600], ['s5', 'HIST140', 1620], ['s2', 'MATH101', 6900],
['s5', 'MATH101', 5941], ['s2', 'BIO130', 1860], ['s5', 'MATH101', 5941]],
1],
[['s2', 2], ['s5', 3]]),
('normal control 8', [[['s4', 'CHEM120', 600], ['s4', 'CHEM120', 600], ['s4', 'MATH101H', 2040]], 2], [])],
[('regression: limit comparison 1',
[[['s5', 'ECON150', 1980], ['s5', 'CHEM120', 3000], ['s2', 'MATH101H', 2041], ['s2', 'HIST140', 2761],
['s2', 'BIO130', 600], ['s1', 'PHYS110', 540], ['s2', 'CHEM120', 3601], ['s1', 'HIST140', 1380],
['s5', 'MATH101H', 540], ['s5', 'PHYS110', 2280]],
2],
[['s5', 3]]),
('regression variant: limit comparison 2',
[[['s4', 'ECON150', 1979], ['s4', 'CHEM120', 4859], ['s1', 'CHEM120', 2761], ['s4', 'MATH101H', 540],
['s1', 'BIO130', 4321], ['s4', 'PHYS110', 1979], ['s1', 'ECON150', 3481], ['s1', 'PHYS110', 600],
['s1', 'MATH101', 1320], ['s4', 'MATH101H', 540], ['s4', 'HIST140', 7739]],
2],
[['s4', 3]]),
('partial repair guard 3', [[['s1', 'HIST140', 3300], ['s1', 'ECON150', 600], ['s1', 'MATH101', 2040]], 2],
[]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('normal control 5',
[[['s2', 'PHYS110', 540], ['s3', 'MATH101', 2040], ['s2', 'CHEM120', 1979], ['s1', 'CHEM120', 1980],
['s1', 'BIO130', 3419], ['s2', 'BIO130', 5759], ['s1', 'HIST140', 540], ['s2', 'MATH101', 5579],
['s2', 'MATH101H', 4859], ['s3', 'HIST140', 600]],
3],
[]),
('normal control 6',
[[['s2', 'MATH101H', 2160], ['s2', 'PHYS110', 3599], ['s2', 'HIST140', 540], ['s2', 'BIO130', 720],
['s2', 'ECON150', 720]],
3],
[]),
('normal control 7',
[[['s4', 'CHEM120', 600], ['s4', 'ECON150', 1860], ['s4', 'MATH101H', 4920], ['s4', 'HIST140', 4740]], 1],
[['s4', 2]]),
('normal control 8',
[[['s2', 'CHEM120', 3301], ['s2', 'CHEM120', 3301], ['s2', 'HIST140', 600], ['s2', 'ECON150', 1860],
['s5', 'ECON150', 1981], ['s2', 'PHYS110', 4740], ['s5', 'MATH101H', 540]],
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: limit comparison 1 | [['s1', 2]] | [] | Failed |
| regression variant: limit comparison 2 | [['s1', 3], ['s2', 2]] | [['s1', 3]] | Failed |
| partial repair guard 3 | [['s2', 3]] | [['s2', 3]] | Passed |
| boundary control 4 | [['s1', 2]] | [['s1', 2]] | Passed |
| normal control 5 | [['s4', 2], ['s5', 2]] | [] | Failed |
| normal control 6 | [['s4', 2]] | [] | Failed |
| normal control 7 | [['s2', 3]] | [] | Failed |
| normal control 8 | [['s3', 3]] | [] | Failed |
SHA-256 / 37e3f36394bc71ccb418855e8af85733458e0adeacf2f5460f12a9047ed75db5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(sits, limit):
by = {}
for st, ex, t in sits:
by.setdefault(st, {})[ex] = t
out = []
for st in sorted(by):
ts = sorted(by[st].values())
best = 0
j = 0
for i in range(len(ts)):
while ts[i] - ts[j] >= 1440:
j += 1
best = max(best, i - j + 1)
if len(ts) > limit:
out.append([st, best])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: limit comparison 1', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('regression variant: limit comparison 2',
[[['s1', 'PHYS110', 540], ['s2', 'PHYS110', 900], ['s2', 'HIST140', 600], ['s1', 'ECON150', 1800],
['s1', 'CHEM120', 540]],
2],
[['s1', 3]]),
('partial repair guard 3',
[[['s2', 'BIO130', 600], ['s2', 'MATH101H', 2760], ['s1', 'ECON150', 3420], ['s2', 'ECON150', 2040],
['s1', 'BIO130', 4861], ['s2', 'ECON150', 2040], ['s1', 'MATH101', 540], ['s2', 'PHYS110', 1860]],
2],
[['s2', 3]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'A', 600], ['s1', 'B', 900]], 1], [['s1', 2]]),
('normal control 5',
[[['s5', 'BIO130', 3420], ['s5', 'PHYS110', 540], ['s4', 'MATH101H', 840], ['s4', 'MATH101', 540],
['s5', 'MATH101', 4680]],
2],
[]),
('normal control 6', [[['s4', 'CHEM120', 1800], ['s4', 'ECON150', 540], ['s4', 'ECON150', 540]], 2], []),
('normal control 7',
[[['s2', 'PHYS110', 2699], ['s2', 'MATH101', 1260], ['s2', 'ECON150', 540], ['s5', 'HIST140', 6899],
['s5', 'MATH101H', 3299], ['s5', 'PHYS110', 1860], ['s2', 'MATH101H', 540], ['s2', 'PHYS110', 2699],
['s5', 'CHEM120', 6179], ['s5', 'MATH101', 600]],
3],
[]),
('normal control 8',
[[['s3', 'BIO130', 5220], ['s3', 'HIST140', 1860], ['s2', 'BIO130', 720], ['s3', 'ECON150', 4920],
['s2', 'MATH101H', 3600], ['s3', 'MATH101H', 600], ['s5', 'MATH101H', 600], ['s3', 'CHEM120', 4740],
['s5', 'HIST140', 1440], ['s2', 'HIST140', 540]],
3],
[])],
[('regression: limit comparison 1', [[['s1', 'A', 540], ['s1', 'B', 1979], ['s1', 'C', 1990]], 2], []),
('regression variant: limit comparison 2',
[[['s3', 'PHYS110', 600], ['s3', 'MATH101H', 2280], ['s3', 'HIST140', 1440], ['s3', 'MATH101', 5160]], 2],
[]),
('partial repair guard 3',
[[['s2', 'CHEM120', 600], ['s1', 'HIST140', 780], ['s3', 'HIST140', 2040], ['s1', 'MATH101H', 2520],
['s1', 'CHEM120', 600], ['s2', 'ECON150', 5941], ['s2', 'BIO130', 900], ['s2', 'HIST140', 5221],
['s3', 'PHYS110', 600], ['s2', 'PHYS110', 3780], ['s1', 'PHYS110', 1080]],
2],
[['s1', 3]]),
('normal control 4', [[['s4', 'ECON150', 600], ['s4', 'MATH101H', 780], ['s4', 'PHYS110', 3660]], 2], []),
('normal control 5',
[[['s1', 'HIST140', 6600], ['s1', 'ECON150', 6300], ['s1', 'CHEM120', 540], ['s1', 'MATH101', 6300],
['s1', 'HIST140', 6600], ['s1', 'BIO130', 3420]],
1],
[['s1', 3]]),
('normal control 6',
[[['s2', 'CHEM120', 2041], ['s3', 'BIO130', 540], ['s3', 'MATH101', 1380], ['s3', 'MATH101H', 3661],
['s2', 'MATH101', 3301], ['s1', 'MATH101H', 600], ['s3', 'CHEM120', 2220], ['s2', 'MATH101H', 4021],
['s3', 'BIO130', 540], ['s1', 'PHYS110', 600], ['s1', 'CHEM120', 780], ['s2', 'PHYS110', 600],
['s2', 'HIST140', 600]],
3],
[]),
('normal control 7',
[[['s3', 'MATH101H', 600], ['s3', 'HIST140', 5761], ['s3', 'PHYS110', 2041], ['s3', 'CHEM120', 4921]], 2],
[]),
('normal control 8', [[['s4', 'CHEM120', 1800], ['s4', 'ECON150', 540], ['s4', 'ECON150', 540]], 2], [])],
[('regression: limit comparison 1', [[['s5', 'PHYS110', 1380], ['s5', 'CHEM120', 540]], 2], []),
('regression variant: limit comparison 2',
[[['s2', 'MATH101', 1440], ['s1', 'HIST140', 720], ['s4', 'HIST140', 600], ['s1', 'MATH101H', 540],
['s1', 'CHEM120', 900], ['s2', 'CHEM120', 1440], ['s1', 'MATH101', 2341], ['s2', 'PHYS110', 2881],
['s2', 'MATH101H', 600], ['s4', 'ECON150', 780]],
2],
[['s1', 3], ['s2', 3]]),
('partial repair guard 3',
[[['s5', 'MATH101', 3481], ['s5', 'PHYS110', 600], ['s5', 'MATH101', 3481], ['s1', 'ECON150', 540],
['s5', 'BIO130', 2040], ['s1', 'BIO130', 1380], ['s5', 'MATH101H', 1860], ['s5', 'CHEM120', 600]],
3],
[]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'B', 600], ['s1', 'C', 900]], 2], [['s1', 3]]),
('normal control 5',
[[['s2', 'HIST140', 4860], ['s2', 'MATH101', 5160], ['s3', 'BIO130', 3060], ['s2', 'MATH101H', 1980],
['s3', 'HIST140', 2760], ['s3', 'ECON150', 600], ['s2', 'ECON150', 5460], ['s3', 'MATH101H', 3240],
['s3', 'PHYS110', 1320], ['s2', 'CHEM120', 540], ['s2', 'MATH101', 5160]],
3],
[]),
('normal control 6',
[[['s4', 'BIO130', 4920], ['s4', 'CHEM120', 2040], ['s4', 'MATH101H', 600], ['s4', 'HIST140', 6359],
['s4', 'PHYS110', 2040]],
2],
[]),
('normal control 7',
[[['s2', 'BIO130', 600], ['s2', 'HIST140', 6179], ['s2', 'ECON150', 3480], ['s2', 'HIST140', 6179],
['s2', 'MATH101H', 2041], ['s2', 'PHYS110', 4919]],
1],
[['s2', 2]]),
('normal control 8',
[[['s2', 'PHYS110', 2880], ['s2', 'HIST140', 600], ['s2', 'MATH101', 2880], ['s2', 'BIO130', 1440]], 2],
[])],
[('regression: limit comparison 1',
[[['s3', 'HIST140', 2039], ['s3', 'BIO130', 600], ['s3', 'HIST140', 2039], ['s3', 'MATH101', 3299]], 2],
[]),
('regression variant: limit comparison 2',
[[['s3', 'BIO130', 540], ['s5', 'PHYS110', 1320], ['s4', 'BIO130', 1980], ['s3', 'PHYS110', 1380],
['s5', 'BIO130', 600], ['s4', 'ECON150', 540]],
1],
[['s3', 2], ['s5', 2]]),
('partial repair guard 3',
[[['s3', 'PHYS110', 3059], ['s4', 'MATH101H', 1320], ['s3', 'HIST140', 900], ['s4', 'BIO130', 600],
['s3', 'BIO130', 1620], ['s3', 'MATH101H', 600], ['s4', 'PHYS110', 1500]],
3],
[]),
('boundary control 4', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2], [['s1', 3]]),
('normal control 5',
[[['s1', 'CHEM120', 540], ['s4', 'MATH101', 3422], ['s4', 'PHYS110', 1981], ['s4', 'ECON150', 540],
['s2', 'MATH101H', 540], ['s2', 'BIO130', 1680], ['s1', 'MATH101', 540], ['s1', 'MATH101H', 720],
['s2', 'HIST140', 1380]],
3],
[]),
('normal control 6',
[[['s2', 'BIO130', 600], ['s2', 'HIST140', 6179], ['s2', 'ECON150', 3480], ['s2', 'HIST140', 6179],
['s2', 'MATH101H', 2041], ['s2', 'PHYS110', 4919]],
1],
[['s2', 2]]),
('normal control 7',
[[['s5', 'CHEM120', 4500], ['s2', 'PHYS110', 3300], ['s5', 'MATH101H', 600], ['s2', 'HIST140', 6180],
['s5', 'PHYS110', 1440], ['s2', 'ECON150', 600], ['s5', 'HIST140', 1620], ['s2', 'MATH101', 6900],
['s5', 'MATH101', 5941], ['s2', 'BIO130', 1860], ['s5', 'MATH101', 5941]],
1],
[['s2', 2], ['s5', 3]]),
('normal control 8', [[['s4', 'CHEM120', 600], ['s4', 'CHEM120', 600], ['s4', 'MATH101H', 2040]], 2], [])],
[('regression: limit comparison 1',
[[['s5', 'ECON150', 1980], ['s5', 'CHEM120', 3000], ['s2', 'MATH101H', 2041], ['s2', 'HIST140', 2761],
['s2', 'BIO130', 600], ['s1', 'PHYS110', 540], ['s2', 'CHEM120', 3601], ['s1', 'HIST140', 1380],
['s5', 'MATH101H', 540], ['s5', 'PHYS110', 2280]],
2],
[['s5', 3]]),
('regression variant: limit comparison 2',
[[['s4', 'ECON150', 1979], ['s4', 'CHEM120', 4859], ['s1', 'CHEM120', 2761], ['s4', 'MATH101H', 540],
['s1', 'BIO130', 4321], ['s4', 'PHYS110', 1979], ['s1', 'ECON150', 3481], ['s1', 'PHYS110', 600],
['s1', 'MATH101', 1320], ['s4', 'MATH101H', 540], ['s4', 'HIST140', 7739]],
2],
[['s4', 3]]),
('partial repair guard 3', [[['s1', 'HIST140', 3300], ['s1', 'ECON150', 600], ['s1', 'MATH101', 2040]], 2],
[]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('normal control 5',
[[['s2', 'PHYS110', 540], ['s3', 'MATH101', 2040], ['s2', 'CHEM120', 1979], ['s1', 'CHEM120', 1980],
['s1', 'BIO130', 3419], ['s2', 'BIO130', 5759], ['s1', 'HIST140', 540], ['s2', 'MATH101', 5579],
['s2', 'MATH101H', 4859], ['s3', 'HIST140', 600]],
3],
[]),
('normal control 6',
[[['s2', 'MATH101H', 2160], ['s2', 'PHYS110', 3599], ['s2', 'HIST140', 540], ['s2', 'BIO130', 720],
['s2', 'ECON150', 720]],
3],
[]),
('normal control 7',
[[['s4', 'CHEM120', 600], ['s4', 'ECON150', 1860], ['s4', 'MATH101H', 4920], ['s4', 'HIST140', 4740]], 1],
[['s4', 2]]),
('normal control 8',
[[['s2', 'CHEM120', 3301], ['s2', 'CHEM120', 3301], ['s2', 'HIST140', 600], ['s2', 'ECON150', 1860],
['s5', 'ECON150', 1981], ['s2', 'PHYS110', 4740], ['s5', 'MATH101H', 540]],
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: limit comparison 1 | [['s1', 2]] | [] | Failed |
| regression variant: limit comparison 2 | [['s1', 3]] | [['s1', 3]] | Passed |
| partial repair guard 3 | [['s1', 1], ['s2', 3]] | [['s2', 3]] | Failed |
| boundary control 4 | [['s1', 2]] | [['s1', 2]] | Passed |
| normal control 5 | [['s5', 2]] | [] | Failed |
| normal control 6 | [] | [] | Passed |
| normal control 7 | [['s2', 3], ['s5', 2]] | [] | Failed |
| normal control 8 | [['s3', 3]] | [] | Failed |
SHA-256 / 56b6de7b89e099f3dd1d3e4f447d3dcc933eab39378b869858e5cb98c4a2a428
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.180758+00:00.
Case digest / 69a2477b3dbd1e6fcf7558402624e62831bf5857115fc5745260c2853726103f