CIS 262 Automata Computability and Complexity Spring 2019
CIS 262 Automata, Computability, and Complexity Spring 2019 http: //www. seas. upenn. edu/~cse 262/ Instructor: Aaron Roth aaroth@cis. upenn. edu Lecture: April 22, 2019
Vertex Cover A vertex cover of a graph G is a subset of vertices S such that every edge in G is adjacent to a vertex in S. 2
Vertex Cover A vertex cover of a graph G is a subset of vertices S such that every edge in G is adjacent to a vertex in S. VERTEX-COVER = {<G, k> | G is a graph with a vertex cover of size k} 3
Vertex Cover 4
Vertex Cover 5
Vertex Cover 6
Vertex Cover 7
Vertex Cover 8
Vertex Cover 9
Vertex Cover Theorem: VERTEX-COVER is NP-Complete. The optimization version: MIN-VC: Given a graph G, find the smallest vertex cover S. MIN-VC is not a decision problem, so not in NP. But… If we can solve MIN-VC in polynomial time, we can solve VERTEX-COVER (and vice versa) • Why? So, MIN-VC is NP-hard. 10
Vertex Cover But suppose we want to solve MIN-VC… What do we do? A couple of options: • Try and solve it anyway. (e. g. encode vertex cover as a 3 SAT instance, and run a commodity SAT solver. ) • Might work on your instance. • Not guaranteed to work. • Design an Approximation Algorithm • A poly-time algorithm guaranteed to find a vertex cover quickly. • But not necessarily the smallest vertex cover. 11
Vertex Cover 12
Vertex Cover 4 5 1 3 5 1 2 4 13
Vertex Cover Lets try designing an approximation algorithm. Is Greedy a good approximation algorithm? No: Greedy is not a c-approximation algorithm for any c. Consider a star graph G with c+1 vertices. Optimal cover has size OPT(G) = 1. But Greedy can pick a cover of size c. 14
Vertex Cover 1 4 3 2 5 1 3 2 4 15
Vertex Cover Another Attempt Is Greedy 2 a good approximation algorithm? • Seems wasteful! Adds two vertices to cover a single edge! • How does it do on the star example? • Never finds OPT… • But always finds a cover of size 2. 16
Vertex Cover 17
Vertex Cover 18
Vertex Cover Theorem: Greedy 2 is a poly-time 2 -approximation algorithm for MIN-VC. No better algorithm is known. Finding a poly-time 1. 99 -approximation algorithm for MIN-VC would disprove the “Unique Games Conjecture” 19
Max-Cut A cut in a graph G is a partition of the vertices into two sets S, T. The size of the cut is the number of edges crossing the partition. S: T: 4 3 6 2 1 5 MAX-CUT: Given G, find the largest cut. NP-hard (See book). 20
Max-Cut Can we give an approximation algorithm for MAX-CUT? Local. Search(G): • Let S, T be an arbitrary partition of the vertices of G. • Until there are no more changes: • If one exists, find a vertex v such that moving it from S to T or from T to S increases the size of cut(T, S). • Swap v to the other set in the partition. 21
Max-Cut Local. Search Example: S: T: 4 3 6 2 1 5 22
Max-Cut Local. Search Example: S: T: 4 3 6 2 1 5 23
Max-Cut Local. Search Example: S: T: 4 3 6 2 1 5 24
Max-Cut Can we give an approximation algorithm for MAX-CUT? Theorem: Local. Search is a polynomial time 2 -approximation algorithm for MAX-CUT. e. g. finds a cut of size at least half of the max-size cut. 25
Max-Cut 26
- Slides: 26