520 likes | 660 Views
Approximation algorithms for the TSP with a P arameterized T riangle Inequality. Rotem Golan Alon Furman Department of Computer Science Ben-Gurion University. Outline. Problem Description TSP- Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ -TSP.
E N D
Approximation algorithms for the TSP with a Parameterized Triangle Inequality Rotem Golan Alon Furman Department of Computer Science Ben-Gurion University
Outline Problem Description TSP-Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ-TSP. The Refined Algorithm 6 Approximation Algorithm
The Problem • An instance of the problem is a weighted graph G consisting on n vertices (representing cities).Distances between vertices satisfy the Δτ-inequality and the length of an optimal TSP tour is denoted OPT. • Δτ-inequality: dist(x,z) ≤ τ(dist(x,y) + dist(y,z)) • The objective of the problem is to find (in polynomial time) a tour having length at most f(τ)*OPT, where f(τ)is a slowly-growing function of τ.
We observe two well known approximation algorithms for the TSP: • Double-Tree Algorithm1. Find a minimum spanning tree T for G.2. Create a multigraph by duplicating each edge in the MST.3. Find an Eulerian tour.4. Shortcut over nodes to obtain a Hamiltonian cycle.
Christofides algorithm: • Find a MST for G. • Identify the nodes of odd degree and find a minimum cost perfect matching for these nodes. • Find an Eulerian tour in the multigraph consisting of the MST and the perfect matching. • Shortcut the Eulerian tour to obtain a Hamiltonian cycle. • The above algorithm yields a approximation.
What happens to these algorithms for the Δτ-TSP? • Observation 1: The MST is a lower bound on OPT. • Observation 2:Shortcutting vertices never increases distances. • Observation 3:The minimum cost perfect matching is a lower bound on .
Notice that step 4 in both algorithms obtains a Hamiltonian cycle by shortcutting the Eulerian tour. • In the TSP (satisfying the triangle inequality) the above step will always result in a shorter path, however, this is not the case for the Δτ-TSP! 50 x y τ = 2 10 15 z dist(x,y) ≤ τ(dist(x,z) + dist(z,y)) ≤ 2 (15+10) ≤ 50
We present 3 algorithms for the Δτ-TSP, each obtains the best approximation for different values of τ. • 1 ≤ τ≤ 2: Refined • 2 ≤ τ≤ 3.24: Generalized 6-approximation algorithm • τ ≥ 3.24: TSP-Approx • We are not interested in the case where τ ≤ 1 since in this case a more strict version of the triangle inequality applies.
Outline Problem Description TSP-Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ-TSP. The Refined Algorithm 6 Approximation Algorithm
TSP-Approx • Definitions: • A graph S is 2 node connected if the deletion of any node from S leaves it connected.
Let denote the square of graph S. Thus, (u,v) is an edge in if there is a path in S between u and v using at most 2 edges.
Observations: • Any Hamiltonian cycle is 2-node connected. Thus, the minimum weight 2-node connectedsubgraph is a lower bound on OPT. • It is NP hard to find the minimum weight 2-node connectedsubgraph. However, 2 approximation can be computed in polynomial time (Khuller& Raghavachari 1996, Penn & Shasha-Krupnik 1995). • The square of 2-node connected graph contains a Hamilton cycle, which can be found in polynomial time (Fleischner 1970 ,Lau 1980).
TSP-Approx Algorithm • TSP-Approx(G) • Find an (approximately) minimum cost 2-node connected subgraph of G. Call this graph S. • Find a Hamiltonian cycle in .
The goal is to find a Hamiltonian cycle in that has low weight. • Definition: • Consider any Hamiltonian cycle C in , and orient this cycle. Let (u,w) be a (directed) edge in C.(u,w) C crosses (undirected) edges {u,v} and {v,w} in S if {u,w} and otherwise crosses edge {u,w} • The solid lines represent edges in S, the dotted lines represent edges in C .
Notice that no Hamiltonian cycle crosses any edge more than 4 time. This is because each node u in S is incident to exactly two edges in C, one edge entering u and one edge leaving u. • Observation 2 indicated that graph S has weight at most of . Combined with the above remark immediately yields an 8τ-approximation.
Theorem 1: Algorithm TSP-Approx is a 4τ approximation algorithm. • We obtain a4τ approximation by finding a new Hamiltonian cycle C’ that crosses every edge in S at most twice. • We obtain C’ by adjusting overlapping edges, there are 2 cases.
Case 1: The edge {u,v} is crossed 4 times.Hamiltonian cycle C can be modified so that the edge {u,v} is never crossed.
Case 2: The edge {u,v} is crossed 3 times.Hamiltonian cycle C can be modified so that the edge {u,v} is crossed only once.
Example • Find an (approximately) minimum cost 2-node connected subgraph of G. Call this graph S. G= =
Adjust the overlapping edges • Find a Hamiltonian cycle in . a a b b (a,b) is being crossed 3 times (a,b) is being crossed 1 time
Conclusions • After fixing these 2 cases no edge is crossed more than twice. • The graph S has weight at most (observation 2). In addition, modifying the Hamiltonian cycle in as described adds a factor of 2τto the weight of cycle C, resulting in a total of 4τ approximation.
Outline Problem Description TSP-Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ-TSP. The Refined Algorithm 6 Approximation Algorithm
Theorem 2: There exists some fixed constant ε > 0 such that it is NP hard to approximate Δτ-TSP to within a factor better than (1+ετ). • Observations: • There exists an infinite class of graphs with the following properties. For each graph G = (V,E) in there exists a fixed constant ε> 0 such that either G is Hamiltonian, or every Hamiltonian cycle in the complete graph on V requires at least εn edges from (Papadimitriou & Yannakakis, 1993). • Given a graph from it is NP-Complete to distinguish which of the above two cases applies.
Proof: Given a graph G = (V,E) from we create an instance of Δτ-TSP by making the graph complete with edges in E having cost 1, and the rest having cost 2τ. If G is Hamiltonian the cost of an optimal TSP tour in G is n, otherwise it is at least . Let’s consider the worst case: ( According to observation 2 the theorem follows.
Conclusions • Reminder: A PTAS is an algorithm which takes an instance of an optimization problem and a parameter ε > 0 and, in polynomial time, produces a solution that is within a factor of being optimal. • Theorem 2 shows that there always exists some ε > 0 such that it is NP-hard to approximate Δτ-TSP, therefore rejecting the existence of a PTAS algorithm for the Δτ-TSP.
Outline Problem Description TSP-Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ-TSP. The Refined Algorithm 6 Approximation Algorithm
The Refined Algorithm • Definition: • Let denote the cube of graph T. Thus, (u,v) is an edge in if there is a path in T between u and v using at most 3 edges. • Observation: • Given a tree T with , the cube of T always contains a Hamilton cycle H (Sekanina, 1960). = =
The Algorithm • Step 1: Find a minimum spanning tree T. • Step 2: Find a normal Hamilton cycle H of by application of (REFINED) to T and return the corresponding tour as a heuristic solution. • (REFINED) is a recursive procedure for obtaining Hamilton cycle H.
(REFINED) • Input: A tree T with , a cost function c on T, and a locally minimal edge of T. • Output: A normal Hamilton cycle H of containing . • Step 1:Let be the component of T-containing (i= 1,2). For i=1,2 do: • if pick V() such that (,) E() and = ( , ) is a locally minimal edge of . • If , let = .
(REFINED) (Cont) • If , then recursively apply (REFINED) to and as input, thus obtaining a normal Hamilton cycle of containing . • If put - , else = . • Step 2:Construct H by putting together
In the described algorithm during step 1 we select as a locally minimal edge of . The naïve version of this algorithm will select the edge arbitrary resulting in an approximation ratio of . • The (REFINED) algorithm provides an approximation ratio of . • This result is the best approximation for 1 ≤ τ≤2.
Example • Given graph G we’ll find the minimum spanning tree T = =
First we’ll demonstrate the naïve version of the algorithm which selects the edge arbitrary. • The input is the tree T and an edge 3 1 2 3
Lets examine • if pick V() such that ( , ) E() and = ( ,) • If put - , else = . = = = ( ,) =
Now we’ll examine • if pick V() such that ( , ) E() and = ( ,) • If , then recursively apply (REFINED) to and as input, thus obtaining a normal Hamilton cycle of containing . = = ( ,)
= = • Lets examine • If , let = . • Now we’ll examine • if pick V() such that ( , ) E() and = ( , ) • If put - , else = . = = ( ,)
Now in step 2 of the recursion we construct by putting together = =
After exiting the recursion and obtaining , we’ll execute:If put - , else = .
Now we can execute step 2 of the main iteration: • Step 2: Construct H by putting together • Return H as the solution. = H = =
In the refined version where we select as a locally minimal edge of the difference is that during examination of we’ll select ) instead of ) resulting in the following Hamiltonian cycle: H =
Outline Problem Description TSP-Approx Algorithm Rejection of the existence of a PTAS algorithm for the Δτ-TSP. The Refined Algorithm 6 Approximation Algorithm
6-approximation algorithm • This algorithm is used for the TSP under squared Euclidean distance, i.e.Given a set of n points we consider the complete graph with edge weights where denotes the Euclidean distance between p and q. • Motivation: The problem is related to the field of wireless networks where the square of the distances is in linear correlation with the energy required to pass information from one node to another.
Why Euclidean TSP does not work in this case? • Consider the example where n points lie on a slightly bent line and each point having distance to its right and left neighbor. • An optimal Euclidean tour would visit the points in their linear order and then go back to the first point; however, this is not the case for the squared Euclidean distances.
Omitting the fact that the line is slightly bent this tour would have a cost of:if the edge weights are squared Euclidean distances. • However, an optimal tour would have a cost of
The cost of a minimum spanning tree is a lower bound for the optimal value OPT of the tour. • We denote the cost of a minimum spanning tree T by MST(T). • Let r be the root of T and p be one child of T. • We define two Hamiltonian paths and as follows: • Let be a path starting at r, finishing at p that visits all nodes of T and the cost of this path is at most 6MST(T) − 3. • Let be defined in the same way but in opposite direction, that is, it starts at p and finishes at r.
Now, if we have such a tour for the original vertex set V we can construct a Hamilton tour by connecting r with p. The cost of this tour is clearly at most 6MST(T)−3+ ≤ 6MST(T) ≤ 6OPT. • It remains to show how to construct such tours and . We will do this recursively. • For a tree T of height , i.e. a single node r, and both consist of just the single node. Conceptually, we identify p with r in this case.
Now, let T be of height larger than and let , . . . , be its children trees. Let r denote the root of T and the root of and be a child of as in the figure. • Then we set = (r, , ,. . . , ).