Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose you are given a set S of n points (x 1 ,y 1 ), . . . , (x n , y n ) wher

ID: 3609131 • Letter: S

Question


Suppose you are given a set S of n points (x1,y1), . . . , (xn, yn) where thexis and yis are distinct
(i.e., no two are equal). We use pi as a shorthand for thepoint (xi, yi). A point pi is said to dominate
another point pj if xj < xi andyj < yi. Two points are comparable if oneof them dominates the other,
and are incomparable if neither of them dominates the other.For example, the point (9.2, 3.3)
dominates the point (7.1, 1.2), but the two points (9.2, 3.3)and (4.5, 6.8) are incomparable.

Let be the number of points of a largest subset of Sin which all the points are pairwise comparable.
Let be the number of points of a largest subsetof S in which all the points are pairwise incomparable.
a) Give an O(n log n) time algorithm for computing.
b) Give an O(n log n) time algorithm for computing.
c) Prove that max{ , } n .
Suppose you are given a set S of n points (x1,y1), . . . , (xn, yn) where thexis and yis are distinct
(i.e., no two are equal). We use pi as a shorthand for thepoint (xi, yi). A point pi is said to dominate
another point pj if xj < xi andyj < yi. Two points are comparable if oneof them dominates the other,
and are incomparable if neither of them dominates the other.For example, the point (9.2, 3.3)
dominates the point (7.1, 1.2), but the two points (9.2, 3.3)and (4.5, 6.8) are incomparable.

Let be the number of points of a largest subset of Sin which all the points are pairwise comparable.
Let be the number of points of a largest subsetof S in which all the points are pairwise incomparable.
a) Give an O(n log n) time algorithm for computing.
b) Give an O(n log n) time algorithm for computing.
c) Prove that max{ , } n .

Explanation / Answer

(f(x),f(y)) = {(x1,y1), (x2,y2),…(xn,yn)}

Pi is a point (xi,yi) it dominates the another point (xj,yj) iffxj<xi and yj<yi  

Assume that f(x) = f(y) and f(x) ? f(y). Then, by definition ofdominance, for each component of f, f(xj) f(xi) and f(yj) f(yi)   there exists a component fj(xj,yj) wherefi(xi,yi) < fj(xj,yj). As f(x,y) = f1(x1,y1)+f2(x2,y2)+. ..+fn(xn,yn), this contradicts the assumption that f(xi,yi) =f(xj,yj). Thus, if f(xi,yi) = f(xj,yj), then fi(xi,yi) does notdominate fj(xj,yj). By a symmetric argument, fj(xj,yj) does notdominate fi(xi,yi) either. Therefore, by definition of thedominance relations, either i and j are indifferent (the same inall components) or incomparable. the time complexity of thisalgorithm is O(n log n).

Compute all maximal (in inclusion) points in the interval graphof the covering intervals of .

In each such point, use the algorithms for the {<, x, y}model to approximate the maximum {x, y}–comparable subset of2-intervals corresponding to this subset

Return the largest solution found in any of these subsets.Sincean interval has at most n maximal subsets, this algorithm ispolynomial. The approximation factors obtained are similar to thoseobtained for the {<, x, y} model.Any pair of disjoint2-intervals are {<, y}–comparable iff their correspondingsubsets are disjoint. Any pair of 2-intervals are {<,y}–comparable if and only if their corresponding subsets aredisjoint and do not clash. The maximum pairwise disjoint subset oftrapezoids is as least as large as the maximum {<,y}–comparable subset. optimal O(n lgn) algorithm.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote