Approximation Algorithms II - Lecture Notes | CS 473, Assignments of Algorithms and Programming

Material Type: Assignment; Class: Fundamental Algorithms; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Spring 2006;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-j7v
koofers-user-j7v 🇺🇸

9 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
14: Approximation algorithms II
Sariel Har-Peled
March 16, 2006
473G - Algorithms
Version: 0.1
1 Max Exact 3SAT
We remind the reader that an instance of the 3SAT problem looks like F=(x1+x2+x3)(x4+x1+x2).
Interestingly, we can turn this into an optimization problem.
Problem: M 3SAT
Instance: A collection of clauses: C1,...,Cm.
Output: Find the assignment to x1, ..., xnthat 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:
x1+x2+x3and x4+x1+x2.
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 x1,...,xnbe the nvariables used in the given instance. The algorithm works by randomly
assigning values to x1,...,xn, independently, and equal probability to 0 and 1 for each one of the variables
of the given instance.
Let Yibe 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=
1Ciis satisfied by the random assignment
0 Otherwise.
Clearly, the number of clauses satisfied by the given assignment is: Y=Pm
i=1Yi. We claim that E[Y]=
(7/8)m, where mis the number of clauses in the input. Indeed, we have
E[Y]=E
m
X
i=1
Yi
=
m
X
i=1
E[Yi]
1
pf3
pf4

Partial preview of the text

Download Approximation Algorithms II - Lecture Notes | CS 473 and more Assignments Algorithms and Programming in PDF only on Docsity!

14: Approximation algorithms II

Sariel Har-Peled

March 16, 2006

473G - Algorithms

Version: 0.

1 Max Exact 3SAT

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

E[Y] = E

∑^ 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

2.1 Guarding an Art Gallery

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.

2.2 Set Cover

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.

X∈F X^ =^ S^.

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.