• edited by
3,830 views
0 0 votes

Arrange the following functions in their increasing order of complexities.

$f(n) = n ^{0.999999} * \log n$          ($\log n$ is not in power)

$g(n) = 10000 n$

$h(n) = n^{2}$

$k(n) = (1.000001)^{n}$

$p(n) =\large \frac{2 ^{√n}}{ n^{2}}$

$q(n) = \Large \frac{n^{1.000001}}{\log n}$

1 Answer

0 0 votes

$f\left ( n \right )=\Theta \left ( n^{0.999999}*\log n \right )\simeq \Theta \left ( n \log n\right )$

$g\left ( n \right )=\Theta \left ( 100000 n \right )\simeq \Theta \left ( n\right )$

$h\left ( n \right )= \Theta \left ( n^{2}\right )$

$k\left ( n \right )= \Theta \left ( \left ( 1.00001 \right )^{n}\right )$

$p\left ( n \right )= \frac{2^{\sqrt{n}}}{n^{2}}\simeq\Theta \left ( 2^{\sqrt{n}} \right )$

$q\left ( n \right )= \frac{n^{1.000001}}{\log n}\simeq\Theta \left ( n \right )$

So,order of growth rate $ g< q< f<h<k<p$

for total diagram https://www.desmos.com/calculator/fiepklrawo

 

• edited by
Position:
Show:

Related questions

0 0 votes
0 0 answers
869
869 views
sushmita asked Sep 28, 2018
869 views
State true/falsef(n) != O(g(n)) and g(n) != O(f(n))
6 6 votes
3 answers 3 answers
4.1k
4.1k views
sushmita asked Oct 4, 2018
4,089 views
$T(n)=\sqrt{n} T(\sqrt{n})+100n$Please solve this.
0 0 votes
1 answers 1 answer
1.9k
1.9k views
sushmita asked Sep 28, 2018
1,908 views
Find the complexity of the following code fragment:int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
1 1 vote
2 answers 2 answers
1.8k
1.8k views
sushmita asked Sep 28, 2018
1,781 views
Find the complexity of the following function when called with some integer n:void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k ...