Per the lecture, the worst-case lower bound on the number of comparisons made by any comparison-based sort on n elements is
A$\Omega(n \log n)$
B$\Omega(n)$
C$\Omega(n^2)$
D$\Omega(\log n)$
Answer & Solution
Correct answer: A. $\Omega(n \log n)$
Each pairwise comparison can split the space of possible orderings by at most a factor of 2, and there are n!
possible orderings of n distinct elements.
So any decision tree resolving them needs at least log_2(n!) ≈ n log n levels.
Hence Ω(n log n) is the lower bound.
Linear or sub-linear bounds are impossible without using non-comparison information.
Keep practising Algorithms
Browse all Algorithms questions for GATE CSE, or explore more Computer Science topics.