in Algorithms edited by
594 views
0 votes
0 votes

in Algorithms edited by
594 views

1 Answer

0 votes
0 votes

For option a)

f(n)=$n^{2}$

g(n)=$n^{3}$

then f(n)=O(g(n))

but g(n) $\neq$ O(f(n)) because on using any constant K we can’t prove that

$n^{3}$<=K$n^{2}$  (because for that K = n should be there but it is not allowed as K is constant.)

so option a) is false.

 

For option b)

f(n)=$n^{2}$ and

let, S(n)= O(f(n)) hence

S(n)=O($n^{2}$) that means 

S(n)<= K. $n^{2}$ where K is any constant ,

since S(n) may be equal or less than f(n)

hence in,

f(n)+(S(n))=$\Theta$(f(n)) 

we can neglect S(n) so it can be written as f(n)=$\Theta$(f(n)) .

so option b) is True.

 

For option c)

f(n)=$n^{2}$ and

let, S(n)= o(f(n)) hence,

S(n)=o($n^{2}$) that means 

S(n)< K. $n^{2}$ where K is any constant ,

since S(n) is strictly less than f(n)

hence in,

f(n)+(S(n))=$\Theta$(f(n)) 

we can neglect S(n) so it can be written as f(n)=$\Theta$(f(n)) .

so option c) is True.

 

For option d)

log n)! and (log log n)! are not polynomially bounded functions.

The factorial function grows at an exponential rate, meaning the value of (log n)! and (log log n)! increases rapidly as n or log n increases. In contrast, a polynomially bounded function is one that can be upper-bounded by a polynomial function of the input size.

Therefore, (log n)! and (log log n)! are not polynomially bounded functions.

 

 

edited by

4 Comments

@shishir__roy Thank you for asking. 

I made a blunder here,

I assumed option b and c as f(n)+O(g(n))=$\Theta$(f(n)). now I corrected my mistake, i hope this time i did it correctly. 

Thank you.

0
0
edited by

@shishir__roy 

How is the second function in option (d) not polynomially bounded?

We know $n! =  O$ ($n^{n}$)

Let $ n= log(logn) $

So $(log(logn))! = O((log(logn))^{log(logn)} ) $

From

A function is polynomially bounded iff $ log(f(n)) \in O(logn) $

 $log ((log(logn))^{log(logn)})$ $\in$ $O(logn)$

$(log(logn)*log(log(logn)))$ $\leq$ $logn$

Thus we can conclude that $(log(logn))!$ is polynomially bounded.

Reference

1
1

In contrast, a polynomially bounded function is one that can be upper-bounded by a polynomial function of the input size.

For sufficiently large $n,$ $\log (\log n)!$ is polynomially bounded by a particular polynomial function, say, $n.$

You can prove it as $\lim_{n \rightarrow \infty}\dfrac{n}{(\log (\log n))!} = \infty$ by using Stirling’s approximation for the factorial. 

1
1

Related questions