UGC-NET Sep 2013 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0043

The number of possible paranthesizations of a sequence of n matrices is
  1. A
    O(n)
  2. B
    $\theta$(n Ig n)
  3. C
    $\Omega(2^n)$
  4. D
    None of the above

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

Show the worked solution\[\boxed{P(n)=\sum_{k=1}^{n-1}P(k)\,P(n-k),\quad P(1)=1}\]The last multiplication splits the chain at some \(k\), and the two parts are parenthesized independently. This gives the Catalan numbers:\[P(n)=C_{n-1}=\frac{1}{n}\binom{2n-2}{n-1}=\Omega\!\Big(\frac{4^n}{n^{3/2}}\Big).\]Since \(4^n/n^{3/2}\) grows faster than \(2^n\), \(P(n)=\Omega(2^n)\): exponential, which is why brute force is hopeless and dynamic programming is used.Answer: C

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