FA-94506 / Exam timetabling constraints / Open access
Exam load counted per calendar day instead of rolling 24 hours · case 01
An evening exam followed by two next-morning exams is not reported.
ROOT CAUSE
The window is the calendar day of the current exam.
THE FAILURE
The window is the calendar day of the current exam.
Unsuccessful approach: Half-day buckets are still calendar-aligned.
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] // 1440 != 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: calendar day bucket 1', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2],
[['s1', 3]]),
('regression variant: calendar day bucket 2',
[[['s5', 'ECON150', 1380], ['s5', 'BIO130', 540], ['s2', 'MATH101', 5159], ['s5', 'PHYS110', 1680],
['s3', 'HIST140', 2761], ['s2', 'MATH101H', 1979], ['s3', 'ECON150', 3061], ['s2', 'HIST140', 540],
['s2', 'ECON150', 4859], ['s5', 'HIST140', 3120], ['s3', 'CHEM120', 1320], ['s2', 'PHYS110', 6598],
['s2', 'HIST140', 540], ['s3', 'BIO130', 600]],
1],
[['s2', 2], ['s3', 2], ['s5', 3]]),
('partial repair guard 3',
[[['s2', 'PHYS110', 2039], ['s5', 'ECON150', 3000], ['s5', 'ECON150', 3000], ['s2', 'HIST140', 600],
['s5', 'MATH101H', 1260], ['s5', 'CHEM120', 540], ['s5', 'PHYS110', 1560]],
1],
[['s2', 2], ['s5', 3]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'A', 600], ['s1', 'B', 900]], 1], [['s1', 2]]),
('normal control 5',
[[['s5', 'ECON150', 1981], ['s5', 'HIST140', 540], ['s5', 'BIO130', 540], ['s5', 'MATH101H', 3422],
['s5', 'PHYS110', 6302]],
2],
[]),
('normal control 6',
[[['s5', 'ECON150', 1260], ['s5', 'MATH101H', 3539], ['s5', 'HIST140', 1260], ['s5', 'PHYS110', 540],
['s5', 'MATH101', 2100]],
1],
[['s5', 3]]),
('normal control 7', [[['s5', 'HIST140', 1981], ['s5', 'MATH101', 540]], 2], []),
('normal control 8',
[[['s4', 'MATH101H', 2160], ['s4', 'ECON150', 1320], ['s4', 'CHEM120', 3420], ['s4', 'HIST140', 3600],
['s4', 'PHYS110', 600], ['s4', 'CHEM120', 3420]],
3],
[])],
[('regression: calendar day bucket 1',
[[['s4', 'MATH101', 3120], ['s4', 'PHYS110', 840], ['s2', 'ECON150', 540], ['s2', 'BIO130', 2640],
['s5', 'MATH101', 600], ['s5', 'BIO130', 2040], ['s4', 'CHEM120', 540], ['s5', 'CHEM120', 2760],
['s4', 'MATH101H', 840], ['s4', 'ECON150', 1680], ['s2', 'MATH101', 1380]],
3],
[['s4', 4]]),
('regression variant: calendar day bucket 2',
[[['s4', 'PHYS110', 1800], ['s2', 'HIST140', 1860], ['s5', 'MATH101', 3240], ['s2', 'ECON150', 600],
['s5', 'HIST140', 3240], ['s2', 'CHEM120', 2160], ['s5', 'MATH101H', 1800], ['s5', 'CHEM120', 1800],
['s4', 'BIO130', 540], ['s2', 'BIO130', 3420], ['s5', 'BIO130', 540], ['s4', 'CHEM120', 3060],
['s4', 'CHEM120', 3060]],
1],
[['s2', 2], ['s4', 2], ['s5', 3]]),
('partial repair guard 3',
[[['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]]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1979], ['s1', 'C', 1990]], 2], []),
('normal control 5',
[[['s4', 'ECON150', 540], ['s5', 'ECON150', 3480], ['s5', 'BIO130', 2040], ['s5', 'MATH101H', 3480],
['s4', 'MATH101', 3420], ['s5', 'HIST140', 3660], ['s4', 'CHEM120', 540], ['s5', 'CHEM120', 600],
['s4', 'MATH101H', 3720]],
2],
[['s5', 3]]),
('normal control 6',
[[['s5', 'HIST140', 3478], ['s4', 'PHYS110', 2880], ['s4', 'BIO130', 720], ['s5', 'CHEM120', 600],
['s4', 'MATH101H', 2160], ['s3', 'MATH101H', 600], ['s4', 'CHEM120', 540], ['s5', 'MATH101H', 6358],
['s4', 'MATH101', 4140], ['s3', 'PHYS110', 1320], ['s5', 'MATH101', 2039]],
1],
[['s3', 2], ['s4', 2], ['s5', 2]]),
('normal control 7',
[[['s2', 'ECON150', 1440], ['s3', 'PHYS110', 1860], ['s2', 'MATH101H', 3720], ['s3', 'MATH101H', 1560],
['s2', 'BIO130', 2880], ['s3', 'MATH101', 1380], ['s3', 'BIO130', 2700], ['s2', 'HIST140', 600],
['s3', 'HIST140', 540]],
1],
[['s2', 2], ['s3', 4]]),
('normal control 8',
[[['s1', 'PHYS110', 540], ['s2', 'PHYS110', 900], ['s2', 'HIST140', 600], ['s1', 'ECON150', 1800],
['s1', 'CHEM120', 540]],
2],
[['s1', 3]])],
[('regression: calendar day bucket 1',
[[['s5', 'HIST140', 600], ['s5', 'HIST140', 600], ['s5', 'MATH101H', 1440]], 1], [['s5', 2]]),
('regression variant: calendar day bucket 2',
[[['s2', 'CHEM120', 600], ['s1', 'CHEM120', 2339], ['s5', 'MATH101', 4739], ['s1', 'HIST140', 600],
['s5', 'PHYS110', 3299], ['s2', 'MATH101', 7019], ['s1', 'ECON150', 2339], ['s1', 'PHYS110', 900],
['s2', 'BIO130', 1440], ['s5', 'MATH101H', 1860], ['s2', 'MATH101H', 4320], ['s1', 'MATH101', 3778],
['s2', 'HIST140', 5580], ['s5', 'CHEM120', 5579], ['s5', 'ECON150', 600]],
2],
[['s1', 3]]),
('partial repair guard 3',
[[['s3', 'PHYS110', 1860], ['s3', 'HIST140', 1260], ['s3', 'BIO130', 1560], ['s3', 'CHEM120', 540]], 1],
[['s3', 4]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'B', 600], ['s1', 'C', 900]], 2], [['s1', 3]]),
('normal control 5',
[[['s4', 'HIST140', 2160], ['s4', 'MATH101', 2460], ['s4', 'CHEM120', 2640], ['s4', 'ECON150', 600],
['s4', 'BIO130', 1860]],
2],
[['s4', 4]]),
('normal control 6',
[[['s1', 'ECON150', 840], ['s2', 'ECON150', 3420], ['s2', 'MATH101H', 3600], ['s1', 'CHEM120', 1140],
['s1', 'BIO130', 540], ['s5', 'CHEM120', 600], ['s5', 'PHYS110', 2039], ['s2', 'HIST140', 4860],
['s2', 'BIO130', 540], ['s1', 'HIST140', 1980], ['s1', 'PHYS110', 840], ['s5', 'PHYS110', 2039]],
2],
[['s1', 4]]),
('normal control 7',
[[['s5', 'HIST140', 600], ['s3', 'CHEM120', 540], ['s5', 'MATH101H', 3481], ['s3', 'MATH101H', 3661],
['s1', 'HIST140', 3480], ['s1', 'BIO130', 600], ['s5', 'ECON150', 2221], ['s3', 'MATH101', 1981],
['s3', 'HIST140', 2821], ['s5', 'BIO130', 780], ['s1', 'ECON150', 9061], ['s1', 'PHYS110', 6360],
['s5', 'CHEM120', 780], ['s1', 'MATH101', 7620]],
2],
[['s5', 3]]),
('normal control 8', [[['s5', 'HIST140', 1981], ['s5', 'MATH101', 540]], 2], [])],
[('regression: calendar day bucket 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: calendar day bucket 2',
[[['s2', 'ECON150', 540], ['s2', 'ECON150', 540], ['s1', 'BIO130', 1380], ['s2', 'PHYS110', 3001],
['s2', 'CHEM120', 3301], ['s2', 'MATH101H', 2281], ['s4', 'MATH101H', 1981], ['s1', 'HIST140', 2819],
['s1', 'ECON150', 540], ['s2', 'BIO130', 1981], ['s4', 'MATH101', 540], ['s4', 'ECON150', 3422]],
2],
[['s2', 4]]),
('partial repair guard 3',
[[['s4', 'BIO130', 540], ['s3', 'PHYS110', 840], ['s1', 'PHYS110', 1440], ['s3', 'CHEM120', 540],
['s1', 'MATH101', 1440], ['s4', 'PHYS110', 1380], ['s1', 'MATH101H', 1440], ['s3', 'ECON150', 1680],
['s3', 'CHEM120', 540], ['s1', 'ECON150', 600]],
1],
[['s1', 4], ['s3', 3], ['s4', 2]]),
('boundary control 4', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2], [['s1', 3]]),
('normal control 5',
[[['s5', 'CHEM120', 4740], ['s3', 'PHYS110', 1860], ['s5', 'PHYS110', 3480], ['s1', 'HIST140', 2040],
['s3', 'BIO130', 600], ['s5', 'HIST140', 600], ['s3', 'ECON150', 600], ['s5', 'CHEM120', 4740],
['s1', 'MATH101', 600]],
2],
[['s3', 3]]),
('normal control 6', [[['s5', 'MATH101H', 540], ['s5', 'HIST140', 1981]], 2], []),
('normal control 7',
[[['s3', 'MATH101H', 5701], ['s3', 'PHYS110', 4260], ['s3', 'HIST140', 540], ['s5', 'PHYS110', 540],
['s3', 'CHEM120', 2821], ['s3', 'HIST140', 540], ['s3', 'BIO130', 1981], ['s5', 'MATH101H', 1981]],
2],
[]),
('normal control 8',
[[['s3', 'MATH101H', 2041], ['s2', 'ECON150', 2821], ['s2', 'BIO130', 1380], ['s3', 'MATH101H', 2041],
['s3', 'CHEM120', 3482], ['s2', 'MATH101H', 540], ['s3', 'ECON150', 4202], ['s3', 'MATH101', 600]],
1],
[['s2', 2], ['s3', 2]])],
[('regression: calendar day bucket 1',
[[['s1', 'ECON150', 2820], ['s1', 'PHYS110', 3000], ['s1', 'MATH101H', 1980], ['s1', 'HIST140', 540],
['s1', 'ECON150', 2820]],
1],
[['s1', 3]]),
('regression variant: calendar day bucket 2',
[[['s4', 'MATH101H', 1500], ['s4', 'BIO130', 600], ['s4', 'CHEM120', 1320], ['s4', 'HIST140', 2939],
['s4', 'MATH101', 600]],
2],
[['s4', 4]]),
('partial repair guard 3',
[[['s2', 'MATH101H', 3060], ['s2', 'BIO130', 1860], ['s1', 'MATH101', 600], ['s2', 'MATH101', 600],
['s2', 'ECON150', 2340], ['s1', 'MATH101H', 2041], ['s3', 'HIST140', 2039], ['s1', 'HIST140', 2041],
['s3', 'MATH101H', 600], ['s2', 'HIST140', 2160], ['s1', 'CHEM120', 600], ['s3', 'CHEM120', 3478],
['s1', 'ECON150', 600]],
1],
[['s1', 3], ['s2', 4], ['s3', 2]]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('normal control 5',
[[['s5', 'ECON150', 1380], ['s5', 'BIO130', 540], ['s2', 'MATH101', 5159], ['s5', 'PHYS110', 1680],
['s3', 'HIST140', 2761], ['s2', 'MATH101H', 1979], ['s3', 'ECON150', 3061], ['s2', 'HIST140', 540],
['s2', 'ECON150', 4859], ['s5', 'HIST140', 3120], ['s3', 'CHEM120', 1320], ['s2', 'PHYS110', 6598],
['s2', 'HIST140', 540], ['s3', 'BIO130', 600]],
1],
[['s2', 2], ['s3', 2], ['s5', 3]]),
('normal control 6',
[[['s5', 'MATH101', 600], ['s2', 'CHEM120', 1980], ['s1', 'MATH101H', 1980], ['s5', 'PHYS110', 600],
['s2', 'ECON150', 1980], ['s1', 'BIO130', 540], ['s1', 'MATH101', 2700], ['s2', 'PHYS110', 540]],
2],
[]),
('normal control 7',
[[['s2', 'HIST140', 840], ['s2', 'MATH101', 540], ['s4', 'BIO130', 540], ['s4', 'ECON150', 1560],
['s2', 'MATH101H', 840], ['s4', 'BIO130', 540], ['s4', 'MATH101', 1380], ['s2', 'PHYS110', 1680]],
2],
[['s2', 4], ['s4', 3]]),
('normal control 8',
[[['s4', 'PHYS110', 3480], ['s5', 'MATH101H', 3780], ['s4', 'BIO130', 4920], ['s5', 'PHYS110', 900],
['s5', 'BIO130', 600], ['s4', 'MATH101', 600], ['s5', 'HIST140', 5221], ['s4', 'MATH101', 600],
['s4', 'ECON150', 7800], ['s3', 'CHEM120', 1440], ['s3', 'ECON150', 600]],
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: calendar day bucket 1 | [] | [['s1', 3]] | Failed |
| regression variant: calendar day bucket 2 | [['s2', 2], ['s3', 2], ['s5', 2]] | [['s2', 2], ['s3', 2], ['s5', 3]] | Failed |
| partial repair guard 3 | [['s5', 2]] | [['s2', 2], ['s5', 3]] | Failed |
| boundary control 4 | [['s1', 2]] | [['s1', 2]] | Passed |
| normal control 5 | [] | [] | Passed |
| normal control 6 | [['s5', 3]] | [['s5', 3]] | Passed |
| normal control 7 | [] | [] | Passed |
| normal control 8 | [] | [] | Passed |
SHA-256 / 4ee35df0420739a07472c3b2938e24397c83a349ec936fa2be246b70f4d5876b
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] // 720 - ts[j] // 720 >= 2:
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: calendar day bucket 1', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2],
[['s1', 3]]),
('regression variant: calendar day bucket 2',
[[['s5', 'ECON150', 1380], ['s5', 'BIO130', 540], ['s2', 'MATH101', 5159], ['s5', 'PHYS110', 1680],
['s3', 'HIST140', 2761], ['s2', 'MATH101H', 1979], ['s3', 'ECON150', 3061], ['s2', 'HIST140', 540],
['s2', 'ECON150', 4859], ['s5', 'HIST140', 3120], ['s3', 'CHEM120', 1320], ['s2', 'PHYS110', 6598],
['s2', 'HIST140', 540], ['s3', 'BIO130', 600]],
1],
[['s2', 2], ['s3', 2], ['s5', 3]]),
('partial repair guard 3',
[[['s2', 'PHYS110', 2039], ['s5', 'ECON150', 3000], ['s5', 'ECON150', 3000], ['s2', 'HIST140', 600],
['s5', 'MATH101H', 1260], ['s5', 'CHEM120', 540], ['s5', 'PHYS110', 1560]],
1],
[['s2', 2], ['s5', 3]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'A', 600], ['s1', 'B', 900]], 1], [['s1', 2]]),
('normal control 5',
[[['s5', 'ECON150', 1981], ['s5', 'HIST140', 540], ['s5', 'BIO130', 540], ['s5', 'MATH101H', 3422],
['s5', 'PHYS110', 6302]],
2],
[]),
('normal control 6',
[[['s5', 'ECON150', 1260], ['s5', 'MATH101H', 3539], ['s5', 'HIST140', 1260], ['s5', 'PHYS110', 540],
['s5', 'MATH101', 2100]],
1],
[['s5', 3]]),
('normal control 7', [[['s5', 'HIST140', 1981], ['s5', 'MATH101', 540]], 2], []),
('normal control 8',
[[['s4', 'MATH101H', 2160], ['s4', 'ECON150', 1320], ['s4', 'CHEM120', 3420], ['s4', 'HIST140', 3600],
['s4', 'PHYS110', 600], ['s4', 'CHEM120', 3420]],
3],
[])],
[('regression: calendar day bucket 1',
[[['s4', 'MATH101', 3120], ['s4', 'PHYS110', 840], ['s2', 'ECON150', 540], ['s2', 'BIO130', 2640],
['s5', 'MATH101', 600], ['s5', 'BIO130', 2040], ['s4', 'CHEM120', 540], ['s5', 'CHEM120', 2760],
['s4', 'MATH101H', 840], ['s4', 'ECON150', 1680], ['s2', 'MATH101', 1380]],
3],
[['s4', 4]]),
('regression variant: calendar day bucket 2',
[[['s4', 'PHYS110', 1800], ['s2', 'HIST140', 1860], ['s5', 'MATH101', 3240], ['s2', 'ECON150', 600],
['s5', 'HIST140', 3240], ['s2', 'CHEM120', 2160], ['s5', 'MATH101H', 1800], ['s5', 'CHEM120', 1800],
['s4', 'BIO130', 540], ['s2', 'BIO130', 3420], ['s5', 'BIO130', 540], ['s4', 'CHEM120', 3060],
['s4', 'CHEM120', 3060]],
1],
[['s2', 2], ['s4', 2], ['s5', 3]]),
('partial repair guard 3',
[[['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]]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1979], ['s1', 'C', 1990]], 2], []),
('normal control 5',
[[['s4', 'ECON150', 540], ['s5', 'ECON150', 3480], ['s5', 'BIO130', 2040], ['s5', 'MATH101H', 3480],
['s4', 'MATH101', 3420], ['s5', 'HIST140', 3660], ['s4', 'CHEM120', 540], ['s5', 'CHEM120', 600],
['s4', 'MATH101H', 3720]],
2],
[['s5', 3]]),
('normal control 6',
[[['s5', 'HIST140', 3478], ['s4', 'PHYS110', 2880], ['s4', 'BIO130', 720], ['s5', 'CHEM120', 600],
['s4', 'MATH101H', 2160], ['s3', 'MATH101H', 600], ['s4', 'CHEM120', 540], ['s5', 'MATH101H', 6358],
['s4', 'MATH101', 4140], ['s3', 'PHYS110', 1320], ['s5', 'MATH101', 2039]],
1],
[['s3', 2], ['s4', 2], ['s5', 2]]),
('normal control 7',
[[['s2', 'ECON150', 1440], ['s3', 'PHYS110', 1860], ['s2', 'MATH101H', 3720], ['s3', 'MATH101H', 1560],
['s2', 'BIO130', 2880], ['s3', 'MATH101', 1380], ['s3', 'BIO130', 2700], ['s2', 'HIST140', 600],
['s3', 'HIST140', 540]],
1],
[['s2', 2], ['s3', 4]]),
('normal control 8',
[[['s1', 'PHYS110', 540], ['s2', 'PHYS110', 900], ['s2', 'HIST140', 600], ['s1', 'ECON150', 1800],
['s1', 'CHEM120', 540]],
2],
[['s1', 3]])],
[('regression: calendar day bucket 1',
[[['s5', 'HIST140', 600], ['s5', 'HIST140', 600], ['s5', 'MATH101H', 1440]], 1], [['s5', 2]]),
('regression variant: calendar day bucket 2',
[[['s2', 'CHEM120', 600], ['s1', 'CHEM120', 2339], ['s5', 'MATH101', 4739], ['s1', 'HIST140', 600],
['s5', 'PHYS110', 3299], ['s2', 'MATH101', 7019], ['s1', 'ECON150', 2339], ['s1', 'PHYS110', 900],
['s2', 'BIO130', 1440], ['s5', 'MATH101H', 1860], ['s2', 'MATH101H', 4320], ['s1', 'MATH101', 3778],
['s2', 'HIST140', 5580], ['s5', 'CHEM120', 5579], ['s5', 'ECON150', 600]],
2],
[['s1', 3]]),
('partial repair guard 3',
[[['s3', 'PHYS110', 1860], ['s3', 'HIST140', 1260], ['s3', 'BIO130', 1560], ['s3', 'CHEM120', 540]], 1],
[['s3', 4]]),
('boundary control 4', [[['s1', 'A', 600], ['s1', 'B', 600], ['s1', 'C', 900]], 2], [['s1', 3]]),
('normal control 5',
[[['s4', 'HIST140', 2160], ['s4', 'MATH101', 2460], ['s4', 'CHEM120', 2640], ['s4', 'ECON150', 600],
['s4', 'BIO130', 1860]],
2],
[['s4', 4]]),
('normal control 6',
[[['s1', 'ECON150', 840], ['s2', 'ECON150', 3420], ['s2', 'MATH101H', 3600], ['s1', 'CHEM120', 1140],
['s1', 'BIO130', 540], ['s5', 'CHEM120', 600], ['s5', 'PHYS110', 2039], ['s2', 'HIST140', 4860],
['s2', 'BIO130', 540], ['s1', 'HIST140', 1980], ['s1', 'PHYS110', 840], ['s5', 'PHYS110', 2039]],
2],
[['s1', 4]]),
('normal control 7',
[[['s5', 'HIST140', 600], ['s3', 'CHEM120', 540], ['s5', 'MATH101H', 3481], ['s3', 'MATH101H', 3661],
['s1', 'HIST140', 3480], ['s1', 'BIO130', 600], ['s5', 'ECON150', 2221], ['s3', 'MATH101', 1981],
['s3', 'HIST140', 2821], ['s5', 'BIO130', 780], ['s1', 'ECON150', 9061], ['s1', 'PHYS110', 6360],
['s5', 'CHEM120', 780], ['s1', 'MATH101', 7620]],
2],
[['s5', 3]]),
('normal control 8', [[['s5', 'HIST140', 1981], ['s5', 'MATH101', 540]], 2], [])],
[('regression: calendar day bucket 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: calendar day bucket 2',
[[['s2', 'ECON150', 540], ['s2', 'ECON150', 540], ['s1', 'BIO130', 1380], ['s2', 'PHYS110', 3001],
['s2', 'CHEM120', 3301], ['s2', 'MATH101H', 2281], ['s4', 'MATH101H', 1981], ['s1', 'HIST140', 2819],
['s1', 'ECON150', 540], ['s2', 'BIO130', 1981], ['s4', 'MATH101', 540], ['s4', 'ECON150', 3422]],
2],
[['s2', 4]]),
('partial repair guard 3',
[[['s4', 'BIO130', 540], ['s3', 'PHYS110', 840], ['s1', 'PHYS110', 1440], ['s3', 'CHEM120', 540],
['s1', 'MATH101', 1440], ['s4', 'PHYS110', 1380], ['s1', 'MATH101H', 1440], ['s3', 'ECON150', 1680],
['s3', 'CHEM120', 540], ['s1', 'ECON150', 600]],
1],
[['s1', 4], ['s3', 3], ['s4', 2]]),
('boundary control 4', [[['s1', 'A', 1300], ['s1', 'B', 1500], ['s1', 'C', 1600]], 2], [['s1', 3]]),
('normal control 5',
[[['s5', 'CHEM120', 4740], ['s3', 'PHYS110', 1860], ['s5', 'PHYS110', 3480], ['s1', 'HIST140', 2040],
['s3', 'BIO130', 600], ['s5', 'HIST140', 600], ['s3', 'ECON150', 600], ['s5', 'CHEM120', 4740],
['s1', 'MATH101', 600]],
2],
[['s3', 3]]),
('normal control 6', [[['s5', 'MATH101H', 540], ['s5', 'HIST140', 1981]], 2], []),
('normal control 7',
[[['s3', 'MATH101H', 5701], ['s3', 'PHYS110', 4260], ['s3', 'HIST140', 540], ['s5', 'PHYS110', 540],
['s3', 'CHEM120', 2821], ['s3', 'HIST140', 540], ['s3', 'BIO130', 1981], ['s5', 'MATH101H', 1981]],
2],
[]),
('normal control 8',
[[['s3', 'MATH101H', 2041], ['s2', 'ECON150', 2821], ['s2', 'BIO130', 1380], ['s3', 'MATH101H', 2041],
['s3', 'CHEM120', 3482], ['s2', 'MATH101H', 540], ['s3', 'ECON150', 4202], ['s3', 'MATH101', 600]],
1],
[['s2', 2], ['s3', 2]])],
[('regression: calendar day bucket 1',
[[['s1', 'ECON150', 2820], ['s1', 'PHYS110', 3000], ['s1', 'MATH101H', 1980], ['s1', 'HIST140', 540],
['s1', 'ECON150', 2820]],
1],
[['s1', 3]]),
('regression variant: calendar day bucket 2',
[[['s4', 'MATH101H', 1500], ['s4', 'BIO130', 600], ['s4', 'CHEM120', 1320], ['s4', 'HIST140', 2939],
['s4', 'MATH101', 600]],
2],
[['s4', 4]]),
('partial repair guard 3',
[[['s2', 'MATH101H', 3060], ['s2', 'BIO130', 1860], ['s1', 'MATH101', 600], ['s2', 'MATH101', 600],
['s2', 'ECON150', 2340], ['s1', 'MATH101H', 2041], ['s3', 'HIST140', 2039], ['s1', 'HIST140', 2041],
['s3', 'MATH101H', 600], ['s2', 'HIST140', 2160], ['s1', 'CHEM120', 600], ['s3', 'CHEM120', 3478],
['s1', 'ECON150', 600]],
1],
[['s1', 3], ['s2', 4], ['s3', 2]]),
('boundary control 4', [[['s1', 'A', 540], ['s1', 'B', 1980], ['s1', 'C', 2000]], 2], []),
('normal control 5',
[[['s5', 'ECON150', 1380], ['s5', 'BIO130', 540], ['s2', 'MATH101', 5159], ['s5', 'PHYS110', 1680],
['s3', 'HIST140', 2761], ['s2', 'MATH101H', 1979], ['s3', 'ECON150', 3061], ['s2', 'HIST140', 540],
['s2', 'ECON150', 4859], ['s5', 'HIST140', 3120], ['s3', 'CHEM120', 1320], ['s2', 'PHYS110', 6598],
['s2', 'HIST140', 540], ['s3', 'BIO130', 600]],
1],
[['s2', 2], ['s3', 2], ['s5', 3]]),
('normal control 6',
[[['s5', 'MATH101', 600], ['s2', 'CHEM120', 1980], ['s1', 'MATH101H', 1980], ['s5', 'PHYS110', 600],
['s2', 'ECON150', 1980], ['s1', 'BIO130', 540], ['s1', 'MATH101', 2700], ['s2', 'PHYS110', 540]],
2],
[]),
('normal control 7',
[[['s2', 'HIST140', 840], ['s2', 'MATH101', 540], ['s4', 'BIO130', 540], ['s4', 'ECON150', 1560],
['s2', 'MATH101H', 840], ['s4', 'BIO130', 540], ['s4', 'MATH101', 1380], ['s2', 'PHYS110', 1680]],
2],
[['s2', 4], ['s4', 3]]),
('normal control 8',
[[['s4', 'PHYS110', 3480], ['s5', 'MATH101H', 3780], ['s4', 'BIO130', 4920], ['s5', 'PHYS110', 900],
['s5', 'BIO130', 600], ['s4', 'MATH101', 600], ['s5', 'HIST140', 5221], ['s4', 'MATH101', 600],
['s4', 'ECON150', 7800], ['s3', 'CHEM120', 1440], ['s3', 'ECON150', 600]],
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: calendar day bucket 1 | [['s1', 3]] | [['s1', 3]] | Passed |
| regression variant: calendar day bucket 2 | [['s2', 2], ['s3', 2], ['s5', 2]] | [['s2', 2], ['s3', 2], ['s5', 3]] | Failed |
| partial repair guard 3 | [['s5', 2]] | [['s2', 2], ['s5', 3]] | Failed |
| boundary control 4 | [['s1', 2]] | [['s1', 2]] | Passed |
| normal control 5 | [] | [] | Passed |
| normal control 6 | [['s5', 3]] | [['s5', 3]] | Passed |
| normal control 7 | [] | [] | Passed |
| normal control 8 | [] | [] | Passed |
SHA-256 / b45ece4aa267a3775a83696877169af2c341a4dee176ec5cbd48138088caeeea
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:04.999281+00:00.
Case digest / 6dd10752e7db7ef0b8ce3559a2c1b9162771594158302626acea26029cad79c1