edited by
19,762 views
43 votes
43 votes

Which of the following is false?

  1. $100n \log n=O(\frac{n\log n}{100})$

  2. $\sqrt{\log n} = O(\log\log n)$

  3. If $0 < x < y \text{ then } n^x = O\left(n^y\right)$

  4. $2^n \neq O\left(nk\right)$

edited by

2 Answers

Best answer
62 votes
62 votes
  1. $100n \log n=O(\frac{n\log n}{100})$  : Big-$O$ denotes the growth rate of functions and multiplication or division by a constant does not change the growth rate. So, this is TRUE and here $O$ can even be replaced by $\Theta$ or $\Omega$.
  2. $\sqrt{\log n} = O(\log\log n)$  : FALSE. $\sqrt \log n = ({\log n}) ^{0.5}$ grows faster than $\log \log n$ as any positive polynomial function $($including powers between $0-1)$ grows faster than any polylogarithmic function. (Ref: Section 3.2- Logarithms, Cormen). We can also do substitution here, but we must do for at least $2$ large values and ensure it works for any larger $n$ also. 
  3. $0 < x < y \text{ then } n^x = O\left(n^y\right)$ : TRUE since $y$ is always greater than $x$. So, RHS is always greater than LHS.
  4. $2^n \neq O\left(nk\right)$ : TRUE since $k$ is constant. So, for large values of $n$, LHS is much higher than RHS (exponential function always greater than linear).

Only B is FALSE.

edited by
Answer:

Related questions

3.6k
views
2 answers
24 votes
Kathleen asked Oct 9, 2014
3,625 views
Consider the following program that attempts to locate an element $x$ in an array $a[ ]$ using binary search. Assume $N > 1$. The program is erroneous. Under what ... x is in the array') else writeln ('x is not in the array') end;
7.9k
views
7 answers
25 votes
Kathleen asked Oct 9, 2014
7,924 views
Let $G$ be the directed, weighted graph shown in below figureWe are interested in the shortest paths from $A$.Output the sequence of vertices identified by the Dijkstra's ... $E$What is the cost of the shortest path from $A$ to $E$?
5.3k
views
1 answers
26 votes
Kathleen asked Oct 9, 2014
5,328 views
A complete, undirected, weighted graph $G$ is given on the vertex $\{0, 1,\dots, n -1\}$ for any fixed ‘n’. Draw the minimum spanning tree of $G$ ifthe weight of the edge $(u, v)$ is $\mid u-v\mid$the weight of the edge $(u, v)$ is $u + v$
5.9k
views
2 answers
35 votes
Kathleen asked Oct 9, 2014
5,944 views
A two dimensional array $A[1..n][1..n]$ of integers is partially sorted if $\forall i, j\in [1..n-1], A[i][j] < A[i][j+1] \text{ and } A[i][j] < A[i+1][j]$The ... begin A[i][j]:=A[i+1][j]; i:=i+1; end else begin _____ end A[i][j]:= ____ end