A student objected that the potential function trees(H) + 2·marks(H) "seems arbitrary" and asked what it buys us 1:13:18.
The charging / bank account intuition
- Potential functions let you charge expensive future work back to earlier operations
1:13:39. - Concrete case: a delete-min may cost
nsteps, but it can only cost that much ifnprior insertions built up that root list — and after the delete-min everything is consolidated1:13:39,1:13:59. - Bank account metaphor:
Φis a balance. An insert deposits 1 (it adds a tree); a delete-min spends what was deposited1:14:14,1:14:33. - Decrease-key does both: with no cascading it deposits a mark, which a later decrease-key can then spend
1:15:02.
Why the coefficient is 2 (and why it need not be exactly 2)
- Asked whether the coefficient could just be made large: yes — any coefficient at least 2 works; 2 is not uniquely correct
1:15:26,1:16:19,1:16:47,1:17:44. - The requirement is structural: the coefficient on marks must be at least twice the coefficient on trees
1:16:47. - A student supplied the mechanical reason: a mark-and-cut event creates two additional trees while removing one mark, so the mark term must be worth 2 to cancel that growth
1:17:08,1:17:20.
Two further clarifications
- Negative amortized cost is fine. Quoting "operation X has amortized cost B" means B is the worst case of
actual + ΔΦ; here the worst case isc = 0, which gives the constant1:15:26,1:15:53,1:17:44,1:18:06. - Constraints on
Φare minimal: onlyΦ(∅) = 0andΦ ≥ 0. Given those, any proved amortized bound upper-bounds the true cost of any operation sequence1:18:47,1:19:19. - Asked for a conceptually different potential function that also works: none offered — no formalization of "this is the only one that works" is known off-hand
1:19:19,1:19:43,1:20:16.