~/ learn/ comp-372/ cards/ The Ω(n lg n) comparison-sort lower bound
1 of 4

Recall the lower-bound proof chain (type the Q→A)

Recall the lower-bound proof chain (type the Q→A)

Answer

Q: prove a comparison sort needs Omega(n lg n) A: n! <= leaves <= 2^h => h >= lg(n!) = Theta(n lg n)

Correctness forces ≥ n! reachable leaves; a height-h binary tree has ≤ 2^h leaves; so h ≥ lg(n!) = Θ(n lg n). The worst-case comparison count equals the height.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/7fcd80fc-f820-47ce-85a1-c27b9665f9a2/flashcard utf-8 LF