Definition · The exchange argumentLet g₁, g₂, …, g_k be greedy's choices in the order it made them, and let O be any optimal solution. For i = 1, 2, …, k in turn, replace the i-th element of O (in the same order greedy uses) by gᵢ, leaving gᵢ alone if it is already there. The argument succeeds when every intermediate set is feasible and has the same size as O.
If it succeeds then after k swaps the set contains all of greedy's choices and is still optimal, and a feasible set containing greedy's answer cannot be larger than greedy's answer, because greedy stopped only when nothing more could be added. So greedy's answer is optimal. That last step is worth saying out loud: it is where the rule's own stopping condition enters the proof, and it is why the argument is about greedy rather than about swaps.
Example · Three intervals, two rules, two outcomesThe lab opens on 0-5, 4-6, 5-10, labelled A, B, C. The optimum is A C, size 2, out of eight subsets. Under earliest finish, greedy also selects A C, so both swaps find their target already in place and the chain survives. Under shortest first, greedy selects B alone; the first swap puts B in for A, giving the set B C, which is still size 2 and is not feasible, because B runs from 4 to 6 and C from 5 to 10. The chain stops there.
That is the whole of the negative result and it took one swap. The proof template for earliest finish does not merely fail to apply to shortest first; it produces, at a named step, a specific infeasible set from a specific optimum. The panel prints the set — B C — and runs a feasibility check on it separately, so the verdict is not the chain's own opinion of itself.
The two ways a swap can fail, and which trap shows which
On 0-10, 1-2, 3-4, 5-6, 7-8 under earliest start, greedy takes A alone. The first swap puts A in for B and gives A C D E, which has the right size and overlaps, since A spans the whole day. On 0-2, 2-4, 4-6, 6-8, 1-3, 3-5, 5-7 under fewest conflicts the opposite happens: the first swap is a no-op, the second puts D in for B, and the resulting set A D C is perfectly feasible and has three intervals where the optimum had four. On the eleven-interval instance under earliest start the chain manages both — three swaps, the first two same-size and overlapping, the third feasible and down to three.
So the size column and the feasibility column both fire somewhere, on different instances, and a reader who only watched one of the traps would conclude the argument always breaks the same way. It does not, and there is no reason it should: the two obligations are independent.
Theorem · Exchange proves the earliest-finish ruleFor interval scheduling with the earliest-finish rule, every swap in the sequence above keeps the set feasible and keeps its size, for every instance and every optimal solution. Hence the rule is optimal on every instance.
Take the first index i at which O and greedy differ, so greedy's first i - 1 choices are already in O. Let o be the i-th interval of O in increasing finish order and gᵢ greedy's i-th choice.
Greedy considered every interval compatible with its first i - 1 choices and took the one finishing earliest, so f(gᵢ) ≤ f(o). Replacing o by gᵢ therefore leaves every later interval of O still compatible, because each of them starts at or after f(o) and so at or after f(gᵢ). The earlier intervals of O are greedy's own first i - 1 choices, which gᵢ is compatible with by construction.
The size is unchanged because one interval was removed and one added, and gᵢ was not already present by the choice of i. Repeating drives the first difference forward one position at a time, so after at most k swaps O contains all of greedy's choices while remaining feasible and optimal.
□
The step that breaks for the other three rules is the inequality f(gᵢ) ≤ f(o). Nothing about sorting by length, or by start time, or by conflict count makes greedy's i-th choice finish no later than the optimum's, and the traps are instances where it finishes later. That single inequality is the entire content of the proof, and it is the reason earliest finish is the rule and the other three are folklore.
When the chain has nothing to do
On the eleven-interval instance under earliest finish, the panel reports four swaps and every one of them reads “already there”. Nothing was exchanged. That is not the argument working particularly well; it is the enumeration having returned A D H K, which is greedy's own answer, so the first difference never arrives. Switch the rule to shortest first on the same eleven and the first swap becomes real: A out, B in, giving B D H K, still feasible and still four.
This is a small trap in reading the lab and a large one in reading a proof. A chain of no-ops proves nothing about the rule, because the argument was never exercised. When you want to see the machinery work, pick a rule whose answer differs from the optimum the panel found, and watch a swap actually replace something.
Measured on this page: on the three-interval instance the earliest-finish chain survives 2 swaps and the shortest-first chain breaks at swap 1 with the set B C. Proved on this page: the earliest-finish chain survives every swap on every instance, by the inequality above. The lab cannot reach the second sentence, and the second sentence is the only one that licenses using the rule on an input nobody has tried.