in Algorithms
523 views
2 votes
2 votes

which function will grow faster?

a) x$\sqrt{x}$ 

b) x!   

in Algorithms
523 views

8 Comments

reshown by

BLUE $\Rightarrow$ x! 

Red $\Rightarrow$ x√x 

x! grows faster

0
0

x!=x (x-1) (x-2)....3.2.1=O(xx)

Now, compare xx and xsqrt(x)

xx will grow faster

0
0
Take log on both sides..

√xlogx  and log(x!)

log(x!) Can be written as xlogx( you can search the derivation )

So,

√xlogx and xlogx

B is greater..
0
0

@MiNiPanda   yes youre right , i heard  sometime taking log it can give incorrect result , thats why i avoid using it , since by taking  log it  decreases  the rate of function exponentially , how we will sure that , here rate is not decreased  exponentially

0
0
It gives incorrect result only when both sides become equal.

In this case if both would have come xlogx then it would have been incorrect to infer that both have same rate of growth. In that case other ways should be followed.

But if they are different then it's okay...
0
0

like n^2  and n are not theta of each other , but if i took  log  ,  then 2logn and logn are theta of each other  thanks @MiNiPanda 

0
0
Approximation for logn! $\approx$ (n+1)logn - n

by Srinivasa Ramanujan :o
0
0
Right Sumit :D

Utkarsh ooh..maybe .. but that again can be approximated to nlogn for asymptomatic analysis..
1
1

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
4