


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Fundamental Algorithms; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2006;
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Version: 0.
We remind the reader that an instance of the 3SAT problem looks like F = (x 1 + x 2 + x 3 )(x 4 + x 1 + x 2 ). Interestingly, we can turn this into an optimization problem.
Problem: M 3SAT Instance: A collection of clauses: C 1 ,... , Cm. Output: Find the assignment to x 1 , ..., xn that satisfies the maximum number of clauses.
Clearly, since 3SAT is NP-C it implies that M 3SAT is NP-H. In particular, the formula F becomes the following set of two clauses:
x 1 + x 2 + x 3 and x 4 + x 1 + x 2.
Note, that M 3SAT is a maximization problem.
Definition 1.1 Algorithm Alg for a maximization problem achieves an approximation factor α if for all inputs, we have: Alg(G) Opt(G) ≥ α.
Theorem 1.2 There is an algorithm which achieves (in expectation) (7/8)-approximation in polynomial time. Namely, if the instance has m clauses it satisfies (7/8)m.
Proof: Let x 1 ,... , xn be the n variables used in the given instance. The algorithm works by randomly assigning values to x 1 ,... , xn, independently, and equal probability to 0 and 1 for each one of the variables of the given instance. Let Yi be the indicator variables which is 1 if ith clause is satisfied by the generated random assignment and 0 otherwise, for i = 1 ,... , n. We have that
Yi =
1 Ci is satisfied by the random assignment 0 Otherwise.
Clearly, the number of clauses satisfied by the given assignment is: Y =
∑m i= 1 Yi. We claim that^ E[Y]^ = (7/8)m, where m is the number of clauses in the input. Indeed, we have
∑^ m
i= 1
Yi
∑^ m
i= 1
E[Yi]
by linearity of expectation. Now, what is the probability that Yi = 0?
Pr[Yi = 0] =
This is the probability that Ci is not satisfied. Ci is made out of exactly three literals, and as such....?
Pr[Yi = 1] = 1 − Pr[Yi = 0] =
Thus, E[Yi]^ =^ Pr[Yi =^ 0]^ ∗^0 +^ Pr[Yi =^ 1]^ ∗^1 =^
Namely, (^) E[# of clauses sat] = (^) E[Y] =
∑m i= 1 E[Yi]^ =^
7 8 m. Since the optimal solution satisfies at most^ m clauses, the claim follows.
2 Approximation Algorithms for Set Cover
You are given the floor plan of an art gallery, which is a two dimen- sional simple polygon. You would like to place guards that see the whole polygon. A guard is a point, which can see all points around it it, but it can not see through walls. Formally, a point p can see point q, if the segment pq is contained inside the polygon. See example on the right for how the input looks like.
p
Such a visibility polygon is depicted on the left, here the yellow poly- gon is the visibility polygon of p. The question is how many guards to we need to guard the given art-gallery? Namely, every guard can see in all directions, and we need to places guards that see all the points in the polygon. The art-gallery is essentially a set-cover problem. It is known that finding the minimum number guards is NP-H. No approximation is currently known. It is known that a polygon with n corners, can be guarded using n/ 3 + 1 guards. Note, that this problem is harder than the classical set-cover problem because the number of subsets is infinite and the underlining base set is also infinite. An interesting open problem is to find a polynomial time approximation algorithm, such that given P, it computes a set of guards, such that #guards ≤
nkopt, where n is the number of vertices of the input polygon P, and kopt is the number of guards used by the optimal solution.
The optimization version of S C, is the following:
Problem: S C Instance: (S , F ) S - a set of n elements F - a family of subsets of S , s.t.
Output: The set X ⊆ F such that X contains as few sets as possible, and X covers S.
References
[Chr76] N. Christofides. Worst-case analysis of a new heuristic for the travelling salesman problem. Techni- cal Report Report 388, Graduate School of Industrial Administration, Carnegie Mellon University,
[FG95] U. Feige and M. Goemans. Approximating the value of two power proof systems, with applications to max 2sat and max dicut. In ISTCS ’95: Proceedings of the 3rd Israel Symposium on the Theory of Computing Systems (ISTCS’95), page 182, Washington, DC, USA, 1995. IEEE Computer Society.
[Has97] J. Hastad. Some optimal inapproximability results. In Proc. 29th Annu. ACM Sympos. Theory Comput., pages 1–10, New York, NY, USA, 1997. ACM Press.