UGC-NET Dec 2014 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0030

Any decision tree that sorts $n$ elements has height
  1. A
    $\Omega(n)$
  2. B
    $\Omega(\text{lg}n)$
  3. C
    $\Omega(n \text{lg} n)$
  4. D
    $\Omega(n^2)$

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionA comparison sort's decision tree must have a reachable leaf for every one of the \(n!\) input orders. A binary tree of height \(h\) has at most \(2^h\) leaves:\[2^h\ge n!\ \Rightarrow\ h\ge\lg(n!)=\Omega(n\lg n).\]This is the \(\Omega(n\lg n)\) lower bound for comparison sorting.Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com