the traveling salesman problem approximation n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
The Traveling Salesman Problem Approximation PowerPoint Presentation
Download Presentation
The Traveling Salesman Problem Approximation

Loading in 2 Seconds...

play fullscreen
1 / 13

The Traveling Salesman Problem Approximation - PowerPoint PPT Presentation


  • 244 Views
  • Uploaded on

The Traveling Salesman Problem Approximation. Rachit Shah March 3 Class Notes CSE Department UTA Arlington CSE 6311 Adv Comp Models and Algorithms Prof: Dr Gautam Das. Traveling Salesman Problem.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'The Traveling Salesman Problem Approximation' - jacob


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
the traveling salesman problem approximation

The Traveling Salesman Problem Approximation

Rachit Shah

March 3 Class Notes

CSE Department

UTA Arlington

CSE 6311 Adv Comp Models and Algorithms

Prof: Dr Gautam Das

traveling salesman problem
Traveling Salesman Problem
  • Traveling Salesman Problem (TSP): Given a complete graph with nonnegative edge costs, Find a minimum cost cycle visiting every vertex exactly once.
  • Application (Example): Given a number of cities and the costs of traveling from any city to any other city, what is the cheapest round-trip route that visits each city exactly once and then returns to the starting city
triangle inequality
Triangle Inequality

a + b ≥ c

  • For example, cost of an edge as the euclidian distance between two points.
  • Metric Traveling Salesman Problem (metric TSP): Given a complete graph with edge costs satisfying triangle inequalities, Find a minimum cost cycle visiting every vertex exactly once.

a

c

b

metric tsp approximation
Metric TSP approximation
  • The cost function satisfies the triangle inequality for all vertices u, v, w in V
    • c(u,w) <= c(u,v) + c(v,w)
  • Eulerian graphs and Eulerian circuits:
    • Eulerian circuit: cycle that uses each edge exactly once
    • Eulerian graph: graph with a Eulerian circuit
    • An undirected graph is Eulerian iff each vertex has even degree
approximate tsp tour g
Approximate-TSP-tour (G)
  • Find MST T of G
  • Double every edge of the MST to get a Eulerian graph G’Idea: Get a tour from Minimum spanning tree without increasing its cost too much (at most twice).
  • Find an Eulerian circuit E on G’
  • Output the vertices of G in order of appearance in E
slide6
First let’s compare the optimal solutions of MST and TSP for any problem instance G=(V,E)

Optimal MST sol-n

Optimal TSP sol-n

A tree obtained from the tour

(*)

Cost (Opt. MST sol-n)

Cost (Opt. TSP sol-n)

Cost (of this tree)

analysis
Analysis
  • This is a 2 approximation algorithm
  • MST < Euler Cycle = 2 * MST <= 2.0 TSP
  • Can we improve this?
    • The previous algorithm was a factor 2 algorithm.
      • Recall Step 2:

Double every edge of the MST to get a Eulerian graph G’

    • If we can work avoid this, we could possibly have a better solution !
perfect matching
Perfect Matching
  • Matching: a matching is a subset M of E such that for all vertices v in V, at most one edge is incident on v.
  • Perfect Matching: is a matching M such that for all vertices v in V exactly one edge of M is incident on v.
minimum weight matching
Minimum Weight Matching
  • Perfect matching with minimum sum of weights
  • Input: Complete weighted graph s, |v| is even
  • Output: A pair of values (vi, vj) such that the sum of weights is smallest.
1 5 approximation algorithm
1.5 approximation algorithm

(Known as Christofides Heuristics)

  • Find a MST T of G
  • Find a minimum weight (perfect) matching M on the set of odd degree vertices in T.
  • Add M to T to get the Eulerian graph G’
  • Find an Eulerian circuit E on G’ by skipping vertices already seen (shortcutting)
  • Output the vertices of G in order of appearance in E
step 2 even nodes with odd degree
Step 2: Even nodes with odd degree??
  • How can I know that I always have even number of nodes, which have odd degree, for me to do the MATCHING?
  • Let Sum(d) = 2m, where m= number of edges. Therefore Sum(d) is even.
  • Let SumEven(d) to be the sum of degrees of the vertices which have even degree, SumEven(d) is also even.
  • Therefore SumOdd(d)=Sum(d)-SumEven(d) = 2k, k=1,2,…, which means that the sum of degrees of the vertices which have odd degree each is also an even number. Thus there are even numbers of vertices which have odd number of degree.
analysis1
Analysis

TSP = match1 + match2 (we can divide TSP in two mutually exclusive matchings)

MWM <= min{ match1, match2}

  • Match1 + match 2 = TSP
  • MWM + MWM <= TSP (MWM <= match1 and MWM <= match2)
  • MWM <= .5 TSP

MWM <= .5 TSP

MST < Euler Cycle

= MST + MWM <= TSP + .5 TSP

= 1.5 TSP