UGC-NET Oct 2020 · Asymptotic Analysis & Recurrences

MCQ · 2 marks · Problem PROG-DIVC-0014

If algorithm \(A\) and another algorithm \(B\) take \(\log_2 n\) and \(\sqrt{n}\) microseconds, respectively, to solve a problem of size \(n\), then the largest sizes \(n\) of a problem these algorithms can solve, respectively, in one second are and .
  1. A
    \(2^{10^6}\) and \(10^6\)
  2. B
    \(2^{10^6}\) and \(10^{12}\)
  3. C
    \(2^{10^6}\) and \(6\times 10^6\)
  4. D
    \(2^{10^6}\) and \(6\times 10^{12}\)

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

Show the worked solutionOne second is \(10^{6}\) microseconds.\[\boxed{\log_2 n\le 10^{6}\Rightarrow n\le 2^{10^{6}},\qquad \sqrt{n}\le 10^{6}\Rightarrow n\le 10^{12}}\]Answer: B

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