Traveling Salesperson Problem (TSP)

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

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

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

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

Approximation Algorithms

Module 6 NP-Complete Problems and Heuristics

Module 6 NP-Complete Problems and Heuristics

Lecture 8: The Traveling Salesman Problem

Module 6 NP-Complete Problems and Heuristics

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

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

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

Approximation Algorithms

Theory of Computing. Lecture 10 MAS 714 Hartmut Klauck

Notes for Recitation 9

APPROXIMATION ALGORITHMS FOR GEOMETRIC PROBLEMS

Polynomial time approximation algorithms

Theorem 2.9: nearest addition algorithm

2 Approximation Algorithms for Metric TSP

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

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

1 Better Approximation of the Traveling Salesman

Algorithm Design and Analysis

1 The Traveling Salesman Problem

1 Variations of the Traveling Salesman Problem

Partha Sarathi Mandal

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

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

1 The Traveling Salesperson Problem (TSP)

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

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

Introduction to Algorithms

Graphs and Algorithms 2015

Chapter 9 Graph Algorithms

1 The Traveling Salesman Problem

Chapter 9 Graph Algorithms

11.4 Bipartite Multigraphs

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).

Assignment 5: Solutions

Coping with NP-Completeness

Chapter 9 Graph Algorithms

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1

Assignment No 2 (Group B)

Greedy algorithms Or Do the right thing

EECS 203 Lecture 20. More Graphs

MITOCW watch?v=zm5mw5nkzjg

Greedy Algorithms. At each step in the algorithm, one of several choices can be made.

Notes for Lecture 24

CMPSCI611: The SUBSET-SUM Problem Lecture 18

6.2. Paths and Cycles

Improved approximation ratios for traveling salesperson tours and paths in directed graphs

Graphs. Pseudograph: multiple edges and loops allowed

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

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

Institute of Operating Systems and Computer Networks Algorithms Group. Network Algorithms. Tutorial 4: Matching and other stuff

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

8.2 Paths and Cycles

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

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

P and NP (Millenium problem)

Vertex Cover Approximations

Ma/CS 6a Class 8: Eulerian Cycles


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

Introduction III. Graphs. Motivations I. Introduction IV

Approximation Algorithms

Slides on Approximation algorithms, part 2: Basic approximation algorithms

Optimal tour along pubs in the UK

Graphs Introduction and Depth first algorithm

1 Minimum Spanning Trees (MST) b 2 3 a. 10 e h. j m

Varying Applications (examples)

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

Assignment 4 Solutions of graph problems

Minimum-Spanning-Tree problem. Minimum Spanning Trees (Forests) Minimum-Spanning-Tree problem

Basic Approximation algorithms

Advanced Methods in Algorithms HW 5

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 7

Approximation Algorithms

Solutions to Assignment# 4

Number Theory and Graph Theory

Introduction to Approximation Algorithms

University of New Mexico Department of Computer Science. Final Examination. CS 362 Data Structures and Algorithms Spring, 2006

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

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

Spanning Tree. Lecture19: Graph III. Minimum Spanning Tree (MSP)

5.5 The Travelling Salesman Problem

Restricted Delivery Problems on a Network. December 17, Abstract

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

1. The following graph is not Eulerian. Make it into an Eulerian graph by adding as few edges as possible.

A constant-factor approximation algorithm for the asymmetric travelling salesman problem

DS UNIT 4. Matoshri College of Engineering and Research Center Nasik Department of Computer Engineering Discrete Structutre UNIT - IV

Study Guide Mods: Date:

MC302 GRAPH THEORY SOLUTIONS TO HOMEWORK #1 9/19/13 68 points + 6 extra credit points

Precept 4: Traveling Salesman Problem, Hierarchical Clustering. Qian Zhu 2/23/2011

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

Undirected Network Summary

Notes 4 : Approximating Maximum Parsimony

Improved Approximations for Graph-TSP in Regular Graphs

Strongly Connected Spanning Subgraph for Almost Symmetric Networks

Transcription:

TSP-0 Traveling Salesperson Problem (TSP) Input: Undirected edge weighted complete graph G = (V, E, W ), where W : e R +. Tour: Find a path that starts at vertex 1, visits every vertex exactly once, and ends at vertex 1. Cost (weight) of a Tour: Sum of the weight of the edges in the tour. TSP: Find a least cost tour. TSP is NP-hard even when the graph is defined by a set of points in 2D. Later on we show that the approximation problem is NP-hard.

TSP-1 Relaxed Version of TSP A relaxed tour is defined as as a path that starts at vertex 1, visits every vertex at least once, and ends at vertex 1. The Relaxed Version of the TSP is to find a least cost relaxed tour.

TSP-2 Euler Tours and Multigraphs A multigraph is a graph that may contain more than one edge between a pair of vertices. A multigraph in which there is a path between every pair vertices (or connected multigraph) and every vertex is of even degree is called an Euler multigraph. An Euler tour of a multigraph is a relaxed tour of a multigraph in which every edge is traversed by the relaxed tour exactly once. There is a linear time (with respect to the number of vertices and edges in the multigraph) algorithm (CS 130A) that given an Eulerean multigraph it constructs an Euler tour.

TSP-3 Approx.: Relaxed TSP (Via Restriction) Construct a tour that uses the least number of different edges. Least number of different edges is n 1. From all sets of n 1 edges, pick the set with least total weight. This is just a minimum cost spanning tree. Make a copy of each edge. The resulting graph is an Eulerean multigraph. Find an Euler Tour The Euler tour is the solution. Claim: ˆf 2f. (Follows from ˆf = 2W (MCST ) and f > W (MCST ), where W (MCST ) is the sum of the weight of the edges in a minimum cost spanning tree for the TSP graph) (We prove this later on).

TSP-4 Metric TSP Graph G is said to satisfy the triangle inequality (or the graph is called a metric graph) if for every pair of vertices u and v, w(u, v) w(p(u, v)), where p(u, v) is any path from vertex u to vertex v and w(p(u, v)) is the sum of the weight of the edges in p(u, v).

TSP-5 Approximation to Metric TSP Approximation algorithm is based on Relaxation - Restriction. Relaxation: May visit vertices more than once. Restriction: Visit least number of different edges. Algorithm MWST (G = (V, E, W )) Construct a min weight (cost) spanning tree S = (V, T ); /* I.e., sum of weight of edges in tree is least possible */; Construct multigraph M = (V, T T ); /* I.e., there are multiple copies of edges between nodes */ Construct Euler circuit EC for M; Apply Transformation R to EC n 1 times; /* Resulting graph is a TOUR */ End of Algorithm MWST

TSP-6 Transformation R Example MWST: (For example use Kruskal s algorithm). Multigraph: M = (V, T T ) Euler Circuit EC for M 12 11 13 10 14 15 16 9 8 7 1 6 2 3 4 5

TSP-7 2W(T) 2W(T) 2W(T) 2W(T) 2W(T) 2W(T) 2W(T) 2W(T) SOL at most 2W(T)

TSP-8 Approximation Bound f*(i) Spanning Tree Deleting the edge with largest weight from the an optimal tour results in a spanning tree. Therefore, f (I)(1 1 n ) W (T ) So, ˆf(I) 2W (T ) 2f (I)(1 1 n ). This is equivalent to ˆf(I) f (I) = 2 2 n

TSP-9 Worst Case Example 1 2 ˆf(I) = 10; f (I) = 6; ˆf(I) f (I) = 5 3 In General, 2 2 n. So the approximation bound is tight.

TSP-10 Christofidas Method Definitions (for graphs) Matching: Subset of edges no two of which are adjacent to the same vertex. Complete Matching: A matching that Covers all the vertices in the graph. Weight of Complete Matching (for edge weighted graphs): Sum of weight of edges in the matching.

TSP-11 MWCM Algorithm MWCM (G = (V, E, W )) Construct a min weight (cost) spanning tree S = (V, T ); Let V be the set of odd degree vertices in S = (V, T ); Let M be the graph induced by V in G; Let C be a minimum weight complete matching in M ; Let M = (V, T C); Construct Euler circuit EC for M; Apply Transformation R to EC until you get a TOUR; /* Resulting graph is a TOUR */ End of Algorithm MWCM

TSP-12 S M M C

TSP-13 ˆf(I) W (T ) + W (C) Since W (T ) (1 1 n )f (I) ˆf(I) (1 1 n )f (I) + W (C) o e o e o e W (e) W (C) and W (o) W (C) f (I) W (Edges e o) = W (e) + W (o) 2W (C) Therefore, ˆf(I) (1 1 n )f (I) + 0.5f (I) ( 3 2 1 n )f (I)

TSP-14

TSP-15 Worst Case Example 1 2 ˆf(I) = 8; f (I) = 6; ˆf(I) f (I) = 4 3 In General, 1 2 1 n. So the approximation bound is tight.

TSP-16 Equivalence of Relaxed and Metric TSP The metric TSP (graph is metric) and the relaxed TSP are equivalent problems. Given an instance of the relaxed TSP for graph G, construct the graph G for the metric TSP as follows. Every vertex in G is a vertex in G. The graph G is complete and the weight of the edge from vertex u to vertex v is defined as w(sp(u, v)) in G, where sp(u, v) is a shortest path from vertex u to vertex v in G, and w(sp(u, v)) is the sum of the weight of the edges in sp(u, v). There is a correspondence between tours in the metric TSP and relaxed tour in the relaxed TSP and vice-versa.