Please help me to solve this b Prove that the function fn

Please help me to solve this :


(b) Prove that the function f(n) = 2n3 + 2n7/3 + log2 n + 5 is O(n3).

(c) Prove that the function f(n) = (log2 n)2 is O(n).

(d) Prove that the function f(n) = 2n+3 is (2n).

Solution

In order to answer these question, we must know the definition og big-oh.

For a function, f(n) = O(g(n))

c*g(n) >= f(n) for some value of c and n>n0.

a.) f(n) = 2n^3 + 2n ^(7/3) + log n + 5

c*n^3 >=f(n); for some value of C it must be greater than that of f(n)

therefore, f(n) = O(n^3)

b.) f(n) = (log n )^2

now, c*n >= (log n)^2; for some value of c, c*n will always be greater than f(n)

therefore, f(n) = O(n)

c.) For a function f(n) = theta (g(n)), it must follow given condition:

c1*g(n) <= f(n) <=c2*g(n); for value of c1, and c2.

c1*2^n <=2^(n+3) <= c2* 2^n; where c must be less than 8 and greater than 8.

therefore, f(n) = theta (2^n).

Hope it helps, do give your response.

Please help me to solve this : (b) Prove that the function f(n) = 2n3 + 2n7/3 + log2 n + 5 is O(n3). (c) Prove that the function f(n) = (log2 n)2 is O(n). (d) P

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site