Algorithm problem
b. Give an example of a single nonnegative function ƒ(n) such that for all functions g(n) in part (a), ƒ(n) is neither in O(g(sub(i))(n)) nor in Ω(g(n)).
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
f(n)=0 if n is even
f(n)=n^(n^n) if n is odd
The above function has basically 2 parts which means that if n is even then it will make sure f(n) is not greater than g(n). So, it can't be Omega(g(n)).
If n is odd it is the function with more complexity of all listed in a part. So, this will confirm that it will be never less than g(n). So, f(n) can't be O(g(n))
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.