proving set theory proving (B' ∩ u) ∩ (A' ∪ φ) = (A ∪ B)' - set

Can anyone help me prove below set
(B' ∩ u) ∩ (A' ∪ φ) = (A ∪ B)'
please note in (B' ∩ u) this is (B' ∩ set u)

Union of φ with any set will result that set, so (A' ∪ φ)=A'
intersection of any set with U set will be, that set, (B' ∩ u)=B'
Thus the left side result in B' ∩ A' which is Euler representation of right side.

Related

Result of multiplying both sides of not-big-O relationship by the same function?

Is the following generally true?
f∉O(g) ⇒ f*h∉O(g*h)
Where f, h, g are positive-only functions. My intuition is that it is true, but I don't know how to prove it.
Here is why I think it is true:Because f∉O(g) there is no c multiplied by g that will make f ≤ c*g for a large enough x. There is no valid c for g because either f and g alternate who is on top or f dominates g. For each x, the point f(x) and g(x) will be scaled by h(x), therefore if f(x) is above g(x), then h(x)f(x) will be above h(x)g(x). This would mean the lack of asymptotic dominance must remain the same when multiplied by h, right?
Suppose f * h is O(g * h). Then there exist x0, c such that f(x) * h(x) <= c * g(x) * h(x) for all x >= x0. Since h is always positive, h(x) is positive and we are free to divide both sides of the inequality without changing sign. This yields f(x) <= c * g(x). Therefore, f * h in O(g * h) implies f in O(g).
What we have just shown to be true is the contrapositive of your claim. Your claim to prove is:
if f is not O(g), then f * h is not O(g * h)
What we have just shown is:
if f * h is O(g * h), then f is O(g)
Because all logical statements are logically equivalent to their contrapositives, your statement is also true. You can reason directly by multiplying one side of the inequality by the unity h(x)/h(x) and then multiplying through by h(x); but I thought canceling by division was clearer.

Is the worst case scenario for the following sorting algorithm O(n^2)? I used the master theorem

I am supposed to find the worst case time complexity for the following sorting algorithm. Using master theorem, I got O(n^2). I wanted to check if my answer was right.
SomeSort (A, b, e)
if e = b + 1 then
if A[b] > A[e] then
exchange A[b] and A[e]
end if
else if e > b + 1 then
p ←− [(e-b+1)/3] * the [] represents floor division
SomeSort (A, b, e − p)
SomeSort (A, b + p, e)
SomeSort (A, b, e − p)
end if
The running time recurrence is
T(n) = 3T(2n/3) = 3T(n/(3/2)),
hence Case 1 of the Master Theorem applies, and the running time is
Theta(n^(log(3)/log(3/2))) = Omega(n^2.7).

Asymptotic Analysis compare f and g

I have to compare the function f and g to find whether:
f ∈ Θ(g), f ∈ O(g),
f ∈ o(g), f ∈ Ω(g),
f ∈ ω(g), g ∈ Θ(f),
g ∈ O(f), g ∈ o(f),
g ∈ Ω(f), g ∈ ω(f).
f(n) = n^2/ log n and g(n) = n log n.
As my understanding for the asymptotic analysis I got that:
f(n) = O(g(n)) is like a =< b
f(n) = Ω(g(n)) is like a => b
f(n) = Θ(g(n)) is like a == b
f(n) = o(g(n)) is like a < b
f(n) = ω(g(n)) is like a > b
So now I plot the f(n) and g(n) and I saw that for small values of n, f(n) is bigger but for very large values of n the g(n) is bigger, so in this sense when the n is bigger is more important since the algorithms have to be general, so this means that the f(n) and g(n) are:
f ∈ Ω(g) and f ∈ ω(g) and g ∈ O(f) and g ∈ o(f)
Now my question is this the right way to find these so to plot the function and see which is bigger and does that mean that when they intersect they are equal?
Your understanding looks wrong in these two cases:
f(n) = o(g(n)) is like a < b
f(n) = ω(g(n)) is like a > b
It's better to visualize these cases like:
f(n) = o(g(n)) is like a << b
f(n) = ω(g(n)) is like a >> b
Sorry to say, the exact mathematical meaning of these two symbols << ("much less") and >> ("much greater") is not defined.
So, in general, instead of plotting two functions you can think in terms of the limit of the ratio f(n)/g(n) of these two functions (when n goes to positive infinity):
if this limit is zero, then f = o(g)
if this limit is a positive constant, then f = Θ(g)
if this limit is a positive infinity, then f = ω(g)
Of course, it's just a hint - your answer to any question about asymptotic relationship between two functions will look much better if you use an exact mathematical definition of this relationship.

Let L1={a^nb^mc^(n+m) / n,m > 0} and L2={a^nb^nc^m / n,m > 0}.Is L3= L1 ∩ L2 context-free or not?

Let L1={a^n b^m c^(n+m) / n,m > 0} and L2={a^n b^n c^m / n,m > 0}.Is L3= L1 ∩ L2 context-free or not?
My logic being is if n < m the intersection will yield a language (a^n b^n c^n) if n > m the intersection will yield a language (a^n b^m c^m) in both cases we have a CFG so is my interpretation correct?
I'm not sure if i understood your idea correctly, but if you try using the same n and m for both L1 and L2 and compute the intersection based on that, you are not right.
Besides that, the language {an bn cn | n > 0} is not CFG, as you can see as an example here https://en.wikipedia.org/wiki/Context-free_language or show by using the pumping lemma.
How can one see what L1 ∩ L2 looks like?
x ∈ L1 ∩ L2 <=> x ∈ L1 and x ∈ L2. So x must fullfill both restrictions of the two languages.
Therefore x ∈ L1 ∩ L2 is x = an bm co where n = m because of L2 and o = n+m = n+n (n + m because of L1 and n + n because n = m).
This gives us L1 ∩ L2 = {an bn c2n | n > 0}, which is not CFG.
Reason:
Intuitively speaking a CFG can not count (more than once, an bn is fine). But for achieving the pattern n, n, 2n, we have to count the amoung of a and b and then add the right amount of c.
Pumping Lemma: We have to negate the original lemma in order to show that {an bn c2n | n > 0} is not CFG. So we need to prove that for every p >= 0 there is a s ∈ {an bn c2n | n > 0} which can NOT be split into uvwxy fullfilling |uvw| <= p and uvkwxky ∈ {an bn c2n | n > 0}.
Proof: Given a p >= 0. We choose the word t = ap bp c2p ∈ L1 ∩ L2. Now for every choose of uvwxy = t we can not pump uvwxy to still be ∈ L1 ∩ L2. This is because we only pump v and x. And |vwx| is <= p. So vwx can not contain a, b, and c but at max two of them. Now if we pump v and x we get more a than c, or the other way round and the result uv2wx2y is not in L1 ∩ L2.

Algorithms - Semi definite programming

Let G=({1,...,n},E) be a graph with two edge weight functions ֿαe ≤ βe, e ∈ E.
I want to know whether there exist points p1 ,..., pn ∈ Rn, such that α{i,j} ≤ ||pi−pj||^2 ≤ β{i,j}, for all {i,j} ∈ E.
How can I show that this decision problem can be formulated as a semidefinite program?

Resources