in Algorithms
173 views
2 votes
2 votes

Order the following functions by growth rate :

  1. $\log n$
  2. $n/\log n$
  3. $(3/2)^n$
  4. $n\log^2 n$
    1. a. $\log n$ $\quad$ b. $n/\log n$  $\quad$ d. $n\log^2 n$  $\quad$ c. $(3/2)^n$ 
    2. d. $n\log^2 n$ $\quad$ c. (3/2)$^n$  $\quad$ a. $\log n$$\quad$ b. $n/log n$
    3. a. $\log n$ $\quad$ d.$n\log^2 n$ $\quad$ b. $n/\log n$  $\quad$ c. (3/2)$^n$
    4. a. $\log n$ $\quad$ c. (3/2)$^n$  $\quad$ b. $n/\log n$ $\quad$ d. $n\log^2 n$
in Algorithms
by
173 views

1 Answer

2 votes
2 votes
c is exponential so it has higher growth and a is logn which has least growth...b/w b and c

n/logn<= c* nlog2n

because nlog2n , we can write as  n * lognlogn

                            which is obviously larger than n/logn

for ex: let n=2^20

n*lognlogn = 2^20 *20 *20

and n/logn = 2^20/20

hence (A) is the answer
edited by
by

4 Comments

yes, but $n \log^2 n = n \log n \log n,$ not $2n \log n$. That is for $n \log n^2.$
0
0
thanks sir for pointing out...now edited :)
0
0
log^2(n)= logn * logn     or    log(logn)???/

can any one expain? I am getting confused.
0
0
$log^{2}n = (logn)^{2} = logn * logn$
1
1
Answer:

Related questions