In each of the following situations indicate whether...

914 Views Asked by At

In each of the following situations indicate whether f = O(g), or f = Ω(g), or both (in which case f = Θ(g)).

$f(n) = n\log n, \\g(n) = 10n\log10n$

The solution is saying that both are $O(n\log n) \implies f = \Theta(g)$..

But I don't understand this because I thought that any polynomial dominates any logarithm. So wouldn't the answer be that they are both $O(n) \implies f = \Theta(g)$?

1

There are 1 best solutions below

0
On

Ahh, I just realized that they are both $O(n\log n)$ because the $n$ is not separate from the $\log n$ which makes them one term. So the solution in the book is in fact correct.