For which case f(n) != O(g(n)) and g(n) != O(f(n)) is true?
I have following answer to this which i could not understand:
Sometimes true: For f(n) = 1 and g(n) = ||n ∗ sin(n)|| it is true, while
for any f(n) = O(g(n)), e.g. f(n) = g(n) = 1, it is not true.
Please someone help in understanding :
- For which case it is sometimes true? An explanation with example will be much appreciated.
- What is meaning of "||" in this?
f(n) != O(g(n))then it must follow thatf(n) = ω(n), and this immediately contradictsg(n) != O(f(n)).||in your example is probably the absolute value.