I do not know much about O notation so could you please help me, I have to prove or disprove the following statment:
∀f,g:N→R≥0 f=O(g) or f=Ω(g)
Can I disprove this statement with f=sin(x)+1 and g=cos(x)+1?
Thanks in advance!
Cheers
Answer
Your proposed example will do the job in a fairly straightforward way if you measure angles in degrees.
If you are working in radians, which is the usual convention in mathematics unless one says otherwise, it can be done. But we need to find out quite a lot about how sine and cosine behave at the integers. Not easy! Replacing the n in sinn and cosn by πn2 will work.
There are simpler examples that disprove the assertion. We can let f(n)=0 when n is even, f(n)=1 when n is odd, and let g(n)=1−f(n).
Or for an example that is slightly more realistic in a computing context, let f(n)=n when n is even, f(n)=n2 when n is odd, and let g(n)=n2 when n is even, g(n)=n when n is odd.
No comments:
Post a Comment