• edited by
1,025 views
0 0 votes
f(n)= n^0.0000001

g(n)=lg n(base 2)

Is g(n)=O(f(n))...?

For the large values of n

n= 10^8   f(n)= 1.0000018 , g(n)=26.565

n=10^10  f(n)=1.0000023,   g(n)=33.21

So I am getting f(n)=O(g(n))...

Can anyone please explain why g(n)=O(f(n))....?

1 Answer

0 0 votes

There is no limit on a large value being considered. 

f(n)= n^0.0000001 = n^(10^-7)
g(n)=lg n(base 2)

n= 10^8   f(n)= 1.000001842 , g(n)=26.565

Now, I take n = 10^(10^8)

f(n) = n^(10^-7) = (10^(10^8))^(10^-7) = 10^(10^(8-7)) = 10^10
g(n) = 10^8 log10 2

So, f(n) becomes larger. Thus for any x, we can have an n, where nx becomes larger than log n and stays larger from there on wards for any higher n. 

• edited by
Position:
Show:

Related questions

3 3 votes
1 1 answer
229
229 views
GO Classes asked Aug 31
229 views
The algorithm $\text{ALGSORT}$ sorts an array of distinct integers using comparisons.The function $\text{MININDEX(V,i,j)}$ returns the position of the smallest element in...
1 1 vote
1 1 answer
161
161 views
GO Classes asked Aug 29
161 views
Suppose Huffman coding is implemented as follows.Initially, the $n$ symbols are stored in a min priority queue according to their frequencies.The algorithm repeatedly per...
1 1 vote
1 1 answer
137
137 views
GO Classes asked Aug 26
137 views
Consider,f1(N): x = 0 for i = 0 to N - 1: x++ return xand,f2(N, R): x = 0 for i = 0 to N - 1: for j = 1; j <= R; j = j + j: x = x + f1(j) return xWhat is the order of gro...
2 2 votes
1 1 answer
390
390 views
KrishnaVardhan asked Oct 7, 2024
390 views
Even though there are two for loops some times the Time complexity will be the m+n and some times it will be m*n assuming loops run till m and n respectively.How do we di...