The Gateway to Computer Science Excellence
0 votes
288 views

If c is non-negative but not infinite then :

1.f(n)=O(g(n))

2.f(n)=⊖(g(n)) 

According to me :

it is saying that c is non-negative and not infinite so if g(n) tends to zero then c will tend to infinite but it is given that it is not infinite therefore clearly g(n) should be larger than f(n) , so more precisely we can say f(n)=O(g(n)) ,plz correct me ,if I am wrong

in Algorithms by Loyal (6.3k points) | 288 views
0
if c>0 it means then numerator has to be big na so f(n) has to be big na so i think it has to be f(n)=theta(g(n)) plz say me if im wrong
0
See the answer .
0

suppose c is n let f(N) be n2  g(n) be n then f(n)/g(n) =n=c>0

0
c is a constant , and n is a variable

3 Answers

0 votes
Given that c is non-negative means that c={0} ∪ {1,2,3...n} and it is also mentioned that it is non-negative so if c=0 ,it implies that f<g and if c >0 then it implies that f =g , so f(n)=O(g(n)) .
by Loyal (6.3k points)
0

Consider positive functions as $f(n)=n$ and $g(n)=n^2$ for values of $n>=0$

Now, if C is a positive integer, of course $g(n)$ will be greater than $f(n)$ for all values of C

But, if C is a positive fraction, say $1/1000$ Then for some values of $n$ $g(n)$ will be smaller than $f(n)$

Hence, we have $C1 g(n) <= f(n) <= C2 g(n)$

Therefore, $f(n) = \Theta g(n)$

0
can you explain this once again,i did nt get you
0 votes
It could be (-)g(n) as c is a constant and > 0 i.e. F(n) has same order of growth as g(n)
by (17 points)
0 votes

Consider positive functions as $f(n)=n$ and $g(n)=n^2$ for values of $n>=0$

Now, if C is a positive integer, of course $g(n)$ will be greater than $f(n)$ for all values of C

But, if C is a positive fraction, say $1/1000$ Then for some values of $n$ $g(n)$ will be smaller than $f(n)$

Hence, we have $C1 g(n) <= f(n) <= C2 g(n)$

Therefore, $f(n) = \Theta g(n)$

by (377 points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,650 questions
56,193 answers
193,988 comments
94,863 users