retagged by
379 views

2 Answers

Best answer
3 votes
3 votes

Slowness and fastness of an algorithm depends on , how the value of that function increases depending upon the value of input size 'n'..

  n=2 n=16 n=256 n=2^16
n/logn 2 4 32 2^12
log(logn) 0 2 3 4

look here, n/logn is growing faster than log(logn) depending upon various values of 'n'..

selected by
0 votes
0 votes
Best way is to find

lim n-> infinite (f(n)/g(n))

If we are getting 0, means g(n) growing faster, 1 means f(n) growing faster, constant means same speed.

 

If functions are complicated and we are not able to find limit, then go to value substitisubs method.

Related questions

1 votes
1 votes
3 answers
1
Tushar Garg asked Jul 4, 2018
1,653 views
How to find log n base2+ log n base 3+ log n base4+........log n base n?
1 votes
1 votes
2 answers
3
Sidd_ asked Jun 4, 2017
500 views
Is n^2 2^(3log base 2 n) = theta (n^5).
0 votes
0 votes
1 answer
4
piyushkr asked Jan 10, 2016
225 views
What is the difference between $\log^m n$ and $(\log n)^m.$ Can anyone explain?