CMPSCI611: Approximating MAX-CUT Lecture 20



Similar documents
Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Near Optimal Solutions

Chapter Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

NP-Completeness. CptS 223 Advanced Data Structures. Larry Holder School of Electrical Engineering and Computer Science Washington State University

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Applied Algorithm Design Lecture 5

Computer Algorithms. NP-Complete Problems. CISC 4080 Yanjun Li

Approximation Algorithms

Guessing Game: NP-Complete?

Problem Set 7 Solutions

NP-complete? NP-hard? Some Foundations of Complexity. Prof. Sven Hartmann Clausthal University of Technology Department of Informatics

Graph Theory Problems and Solutions

Lecture 7: NP-Complete Problems

On the Unique Games Conjecture

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

Midterm Practice Problems

Introduction to Logic in Computer Science: Autumn 2006

Introduction to Algorithms. Part 3: P, NP Hard Problems

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms

11. APPROXIMATION ALGORITHMS

Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

One last point: we started off this book by introducing another famously hard search problem:

Simple Graphs Degrees, Isomorphism, Paths

Approximating Average Distortion of Embeddings into Line

CSC 373: Algorithm Design and Analysis Lecture 16

Complexity Theory. IE 661: Scheduling Theory Fall 2003 Satyaki Ghosh Dastidar

CAD Algorithms. P and NP

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

Euler Paths and Euler Circuits

Lecture 5 - CPA security, Pseudorandom functions

A Working Knowledge of Computational Complexity for an Optimizer

GRAPH THEORY LECTURE 4: TREES

5.1 Bipartite Matching

Lecture 1: Course overview, circuits, and formulas

Exponential time algorithms for graph coloring

CoNP and Function Problems

NP-Completeness and Cook s Theorem

Graph Theory Origin and Seven Bridges of Königsberg -Rhishikesh

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

The Classes P and NP

8.1 Min Degree Spanning Tree

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

Scheduling Shop Scheduling. Tim Nieberg

Lecture 15 An Arithmetic Circuit Lowerbound and Flows in Graphs

Polynomial and Rational Functions

Analysis of Algorithms, I

Connectivity and cuts

Algorithm Design and Analysis

Notes on NP Completeness

1. Nondeterministically guess a solution (called a certificate) 2. Check whether the solution solves the problem (called verification)

Social Media Mining. Graph Essentials

Theoretical Computer Science (Bridging Course) Complexity

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

Math 181 Handout 16. Rich Schwartz. March 9, 2010

x x y y Then, my slope is =. Notice, if we use the slope formula, we ll get the same thing: m =

Distributed Computing over Communication Networks: Maximal Independent Set

Combinatorial 5/6-approximation of Max Cut in graphs of maximum degree 3

Planar Graphs. Complement to Chapter 2, The Villas of the Bellevue

Universality in the theory of algorithms and computer science

6.3 Conditional Probability and Independence

Definition Given a graph G on n vertices, we define the following quantities:

3 Some Integer Functions

Chapter 6: Graph Theory

Steiner Tree Approximation via IRR. Randomized Rounding

Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs

Single machine parallel batch scheduling with unbounded capacity

1. Write the number of the left-hand item next to the item on the right that corresponds to it.

MATH 13150: Freshman Seminar Unit 10

How To Solve A K Path In Time (K)

Part 2: Community Detection

(Refer Slide Time: 2:03)

OHJ-2306 Introduction to Theoretical Computer Science, Fall

Network File Storage with Graceful Performance Degradation

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig

Lecture 19: Introduction to NP-Completeness Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

Math 4310 Handout - Quotient Vector Spaces

Vieta s Formulas and the Identity Theorem

Graph Theory Lecture 3: Sum of Degrees Formulas, Planar Graphs, and Euler s Theorem Spring 2014 Morgan Schreffler Office: POT 902

Computational Geometry Lab: FEM BASIS FUNCTIONS FOR A TETRAHEDRON

Lecture 17 : Equivalence and Order Relations DRAFT

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

MATHEMATICAL ENGINEERING TECHNICAL REPORTS. An Improved Approximation Algorithm for the Traveling Tournament Problem

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

17. Inner product spaces Definition Let V be a real vector space. An inner product on V is a function

Data Structures and Algorithms Written Examination

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

! X is a set of strings. ! Instance: string s. ! Algorithm A solves problem X: A(s) = yes iff s! X.

Solutions to Bulb questions

Social Media Mining. Network Measures

Pre-Algebra Lecture 6

Introduction to computer science

Triangle deletion. Ernie Croot. February 3, 2010

arxiv: v1 [cs.cg] 15 Sep 2014

BALTIC OLYMPIAD IN INFORMATICS Stockholm, April 18-22, 2009 Page 1 of?? ENG rectangle. Rectangle

Network Flow I. Lecture Overview The Network Flow Problem

Introduction to Graph Theory

Transcription:

CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to be NP-hard in Lecture 18. Our goal is to divide the vertices of an undirected graph G into two sets A and B, so as to maximize the number of edges that have one edge in A and the other in B. Here is a somewhat greedy algorithm that does reasonably well at approximating the maximum cut. Given any two sets A and B, look at an arbitrary vertex v. Suppose for the moment that v is in A. Of the edges incident to v, some go to other vertices in A and the others go to B. If more vertices go to A then B, consider what happens if we move v into B. Our score goes up one for each edge to an element of A, and goes down one for each edge to B, so all in all it goes up. Thus our algorithm starting with A = V and B =, keep switching any vertex v from A to B or vice versa as long as it will increase the number of edges from A to B. If we reach a position where there is no such v, return that cut as the output. 1

Note that there is no reason a single v might not go back and forth from A to B several times. But the algorithm must terminate, because the count of edges across the cut starts at 0, increases by at least 1 with each switch, and ends at some value that is at most e. This analysis also gives us a bound on the running time we have at most e rounds during which we might have to check all n vertices and examine all e edges, so the total time is O(e(e + n)). How closely does this algorithm approximate the maximum? Consider any A and B such that each vertex has at least as many edges to the other set as it does to its own set. That is, the fraction of cross edges at each vertex is at least 1/2. The fraction for the whole graph is a weighted average of the fractions for each edge (where the weight of each vertex is its degree), and so it must be at least 1/2. Thus we have a 2-approximation to the maximum, because the fraction of edges across the maximum cut can t be any greater than 1. 2

Can we do better? In 1995, using a different method ( semidefinite programming ), Goemans and Williamson found a poly-time way to approximate MAX-CUT within 1.1383. Can we get a poly-time approximation scheme? There is a lovely archive of known results (as of about 2000) on approximation algorithms for NP-hard problems, located at: www.nada.kth.se/ viggo/wwwcompendium There (at node85.html) we find that MAX-CUT is NP-hard to approximate within 1.0684. Like VERTEX- COVER, it is approximable to within one constant in polynomial time but not to within another constant, unless P = NP. 3

CMPSCI611: Approximating TSP Lecture 20 The traveling salesperson problem or TSP may be the most famous NP-hard optimization problem. We have a weighted complete graph G representing n cities, a solution is a Hamilton circuit of G, and our goal is to find a solution of minimum total weight. It is NP-complete to decide whether an ordinary undirected graph has a Hamilton cycle. The proof of this is rather nice given a 3-SAT instance, you construct a graph where the only way to have a cycle reaching all vertices is to pick a setting of the n variables that satisfies the formula. (Sipser has a nice presentation of this in Introduction to the Theory of Computation.) It stands to reason that comparing Hamilton paths by score would be at least as hard as finding one, and we can convert this intuition to a formal proof. 4

Let G be an undirected graph, and define a weighted complete undirected graph H with the same set of n vertices. Define the weight in H of (u, v) to be 2 if (u, v) is not an edge in G and 1 if it is. Now a Hamilton cycle in G corresponds to a Hamilton cycle in H of weight n, and any other Hamilton cycle in H has weight more than n. So the pair (H, n) is an achievable goal for TSP iff G is in the NP-complete language HAM-CYCLE. We can use this same construction to show that TSP is difficult to approximate, even within a factor of, say, n. Given G as before, we form H with weight 1 for edges of G and some weight z for non-edges of G. Then Hamilton cycles of G have weight n in H, and other Hamilton cycles of H have weight at least z + n 1. If we let z = n 2, any approximation algorithm with ratio n would have to distinguish these two cases and thus decide HAM-CYCLE for G. How bad could we make the approximation ratio? It is NP-hard to get within z/n, where z is anything we can even write down in polynomial time. 5

However, it s natural to consider the special case of TSP where the weight function is somehow reasonable. The triangle inequality is a restriction on a binary distance function d, saying that for any three vertices x, y, and z, d(x, z) d(x, y) + d(y, z). This is the defining property of a metric, so the restriction of TSP to weight functions that satisfy the triangle inequality is called Triangle-TSP or Metric TSP or MTSP. Note that our first reduction, with weight 1 for edges and 2 for non-edges, gives us a weight function on H that satisfies the triangle inequality. Thus MTSP is still an NP-hard optimization problem. 6

But it is possible to approximate MTSP to within a constant factor, using a technique based on Euler circuits rather than Hamilton circuits. Remember that an Euler circuit is one that visits all the edges in a graph. In an undirected graph, an Euler circuit exists iff the graph is connected and every node has even degree. in a directed graph, an Euler circuit exists iff the graph is strongly connected and every vertex has in-degree equal to its outdegree. For our first approximation algorithm, consider a minimum spanning tree T of the weighted complete graph H. Now view this tree as a directed graph by replacing each edge with a directed edge in each direction. The result is a strongly connected directed graph with equal in-degree and out-degree at every vertex. Let C be an Euler circuit of this graph. Note that the total weight of C is exactly twice that of T, because each edge of T appears in C exactly twice. 7

We can use this tree T and circuit C to get a relatively low-weight Hamilton circuit in H, and to analyze how close it is to the minimum weight circuit. Of course, C itself is not a Hamilton circuit because it has 2n 2 edges, not n. However, we can shorten C in terms of edges without increasing its total weight. If x, y, and z are any three consecutive vertices in C, we can replace the two edges (x, y) and (y, z) by the single edge (x, z), and the triangle inequality tells us that the total weight cannot increase. Does the resulting circuit still reach every vertex? Yes, as long as y appears somewhere else on C. Thus we get a Hamilton circuit by using such shortcuts to bypass any vertex that appears more than once, continuing as long as we can. The process stops when our circuit has only n vertices. Since the weight of C was at most twice that of T, and each bypass at worst keeps the weight the same, we have a Hamilton circuit A of weight at most w(t ). 8

But what of the optimal circuit? It exists somewhere, though we can t find it, and we can reason about it. If we remove any one edge from the optimal circuit O, we get a path, which is among other things a connected acyclic graph, a spanning tree, whose total weight is at most w(o). Since T is a minimum spanning tree, we thus know that w(t ) w(o). Since w(a) 2w(T ), we know that our approximation is within a factor of 2. 9

A simple improvement of this algorithm, due to Christofides in 1976, gets a 3/2 approximation rather than 2. Again, let T be a minimum spanning tree of the weighted connected graph H. Let D be the set of nodes that have odd degree in T there may be as few as 2 or as many as n, but there must be an even number (why?). Let M be a minimum-weight matching on D, and note that T M is now a connected undirected graph with even degree at every vertex. (Actually, T M is a multigraph in general, because there is nothing stopping an edge from being in both T and M in this case we keep two parallel copies of the edge in T M). To get our approximation A, we take T M and (if necessary) apply shortcuts to bypass vertices that occur more than once, as long as we can. This gets us to a Hamilton circuit, with n nodes and n edges. 10

How good an approximation is A to the optimal TSP tour O? As before, we know that w(t ) is at most w(o), because deleting an edge from O gives a spanning tree. What about M? M is a minimal matching on D, an even-size set. Consider the optimal TSP tour on D. Using the triangle inequality, it s easy to show that this tour has weight at most w(o). We can break this tour into sets odd-numbered and even-numbered edges, and each of these sets is a matching on D. One of them must have weight at most w(o)/2, and thus the minimum weight matching on D, M, has at most this weight. This means that the weight of T M is at most w(t ) + w(m) w(o) + w(o)/2 = 3w(O)/2. As before, the weight of A can be no greater than this, so A is at worst a 3/2 approximation to the minimum weight Hamilton circuit in H. 11

Can this be improved farther? Checking the archive again, we find no indication that it has been. The MIN-MTSP problem is listed as being APX-complete, which means that there exists some positive constant ɛ such that it is NP-hard to approximate it within 1 + ɛ. There is reference to an explicit ɛ for which this has been proved, but since no one seems to want to talk about its specific value it would seem to be very small. When people think about the TSP, and when they construct test instances of it, they often consider the Euclidean TSP problem, where the nodes are points in the Euclidean plane and the weight of an edge is the Euclidean distance between the two nodes. It turns out that this version of the TSP decision problem is still NP-hard (though technicalities arise when trying to prove it NPcomplete, involving adding square roots). 12

For Euclidean TSP, there is a polynomial time approximation scheme due to Arora. For any positive constant ɛ, there is a polynomial-time algorithm f ɛ that gets a 1+ɛ approximation. However, the running time of f ɛ depends exponentially on 1/ɛ, so this is not a fully polynomial time approximation scheme. 13