UGC-NET Dec 2013 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0026

Let $A$ and $B$ be two $n$ $\times$$n$ matrices. The efficient algorithm to multiply the two matrices has the time complexity
  1. A
    $O(n^3)$
  2. B
    $O(n^{2.81})$
  3. C
    $O(n^{2.67})$
  4. D
    $O(n^2)$

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

Show the worked solution\[\boxed{T(n)=7T(n/2)+\Theta(n^2)\Rightarrow T(n)=\Theta(n^{\log_2 7})}\]Strassen's algorithm multiplies two \(2\times2\) block matrices with 7 block multiplications instead of 8.\[\log_2 7\approx 2.81\ \Rightarrow\ O(n^{2.81}).\]The naive method is \(O(n^3)\); \(O(n^2)\) is only the lower bound for reading the input.Answer: B

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