Approximation Algorithms for TSP

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Great Theoretical Ideas in Computer Science for Some.
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
NP-Complete Problems Polynomial time vs exponential time
Combinatorial Algorithms
Lecture 21 Approximation Algorithms Introduction.
Minimum Spanning Trees Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan
Great Theoretical Ideas in Computer Science.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Approximation Algorithms: Concepts Approximation algorithm: An algorithm that returns near-optimal solutions (i.e. is "provably good“) is called an approximation.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
Approximation Algorithms1. 2 Outline and Reading Approximation Algorithms for NP-Complete Problems (§13.4) Approximation ratios Polynomial-Time Approximation.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
Approximation Algorithms for the Traveling Salesperson Problem.
1 NP-Complete Problems Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph, the length.
NP-Complete Problems (Fun part)
Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)
Network Optimization Problems: Models and Algorithms
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
1 NP-Complete Problems (Fun part) Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph,
GRAPH Learning Outcomes Students should be able to:
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
Algorithms for Network Optimization Problems This handout: Minimum Spanning Tree Problem Approximation Algorithms Traveling Salesman Problem.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
The Traveling Salesperson Problem Algorithms and Networks.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
The Traveling Salesman Problem Approximation
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
1 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
1 Combinatorial Algorithms Parametric Pruning. 2 Metric k-center Given a complete undirected graph G = (V, E) with nonnegative edge costs satisfying the.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
The Traveling Salesman Problem Over Seventy Years of Research, and a Million in Cash Presented by Vladimir Coxall.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Projects Network Theory VLSI PSM 1. Network 1. Steiner trees
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
1 Approximation Algorithm Updated on 2012/12/25. 2 Approximation Algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
Approximation Algorithms Guo QI, Chen Zhenghai, Wang Guanhua, Shen Shiqi, Himeshi De Silva.
Approximation Algorithms
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
Traveling Salesman Problem DongChul Kim HwangRyol Ryu.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Approximation Algorithms
Optimization problems such as
School of Computing Clemson University Fall, 2012
Approximation Algorithms
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Great Theoretical Ideas in Computer Science
Approximation Algorithms
Approximation Algorithms
Approximation Algorithms for TSP
Discrete Mathematics for Computer Science
Approximation Algorithms
Minimum Spanning Trees
Approximation Algorithms
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Approximation Algorithms for TSP Tsvi Kopelowitz Ariel Rosenfeld

HC-Hamiltonian Cycle Input: graph G=(V,E) Output: a cycle tour in G that visits each vertex exactly once. Problem is known to be NP-Hard.

TSP – Traveling Salesman Problem Input: a complete graph G=(V,E) with edges of non-negative cost (c(e)). Output: find a cycle tour of minimum cost that visits each vertex exactly once. The problem is NP-Hard (reduction from HC) . … and hard to approximate.

Hardness of Approximation Claim: For every c>1, there is no polynomial time algorithm which can approximate TSP within a factor of c, unless P=NP.

Proof By reduction from Hamiltonian cycle. Given a graph G, we want to determine if it has a HC. Construct a complete graph G’ with same vertices as G, where each edge e has weight 1 if it is in G, and weight c*n if it is not (n is the number of vertices).

Example G=

Example G’= 1 c*n

Proof Run algorithm A for solving TSP within a factor of c. If there is a HC, TSP has a solution of weight n, and approximation is at most c*n If there is no HC, then every tour in TSP has at least one edge of weight c*n, so weight of tour is at least c*n +n-1.

Metric A (complete) graph with weight function w on the edges is called a metric if: For any two vertices u,v in the graph: w(u,v)=w(v,u) The Triangle Equality holds in the graph.

Triangle Inequality Recall: The triangle inequality holds in a (complete) graph with weight function w on the edges if for any three vertices u,v,x in the graph: Metric TSP is still NP-hard, but now we can approximate.

2-approximation Given G, construct an MST T for G (since it is a metric graph, it doesn’t matter whether it is directed or not). For each edge in T create a double edge. (This will guarantee that the degrees of all the vertices are even) Find an Euler tour in the doubled T.

2-approximation Given G, construct an MST T for G (since it is a metric graph, it doesn’t matter whether it is directed or not). For each edge in T create a double edge. (This will guarantee that the degrees of all the vertices are even) Find an Euler tour in the doubled T. Create shortcuts in the Euler tour, to create a tour.

2-approximation How will we create these “shortcuts”? Traverse the Euler tour. Whenever the Euler tour returns to a vertex already visited, “skip” that vertex. The process creates a Hamiltonian cycle.

2-approximation Claim: The above algorithm gives a 2- approximation for the TSP problem (in a metric graph with the triangle inequality). Proof: Definitions: OPT is the optimal solution (set of edges) for TSP. A is the set of edges chosen by the algorithm. EC is the set of edges in the Euler cycle.

2-approximation Proof Continued: cost(T)  cost(OPT): since OPT is a cycle, remove any edge and obtain a spanning tree. cost(EC) = 2cost(T)  2cost(OPT). cost(A)  cost(EC) A is created by taking “shortcuts” from EC. (These are indeed shortcuts, because of the triangle inequality.) So cost(A)  2cost(OPT) . 

1.5 TSP Approximation Algorithm (Known as Christofides Heuristics) Professor Nicos Christofides extended the 2.0 TSP and published that the worst-case ratio of the extended algorithm was 3/2.

1.5 Approximation Algorithm: 1. Compute MST graph T. 2. Compute a minimum-weighted matching graph M between all Odd- degree vertices. 3. Combine T and M as edge set and Compute an Euler Cycle. 4. Traverse each vertex taking shortcuts to avoid visited nodes.

1.5 Approximation What is a Minimum-weighted Matching? It creates a MWM on a set of the nodes having an odd degree. Why odd degree? Property of Euler Cycle (if all edges all of even-degree, EC exists) Why 1.5 TSP? MST < Euler Cycle <= MWM+MST <= 1.5 TSP (need to show MWM <= ½ MST)

1.5-approximation Claim: The above algorithm gives a 1.5- approximation for the TSP problem (in a metric graph with the triangle inequality). Proof: Denote: OPT, A, and EC as before. M is the set of edges in the minimum matching.

1.5-approximation Proof Continued: cost(M)  cost(OPT)/2 The minimum tour on any subset B of vertices has a cost of at most cost(OPT) A Hamiltonian cycle in B can be extracted from OPT by “skipping” vertices not in B, resulting in a tour lighter than OPT, due to the triangle inequality. If B is of even size then divide the minimum tour on B into two disjoint matchings of B. The lighter matching of the two (denote by M’) has weight at most cost(OPT)/2.

1.5-approximation Proof Continued: cost(M)  cost(M’)  cost(OPT)/2. The number of odd vertices in a graph is even. (Always, but Why?) Choose B to be the set of odd vertices in T. M’ is not necessarily the minimum matching of B, but cost(M)  cost(M’).

1.5-approximation Proof Continued: EC is an Euler Cycle in . cost(EC) = cost(T)+cost(M)  1.5cost(OPT). cost(A)  cost(EC)  1.5cost(OPT) 

Input (assume Euclidean distances) Example a d a d e e b f g b f g c c h h Input (assume Euclidean distances) MST

2-approx. Walk W a b c b h b a d e f e g e d a Hamiltonian Cycle H a b c h d e f g a

1.5 approx. a d e e b f g b f g c c h h MST T Matching M

Matching a d e e b f g b f g c c h h G' = MST + Matching Matching M

Optimal Tour * on Odd Nodes Separating the optimal tour of B into 2 matchings e e b f g b f g c c h h Optimal Tour * on Odd Nodes Matching M