Definition · Interval schedulingGiven n intervals, each a half-open span [s, f) with f > s, select as many as possible so that no two of them overlap. A selection is feasible when its intervals are pairwise disjoint, and the optimum is the largest feasible selection. Intervals that merely touch — one finishing exactly where the next starts — do not overlap.
The lab opens on eleven intervals, labelled in the order they are typed: A 1-4, B 3-5, C 0-6, D 5-7, E 3-9, F 5-9, G 6-10, H 8-11, I 8-12, J 2-14, K 12-16. The labels are what every table names, so one interval can be followed through four different orderings of the same instance.
Definition · The four rulesEarliest finish sorts by f and sweeps. Earliest start sorts by s. Shortest first sorts by f - s. Fewest conflicts first counts, for each interval, how many others it overlaps in the full instance, sorts by that count, and sweeps. Each rule then walks its own order once, taking an interval when it starts no earlier than the last one taken finished.
That last clause is the implementation, and it is worth reading twice. The sweep keeps one number — the finish time of the most recently taken interval — and compares each candidate against it. For the earliest-finish order that is the same thing as compatibility with everything already chosen, because the chosen finish times only increase. For the other three orders it is not, and the difference shows up below.
Example · Eleven intervals, four answersEarliest finish selects A D H K, four intervals. Earliest start selects C G K, three. Shortest first selects B D H K, four. Fewest conflicts selects K alone, one. All four selections are feasible, checked pairwise. The best of the 2048 subsets is four, attained by A D H K. So two rules match the optimum, one is one short, and one is three short — on this instance.
The interesting entry there is shortest-first. It gets four, which is optimal, and it is not a correct rule. The lab ships the three intervals that prove it: 0-5, 4-6, 5-10. Shortest-first takes the two-unit interval in the middle, which blocks both of the others, and finishes with one where the best of the eight subsets is two. One instance where a rule is wrong is all it takes, and one instance where it is right is worth nothing at all.
Each losing rule has an instance built for it
Earliest start fails on 0-10, 1-2, 3-4, 5-6, 7-8: the interval that starts first occupies the whole day, the rule takes it and stops at one, and the optimum is four. Fewest conflicts fails on 0-2, 2-4, 4-6, 6-8, 1-3, 3-5, 5-7: it takes A and D, the two intervals with one conflict each, and returns two against an optimum of four. Earliest finish has no such preset, and the reason is not that nobody built one.
The fewest-conflicts instance repays a careful look, because the panel's own grey caption gets it wrong. That caption says taking the two ends “leaves the middle unusable”. The table directly above it names the optimum: A B C D, which is the two ends and the two middle intervals. The middle is perfectly usable. What loses the two intervals is the sweep: after A and then D the single finish-time pointer stands at 8, and B starting at 2 and C starting at 4 are both behind it. Where a caption and the table disagree, the table is the measurement.
The rule the panel runs, and the rule the textbooks state
Fewest-conflicts is usually stated as a rule that recomputes the conflict counts after each removal. The shipped implementation sorts once, by each interval's conflict count in the full instance, and then sweeps — the static-order variant. Both are wrong on some instance, the panel names the one it ran, and the figures on this page are the static one's. A lesson that quoted the dynamic rule's behaviour from a textbook while the page computed the static one's would be teaching a third thing that is neither.
Theorem · The earliest-finish rule is optimal on every instanceFor interval scheduling, the selection produced by sorting on finish time and sweeping is a largest feasible selection, for every input. Not “usually”, and not “on the instances tried”.
That is a claim about all inputs and the lab cannot establish it. What the lab can do is the half that is checkable: for any instance you type, it computes the optimum by enumeration and reports whether the rule matched. The two proofs that close the other half — stays-ahead and the exchange argument — are the subject of the material that follows this page, and the second of them is performed rather than described.
Stays-ahead is already visible here. Write gᵢ for the finish time of greedy's i-th chosen interval and oᵢ for the optimum's, both in increasing order. On the opening instance greedy's finish times are 4, 7, 11 and 16, and the panel reports that it never falls behind at any step. The claim the proof makes is that gᵢ ≤ oᵢ for every i on every input, which is induction, not four numbers.
So the honest summary of this page is two sentences that do not say the same thing. Measured: on the instance shown, earliest finish and shortest first both reach the optimum of 4, earliest start reaches 3, fewest conflicts reaches 1. Proved: earliest finish reaches the optimum on every instance, and each of the other three has an instance on which it does not. The first sentence is a count on one input. The second is the bound, and nothing you can do to the controls will produce it.