You are on page 1of 3

For a given function g(n):

 Θ(g(n)) = {f(n): there exist positive constants c1, c2 and n0 such

that 0 <= c1*g(n) <= f(n) <= c2*g(n) for all n >= n0}

 O(g(n)) = { f(n): there exist positive constants c and

n0 such that 0 <= f(n) <= c*g(n) for

all n >= n0}

 Ω (g(n)) = {f(n): there exist positive constants c and

n0 such that 0 <= c*g(n) <= f(n) for

all n >= n0}.

Given:

f(n) and g(n) both are asymptotically  positive function.

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

Let f(n)= n and g(n)=nk where k=2,3,4,……

Hence it is clear that f(n)=O(g(n)) because n=O(nk)

But nk !=O(n) for k=2,3,4,5……

Hence , the given statement is false.

2.  f(n) + g(n) = Θ(min(f (n), g(n))).

Let, f(n)= n2 and g(n)=n

Then

f(n)+g(n)= n2 + n

and Θ(min(f (n), g(n)))= Θ(min(n2,n))=n


clearly

f(n) + g(n) ≠ Θ(min(f (n), g(n))).

Hence this statement is false.

3. f (n) = O(g(n)) implies lg(f (n)) = O(lg(g(n))), where lg(g(n)) ≥ 1 and f (n) ≥ 1 for
all sufficiently large n

given:

O(g(n)) = { f(n): there exist positive constants c and

n0 such that 0 <= f(n) <= c*g(n) for all n >= n0}

Hence,

 0≤lg(f(n))≤lgc+lg(g(n))≤k⋅lg(g(n))

Therefore,

 lg(f(n))=O(lg(g(n)))

Hence this statement is true.

4.  f (n) = O(g(n)) implies 2f(n) = O (2g(n)).

Let f(n)=2n and g(n)=n

Hence, f(n)=O(g(n)) but 22n=4n≠O(2n)

So, this statement is false.

5. f (n) = O ((f (n))2).

f(n)≥1 for sufficiently large values of n, 0≤f(n)≤c⋅(f(n))2

i.e. f(n)=O((f(n))2).

However, if f(n)<1 this is not true for all n.


6. f (n) = O(g(n)) implies g(n) = Ω(f (n)).

from the first, we know that 0 ≤f(n) ≤cg(n) and we need to prove that 0≤df(n)≤g(n), which is
absolutely correct with d=1/c

7. f (n) = Θ(f (n/2)).

Let f(n)=4n

4n ≠ Θ(4n/2)= Θ(2n)

So this is false.

8. f (n) + o(f (n)) = Θ(f (n)).

We know that,

f(n)≤f(n)+O(f(n))≤2f(n)

Therefore, 

f(n)+o(f(n))=Θ(f(n))

so this is true

You might also like