I have a question regarding big O notation.
If g(n)=O(f(n)) and h(n)=O(f(n)) is g(n)=O(h(n))?
Is this allways true, sometimes true or allways false?
Thanks
In words: if g is bounded by f and h is bounded by f, is g bounded by h?
From this we can see that the conclusion doesn't follow from the premises. You can construct a counterexample by choosing f, g, and h in such a way that the premises hold but the conclusion does not.
Related
In this case the p is supposed to be a subscript. Is it supposed to mean less than or equal polynomial time?
A ≤p B means that there is a polynomial-time many-one reduction from A to B, i.e., there exists a polynomial-time computable function f such that, for every string x, we have x in A if and only if f(x) in B.
I'm stuck proving or disproving this statement:
If f ≠ ω(g), then f = O(g)
Intuitively, I think that the statement is false, however, I can't figure out a valid counterexample.
My thought is that we know that f is not bounded from below by a function of g, but that tells us nothing about an upper bound.
Any thoughts? Hints in the right direction?
As a hint, this statement is false. Think about two functions that oscillate back and forth, where each function overtakes the other over and over again. That would make f ≠ ω(g), because f is repeatedly dominated by g, and would make f ≠ O(g) because f repeatedly dominates g.
You'll need to find concrete choices of f and g that make this work and formally establish that f ≠ ω(g) and f ≠ O(g) to formalize this, and I'll leave that as an exercise.
Hope this helps!
I got a practice exam question here asking if the following is true/false.
Let f , g, and h be functions from the natural numbers to the positive
real numbers. Then if g is an element of Big Omega( f ) and g is an element of O(h), and f is an element of O(h) then g is an element of big Theta (h)
I got false for this but it is kind of confusing me now because I don't exactly know what Big omega(f) is.
Can someone clarify if my answer to this question is correct / if not, where I went wrong (and explain if possible please).
Thanks.
Check the link I mentioned in the comment. g is an element of big Theta (h) <=> g is bounded both above and below by h, which is not the case. From your post it's only can be deduced that g is bounded above by h. So "false" is correct answer.
I've seen several places that have simply stated that it's known that P is a subset of the intersection of NP and co-NP. Proofs that show that P is a subset of NP are not hard to find. So to show that it's a subset of the intersection, all that's left to be done is show that P is a subset of co-NP. What might a proof of this be like? Thank you much!
The class P is closed under complementation: if L is a language in P, then the complement of L is also in P. You can see this by taking any polynomial-time decider for L and switching the accept and reject states; this new machine now decides the complement of L and does so in polynomial time.
A language L is in co-NP iff its complement is in NP. So consider any language L ∈ P. The complement of L is also in P, so the complement of L is therefore in NP (because P ⊆ NP). Therefore, L is in co-NP. Consequently, P ⊆ co-NP.
Hope this helps!
Think of it this way. Consider the class co-P. Since P is closed under compliment, P=co-P.
It should also be clear that co-P is a subset of co-NP because P is contained in NP. Since P = co-P, it follows that P is contained in co-NP.
I've been trying for the better part of an hour to find reference to the following:
f = Ω(g)
But I have had no luck at all. I need to answer a question for an assignment and I can't find references.
The assignment is basically asking me to indicate what it (f = Ω(g)) means, in the context of the following choices:
f = Ω(g(n))
g = o(ln n)
g = o(g(n))
g = O(f)
f = O(g)
Initially, I thought that perhaps there is an error in the question.
I know option 1 is wrong and assume option 5 is also wrong, but after an hour online I couldn't figure out which one is the answer.
Can someone please explain to me how to figure this out? I realize that might mean giving me the answer so it can be explained, but I'm more interested in why one of these answers are correct.
"f = Ω(g) means "f is bounded below by g asymptotically". f = O(g) means "f is bounded above by g asymptotically" as per the comments.
If a river's upper bound is a bridge, what's a bridge's lower bound? The river.
I would suggest d
(For completeness, the "little" versions of these imply a very strong difference in growth.)