Approximation Basics

Similar documents
Fundamentals of optimization problems

Lecture 11 October 7, 2013

Approximation Preserving Reductions

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

Dual fitting approximation for Set Cover, and Primal Dual approximation for Set Cover

Notes for Lecture 2. Statement of the PCP Theorem and Constraint Satisfaction

Poly-APX- and PTAS-completeness in standard and differential approximation

Some Open Problems in Approximation Algorithms

Some Open Problems in Approximation Algorithms

K-center Hardness and Max-Coverage (Greedy)

Solutions to Exercises

Lecture 6,7 (Sept 27 and 29, 2011 ): Bin Packing, MAX-SAT

Lec. 2: Approximation Algorithms for NP-hard Problems (Part II)

Variants of MAX WEIGHTED SAT and MIN WEIGHTED SAT have been considered in the literature, dened by making restrictions on the size of the clauses in t

PCP Course; Lectures 1, 2

a 1 a 2 a 3 a 4 v i c i c(a 1, a 3 ) = 3

A An Overview of Complexity Theory for the Algorithm Designer

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming

Lecture 20: LP Relaxation and Approximation Algorithms. 1 Introduction. 2 Vertex Cover problem. CSCI-B609: A Theorist s Toolkit, Fall 2016 Nov 8

CO759: Algorithmic Game Theory Spring 2015

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

Complexity of determining the most vital elements for the 1-median and 1-center location problems

Asymptotic Polynomial-Time Approximation (APTAS) and Randomized Approximation Algorithms

On the efficient approximability of constraint satisfaction problems

Approximation Algorithms and Hardness of Approximation. IPM, Jan Mohammad R. Salavatipour Department of Computing Science University of Alberta

Lecture 4: NP and computational intractability

Lecture 15 (Oct 6): LP Duality

COSC 341: Lecture 25 Coping with NP-hardness (2)

EECS 495: Combinatorial Optimization Lecture Manolis, Nima Mechanism Design with Rounding

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Topics in Theoretical Computer Science April 08, Lecture 8

Linear Programming. Scheduling problems

P,NP, NP-Hard and NP-Complete

The Knapsack Problem. 28. April /44

1 Primals and Duals: Zero Sum Games

Approximability preserving reduction

Lecture 13 March 7, 2017

9. Submodular function optimization

APPROXIMATION FOR DOMINATING SET PROBLEM WITH MEASURE FUNCTIONS

More Approximation Algorithms

Topic: Balanced Cut, Sparsest Cut, and Metric Embeddings Date: 3/21/2007

Welcome to... Problem Analysis and Complexity Theory , 3 VU

Notes on Dantzig-Wolfe decomposition and column generation

Approximation algorithm for Max Cut with unit weights

Some Open Problems in Approximation Algorithms

Polynomial kernels for constant-factor approximable problems

Discrete (and Continuous) Optimization WI4 131

A Robust APTAS for the Classical Bin Packing Problem

From Primal-Dual to Cost Shares and Back: A Stronger LP Relaxation for the Steiner Forest Problem

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

Structure in Approximation Classes 2 able to come back from \good" solutions for B to \good" solutions for A. Surprisingly, the rst denition of this k

Machine scheduling with resource dependent processing times

Multiple Sequence Alignment: Complexity, Gunnar Klau, January 12, 2006, 12:

Knapsack. Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i

Hardness of Approximation

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

NP-Completeness. f(n) \ n n sec sec sec. n sec 24.3 sec 5.2 mins. 2 n sec 17.9 mins 35.

Approximation complexity of min-max (regret) versions of shortest path, spanning tree, and knapsack

Provable Approximation via Linear Programming

Approximating maximum satisfiable subsystems of linear equations of bounded width

Introduction to Bin Packing Problems

How to Cope with NP-Completeness

This means that we can assume each list ) is

Discrepancy Theory in Approximation Algorithms

Keywords. Approximation Complexity Theory: historical remarks. What s PCP?

Approximation Algorithms for Maximum. Coverage and Max Cut with Given Sizes of. Parts? A. A. Ageev and M. I. Sviridenko

Now just show p k+1 small vs opt. Some machine gets k=m jobs of size at least p k+1 Can also think of it as a family of (1 + )-approximation algorithm

Complexity Classes IV

Network Design and Game Theory Spring 2008 Lecture 2

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

NP-Complete Reductions 1

Integer Linear Programs

Lecture 18: PCP Theorem and Hardness of Approximation I

Approximation Algorithms for the Incremental Knapsack Problem via Disjunctive Programming

A primal-dual schema based approximation algorithm for the element connectivity problem

BBM402-Lecture 20: LP Duality

Lecturer: Shuchi Chawla Topic: Inapproximability Date: 4/27/2007

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003

The Complexity and Approximability of Finding. Maximum Feasible Subsystems of Linear Relations. Abstract

NP Completeness and Approximation Algorithms

8 Knapsack Problem 8.1 (Knapsack)

The Steiner k-cut Problem

1 The Knapsack Problem

Approximation of min-max and min-max regret versions of some combinatorial optimization problems

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

On the Tightness of an LP Relaxation for Rational Optimization and its Applications

CS 583: Approximation Algorithms: Introduction

Chapter 34: NP-Completeness

Today: Linear Programming (con t.)

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Lecture 4. 1 FPTAS - Fully Polynomial Time Approximation Scheme

APTAS for Bin Packing

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Lecture 1 : Probabilistic Method

Computability and Complexity Theory

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

Convex and Semidefinite Programming for Approximation

Transcription:

Approximation Basics, Concepts, and Examples Xiaofeng Gao Department of Computer Science and Engineering Shanghai Jiao Tong University, P.R.China Fall 2012 Special thanks is given to Dr. Guoqiang Li for sharing his teaching materials. Fall, 2012 Xiaofeng Gao Approximation Basics 1/34

Outline History Books 1 History Books 2 NP Optimization Definition of Approximation 3 Fall, 2012 Xiaofeng Gao Approximation Basics 2/34

History of Approximation History Books 1966 Graham: First analyzed algorithms by approximation ratio 1971 Cook: Gave the concepts of NP-Completeness 1972 Karp: Introduced plenty NP-Hard combinatorial optimization problems 1970 s Approximation became a popular research area 1979 Garey & Johnson: Computers and Intractability: A guide to the Theory of NP-Completeness Fall, 2012 Xiaofeng Gao Approximation Basics 3/34

Books History Books CS 351 Stanford Univ (1991-1992) Rajeev Motwani Lecture Notes on Volumn I (1997) Hochbaum (Editor) for NP-Hard Problems (1999) Ausiello, Crescenizi, Gambosi, etc. Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties Fall, 2012 Xiaofeng Gao Approximation Basics 4/34

Books (2) History Books (2001) Vijay V. Vazirani (2010) D.P. Williamson & D.B. Shmoys The Design of (2012) D.Z Du, K-I. Ko & X.D. Hu Design and Analysis of Fall, 2012 Xiaofeng Gao Approximation Basics 5/34

Hardness History Books There are not much hardness results until 1990s... Theorem (PCP Theorem, ALMSS 92) There is no PTAS for MAX-3SAT unless P = NP ALMSS: Arora, Lund, Motwani, Sudan, and Szegedy Conjecture (Unique Games Conjecture, Knot 02) The Unique Game is NP-hard to approximate for any constant ratio. Subhash Khot Fall, 2012 Xiaofeng Gao Approximation Basics 6/34

Outline NP Optimization Definition of Approximation 1 History Books 2 NP Optimization Definition of Approximation 3 Fall, 2012 Xiaofeng Gao Approximation Basics 7/34

NP Optimization Problem NP Optimization Definition of Approximation Definition A NP Optimization Problem P is a fourtuple (I, sol, m, goal) s.t. I is the set of the instances of A and is recognizable in polynomial time. Given an instance x of I, sol(x) is the set of short feasible solutions of x and x and y such that y p( x ), it is decidable in polynomial time whether y sol(x). Given an instance x and a feasible solution y of x, m(x, y) is a polynomial time computable measure function providing a positive integer which is the value of y. goal {max, min} denotes maximization or minimization. Fall, 2012 Xiaofeng Gao Approximation Basics 8/34

NP Optimization Definition of Approximation An Example of NP Optimization Problem Example Given a graph G = (V, E), the Minimum Vertex Cover problem (MVC) is to find a vertex cover of minimum size, that is, a minimum node subset U V such that, for each edge (v i, v j ) E, either v i U or v j U. Justification MVC is an NP Optimization Problem I = {G = (V, E) G is a graph}; poly-time decidable sol(g) = {U V (v i, v j ) E[v i U v j U]}; short feasible solution set and poly-time decidable m(g, U) = U ; poly-time computable function goal = min. Fall, 2012 Xiaofeng Gao Approximation Basics 9/34

NPO Class NP Optimization Definition of Approximation Definition (NPO Class) The class NPO is the set of all NP optimization problems. Definition (Goal of NPO Problem) The goal of an NPO problem with respect to an instance x is to find an optimum solution, that is, a feasible solution y such that m(x, y) = goal{m(x, y ) : y sol(x)}. Fall, 2012 Xiaofeng Gao Approximation Basics 10/34

NP Optimization Definition of Approximation What is Approximation Algorithm? Definition Given an NP optimization problem A = (I, sol, m, goal), an algorithm A is an approximation algorithm for P if, for any given instance x I, it returns an approximate solution, that is a feasible solution A(x) sol(x) with guaranteed quality. Guaranteed quality is the difference between approximation and heuristics. Approximation for PO, NPO and NP-hard Optimization. Decision, Optimization, and Constructive Problems. Fall, 2012 Xiaofeng Gao Approximation Basics 11/34

r-approximation NP Optimization Definition of Approximation Definition (Approximation Ratio) Let P be an NPO problem. Given an instance x and a feasible solution y of x, we define the performance ratio of y with respect to x as { m(x, y) R(x, y) = max opt(x), opt(x) }. m(x, y) Definition (r-approximation) Given an optimization problem P and an approximation algorithm A for P, A is said to be an r-approximation for P if, given any input instance x of P, the performance ratio of the approximate solution A(x) is bounded by r, say, R(x, A(x)) r. Fall, 2012 Xiaofeng Gao Approximation Basics 12/34

APX Class NP Optimization Definition of Approximation Definition (F-APX) Given a class of functions F, an NPO problem P belongs to the class F-APX if an r-approximation polynomial time algorithm A for P exists, for some function r F. Example F is constant functions P APX. F is O(log n) functions P log-apx. F is O(n k ) functions (polynomials) p poly-apx. F is O(2 nk ) functions P exp-apx. Fall, 2012 Xiaofeng Gao Approximation Basics 13/34

Special Case NP Optimization Definition of Approximation Definition (Polynomial Time Approximation Scheme PTAS) An NPO problem P belongs to the class PTAS if an algorithm A exists such that, for any rational value ǫ > 0, when applied A to input (x,ǫ), it returns an (1+ǫ)-approximate solution of x in time polynomial in x. Definition (Fully PTAS FPTAS) An NPO problem P belongs to the class FPTAS if an algorithm A exists such that, for any rational value ǫ > 0, when applied A to input (x,ǫ), it returns a (1+ǫ)-approximate solution of x in time polynomial both in x and in 1 ǫ. Fall, 2012 Xiaofeng Gao Approximation Basics 14/34

Approximation Class Inclusion NP Optimization Definition of Approximation If P NP, then FPTAS PTAS APX Log-APX Poly-APX Exp-APX NPO Constant-Factor Approximation (APX) Reduce App. Ratio Reduce Time Complexity PTAS ((1+ǫ)-Appx) Test Existence Reduce Time Complexity Fall, 2012 Xiaofeng Gao Approximation Basics 15/34

Outline 1 History Books 2 NP Optimization Definition of Approximation 3 Fall, 2012 Xiaofeng Gao Approximation Basics 16/34

Problem Problem Instance: Given a ground set of elements E = {e 1, e 2,, e n }, subsets of elements S = {S 1,, S m } where each S j E, and a nonnegative weight w j 0 for each subset S j. Solution: A subset I {1, 2,, m} such that j I S j = E. Measure: j I w j. If w j = 1 for each subset S j, then it is unweighted set cover. Fall, 2012 Xiaofeng Gao Approximation Basics 17/34

Application in Networking Definition (Sensor Coverage) s 6 s 1 s 5 2 1 12 11 9 4 5 8 3 14 7 10 13 6 s 2 s 4 s 3 Given a target region with sensor set S = {S 1,..., S k }, find a minimum subset R of S to cover all the target region. S 1 = {7, 9, 11, 12, 13, 14}, S 2 = {6, 9, 13}, S 3 = {3, 6, 7, 8, 10, 13, 14}, S 4 = {3, 4, 5}, S 5 = {2, 1, 3, 4, 8, 12, 14} and S 6 = {2}. Find {S i } to cover T = {1,, 14}. Fall, 2012 Xiaofeng Gao Approximation Basics 18/34

The Goal of Greedy Algorithm Given: An instance of the problem specifies a set of items Goal: Determine a subset of the items that satisfies the problem constraints Maximize or minimize the measure function Steps: Sort the items according to some criterion Incrementally build the solution starting from the empty set Consider items one at a time, and maintain a set of selected" items Terminate when break the problem constraints Fall, 2012 Xiaofeng Gao Approximation Basics 19/34

Greedy Algorithm of Algorithm 1 Greedy Input: E, S, W. Output: Subset I {1, 2,, m} such that j I S j = E. 1: I = ; 2: j : Ŝj = S j ; Ŝj: compute average remaining weight 3: while E do 4: i = arg min j:ŝj w j Ŝj ; 5: I = I {i}; 6: E = E\S i ; 7: j : Ŝj = Ŝj\S i ; 8: end while 9: Return I. Fall, 2012 Xiaofeng Gao Approximation Basics 20/34

Time Complexity Theorem Greedy has time complexity O(m 2 ). Proof. (1) There cannot be more than m round. (2) In each round we compute O(m) ratios, each in constant time. Thus the total running time is O(m 2 ). Fall, 2012 Xiaofeng Gao Approximation Basics 21/34

Preliminaries Definition (Harmonic Number) H k = 1+ 1 2 + 1 3 + 1 4 + + 1 k. H k ln k Theorem Given positive numbers a 1,, a k and b 1,, b k, then a k min i i=1 a i i=1,,k b k i i=1 b i a max i. i=1,,k b i Fall, 2012 Xiaofeng Gao Approximation Basics 22/34

Approximation Ratio Theorem Greedy is an H n -approximation. Proof. (1) Consider the weight of each element. (2) Consider the weight of each iteration. (3) Combination and Relaxation. Fall, 2012 Xiaofeng Gao Approximation Basics 23/34

Notations OPT: The weight of the optimal solution. O: The indices of sets in an optimal solution. n k : The number of elements that remain uncovered at the start of the kth iteration. l: Algorithm terminates in l iterations. n 1 = n, n l+1 = 0. I k : Indices of sets chosen in iterations 1 to k 1. Ŝ j : The set of uncovered elements in S j at the start of the kth iteration. Ŝj = S j p I k S p Fall, 2012 Xiaofeng Gao Approximation Basics 24/34

One Iteration Lemma For the set j chosen in the kth iteration, w j n k n k+1 n k OPT. Proof. min j:ŝj w j Ŝj i O w i i O OPT OPT =. Ŝi Ŝi n k Let j be the chosen set, if we add S j into our solution, then there will be Ŝj fewer uncovered elements, so n k+1 = n k Ŝj. Thus i O w j Ŝj OPT = n k n k+1 OPT. n k n k Fall, 2012 Xiaofeng Gao Approximation Basics 25/34

Merging Together j I w j l k=1 OPT = OPT n k n k+1 OPT n k l k=1 n i=1 = H n OPT. ( 1 + 1 ) n k n k 1 + + 1 n k+1 + 1 1 i Fall, 2012 Xiaofeng Gao Approximation Basics 26/34

Tight Example (1) Greedy solution: 1 n + 1 n 1 + +1 = H n; (2) OPT solution: 1+ǫ. Fall, 2012 Xiaofeng Gao Approximation Basics 27/34

The Goal Since a LP can be solved in polynomial time, given a hard combinatorial optimization problem P, we don t expect to a LP formulation s.t. for any instance x P, the number of constraints of the LP is polynomial in size of x (this would imply P=NP!!) LP can be used as a computational step in the design of approximation algorithm. Integer Linear Programming (ILP) Primal-Dual Algorithm Fall, 2012 Xiaofeng Gao Approximation Basics 28/34

The Steps of Given: An instance of the problem specifies a set of items Goal: Maximize or minimize the measure function Steps: Construct an Integer Program (IP) for discrete optimization problem OPT solution. Relax IP to Linear Program (LP) A polynomial-solvable solution (may not be feasible). Every feasible solution for IP is feasible for LP; The value of any feasible solution for IP has the same value in LP. Round LP solution to a feasible solution. Fall, 2012 Xiaofeng Gao Approximation Basics 29/34

Integer Program { 1 If we select the index of Sj into I. Define x j = 0 otherwise. The Integer Program IP(S) can be formulated as: minimize subject to m w j x j j=1 j:e i S j x j 1, i = 1,, n x j {0, 1}, j = 1,, m Fall, 2012 Xiaofeng Gao Approximation Basics 30/34

Relaxation The relaxed Linear Program LP(S) can be formulated as: minimize subject to m w j x j j=1 j:e i S j x j 1, i = 1,, n x j 0, j = 1,, m Define ZIP as the optimum value of IP(S), Z LP value of LP(S), then we have the optimum Z LP Z IP = OPT. Fall, 2012 Xiaofeng Gao Approximation Basics 31/34

Deterministic Rounding Let f = max i=1,,n f i, (f i = {j : e i S j } ). x the optimal solution of LP(S). Algorithm 2 Deterministic Rounding for LP(S) Input: x, f. Output: x for IP(S). 1: for j = 1 to n do 2: x j = { 3: end for 4: Return x. 1 If x j 1 f. 0 otherwise. Fall, 2012 Xiaofeng Gao Approximation Basics 32/34

Feasible Solution Lemma LP rounding outputs a feasible solution for IP(S). Proof. We call e i is covered if j, s.t. e i S j and x j = 1 in x. Since x is feasible to LP(S), xj 1 for e i. j:e i S j By the definition of f and f i, there are f i f terms in the sum, so at lease one term must be at least 1 f. Thus j such that e i S j and x j 1 f. x j = 1 in x. Fall, 2012 Xiaofeng Gao Approximation Basics 33/34

Approximation Ratio Theorem LP(S)+rounding is an f -approximation for problem. Proof. f xj 1 for each j I and fw j xj 0 for j = 1,, m. m w j w j (f xj ) j I = f j=1 m j=1 w j x j = f Z LP f OPT. Fall, 2012 Xiaofeng Gao Approximation Basics 34/34