Graph Theory and Optimization Approximation Algorithms

Similar documents
Approximation Algorithms

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

Approximation Algorithms

CSE 417 Branch & Bound (pt 4) Branch & Bound

15-451/651: Design & Analysis of Algorithms November 4, 2015 Lecture #18 last changed: November 22, 2015

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

A List Heuristic for Vertex Cover

1 Unweighted Set Cover

val(y, I) α (9.0.2) α (9.0.3)

Approximation slides 1. An optimal polynomial algorithm for the Vertex Cover and matching in Bipartite graphs

1. Lecture notes on bipartite matching February 4th,

6 Randomized rounding of semidefinite programs

Algorithm Design and Analysis

Approximation Algorithms

11.1 Facility Location

The complement of PATH is in NL

Approximation Algorithms

Graph Algorithms Matching

Vertex Cover Approximations

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Integer Programming Theory

Partha Sarathi Mandal

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

Approximation Algorithms

Matching Algorithms. Proof. If a bipartite graph has a perfect matching, then it is easy to see that the right hand side is a necessary condition.

Steiner Trees and Forests

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

The k-center problem Approximation Algorithms 2009 Petros Potikas

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

1 The Traveling Salesperson Problem (TSP)

Solutions for the Exam 6 January 2014

Decision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not.

Lecture 4: Primal Dual Matching Algorithm and Non-Bipartite Matching. 1 Primal/Dual Algorithm for weighted matchings in Bipartite Graphs

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Introduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14

Lecture 14: Linear Programming II

Recitation 13. Minimum Spanning Trees Announcements. SegmentLab has been released, and is due Friday, November 17. It s worth 135 points.

1. Lecture notes on bipartite matching

Combinatorial Optimization

NP-Completeness. Algorithms

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

Basic Approximation algorithms

Questions? You are given the complete graph of Facebook. What questions would you ask? (What questions could we hope to answer?)

Lecture 7. s.t. e = (u,v) E x u + x v 1 (2) v V x v 0 (3)

Important separators and parameterized algorithms

Outline. CS38 Introduction to Algorithms. Approximation Algorithms. Optimization Problems. Set Cover. Set cover 5/29/2014. coping with intractibility

Approximation Algorithms

CSE 417 Network Flows (pt 4) Min Cost Flows

Topic: Local Search: Max-Cut, Facility Location Date: 2/13/2007

6.842 Randomness and Computation September 25-27, Lecture 6 & 7. Definition 1 Interactive Proof Systems (IPS) [Goldwasser, Micali, Rackoff]

Fall CS598CC: Approximation Algorithms. Chandra Chekuri

Introduction to Optimization

Lecture 10,11: General Matching Polytope, Maximum Flow. 1 Perfect Matching and Matching Polytope on General Graphs

Notes for Lecture 24

MVE165/MMG630, Applied Optimization Lecture 8 Integer linear programming algorithms. Ann-Brith Strömberg

Complexity and approximation of satisfactory partition problems

Algorithms for Euclidean TSP

Solutions to Assignment# 4

The Ordered Covering Problem

Approximation of satisfactory bisection problems

P vs. NP. Simpsons: Treehouse of Horror VI

11. APPROXIMATION ALGORITHMS

COMP260 Spring 2014 Notes: February 4th

4 Greedy Approximation for Set Cover

Fundamentals of Integer Programming

Chapter 10 Part 1: Reduction

Outline. 1 The matching problem. 2 The Chinese Postman Problem

Algorithmic Problems Related to Internet Graphs

Approximation Basics

Introduction to Graph Theory

CS612 Algorithms for Electronic Design Automation

PTAS for Matroid Matching

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

On the Max Coloring Problem

Polynomial-Time Approximation Algorithms

Number Theory and Graph Theory

Network Design Foundations Fall 2011 Lecture 10

Online Algorithms. Lecture 11

A 2k-Kernelization Algorithm for Vertex Cover Based on Crown Decomposition

11. APPROXIMATION ALGORITHMS

Design and Analysis of Algorithms (VII)

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

CMSC 451: Lecture 22 Approximation Algorithms: Vertex Cover and TSP Tuesday, Dec 5, 2017

Welcome to the course Algorithm Design

Graph Contraction. Graph Contraction CSE341T/CSE549T 10/20/2014. Lecture 14

Reductions and Satisfiability

AMS /672: Graph Theory Homework Problems - Week V. Problems to be handed in on Wednesday, March 2: 6, 8, 9, 11, 12.

6.856 Randomized Algorithms

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 14: Combinatorial Problems as Linear Programs I. Instructor: Shaddin Dughmi

Iterative Methods in Combinatorial Optimization. R. Ravi Carnegie Bosch Professor Tepper School of Business Carnegie Mellon University

8 NP-complete problem Hard problems: demo

The Design of Approximation Algorithms

3 INTEGER LINEAR PROGRAMMING

3 No-Wait Job Shops with Variable Processing Times

Chapter 5 Graph Algorithms Algorithm Theory WS 2012/13 Fabian Kuhn

Foundations of Computing

4 Integer Linear Programming (ILP)

The Maximum Clique Problem

Prove, where is known to be NP-complete. The following problems are NP-Complete:

Transcription:

Graph Theory and Optimization Approximation Algorithms Nicolas Nisse Université Côte d Azur, Inria, CNRS, I3S, France October 2018 Thank you to F. Giroire for some of the slides N. Nisse Graph Theory and applications 1/19

Motivation Goal: Find good solutions for difficult problems (NP-hard). Be able to quantify the goodness of the given solution. Presentation of a technique to get approximation algorithms: fractional relaxation of integer linear programs. N. Nisse Graph Theory and applications 2/19

Outline 1 Approximation Algorithms 2 Example: Max. Matching vs. Min. Vertex Cover 3 Approximation algorithms using Fractional Relaxation Vertex Cover Set Cover N. Nisse Graph Theory and applications 3/19

Approximation Algorithms Π a maximization Problem c-approximation for Π 1 < c constant or depends on input length deterministic polynomial-time algorithm A for any input I, A returns a solution with value at least OPT (I)/c. Π a minimization Problem c-approximation for Π 1 < c constant or depends on input length deterministic polynomial-time algorithm A for any input I, A returns a solution with value at most c OPT (I). N. Nisse Graph Theory and applications 4/19

Approximation Algorithms Definition: An approximation algorithm produces in polynomial time a feasible solution whose objective function value is close to the optimal OPT, by close we mean within a guaranteed factor of the optimal. Example: a factor 2 approximation algorithm for the cardinality vertex cover problem, i.e. an algorithm that finds a cover of cost 2 OPT in time polynomial in V. N. Nisse Graph Theory and applications 5/19

Outline 1 Approximation Algorithms 2 Example: Max. Matching vs. Min. Vertex Cover 3 Approximation algorithms using Fractional Relaxation Vertex Cover Set Cover N. Nisse Graph Theory and applications 6/19

Approx: Max. Matching vs. Min. Vertex Cover Let G = (V,E) be a graph Matching: set M of pairwise disjoint edges in a graph (M E) Compute a Max. Matching is polynomial-time solvable [Edmonds 1965] Vertex Cover: set K V such that e E, e K /0 set of vertices that touch" every edge Compute a Min. Vertex Cover is NP-complete [Garey,Johnson 1979] N. Nisse Graph Theory and applications 7/19

Approx: Max. Matching vs. Min. Vertex Cover Let G = (V,E) be a graph Matching: set M of pairwise disjoint edges in a graph (M E) Compute a Max. Matching is polynomial-time solvable [Edmonds 1965] Vertex Cover: set K V such that e E, e K /0 set of vertices that touch" every edge Compute a Min. Vertex Cover is NP-complete [Garey,Johnson 1979] Exercise: Prove that for any graph G, maxmatching(g) mincover(g) 2 maxmatching(g) Deduce a (polynomial-time) 2-approximation algorithm for computing mincover(g) N. Nisse Graph Theory and applications 7/19

Approx: Max. Matching vs. Min. Vertex Cover Solution of previous exercise Theorem: for any graph G maxmatching(g) mincover(g) 2 maxmatching(g) Proof: Let K V be a cover of G and M E be a matching of G. By definition of K : K e /0 for any e M Moreover, by definition of M, e f = /0 for any e,f M M K. Let M E be a maximum matching of G Then K = {v e M,v e} is a cover of G (if not, M is not maximum) mincover(g) K = 2 M N. Nisse Graph Theory and applications 8/19

Outline 1 Approximation Algorithms 2 Example: Max. Matching vs. Min. Vertex Cover 3 Approximation algorithms using Fractional Relaxation Vertex Cover Set Cover N. Nisse Graph Theory and applications 9/19

Approximation via Fractional Relaxation Reminder: Idea: Integer Linear Programs often hard to solve (NP-hard). Linear Programs (with real numbers) easier to solve (polynomial-time algorithms). 1- Relax the integrality constraints; 2- Solve the (fractional) linear program and then; 3- Round the solution to obtain an integral solution. N. Nisse Graph Theory and applications 10/19

2-Approximation for Vertex Cover using LP Let G = (V,E) be a graph Vertex Cover: set K V such that e E, e K /0 set of vertices that touch" every edge Integer Linear programme (ILP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v {0,1} v V Fractional relaxation (LP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v 0 v V Exercise: Prove that the LP has an half-integral optimal solution (i.e., x v {0,1/2,1}) Exercise: Deduce a 2-approximation algorithm for Min. Vertex Cover N. Nisse Graph Theory and applications 11/19

2-Approximation for Vertex Cover using LP Let G = (V,E) be a graph Vertex Cover: set K V such that e E, e K /0 set of vertices that touch" every edge Integer Linear programme (ILP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v {0,1} v V Fractional relaxation (LP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v 0 v V Exercise: Prove that the LP has an half-integral optimal solution (i.e., x v {0,1/2,1}) Exercise: Deduce a 2-approximation algorithm for Min. Vertex Cover N. Nisse Graph Theory and applications 11/19

2-Approximation for Vertex Cover using LP Let G = (V,E) be a graph Vertex Cover: set K V such that e E, e K /0 set of vertices that touch" every edge Integer Linear programme (ILP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v {0,1} v V Fractional relaxation (LP): Min. x v v V s.t.: x v + x u 1 {u,v} E x v 0 v V Exercise: Prove that the LP has an half-integral optimal solution (i.e., x v {0,1/2,1}) Exercise: Deduce a 2-approximation algorithm for Min. Vertex Cover N. Nisse Graph Theory and applications 11/19

2-Approximation for Vertex Cover using LP Theorem: Fractional Vertex Cover has an half-integral optimal solution Proof: y: optimal solution with the largest number of coordinates in {0, 1/2, 1}. For purpose of contradiction: y not half-integral: Set ε = min{y v, y v 1 2,1 y v v V and y v / {0,1/2,1}}. Consider y and y, feasible solutions, defined as follows: y v ε, if 0 < y v < 1 y v 2, = y v + ε, if 1 2 < y v < 1, y v, otherwise. and y v = y v + ε, if 0 < y v < 1 2, y v ε, if 1 2 < y v < 1, y v, otherwise. v V y v = 1 2 ( v V y v + v V y v ). y and y are also optimal solutions. By choice of ε, y and y has more coordinates in {0,1/2,1} than y, a contradiction. Theorem: 2-Approximation of Vertex Cover Proof: First solve FRACTIONAL VERTEX COVER and derive an half-integral optimal solution y f to it. Define y by y v = 1 if and only if y f v {1/2;1}, i.e., y v = y f v Clearly, y is an admissible solution of VERTEX COVER. Moreover, by definition y v 2 yv f = 2 ν f (G) 2 ν(g). v V v V N. Nisse Graph Theory and applications 12/19

Set Cover Problem: Given a universe U of n elements, a collection of subsets of U, = S 1,...,S k, and a cost function c : S Q +, find a minimum cost subcollection of S that covers all elements of U. Model numerous classical problems as special cases of set cover: vertex cover, minimum cost shortest path... Definition: The frequency of an element is the number of sets it is in. The frequency of the most frequent element is denoted by f. Various approximation algorithms for set cover achieve one of the two factors O(logn) or f. N. Nisse Graph Theory and applications 13/19

Fractional relaxation Write a linear program to solve set cover. Var.: x S = 1 if S picked in C, x S = 0 otherwise Var.: 1 x S 0 min S c(s)x S min S c(s)x S s. t. S:e S x S 1 ( e U) x S {0,1} ( S ) s. t. S:e S x S 1 ( e U) x S 0 ( S ) N. Nisse Graph Theory and applications 14/19

Fractional relaxation Write a linear program to solve set cover. Var.: x S = 1 if S picked in C, x S = 0 otherwise Var.: 1 x S 0 min S c(s)x S min S c(s)x S s. t. S:e S x S 1 ( e U) x S {0,1} ( S ) s. t. S:e S x S 1 ( e U) x S 0 ( S ) N. Nisse Graph Theory and applications 14/19

Fractional relaxation Write a linear program to solve set cover. Var.: x S = 1 if S picked in C, x S = 0 otherwise Var.: 1 x S 0 min S c(s)x S min S c(s)x S s. t. S:e S x S 1 ( e U) x S {0,1} ( S ) s. t. S:e S x S 1 ( e U) x S 0 ( S ) N. Nisse Graph Theory and applications 14/19

Fractional relaxation The (fractional) optimal solution of the relaxation is a lower bound of the optimal solution of the original integer linear program. Example in which a fractional set cover may be cheaper than the optimal integral set cover: Input: U = {e,f,g} and the specified sets S 1 = {e,f}, S 2 = {f,g}, S 3 = {e,g}, each of unit cost. An integral cover of cost 2 (must pick two of the sets). A fractional cover of cost 3/2 (each set picked to the extent of 1/2). N. Nisse Graph Theory and applications 15/19

Fractional relaxation The (fractional) optimal solution of the relaxation is a lower bound of the optimal solution of the original integer linear program. Example in which a fractional set cover may be cheaper than the optimal integral set cover: Input: U = {e,f,g} and the specified sets S 1 = {e,f}, S 2 = {f,g}, S 3 = {e,g}, each of unit cost. An integral cover of cost 2 (must pick two of the sets). A fractional cover of cost 3/2 (each set picked to the extent of 1/2). N. Nisse Graph Theory and applications 15/19

A simple rounding algorithm Algorithm: 1- Find an optimal solution to the LP-relaxation. 2- (Rounding) Pick all sets S for which x S 1/f in this solution. N. Nisse Graph Theory and applications 16/19

Theorem: The algorithm achieves an approximation factor of f for the set cover problem. Proof: To be proved: 1) All elements are covered. 2) The cover returned by the algorithm is of cost at most f OPT Proofs: proof of 1) All elements are covered. e is in at most f sets, thus one of this set must be picked to the extent of at least 1/f in the fractional cover. proof of 2) The rounding process increases x S by a factor of at most f. Therefore, the cost of C is at most f times the cost of the fractional cover. OPT f OPT f OPT f N. Nisse Graph Theory and applications 17/19

Theorem: The algorithm achieves an approximation factor of f for the set cover problem. Proof: To be proved: 1) All elements are covered. 2) The cover returned by the algorithm is of cost at most f OPT Proofs: proof of 1) All elements are covered. e is in at most f sets, thus one of this set must be picked to the extent of at least 1/f in the fractional cover. proof of 2) The rounding process increases x S by a factor of at most f. Therefore, the cost of C is at most f times the cost of the fractional cover. OPT f OPT f OPT f N. Nisse Graph Theory and applications 17/19

Theorem: The algorithm achieves an approximation factor of f for the set cover problem. Proof: To be proved: 1) All elements are covered. 2) The cover returned by the algorithm is of cost at most f OPT Proofs: proof of 1) All elements are covered. e is in at most f sets, thus one of this set must be picked to the extent of at least 1/f in the fractional cover. proof of 2) The rounding process increases x S by a factor of at most f. Therefore, the cost of C is at most f times the cost of the fractional cover. OPT f OPT f OPT f N. Nisse Graph Theory and applications 17/19

Theorem: The algorithm achieves an approximation factor of f for the set cover problem. Proof: To be proved: 1) All elements are covered. 2) The cover returned by the algorithm is of cost at most f OPT Proofs: proof of 1) All elements are covered. e is in at most f sets, thus one of this set must be picked to the extent of at least 1/f in the fractional cover. proof of 2) The rounding process increases x S by a factor of at most f. Therefore, the cost of C is at most f times the cost of the fractional cover. OPT f OPT f OPT f N. Nisse Graph Theory and applications 17/19

Randomized rounding Idea: View the optimal fractional solutions as probabilities. Algorithm: Flip coins with biases and round accordingly (S is in the cover with probability x S ). Repeat the rouding O(log n) times. This leads to an O(log n) factor randomized approximation algorithm. That is The set is covered with high probability. The cover has expected cost: O(log n)opt. N. Nisse Graph Theory and applications 18/19

Take Aways Fractional relaxation is a method to obtain for some problems: Lower bounds on the optimal solution of an integer linear program (minimization). Remark: Used in Branch & Bound algorithms to cut branches. Polynomial approximation algorithms (with rounding). Complexity: Integer linear programs are often hard. (Fractional) linear programs are quicker to solve (polynomial time). N. Nisse Graph Theory and applications 19/19