Instructor Neelima Gupta Table of Contents Approximation Algorithms.

Slides:



Advertisements
Similar presentations
Chapter 6. Relaxation (1) Superstring Ding-Zhu Du.
Advertisements

MCA 202: Discrete Mathematics under construction Instructor Neelima Gupta
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.
Approximation Algorithms for TSP
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
Combinatorial Algorithms
Lecture 21 Approximation Algorithms Introduction.
Chapter 10 Complexity of Approximation (1) L-Reduction Ding-Zhu Du.
Minimum Spanning Trees Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
Branch and Bound Similar to backtracking in generating a search tree and looking for one or more solutions Different in that the “objective” is constrained.
Approximation Algorithms: Concepts Approximation algorithm: An algorithm that returns near-optimal solutions (i.e. is "provably good“) is called an approximation.
Approximation Algorithms1. 2 Outline and Reading Approximation Algorithms for NP-Complete Problems (§13.4) Approximation ratios Polynomial-Time Approximation.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
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.
NP-Complete Problems (Fun part)
Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234 Lecture 1 -- (14-Jan-09) “Introduction”  Combinatorial Optimization.
Theory of Computing Lecture 10 MAS 714 Hartmut Klauck.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
MCS312: NP-completeness and Approximation Algorithms
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.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
DP TSP Have some numbering of the vertices We will think of all our tours as beginning and ending at 1 C(S, j) = length of shortest path visiting each.
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
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
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.
MCS 312: NP Completeness and Approximation algorthms Instructor Neelima Gupta
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Approximation Algorithms Guo QI, Chen Zhenghai, Wang Guanhua, Shen Shiqi, Himeshi De Silva.
Steiner Tree Problem Given: A set S of points in the plane = terminals
1. For minimum vertex cover problem in the following graph give
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.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
Approximation Algorithms
Optimization problems such as
Lecture 2-2 NP Class.
An introduction to Approximation Algorithms Presented By Iman Sadeghi
Approximation Algorithms
Richard Anderson Lecture 26 NP-Completeness
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Great Theoretical Ideas in Computer Science
CS4234 Optimiz(s)ation Algorithms
Lecture 5 NP Class.
Approximation Algorithms
Approximation Algorithms for TSP
Minimum Spanning Trees
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 28 Coping with NP-Completeness
Approximation Algorithms
Minimum Spanning Trees
Minimum Spanning Trees
Approximation Algorithms
Minimum Spanning Trees
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Instructor Neelima Gupta

Table of Contents Approximation Algorithms

Thanks to: Swati Singhal (28,MCS '09) Instructor: Ms. Neelima Gupta

Thanks to: Swati Singhal (28,MCS '09) Approximation Algorithms Approximate algorithms give approximate solution to NP-Complete problems which is close to optimum solution. Maximization problems E.g. Clique Optimum clique > Approx. clique >= ½ *( Optimum clique) Minimization problems E.g. Vertex Cover Minimum vc < Approx. vc < = 2*(Minimum vc)

Thanks to: Swati Singhal (28,MCS '09) Metric Travelling Salesman Problem Problem Statement Given A complete graph G with non- negative edge costs that satisfy triangle inequality To Find A minimum cost cycle visiting every vertex exactly once.

Thanks to: Swati Singhal (28,MCS '09) Metric TSP - factor 2 approx. algorithm 1. Find an Minimum Spanning Tree (MST) T of G. 1. Double every edge of the MST to obtain an Eulerian graph. 2. Find a Eulerian tour, T’, on G. 3. Output the tour that visits vertices of G in the order of their first appearance in T’. Call this tour C. (Short Cutting)

Thanks to: Swati Singhal (28,MCS '09) Edges shown dotted do not carry weight and are assumed to be shortest path between the pair of vertices( due to triangular inequality). Example Given a Complete Graph V5 V1 V4 V2 V3 V6 V9 V7 V8 V

Thanks to: Swati Singhal (28,MCS '09) V1V2V8 V4V3 V7 V5 V6V9 V10 Step1: Compute Minimum Spanning Tree

Thanks to: Swati Singhal (28,MCS '09) Step 2: Double each edge of MST V5 V10 V7 V8V2 V1 V6 V3V4 V

Thanks to: Swati Singhal (28,MCS '09) Step 3: Computing Eulerian Cycle A cycle is one in which each edge visited exactly once v1  v2  v3  v4  v5  v6  v5  v4  v3  v7  v9  v10  v9  v7  v8  v7  v3  v2  v V5 V6 V4 V3 V1 V2V8 V7 V10 V

Thanks to: Swati Singhal (28,MCS '09) Step 4: Computing solution for TSP V4 V9 V10 V6 V8 V5 V7 V3 V2V v1  v2  v3  v4  v5  v6  v5  v4  v3  v7  v9  v10  v9  v7  v8  v7  v3  v2  v1

Thanks to: Swati Singhal (28,MCS '09) v1  v2  v3  v4  v5  v6  v7  v9  v10  v8  v1 Approximate solution for TSP V1 V9 V8 V3 V2 V4 V5 V6 V7 V10

Thanks to: Swati Singhal (28,MCS '09) Metric TSP - factor 2 approx. algorithm We now show that the proposed algorithm is indeed a factor 2 approximation algorithm for metric TSP Observe that:  Removing any edge from an optimal solution to TSP would give a spanning tree of the graph.  So the cost of an MST in the graph can be used as lower bound for obtaining factor 2 for this algorithm

Thanks to: Swati Singhal (28,MCS '09) Metric TSP - factor 2 approx. algorithm  Therefore, cost(T) <= OPT  T’ contains each edge of T twice, so cost(T’) = 2*cost(T)  Also, cost(C) <= cost(T’) because of triangle inequality  Hence cost(C) <= 2*OPT

Thanks to: Varun Mendiratta( 30,MCS '09) FACTOR 3/2 APPROXIMATION ALGORITHM FOR TSP Instructor: Ms. Neelima Gupta

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP – improving the factor to 3/2 Observations: Consider why did we have to double the MST – to obtain an Euler tour. Can we have an Euler tour with lower cost? YES ! A graph has an Euler tour if and only if all its vertices have even degrees. We therefore need to be bothered about the vertices of odd degree only.

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP - improving the factor to 3/2  Let V’ be the set of vertices of odd degree  Cardinality of V’ must be even. WHY? Because the sum of degrees of all vertices in MST has to be even.  Add to the MST, a minimum cost perfect matching on V’ so that every vertex has an even degree.  We also know that a polynomial time algorithm exists for finding the minimum cost perfect matching.

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP - factor 3/2 approx. algorithm  Step 1: Find an MST, T, of G.  Step 2: Compute a minimum cost perfect matching, M, on the odd degree vertices of T. Add M to T and obtain an Eulerian graph.  Step 3: Find an Euler tour, T’, of this graph.  Step 4: Output the tour that visits vertices of G in order of their first appearance in T’. Call this tour C.

Thanks to: Varun Mendiratta( 30,MCS '09) V1V2V8 V4V3 V7 V5 V6V9 V10 Step1: Compute Minimum Spanning Tree

Thanks to: Varun Mendiratta( 30,MCS '09) Step2: Compute Minimum Cost Perfect Matching V1V2V8 V4V3 V7 V5 V6V9 V10 V1, V3, V6, V7, V8, V10 are odd degree vertices.

Thanks to: Varun Mendiratta( 30,MCS '09) Step 3: Computing Euler Cycle A cycle is one in which each edge is visited exactly once. V1V2V8 V4V3 V7 V5 V6V9 V10 V1  V2  V3  V4  V5  V6  V3  V7  V9  V10  V7  V8  V1 Eulerian Cycle :

Thanks to: Varun Mendiratta( 30,MCS '09) Step 4: Computing solution for TSP V1V2V8 V4V3 V7 V5 V6V9 V10 Solution for TSP : V1  V2  V3  V4  V5  V6  V7  V9  V10  V8  V1

Thanks to: Varun Mendiratta( 30,MCS '09) Approximate solution for TSP V1V2V8 V4V3 V7 V5 V6V9 V10 Solution for TSP : V1  V2  V3  V4  V5  V6  V7  V9  V10  V8  V1

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP - factor 3/2 approx. algorithm In order to show that the proposed algorithm is a factor 3/2 approximation algorithm for metric TSP, we first need to understand the following: Given a subset V’ of V with even number of elements, and a minimum cost perfect matching M on V’, cost(M) <= OPT/2 Let us try to prove the above result !

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP - factor 3/2 approx. algorithm Consider an optimal TSP tour of G, say t. Let t’ be the tour on V’ obtained by shortcutting t. Clearly, cost(t’)<=cost(t) because of triangle inequality. Now t’ is the union of two perfect matchings on V’ each consisting of alternate edges of t. Therefore, the cheaper of these matchings has cost <= cost(t’)/2<=OPT/2. Hence the optimal matching also has cost at most OPT/2.

Thanks to: Varun Mendiratta( 30,MCS '09) Metric TSP - factor 3/2 approx. algorithm In view of this result, let us now see if the proposed algorithm ensures an approximation guarantee of 3/2 for metric TSP Problem Cost of the Euler tour, Using triangle inequality, cost(C)<=cost(T’). Hence Proved!

Consolidated by: Sumedha Upadhyaya( 42), Prachi Nagpal(41) (MCS '09)