FAILURE MAP
← Case archive

FA-94701 / Exam timetabling constraints / Open access

Access-arrangement candidates counted as one seat · case 01

Spaced seating for access candidates overflows the hall.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Every candidate is weighted as one seat.

THE FAILURE

Every candidate is weighted as one seat.

Unsuccessful approach: Requiring an explicit paper mode misses exams defaulting to paper.

Case contract

sits [student, exam, period, access]; cap period -> seats (missing = 0); mode exam -> paper/online (missing = paper). Each distinct (student, exam) uses one seat, two with an access arrangement, and none for online exams. Return [period, used, capacity] for periods over capacity, by period.

Why this case matters

Seat capacity per period is a hard constraint on which periods can take large exams.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(sits, cap, mode):
    seen = set()
    used = {}
    for st, ex, p, acc in sits:
        if (st, ex) in seen:
            continue
        seen.add((st, ex))
        if mode.get(ex) == 'online':
            continue
        used[p] = used.get(p, 0) + 1
    return [[p, used[p], cap.get(p, 0)] for p in sorted(used) if used[p] > cap.get(p, 0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: access seat weight 1', [[['s1', 'A', 0, True]], {0: 1}, {}], [[0, 2, 1]]),
  ('regression variant: access seat weight 2',
   [[['s2', 'MATH101H', 2, True], ['s4', 'MATH101', 0, False], ['s3', 'CHEM120', 0, True],
     ['s1', 'MATH101', 2, False], ['s2', 'PHYS110', 1, True], ['s4', 'BIO130', 0, True],
     ['s3', 'CHEM120', 2, False], ['s4', 'BIO130', 0, True]],
    {0: 2, 1: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],
   [[0, 5, 2], [2, 1, 0]]),
  ('partial repair guard 3',
   [[['s3', 'CHEM120', 0, False], ['s2', 'BIO130', 0, False], ['s5', 'MATH101H', 1, True],
     ['s4', 'CHEM120', 1, False], ['s2', 'CHEM120', 1, True], ['s3', 'CHEM120', 2, False],
     ['s3', 'PHYS110', 1, False], ['s4', 'BIO130', 1, False], ['s2', 'MATH101', 1, False]],
    {1: 3}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 1, 0], [1, 7, 3]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s2', 'PHYS110', 0, False], ['s5', 'PHYS110', 2, False], ['s5', 'BIO130', 2, True],
     ['s1', 'MATH101H', 1, False], ['s5', 'BIO130', 2, True]],
    {0: 4, 1: 3, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'MATH101H', 2, False], ['s1', 'MATH101', 0, False], ['s4', 'MATH101H', 0, False]], {0: 3, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s5', 'CHEM120', 2, False], ['s4', 'CHEM120', 0, False], ['s4', 'BIO130', 1, False]], {0: 4, 1: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'online'}],
   [[2, 1, 0]])],
 [('regression: access seat weight 1',
   [[['s4', 'MATH101H', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False],
     ['s5', 'CHEM120', 2, True], ['s4', 'BIO130', 2, True], ['s1', 'PHYS110', 1, False],
     ['s4', 'MATH101', 1, False], ['s2', 'PHYS110', 2, True], ['s5', 'CHEM120', 1, False],
     ['s5', 'MATH101H', 2, False]],
    {0: 2, 1: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 3, 1], [2, 6, 0]]),
  ('regression variant: access seat weight 2',
   [[['s1', 'MATH101H', 2, False], ['s3', 'MATH101H', 1, True], ['s1', 'BIO130', 1, False],
     ['s5', 'MATH101H', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'CHEM120', 1, True],
     ['s1', 'MATH101', 1, False]],
    {0: 2, 1: 2, 2: 2},
    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 3, 2]]),
  ('partial repair guard 3',
   [[['s3', 'MATH101H', 2, False], ['s1', 'CHEM120', 2, True], ['s4', 'BIO130', 1, False],
     ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False], ['s1', 'MATH101', 0, True],
     ['s1', 'MATH101H', 0, True], ['s3', 'MATH101H', 1, False], ['s4', 'BIO130', 1, False]],
    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],
   [[2, 3, 2]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),
  ('normal control 6',
   [[['s3', 'BIO130', 1, False], ['s1', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],
     ['s1', 'PHYS110', 2, False]],
    {0: 3, 1: 3, 2: 2}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'PHYS110', 2, True], ['s3', 'MATH101H', 0, True], ['s3', 'PHYS110', 2, True]], {0: 4, 1: 4, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],
     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],
     ['s4', 'MATH101H', 2, False]],
    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],
   [[2, 4, 1]])],
 [('regression: access seat weight 1',
   [[['s1', 'MATH101', 0, False], ['s1', 'MATH101', 0, True], ['s1', 'MATH101', 0, False],
     ['s3', 'MATH101', 0, False], ['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False],
     ['s2', 'CHEM120', 2, False], ['s5', 'MATH101H', 0, True], ['s3', 'PHYS110', 1, False]],
    {1: 3},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 4, 0], [2, 1, 0]]),
  ('regression variant: access seat weight 2',
   [[['s3', 'BIO130', 2, False], ['s4', 'MATH101', 2, True], ['s4', 'MATH101H', 0, True],
     ['s2', 'PHYS110', 2, False], ['s4', 'MATH101', 2, False], ['s5', 'PHYS110', 1, False],
     ['s2', 'PHYS110', 2, False]],
    {0: 2, 1: 2},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],
   [[2, 3, 0]]),
  ('partial repair guard 3',
   [[['s4', 'PHYS110', 2, True], ['s5', 'CHEM120', 2, True], ['s1', 'PHYS110', 2, False],
     ['s2', 'MATH101', 0, True], ['s1', 'MATH101H', 0, True], ['s5', 'CHEM120', 1, False],
     ['s1', 'BIO130', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'MATH101', 1, False]],
    {0: 1, 1: 3, 2: 1}, {'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 3, 1], [2, 5, 1]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s5', 'BIO130', 0, True], ['s4', 'MATH101', 2, False], ['s1', 'PHYS110', 2, False],
     ['s5', 'BIO130', 0, True]],
    {0: 1, 1: 1, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   []),
  ('normal control 7',
   [[['s2', 'CHEM120', 0, False], ['s5', 'MATH101', 1, True], ['s2', 'CHEM120', 2, False],
     ['s1', 'BIO130', 0, False], ['s1', 'CHEM120', 1, False], ['s4', 'CHEM120', 2, False],
     ['s4', 'PHYS110', 2, False], ['s1', 'MATH101H', 2, False], ['s4', 'MATH101H', 0, False]],
    {0: 4, 1: 4, 2: 1}, {'MATH101': 'online'}],
   [[2, 3, 1]]),
  ('normal control 8',
   [[['s1', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, False], ['s5', 'PHYS110', 0, False],
     ['s2', 'MATH101H', 1, False], ['s2', 'MATH101H', 1, False], ['s5', 'MATH101', 2, True],
     ['s4', 'MATH101', 2, False]],
    {0: 3, 1: 2, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [])],
 [('regression: access seat weight 1',
   [[['s5', 'CHEM120', 0, False], ['s2', 'MATH101H', 2, True], ['s5', 'PHYS110', 2, False],
     ['s3', 'PHYS110', 0, False], ['s3', 'MATH101', 1, False], ['s1', 'MATH101H', 1, True],
     ['s2', 'MATH101H', 0, True], ['s3', 'MATH101', 2, False], ['s4', 'PHYS110', 2, False],
     ['s3', 'MATH101', 2, False]],
    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[2, 4, 1]]),
  ('regression variant: access seat weight 2',
   [[['s5', 'MATH101H', 1, True], ['s4', 'MATH101H', 1, False], ['s1', 'PHYS110', 1, True],
     ['s4', 'MATH101', 0, False]],
    {1: 4, 2: 3}, {'MATH101H': 'paper', 'BIO130': 'paper'}],
   [[0, 1, 0], [1, 5, 4]]),
  ('partial repair guard 3',
   [[['s1', 'MATH101', 0, True], ['s4', 'CHEM120', 2, False], ['s1', 'MATH101', 1, False],
     ['s1', 'MATH101', 2, False]],
    {1: 1, 2: 3}, {'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper'}],
   [[0, 2, 0]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),
  ('normal control 6',
   [[['s2', 'MATH101', 2, False], ['s3', 'MATH101H', 0, False]], {0: 3, 1: 3, 2: 4},
    {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],
   []),
  ('normal control 7',
   [[['s3', 'BIO130', 1, False], ['s3', 'MATH101H', 2, False], ['s3', 'MATH101H', 2, False]],
    {0: 2, 1: 1, 2: 1}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'MATH101', 2, False], ['s2', 'CHEM120', 1, False], ['s4', 'BIO130', 1, False],
     ['s4', 'CHEM120', 1, False], ['s2', 'BIO130', 1, False], ['s5', 'MATH101H', 0, False],
     ['s1', 'MATH101H', 1, False], ['s3', 'CHEM120', 2, False], ['s2', 'CHEM120', 1, False],
     ['s3', 'CHEM120', 2, False]],
    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'BIO130': 'paper'}],
   [])],
 [('regression: access seat weight 1',
   [[['s3', 'BIO130', 0, True], ['s5', 'CHEM120', 2, False], ['s1', 'MATH101', 0, False],
     ['s2', 'MATH101H', 0, False], ['s4', 'CHEM120', 2, True], ['s5', 'MATH101H', 2, False],
     ['s3', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, False], ['s4', 'BIO130', 0, False],
     ['s1', 'PHYS110', 0, True]],
    {0: 3, 1: 2, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 6, 3], [2, 4, 3]]),
  ('regression variant: access seat weight 2',
   [[['s3', 'MATH101H', 2, False], ['s4', 'MATH101', 0, False], ['s4', 'PHYS110', 0, False],
     ['s3', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False], ['s4', 'MATH101H', 2, True]],
    {0: 4, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 1, 0], [2, 4, 1]]),
  ('partial repair guard 3',
   [[['s1', 'BIO130', 0, False], ['s5', 'BIO130', 0, True], ['s1', 'BIO130', 2, False],
     ['s1', 'CHEM120', 2, False], ['s4', 'PHYS110', 1, False], ['s1', 'PHYS110', 1, True]],
    {0: 1, 2: 1}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],
   [[0, 3, 1], [1, 3, 0]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s3', 'MATH101H', 2, False], ['s1', 'MATH101', 0, False], ['s4', 'MATH101H', 0, False]], {0: 3, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'PHYS110', 1, False], ['s5', 'CHEM120', 1, False], ['s3', 'PHYS110', 1, False]], {1: 4, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'MATH101', 0, False], ['s2', 'MATH101H', 1, True], ['s2', 'BIO130', 2, False],
     ['s2', 'BIO130', 0, False], ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, True],
     ['s4', 'MATH101H', 2, True], ['s1', 'MATH101H', 1, False], ['s1', 'MATH101', 0, False]],
    {1: 4, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],
   [[0, 1, 0]])]]
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 fixtureActualExpectedOutcome
regression: access seat weight 1[][[0, 2, 1]]Failed
regression variant: access seat weight 2[[0, 3, 2], [2, 1, 0]][[0, 5, 2], [2, 1, 0]]Failed
partial repair guard 3[[0, 1, 0], [1, 5, 3]][[0, 1, 0], [1, 7, 3]]Failed
boundary control 4[[0, 2, 1]][[0, 2, 1]]Passed
boundary control 5[][]Passed
normal control 6[][]Passed
normal control 7[][]Passed
normal control 8[[2, 1, 0]][[2, 1, 0]]Passed

SHA-256 / 8b73181d5afd6bba3ac1c331f254eacf957c37f93e0fe4f65e6632f3b677b780

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(sits, cap, mode):
    seen = set()
    used = {}
    for st, ex, p, acc in sits:
        if (st, ex) in seen:
            continue
        seen.add((st, ex))
        if mode.get(ex) == 'online':
            continue
        used[p] = used.get(p, 0) + (2 if acc and mode.get(ex) == 'paper' else 1)
    return [[p, used[p], cap.get(p, 0)] for p in sorted(used) if used[p] > cap.get(p, 0)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: access seat weight 1', [[['s1', 'A', 0, True]], {0: 1}, {}], [[0, 2, 1]]),
  ('regression variant: access seat weight 2',
   [[['s2', 'MATH101H', 2, True], ['s4', 'MATH101', 0, False], ['s3', 'CHEM120', 0, True],
     ['s1', 'MATH101', 2, False], ['s2', 'PHYS110', 1, True], ['s4', 'BIO130', 0, True],
     ['s3', 'CHEM120', 2, False], ['s4', 'BIO130', 0, True]],
    {0: 2, 1: 3}, {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper'}],
   [[0, 5, 2], [2, 1, 0]]),
  ('partial repair guard 3',
   [[['s3', 'CHEM120', 0, False], ['s2', 'BIO130', 0, False], ['s5', 'MATH101H', 1, True],
     ['s4', 'CHEM120', 1, False], ['s2', 'CHEM120', 1, True], ['s3', 'CHEM120', 2, False],
     ['s3', 'PHYS110', 1, False], ['s4', 'BIO130', 1, False], ['s2', 'MATH101', 1, False]],
    {1: 3}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 1, 0], [1, 7, 3]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s2', 'PHYS110', 0, False], ['s5', 'PHYS110', 2, False], ['s5', 'BIO130', 2, True],
     ['s1', 'MATH101H', 1, False], ['s5', 'BIO130', 2, True]],
    {0: 4, 1: 3, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'MATH101H', 2, False], ['s1', 'MATH101', 0, False], ['s4', 'MATH101H', 0, False]], {0: 3, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s5', 'CHEM120', 2, False], ['s4', 'CHEM120', 0, False], ['s4', 'BIO130', 1, False]], {0: 4, 1: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'online'}],
   [[2, 1, 0]])],
 [('regression: access seat weight 1',
   [[['s4', 'MATH101H', 1, False], ['s4', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False],
     ['s5', 'CHEM120', 2, True], ['s4', 'BIO130', 2, True], ['s1', 'PHYS110', 1, False],
     ['s4', 'MATH101', 1, False], ['s2', 'PHYS110', 2, True], ['s5', 'CHEM120', 1, False],
     ['s5', 'MATH101H', 2, False]],
    {0: 2, 1: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 3, 1], [2, 6, 0]]),
  ('regression variant: access seat weight 2',
   [[['s1', 'MATH101H', 2, False], ['s3', 'MATH101H', 1, True], ['s1', 'BIO130', 1, False],
     ['s5', 'MATH101H', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'CHEM120', 1, True],
     ['s1', 'MATH101', 1, False]],
    {0: 2, 1: 2, 2: 2},
    {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 3, 2]]),
  ('partial repair guard 3',
   [[['s3', 'MATH101H', 2, False], ['s1', 'CHEM120', 2, True], ['s4', 'BIO130', 1, False],
     ['s4', 'MATH101', 1, False], ['s3', 'MATH101H', 1, False], ['s1', 'MATH101', 0, True],
     ['s1', 'MATH101H', 0, True], ['s3', 'MATH101H', 1, False], ['s4', 'BIO130', 1, False]],
    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'paper', 'BIO130': 'paper'}],
   [[2, 3, 2]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),
  ('normal control 6',
   [[['s3', 'BIO130', 1, False], ['s1', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],
     ['s1', 'PHYS110', 2, False]],
    {0: 3, 1: 3, 2: 2}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'online', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'PHYS110', 2, True], ['s3', 'MATH101H', 0, True], ['s3', 'PHYS110', 2, True]], {0: 4, 1: 4, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'PHYS110', 2, False], ['s4', 'MATH101H', 0, False], ['s1', 'MATH101H', 2, False],
     ['s5', 'MATH101', 1, True], ['s5', 'PHYS110', 2, False], ['s3', 'BIO130', 2, True],
     ['s4', 'MATH101H', 2, False]],
    {1: 2, 2: 1}, {'MATH101': 'paper', 'MATH101H': 'online'}],
   [[2, 4, 1]])],
 [('regression: access seat weight 1',
   [[['s1', 'MATH101', 0, False], ['s1', 'MATH101', 0, True], ['s1', 'MATH101', 0, False],
     ['s3', 'MATH101', 0, False], ['s3', 'BIO130', 1, False], ['s2', 'PHYS110', 1, False],
     ['s2', 'CHEM120', 2, False], ['s5', 'MATH101H', 0, True], ['s3', 'PHYS110', 1, False]],
    {1: 3},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 4, 0], [2, 1, 0]]),
  ('regression variant: access seat weight 2',
   [[['s3', 'BIO130', 2, False], ['s4', 'MATH101', 2, True], ['s4', 'MATH101H', 0, True],
     ['s2', 'PHYS110', 2, False], ['s4', 'MATH101', 2, False], ['s5', 'PHYS110', 1, False],
     ['s2', 'PHYS110', 2, False]],
    {0: 2, 1: 2},
    {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'CHEM120': 'online', 'BIO130': 'paper'}],
   [[2, 3, 0]]),
  ('partial repair guard 3',
   [[['s4', 'PHYS110', 2, True], ['s5', 'CHEM120', 2, True], ['s1', 'PHYS110', 2, False],
     ['s2', 'MATH101', 0, True], ['s1', 'MATH101H', 0, True], ['s5', 'CHEM120', 1, False],
     ['s1', 'BIO130', 2, False], ['s2', 'PHYS110', 0, False], ['s5', 'MATH101', 1, False]],
    {0: 1, 1: 3, 2: 1}, {'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 3, 1], [2, 5, 1]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s5', 'BIO130', 0, True], ['s4', 'MATH101', 2, False], ['s1', 'PHYS110', 2, False],
     ['s5', 'BIO130', 0, True]],
    {0: 1, 1: 1, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   []),
  ('normal control 7',
   [[['s2', 'CHEM120', 0, False], ['s5', 'MATH101', 1, True], ['s2', 'CHEM120', 2, False],
     ['s1', 'BIO130', 0, False], ['s1', 'CHEM120', 1, False], ['s4', 'CHEM120', 2, False],
     ['s4', 'PHYS110', 2, False], ['s1', 'MATH101H', 2, False], ['s4', 'MATH101H', 0, False]],
    {0: 4, 1: 4, 2: 1}, {'MATH101': 'online'}],
   [[2, 3, 1]]),
  ('normal control 8',
   [[['s1', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, False], ['s5', 'PHYS110', 0, False],
     ['s2', 'MATH101H', 1, False], ['s2', 'MATH101H', 1, False], ['s5', 'MATH101', 2, True],
     ['s4', 'MATH101', 2, False]],
    {0: 3, 1: 2, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [])],
 [('regression: access seat weight 1',
   [[['s5', 'CHEM120', 0, False], ['s2', 'MATH101H', 2, True], ['s5', 'PHYS110', 2, False],
     ['s3', 'PHYS110', 0, False], ['s3', 'MATH101', 1, False], ['s1', 'MATH101H', 1, True],
     ['s2', 'MATH101H', 0, True], ['s3', 'MATH101', 2, False], ['s4', 'PHYS110', 2, False],
     ['s3', 'MATH101', 2, False]],
    {0: 3, 1: 2, 2: 1}, {'MATH101': 'online', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[2, 4, 1]]),
  ('regression variant: access seat weight 2',
   [[['s5', 'MATH101H', 1, True], ['s4', 'MATH101H', 1, False], ['s1', 'PHYS110', 1, True],
     ['s4', 'MATH101', 0, False]],
    {1: 4, 2: 3}, {'MATH101H': 'paper', 'BIO130': 'paper'}],
   [[0, 1, 0], [1, 5, 4]]),
  ('partial repair guard 3',
   [[['s1', 'MATH101', 0, True], ['s4', 'CHEM120', 2, False], ['s1', 'MATH101', 1, False],
     ['s1', 'MATH101', 2, False]],
    {1: 1, 2: 3}, {'MATH101H': 'paper', 'PHYS110': 'online', 'CHEM120': 'paper'}],
   [[0, 2, 0]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 2}, {'A': 'paper'}], []),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s2', 'A', 0, False]], {0: 1}, {'A': 'online'}], []),
  ('normal control 6',
   [[['s2', 'MATH101', 2, False], ['s3', 'MATH101H', 0, False]], {0: 3, 1: 3, 2: 4},
    {'MATH101': 'paper', 'MATH101H': 'online', 'CHEM120': 'paper', 'BIO130': 'online'}],
   []),
  ('normal control 7',
   [[['s3', 'BIO130', 1, False], ['s3', 'MATH101H', 2, False], ['s3', 'MATH101H', 2, False]],
    {0: 2, 1: 1, 2: 1}, {'MATH101': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'MATH101', 2, False], ['s2', 'CHEM120', 1, False], ['s4', 'BIO130', 1, False],
     ['s4', 'CHEM120', 1, False], ['s2', 'BIO130', 1, False], ['s5', 'MATH101H', 0, False],
     ['s1', 'MATH101H', 1, False], ['s3', 'CHEM120', 2, False], ['s2', 'CHEM120', 1, False],
     ['s3', 'CHEM120', 2, False]],
    {0: 4, 1: 4, 2: 2}, {'MATH101': 'paper', 'MATH101H': 'online', 'PHYS110': 'online', 'BIO130': 'paper'}],
   [])],
 [('regression: access seat weight 1',
   [[['s3', 'BIO130', 0, True], ['s5', 'CHEM120', 2, False], ['s1', 'MATH101', 0, False],
     ['s2', 'MATH101H', 0, False], ['s4', 'CHEM120', 2, True], ['s5', 'MATH101H', 2, False],
     ['s3', 'PHYS110', 0, False], ['s4', 'PHYS110', 0, False], ['s4', 'BIO130', 0, False],
     ['s1', 'PHYS110', 0, True]],
    {0: 3, 1: 2, 2: 3},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'online'}],
   [[0, 6, 3], [2, 4, 3]]),
  ('regression variant: access seat weight 2',
   [[['s3', 'MATH101H', 2, False], ['s4', 'MATH101', 0, False], ['s4', 'PHYS110', 0, False],
     ['s3', 'MATH101', 1, False], ['s5', 'CHEM120', 2, False], ['s4', 'MATH101H', 2, True]],
    {0: 4, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   [[1, 1, 0], [2, 4, 1]]),
  ('partial repair guard 3',
   [[['s1', 'BIO130', 0, False], ['s5', 'BIO130', 0, True], ['s1', 'BIO130', 2, False],
     ['s1', 'CHEM120', 2, False], ['s4', 'PHYS110', 1, False], ['s1', 'PHYS110', 1, True]],
    {0: 1, 2: 1}, {'MATH101': 'online', 'MATH101H': 'online', 'PHYS110': 'paper', 'CHEM120': 'online'}],
   [[0, 3, 1], [1, 3, 0]]),
  ('boundary control 4', [[['s1', 'A', 0, False], ['s1', 'B', 0, False]], {0: 1}, {}], [[0, 2, 1]]),
  ('boundary control 5', [[['s1', 'A', 0, False], ['s1', 'A', 0, False]], {0: 1}, {'A': 'paper'}], []),
  ('normal control 6',
   [[['s3', 'MATH101H', 2, False], ['s1', 'MATH101', 0, False], ['s4', 'MATH101H', 0, False]], {0: 3, 2: 1},
    {'MATH101': 'paper', 'MATH101H': 'paper', 'PHYS110': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 7',
   [[['s3', 'PHYS110', 1, False], ['s5', 'CHEM120', 1, False], ['s3', 'PHYS110', 1, False]], {1: 4, 2: 3},
    {'MATH101': 'online', 'MATH101H': 'paper', 'PHYS110': 'paper', 'CHEM120': 'paper', 'BIO130': 'paper'}],
   []),
  ('normal control 8',
   [[['s1', 'MATH101', 0, False], ['s2', 'MATH101H', 1, True], ['s2', 'BIO130', 2, False],
     ['s2', 'BIO130', 0, False], ['s3', 'MATH101H', 1, False], ['s2', 'MATH101H', 0, True],
     ['s4', 'MATH101H', 2, True], ['s1', 'MATH101H', 1, False], ['s1', 'MATH101', 0, False]],
    {1: 4, 2: 4}, {'MATH101': 'paper', 'MATH101H': 'paper', 'CHEM120': 'online', 'BIO130': 'paper'}],
   [[0, 1, 0]])]]
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 fixtureActualExpectedOutcome
regression: access seat weight 1[][[0, 2, 1]]Failed
regression variant: access seat weight 2[[0, 4, 2], [2, 1, 0]][[0, 5, 2], [2, 1, 0]]Failed
partial repair guard 3[[0, 1, 0], [1, 6, 3]][[0, 1, 0], [1, 7, 3]]Failed
boundary control 4[[0, 2, 1]][[0, 2, 1]]Passed
boundary control 5[][]Passed
normal control 6[][]Passed
normal control 7[][]Passed
normal control 8[[2, 1, 0]][[2, 1, 0]]Passed

SHA-256 / 443dedd8ee3710eabab35eb3dd4a09a579b92602c0f910943d437a9f2ba252f7

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:06.818997+00:00.

Case digest / 2039b798269623cf138c8bd6975e7e7ef1f80aa6ee47085c511c4313f8ed64d6