COMP 355 Advanced Algorithms Approximation Algorithms: VC and TSP Chapter 11 (KT) Section (CLRS)

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

Coping with NP-Completeness

CS 4407 Algorithms. Lecture 8: Circumventing Intractability, using Approximation and other Techniques

Lecture 8: The Traveling Salesman Problem

Approximation Algorithms

Theorem 2.9: nearest addition algorithm

Approximation Algorithms

Algorithm Design and Analysis

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

Module 6 NP-Complete Problems and Heuristics

35 Approximation Algorithms

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

Introduction to Approximation Algorithms

Stanford University CS261: Optimization Handout 1 Luca Trevisan January 4, 2011

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

Module 6 P, NP, NP-Complete Problems and Approximation Algorithms

Approximation Algorithms

Module 6 NP-Complete Problems and Heuristics

Partha Sarathi Mandal

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

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

Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, Approximation Algorithms

1 Variations of the Traveling Salesman Problem

Notes for Lecture 24

Module 6 NP-Complete Problems and Heuristics

COMP Analysis of Algorithms & Data Structures

CS261: A Second Course in Algorithms Lecture #16: The Traveling Salesman Problem

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

Greedy algorithms Or Do the right thing

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

Advanced Methods in Algorithms HW 5

Traveling Salesperson Problem (TSP)

1 Better Approximation of the Traveling Salesman

1 The Traveling Salesperson Problem (TSP)

The complement of PATH is in NL

Vertex Cover Approximations

CSE 548: Analysis of Algorithms. Lecture 13 ( Approximation Algorithms )

APPROXIMATION ALGORITHMS FOR GEOMETRIC PROBLEMS

Approximation Algorithms

Copyright 2000, Kevin Wayne 1

Dynamic programming. Trivial problems are solved first More complex solutions are composed from the simpler solutions already computed

Lecture 1. 2 Motivation: Fast. Reliable. Cheap. Choose two.

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

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

31.6 Powers of an element

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

Graphs: Introduction. Ali Shokoufandeh, Department of Computer Science, Drexel University

Notes for Recitation 9

Optimal tour along pubs in the UK

NP-Hard (A) (B) (C) (D) 3 n 2 n TSP-Min any Instance V, E Question: Hamiltonian Cycle TSP V, n 22 n E u, v V H

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

CMPSCI611: Approximating SET-COVER Lecture 21

Approximation Algorithms

2 Approximation Algorithms for Metric TSP

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

Travelling Salesman Problem. Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij

Approximation Algorithms

Coping with the Limitations of Algorithm Power Exact Solution Strategies Backtracking Backtracking : A Scenario

(Refer Slide Time: 01:00)

1 The Traveling Salesman Problem

Chapter 9 Graph Algorithms

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

Questions... How does one show the first problem is NP-complete? What goes on in a reduction? How hard are NP-complete problems?

What Can We Do? CS125 Lecture 20 Fall 2014

Solutions for the Exam 6 January 2014

P and NP (Millenium problem)

SLS Methods: An Overview

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

Notes 4 : Approximating Maximum Parsimony

Chapter 9 Graph Algorithms

Assignment 5: Solutions

Basic Approximation algorithms

Slides on Approximation algorithms, part 2: Basic approximation algorithms

Approximation Algorithms

11. APPROXIMATION ALGORITHMS

1 The Traveling Salesman Problem

Traveling Salesman Problem. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

The k-center problem Approximation Algorithms 2009 Petros Potikas

Fall CS598CC: Approximation Algorithms. Chandra Chekuri

More NP-complete Problems. CS255 Chris Pollett May 3, 2006.

NP-Complete Reductions 2

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

V1.0: Seth Gilbert, V1.1: Steven Halim August 30, Abstract. d(e), and we assume that the distance function is non-negative (i.e., d(x, y) 0).

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

CS154, Lecture 18: PCPs, Hardness of Approximation, Approximation-Preserving Reductions, Interactive Proofs, Zero-Knowledge, Cold Fusion, Peace in

11.1 Facility Location

Introduction to Algorithms

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang

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

Approximation Algorithms

NP-complete Reductions

Constructive and destructive algorithms

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

Introduction to Algorithms

Polynomial-Time Approximation Algorithms

Steiner Trees and Forests

Approximation Algorithms

of optimization problems. In this chapter, it is explained that what network design

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

Transcription:

COMP 355 Advanced Algorithms Approximation Algorithms: VC and TSP Chapter 11 (KT) Section 35.1-35.2(CLRS) 1 Coping with NP-Completeness Brute-force search: This is usually only a viable option for small input sizes (e.g., n 20). Heuristics: This is a strategy for producing a valid solution, but may be there no guarantee on how close it is to optimal. General Search Algorithms: There are a number of very powerful techniques for solving general combinatorial optimization problems. These go under various names such as branch-and-bound, Metropolis-Hastings, simulated annealing, and genetic algorithms. The performance of these approaches varies considerably from one problem to problem and instance to instance. But in some cases they can perform quite well. Approximation Algorithms: This is an algorithm that runs in polynomial time (ideally), and produces a solution that is guaranteed to be within some factor of the optimum solution. 2 1

Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one of three desired features. Solve problem to optimality. Solve problem in poly-time. Solve arbitrary instances of the problem. -approximation algorithm. Guaranteed to run in poly-time. Guaranteed to solve arbitrary instance of the problem Guaranteed to find solution within ratio of true optimum. Challenge. Need to prove a solution's value is close to optimum, without even knowing what optimum value is! 3 Performance Bounds An approximation algorithm is one that returns a legitimate answer, but not necessarily one of the optimal size How do we measure how good an approximation algorithm is? Given an instance I of our problem, let C(I) be the cost of the solution produced by our approximation algorithm, and let C (I) be the optimal solution. (assume that costs are strictly positive values.) For a minimization problem we have C(I)/C (I) 1. For a maximization problem we have C (I)/C(I) 1. In either case, we want the ratio to be as small as possible. For any input size n, we say that the approximation algorithm achieves performance ratio bound ρ(n), if for all I, I = n we have: 4 2

Performance Bounds Some NP-complete are inapproximable in the sense no polynomial time algorithm achieves a ratio bound smaller than unless P = NP. Some NP-complete can be approximated, but the ratio bound is a function of n. For example, the set cover problem (a generalization of the vertex cover problem), can be approximated to within a factor of O(log n). Some NP-complete problems can be approximated and the ratio bound is a constant. Some NP-complete problems can be approximated arbitrarily well. In particular, the user provides a parameter ε > 0 and the algorithm achieves a ratio bound of (1+ε). Of course, as ε approaches 0 the algorithm s running time gets worse. If such an algorithm runs in polynomial time for any fixed ε, it is called a polynomial time approximation scheme (PTAS). 5 Vertex Cover There is an algorithm for vertex cover with a ratio bound of 2. This algorithm will be guaranteed to find a vertex cover whose size is at most twice that of the optimum. Recall that a vertex cover is a subset of vertices such that every edge in the graph is incident to at least one of these vertices. The vertex cover optimization problem is to find a vertex cover of minimum size. Vertex cover (optimal solution) 6 3

The 2-for-1 heuristic for VC 7 2-for-1 Approximation for VC Claim: The 2-for-1 approximation for VC achieves a performance ratio of 2. 8 4

The Greedy Heuristic 9 Reductions and Approximations Approximation factors are not generally preserved by transformations. Example: Recall that if V is a vertex cover for G, then the complement vertex set, V \ V, is an independent set for G. Suppose that G has n vertices, and a minimum vertex cover V of size k. Then our heuristic is guaranteed to produce a vertex cover V that is of size at most 2k. If we consider the complement set V \ V, we know that G has a maximum independent set of size n k. By complementing our approximation V \ V we have an approximate independent set of size n 2k. How good is this? Performance ratio: The problem is that this ratio may be arbitrarily large. For example, if n = 1001 and k = 500, then the ratio is 501/(1001 1000) = 500/1 = 500. 10 5

Traveling Salesman Problem Traveling Salesperson Decision Problem (TSP) - Given a complete undirected graph with nonnegative edge weights, does there exist a cycle that visits all vertices and costs <= k? Let w(u, v) denote the weight on edge (u, v). Given a set of edges A forming a tour we define W(A) to be the sum of edge weights in A. 11 Traveling Salesman with Triangle Inequality Traveling Salesperson Problem (TSP) - Given a complete undirected graph with nonnegative edge weights, and find a cycle that visits all vertices and is of minimum cost. Let w(u, v) denote the weight on edge (u, v). Given a set of edges A forming a tour we define W(A) to be the sum of edge weights in A. Many of the applications of TSP, the edge weights satisfy a property called the triangle inequality for all u, v, x V, w(u, v) w(u, x) + w(x, v). When the underlying cost function satisfies the triangle inequality there is an approximation algorithm for TSP with a ratio-bound of 2. The key insight is to observe that a TSP with one edge removed is just a spanning tree (not necessarily a MST). Cost of the minimum TSP tour is at least as large as the cost of the MST If we can find some way to convert the MST into a TSP tour while increasing its cost by at most a constant factor, then we will have an approximation for TSP If edge weights satisfy triangle inequality, this is possible. 12 6

Traveling Salesman with Triangle Inequality TSP Approximation 13 Approx-TSP Performance Ratio Claim: Approx-TSP achieves a performance ratio of 2. 14 7

Practice 1. Give an example of a graph for which the 2-for-1 VC algorithm yields a suboptimal solution. 2. We know that both the VERTEX COVER problem and the CLIQUE problem are NP-Complete, and as we showed previously, they are complementary in the sense that a minimum-size vertex cover is the complement of a maximum-size clique in the complementary graph. Given the 2-for-1 VC algorithm, does the above relationship imply that there is a polynomial-time approximation algorithm with a constant approximation-ratio for the CLIQUE problem? 15 8