FA-94451 / Exam timetabling constraints / Open access
Extra-time percentage added as flat minutes · case 01
A 25% allowance on a three-hour exam adds only 25 minutes.
ROOT CAUSE
The percentage is added to the duration as minutes.
THE FAILURE
The percentage is added to the duration as minutes.
Unsuccessful approach: Computing only the extra minutes drops the base duration.
Case contract
A student's exams [id, start, duration] and an extra-time percentage. Extended duration = ceil(duration * (100 + pct) / 100), then rounded up to a multiple of 5 minutes. In start order (ties by id) a pair conflicts if the next start is earlier than the previous extended end plus the rest minutes. Return [[id, extended end] in order, conflicting pairs].
Why this case matters
Access arrangements extend sittings; the timetable must still leave rest between a student's exams.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(exams, pct, rest):
rows = []
for eid, st, dur in sorted(exams, key=lambda x: (x[1], x[0])):
ext = dur + pct
ext = -(-ext // 5) * 5
rows.append([eid, st, st + ext])
conf = []
for a, b in zip(rows, rows[1:]):
if b[1] < a[2] + rest:
conf.append([a[0], b[0]])
return [[[r[0], r[2]] for r in rows], conf]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: percent as minutes 1', [[['A', 540, 88]], 25, 30], [[['A', 650]], []]),
('regression variant: percent as minutes 2', [[['Q0', 600, 182], ['U1', 750, 120]], 10, 15],
[[['Q0', 805], ['U1', 885]], [['Q0', 'U1']]]),
('partial repair guard 3', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 4', [[['A', 540, 120], ['B', 720, 90]], 50, 0], [[['A', 720], ['B', 855]], []]),
('boundary control 5', [[['A', 540, 73], ['B', 640, 60]], 10, 15], [[['A', 625], ['B', 710]], []]),
('normal control 6', [[['R3', 1100, 150], ['S2', 980, 180], ['W1', 780, 88], ['R0', 600, 73]], 15, 15],
[[['R0', 685], ['W1', 885], ['S2', 1190], ['R3', 1275]], [['S2', 'R3']]]),
('normal control 7', [[['W2', 900, 44], ['P1', 780, 120], ['S0', 600, 182]], 33, 15],
[[['S0', 845], ['P1', 940], ['W2', 960]], [['S0', 'P1'], ['P1', 'W2']]]),
('normal control 8', [[['R2', 930, 180], ['V3', 1130, 60], ['T0', 540, 73], ['R1', 690, 150]], 10, 30],
[[['T0', 625], ['R1', 855], ['R2', 1130], ['V3', 1200]], [['R2', 'V3']]])],
[('regression: percent as minutes 1', [[['A', 540, 100], ['B', 700, 60]], 25, 30],
[[['A', 665], ['B', 775]], []]),
('regression variant: percent as minutes 2',
[[['P2', 810, 91], ['W3', 960, 100], ['R0', 600, 182], ['S1', 720, 88]], 33, 30],
[[['R0', 845], ['S1', 840], ['P2', 935], ['W3', 1095]], [['R0', 'S1'], ['S1', 'P2'], ['P2', 'W3']]]),
('partial repair guard 3',
[[['P1', 690, 150], ['S2', 890, 72], ['Q0', 600, 150], ['R3', 1010, 90]], 50, 15],
[[['Q0', 825], ['P1', 915], ['S2', 1000], ['R3', 1145]], [['Q0', 'P1'], ['P1', 'S2'], ['S2', 'R3']]]),
('boundary control 4', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 5', [[['A', 540, 100], ['B', 699, 60]], 25, 30], [[['A', 665], ['B', 774]], []]),
('normal control 6', [[['S0', 540, 120], ['U2', 920, 44], ['Q3', 1070, 90], ['W1', 740, 91]], 25, 15],
[[['S0', 690], ['W1', 855], ['U2', 975], ['Q3', 1185]], []]),
('normal control 7', [[['S0', 540, 100], ['P2', 890, 100], ['W3', 1070, 150], ['Q1', 740, 72]], 50, 30],
[[['S0', 690], ['Q1', 850], ['P2', 1040], ['W3', 1295]], []]),
('normal control 8', [[['V1', 630, 180], ['Q0', 540, 44]], 10, 30], [[['Q0', 590], ['V1', 830]], []])],
[('regression: percent as minutes 1', [[['A', 540, 100], ['B', 699, 60]], 25, 30],
[[['A', 665], ['B', 774]], []]),
('regression variant: percent as minutes 2', [[['P1', 740, 120], ['P0', 540, 44], ['W2', 940, 72]], 15, 30],
[[['P0', 595], ['P1', 880], ['W2', 1025]], []]),
('partial repair guard 3', [[['S0', 600, 150], ['S1', 800, 100]], 10, 30],
[[['S0', 765], ['S1', 910]], []]),
('boundary control 4', [[['A', 540, 88]], 25, 30], [[['A', 650]], []]),
('boundary control 5', [[['A', 540, 72]], 33, 15], [[['A', 640]], []]),
('normal control 6', [[['U2', 780, 72], ['V1', 660, 91], ['S3', 900, 90], ['T0', 540, 91]], 15, 30],
[[['T0', 645], ['V1', 765], ['U2', 865], ['S3', 1005]], [['T0', 'V1'], ['V1', 'U2']]]),
('normal control 7', [[['P0', 600, 100], ['R1', 720, 60]], 15, 30],
[[['P0', 715], ['R1', 790]], [['P0', 'R1']]]),
('normal control 8', [[['P2', 990, 60], ['V0', 600, 60], ['T1', 840, 73]], 15, 15],
[[['V0', 670], ['T1', 925], ['P2', 1060]], []])],
[('regression: percent as minutes 1', [[['A', 540, 120], ['B', 720, 90]], 50, 0],
[[['A', 720], ['B', 855]], []]),
('regression variant: percent as minutes 2', [[['W0', 540, 60], ['W1', 780, 44]], 15, 15],
[[['W0', 610], ['W1', 835]], []]),
('partial repair guard 3', [[['T1', 720, 120], ['V0', 600, 180]], 33, 15],
[[['V0', 840], ['T1', 880]], [['V0', 'T1']]]),
('boundary control 4', [[['A', 540, 73], ['B', 640, 60]], 10, 15], [[['A', 625], ['B', 710]], []]),
('normal control 5', [[['U0', 540, 88], ['V1', 740, 44]], 50, 30], [[['U0', 675], ['V1', 810]], []]),
('normal control 6', [[['S2', 810, 100], ['Q0', 600, 72], ['V1', 690, 100], ['R3', 990, 120]], 33, 15],
[[['Q0', 700], ['V1', 825], ['S2', 945], ['R3', 1150]], [['Q0', 'V1'], ['V1', 'S2']]]),
('normal control 7', [[['R2', 840, 72], ['W1', 690, 150], ['P0', 540, 120]], 50, 30],
[[['P0', 720], ['W1', 915], ['R2', 950]], [['P0', 'W1'], ['W1', 'R2']]]),
('normal control 8', [[['Q0', 600, 150], ['R1', 780, 44], ['U2', 960, 91], ['T3', 1160, 100]], 50, 15],
[[['Q0', 825], ['R1', 850], ['U2', 1100], ['T3', 1310]], [['Q0', 'R1']]])],
[('regression: percent as minutes 1', [[['B', 800, 60], ['A', 540, 90]], 15, 30],
[[['A', 645], ['B', 870]], []]),
('regression variant: percent as minutes 2',
[[['R1', 720, 44], ['U3', 1040, 150], ['R0', 540, 90], ['V2', 840, 182]], 15, 15],
[[['R0', 645], ['R1', 775], ['V2', 1050], ['U3', 1215]], [['V2', 'U3']]]),
('partial repair guard 3', [[['P1', 740, 120], ['P0', 540, 44], ['W2', 940, 72]], 15, 30],
[[['P0', 595], ['P1', 880], ['W2', 1025]], []]),
('boundary control 4', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 5', [[['A', 540, 100], ['B', 699, 60]], 25, 30], [[['A', 665], ['B', 774]], []]),
('normal control 6', [[['Q0', 540, 90], ['P2', 860, 100], ['R1', 740, 88]], 10, 15],
[[['Q0', 640], ['R1', 840], ['P2', 970]], []]),
('normal control 7', [[['T1', 780, 73], ['R3', 1050, 91], ['T2', 960, 120], ['S0', 600, 90]], 25, 30],
[[['S0', 715], ['T1', 875], ['T2', 1110], ['R3', 1165]], [['T2', 'R3']]]),
('normal control 8', [[['R1', 780, 150], ['T0', 600, 60], ['R2', 900, 182]], 25, 15],
[[['T0', 675], ['R1', 970], ['R2', 1130]], [['R1', 'R2']]])]]
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: percent as minutes 1 | [[['A', 655]], []] | [[['A', 650]], []] | Failed |
| regression variant: percent as minutes 2 | [[['Q0', 795], ['U1', 880]], [['Q0', 'U1']]] | [[['Q0', 805], ['U1', 885]], [['Q0', 'U1']]] | Failed |
| partial repair guard 3 | [[['A', 645]], []] | [[['A', 645]], []] | Passed |
| boundary control 4 | [[['A', 710], ['B', 860]], []] | [[['A', 720], ['B', 855]], []] | Failed |
| boundary control 5 | [[['A', 625], ['B', 710]], []] | [[['A', 625], ['B', 710]], []] | Passed |
| normal control 6 | [[['R0', 690], ['W1', 885], ['S2', 1175], ['R3', 1265]], [['S2', 'R3']]] | [[['R0', 685], ['W1', 885], ['S2', 1190], ['R3', 1275]], [['S2', 'R3']]] | Failed |
| normal control 7 | [[['S0', 815], ['P1', 935], ['W2', 980]], [['S0', 'P1'], ['P1', 'W2']]] | [[['S0', 845], ['P1', 940], ['W2', 960]], [['S0', 'P1'], ['P1', 'W2']]] | Failed |
| normal control 8 | [[['T0', 625], ['R1', 850], ['R2', 1120], ['V3', 1200]], [['R2', 'V3']]] | [[['T0', 625], ['R1', 855], ['R2', 1130], ['V3', 1200]], [['R2', 'V3']]] | Failed |
SHA-256 / 2939b807ff9c1fc2427584c244b4f3082f62f9957ac39230292460b7b0e073eb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(exams, pct, rest):
rows = []
for eid, st, dur in sorted(exams, key=lambda x: (x[1], x[0])):
ext = -(-dur * pct // 100)
ext = -(-ext // 5) * 5
rows.append([eid, st, st + ext])
conf = []
for a, b in zip(rows, rows[1:]):
if b[1] < a[2] + rest:
conf.append([a[0], b[0]])
return [[[r[0], r[2]] for r in rows], conf]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: percent as minutes 1', [[['A', 540, 88]], 25, 30], [[['A', 650]], []]),
('regression variant: percent as minutes 2', [[['Q0', 600, 182], ['U1', 750, 120]], 10, 15],
[[['Q0', 805], ['U1', 885]], [['Q0', 'U1']]]),
('partial repair guard 3', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 4', [[['A', 540, 120], ['B', 720, 90]], 50, 0], [[['A', 720], ['B', 855]], []]),
('boundary control 5', [[['A', 540, 73], ['B', 640, 60]], 10, 15], [[['A', 625], ['B', 710]], []]),
('normal control 6', [[['R3', 1100, 150], ['S2', 980, 180], ['W1', 780, 88], ['R0', 600, 73]], 15, 15],
[[['R0', 685], ['W1', 885], ['S2', 1190], ['R3', 1275]], [['S2', 'R3']]]),
('normal control 7', [[['W2', 900, 44], ['P1', 780, 120], ['S0', 600, 182]], 33, 15],
[[['S0', 845], ['P1', 940], ['W2', 960]], [['S0', 'P1'], ['P1', 'W2']]]),
('normal control 8', [[['R2', 930, 180], ['V3', 1130, 60], ['T0', 540, 73], ['R1', 690, 150]], 10, 30],
[[['T0', 625], ['R1', 855], ['R2', 1130], ['V3', 1200]], [['R2', 'V3']]])],
[('regression: percent as minutes 1', [[['A', 540, 100], ['B', 700, 60]], 25, 30],
[[['A', 665], ['B', 775]], []]),
('regression variant: percent as minutes 2',
[[['P2', 810, 91], ['W3', 960, 100], ['R0', 600, 182], ['S1', 720, 88]], 33, 30],
[[['R0', 845], ['S1', 840], ['P2', 935], ['W3', 1095]], [['R0', 'S1'], ['S1', 'P2'], ['P2', 'W3']]]),
('partial repair guard 3',
[[['P1', 690, 150], ['S2', 890, 72], ['Q0', 600, 150], ['R3', 1010, 90]], 50, 15],
[[['Q0', 825], ['P1', 915], ['S2', 1000], ['R3', 1145]], [['Q0', 'P1'], ['P1', 'S2'], ['S2', 'R3']]]),
('boundary control 4', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 5', [[['A', 540, 100], ['B', 699, 60]], 25, 30], [[['A', 665], ['B', 774]], []]),
('normal control 6', [[['S0', 540, 120], ['U2', 920, 44], ['Q3', 1070, 90], ['W1', 740, 91]], 25, 15],
[[['S0', 690], ['W1', 855], ['U2', 975], ['Q3', 1185]], []]),
('normal control 7', [[['S0', 540, 100], ['P2', 890, 100], ['W3', 1070, 150], ['Q1', 740, 72]], 50, 30],
[[['S0', 690], ['Q1', 850], ['P2', 1040], ['W3', 1295]], []]),
('normal control 8', [[['V1', 630, 180], ['Q0', 540, 44]], 10, 30], [[['Q0', 590], ['V1', 830]], []])],
[('regression: percent as minutes 1', [[['A', 540, 100], ['B', 699, 60]], 25, 30],
[[['A', 665], ['B', 774]], []]),
('regression variant: percent as minutes 2', [[['P1', 740, 120], ['P0', 540, 44], ['W2', 940, 72]], 15, 30],
[[['P0', 595], ['P1', 880], ['W2', 1025]], []]),
('partial repair guard 3', [[['S0', 600, 150], ['S1', 800, 100]], 10, 30],
[[['S0', 765], ['S1', 910]], []]),
('boundary control 4', [[['A', 540, 88]], 25, 30], [[['A', 650]], []]),
('boundary control 5', [[['A', 540, 72]], 33, 15], [[['A', 640]], []]),
('normal control 6', [[['U2', 780, 72], ['V1', 660, 91], ['S3', 900, 90], ['T0', 540, 91]], 15, 30],
[[['T0', 645], ['V1', 765], ['U2', 865], ['S3', 1005]], [['T0', 'V1'], ['V1', 'U2']]]),
('normal control 7', [[['P0', 600, 100], ['R1', 720, 60]], 15, 30],
[[['P0', 715], ['R1', 790]], [['P0', 'R1']]]),
('normal control 8', [[['P2', 990, 60], ['V0', 600, 60], ['T1', 840, 73]], 15, 15],
[[['V0', 670], ['T1', 925], ['P2', 1060]], []])],
[('regression: percent as minutes 1', [[['A', 540, 120], ['B', 720, 90]], 50, 0],
[[['A', 720], ['B', 855]], []]),
('regression variant: percent as minutes 2', [[['W0', 540, 60], ['W1', 780, 44]], 15, 15],
[[['W0', 610], ['W1', 835]], []]),
('partial repair guard 3', [[['T1', 720, 120], ['V0', 600, 180]], 33, 15],
[[['V0', 840], ['T1', 880]], [['V0', 'T1']]]),
('boundary control 4', [[['A', 540, 73], ['B', 640, 60]], 10, 15], [[['A', 625], ['B', 710]], []]),
('normal control 5', [[['U0', 540, 88], ['V1', 740, 44]], 50, 30], [[['U0', 675], ['V1', 810]], []]),
('normal control 6', [[['S2', 810, 100], ['Q0', 600, 72], ['V1', 690, 100], ['R3', 990, 120]], 33, 15],
[[['Q0', 700], ['V1', 825], ['S2', 945], ['R3', 1150]], [['Q0', 'V1'], ['V1', 'S2']]]),
('normal control 7', [[['R2', 840, 72], ['W1', 690, 150], ['P0', 540, 120]], 50, 30],
[[['P0', 720], ['W1', 915], ['R2', 950]], [['P0', 'W1'], ['W1', 'R2']]]),
('normal control 8', [[['Q0', 600, 150], ['R1', 780, 44], ['U2', 960, 91], ['T3', 1160, 100]], 50, 15],
[[['Q0', 825], ['R1', 850], ['U2', 1100], ['T3', 1310]], [['Q0', 'R1']]])],
[('regression: percent as minutes 1', [[['B', 800, 60], ['A', 540, 90]], 15, 30],
[[['A', 645], ['B', 870]], []]),
('regression variant: percent as minutes 2',
[[['R1', 720, 44], ['U3', 1040, 150], ['R0', 540, 90], ['V2', 840, 182]], 15, 15],
[[['R0', 645], ['R1', 775], ['V2', 1050], ['U3', 1215]], [['V2', 'U3']]]),
('partial repair guard 3', [[['P1', 740, 120], ['P0', 540, 44], ['W2', 940, 72]], 15, 30],
[[['P0', 595], ['P1', 880], ['W2', 1025]], []]),
('boundary control 4', [[['A', 540, 91]], 10, 30], [[['A', 645]], []]),
('boundary control 5', [[['A', 540, 100], ['B', 699, 60]], 25, 30], [[['A', 665], ['B', 774]], []]),
('normal control 6', [[['Q0', 540, 90], ['P2', 860, 100], ['R1', 740, 88]], 10, 15],
[[['Q0', 640], ['R1', 840], ['P2', 970]], []]),
('normal control 7', [[['T1', 780, 73], ['R3', 1050, 91], ['T2', 960, 120], ['S0', 600, 90]], 25, 30],
[[['S0', 715], ['T1', 875], ['T2', 1110], ['R3', 1165]], [['T2', 'R3']]]),
('normal control 8', [[['R1', 780, 150], ['T0', 600, 60], ['R2', 900, 182]], 25, 15],
[[['T0', 675], ['R1', 970], ['R2', 1130]], [['R1', 'R2']]])]]
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: percent as minutes 1 | [[['A', 565]], []] | [[['A', 650]], []] | Failed |
| regression variant: percent as minutes 2 | [[['Q0', 620], ['U1', 765]], []] | [[['Q0', 805], ['U1', 885]], [['Q0', 'U1']]] | Failed |
| partial repair guard 3 | [[['A', 550]], []] | [[['A', 645]], []] | Failed |
| boundary control 4 | [[['A', 600], ['B', 765]], []] | [[['A', 720], ['B', 855]], []] | Failed |
| boundary control 5 | [[['A', 550], ['B', 650]], []] | [[['A', 625], ['B', 710]], []] | Failed |
| normal control 6 | [[['R0', 615], ['W1', 795], ['S2', 1010], ['R3', 1125]], []] | [[['R0', 685], ['W1', 885], ['S2', 1190], ['R3', 1275]], [['S2', 'R3']]] | Failed |
| normal control 7 | [[['S0', 665], ['P1', 820], ['W2', 915]], []] | [[['S0', 845], ['P1', 940], ['W2', 960]], [['S0', 'P1'], ['P1', 'W2']]] | Failed |
| normal control 8 | [[['T0', 550], ['R1', 705], ['R2', 950], ['V3', 1140]], []] | [[['T0', 625], ['R1', 855], ['R2', 1130], ['V3', 1200]], [['R2', 'V3']]] | Failed |
SHA-256 / c0c009b16a220e0a22da9acd7d378f569a3c80fd77e2c4a0ac0e325dd29a5c7f
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.539803+00:00.
Case digest / 186eb98749a8a0e0f5aa62a08b9d4b787677dcb1b56864cec5c60769a3ccf07d