Why it matters

Exchange argument is greedy proof workhorse. Understanding shapes algorithm design.

Advertisement

The architecture

Assume optimal solution.

Show can exchange for greedy choice.

Solution stays optimal.

Exchange argumentAssume OPTnon-greedyExchange with greedyno quality lossOPT stays optimalgreedy = OPTApplies to activity selection, Huffman, min spanning tree, MST, more
Exchange argument.
Advertisement

How it works end to end

Formal proof structure.

Sometimes exchange complex.

Powerful for many greedies.