edited by
709 views
1 votes
1 votes

 Given two positive functions f(n) and g(n). If $\frac{f(n)}{g(n)}=c$, for some constant c ≥ 0 and c is non-negative but not infinite then which of the following is correct?

  • f(n) = O(g(n))
  • f(n) = θ (g(n))
  • f(n) = Ω (g(n))
  • None of these

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

Here I strongly believe that Answer should be the f(n) = θ (g(n)). Other two are correct, but this is strongest statement !

As f(n) / g(n) = constant is only possible if they are of same order.

In that case they are both upper & lower bounds of each other !

Q 47

From Made Easy FLT 6-Practice Test 14

edited by

1 Answer

1 votes
1 votes
IT seems here I made mistake in analysis.

Here c = 0 is possible as pointed out by @Amar Sokt !

In that case f(n) can be 0, & in that case g(n) is always bigger than f(n).g(n) = 0 is not allowed, otherwise whole thing will go to infinity & it is said c can not be 0.

f(n) = θ (g(n)) will be false. As g(n) will not be lowerbound of f(n).

So A is correct answer.

Related questions

0 votes
0 votes
1 answer
1
2 votes
2 votes
2 answers
3
Amar Vashishth asked Aug 2, 2015
2,443 views
int fun(int n) { int count=0; for (int i= n; i 0; i/=2) for(int j=0; j< i; j++) count+= 1; return count; }