Approximation Algorithms for Deadline-TSP & Vehicle Routing with Time Windows by Nikhil Bansal, Avrim Blum, Schuchi Chawla & Adam Meyerson STOC 2004 Presented by Richard Neil Pittman
Outline • Introduction • Definitions & Scenarios • Problem Setup • Algorithms • Conclusion • References • Questions & Homework
Introduction • The Traveling Salesman Problem (TSP) is fundamental routing problem in computer science with numerous applications. • However, optimizing for the minimum length tour is not always the best solution for a given application. • Sometimes the minimization of cost, time or distance is does not produce the desired behavior.
Definition - TSP Traveling Salesman Problem (TSP): Instance: Set C of m cities, positive distances d(ci,cj) for each pair of cites ci & cj in C & an integer B. Question: Is there a tour of C having length of B or less. Or Traveling Salesman Problem (TSP) Given an undirected graph, G(V,E,W), consisting of vertices, V, edges, E, and edge weights, W, find a tour of minimum weight that visits each vertex exactly once. Each edge, e(vi, vj) or eij, is associated with a weight, w(eij) or wtij, which represents a cost that edge. A tour is defined a permutation of vertices in the graph with same start and end point.
Scenario – part 1 • Our traveling salesman with this problem definition can design algorithm that can create the tour with close to the shortest length or determine if a tour exist under a bound which can be interpreted as a limited amount of gas for is vehicle.
Traveling Salesman Optimal tour visiting all sites once
Definitions - MRTSP Maximum Reward TSP (MRTSP) Given graph G(V,E,W, ∏), edge weights W(vi,vj), and vertex rewards ∏(v), and integer B, find a tour with a weight of B or less that maximizes the reward. Each vertex vi has a reward ∏(vi) that is awarded on the tour only the first time the vertex is visited.
Scenario – part 2 • This time our traveling salesman cannot use a tour longer than a given bound. This bound can be thought of as a limit on mileage due to limited gas funds. • Each of the sites has different accounts the salesman is responsible for, that have different values. It is to the salesman’s advantage to service the accounts of the most value. • Using the problem statement above the traveling salesman can create a tour that will allow to him get close to the maximum reward his limited gas funds will allow.
Traveling Salesman What if the tour bounded under 80? Tour with in bound of 80 with reward $194
Definitions - DTSP Deadline TSP (DTSP) Given graph, G(V,E,W, ∏, D), edge weights W(vi,vj), vertex rewards ∏(v), and vertex deadlines D(v), find a tour that maximizes the reward. Each vertex vi has a reward ∏(vi) and a deadline D(vi), such that the reward is awarded on the tour only the first time the vertex is visited before its deadline. 
Definitions - TWTSP Time Window TSP (TWTSP) Given graph, G(V,E,W, ∏, D,R), weights W(vi,vj), vertex rewards, ∏(v), vertex deadlines D(v), and vertex release times R(v), find a tour that maximizes the reward. Each vertex vi has a reward ∏(vi), a deadline D(vi), and a release time R(vi), such that the reward is awarded on the tour only the first time the vertex is visited before its deadline but after its release time.
Scenario – part 3 • This time the traveling salesman has the added complication that he has to make appointments ahead of time to meet with his clients. • These clients have limited availability defined by their time windows and deadlines. Using one or both of these problems statement defines the requirements for an algorithm to solve problems of interest.
Traveling Salesman What if the salesman could only visit sites at certain times? Tour with reward of 238 & visiting 6 sites on time
Definitions - P2POP Point to Point Orienteering Problem (P2POP) Given graph, G(V,E,W, ∏), weights W(vi,vj), and vertex rewards ∏(vi), two points vi and vj, and an integer D, find the path from vi to vj with weight D or less that maximizes the reward. Each vertex vi has a reward ∏i that is awarded on the path only the first time the vertex is visited.
Definitions - ORDP Orienteering with Release Dates Problem (ORDP) Given graph, G(V,E,W, ∏,D,R), edge weights W(vi,vj), vertex rewards ∏(vi), deadlines D(vi), and release times R(vi), and two points vi and vj, find the path from vi to vj that maximizes the reward. Each vertex vi has a reward ∏i that is awarded on the path only the first time the vertex is visited after its release time but before its deadline.
Definitions - MEPP Min Excess Path Problem (MEPP) Given graph G(V,E,W, ∏), weights W(vi,vj), and vertex rewards ∏(vi), two points vi and vj, and an integer K, find the path from vi to vj that visits K or more vertices and minimum excess along that path from vi to vj, εP. Each vertex vi has a reward ∏i that is awarded on the tour only the first time the vertex is visited. The excess of the path, P, from vi to vj is defined as the length of the path, lP(vi,vj), minus the direct distance from vi to vj, dist(vi,vj). Therefore εP >= lP(vi,vj) - dist(vi,vj).
Problem Setup • The problem instance for both these problems are given in the form of an undirected graph with edge weights and vertex rewards, deadlines and release times defined. • In the case of scheduling problems with additional parameters of setup time and task duration, these parameters can be taken into account by adjusting the edge weights of the graph. • For each edge eij from vi to vj, increase the edge weight by half the setup time for vi and vj and half the duration of vi and vj.
(2 + ε) Min Excess Path Algorithm • Use a dynamic algorithm previously presented in Blum et al 
Point to Point Orienteering Algorithm • FACT 1: εP(u0, ui) is increasing in i, where εP(u0, ui) is the excess along path P from u0 to ui.  • FACT 2: The excess function is sub-additive. By ‘sub-additive’ we refer to that nodes ui, uj and uk with 0 <= i <= j <= k <= l, εP(ui,uj) + εP(uj,uk) <= εP(ui,uk).  • Theorem 1: The algorithm for P2POP is a 3-approximation to the point to point orienteering problem or the algorithm returns 1/3 the optimal prize. 
Bicriteria Approximation for TWTSP • This algorithms is designed to optimize for two criteria: • Maximize Reward • Minimize Excess along the path • This algorithm is broken into two cases that are used to solve the General Case (Algorithm C): • Small Margin Case (Algorithm A) • Large Margin Case (Algorithm B)
Small Margin Case (Algorithm A) • ε is a constant that establishes the segment partitions • Sj is partitioned subset of vertices whose deadlines fall into to the interval [fjDmax,fj-1Dmax] • Ve is the set of all vertices that lie on the optimal path on the interval [D(v)/(1+ε),D(v),]
Small Margin Case (Algorithm A) • Lemma 2: For any j and any nodes u in Sj ∩ Ve where in Sj+3 ∩ Ve, tO(v) < tO(u), where tO(v) is the arrival time on the optimal path at vertex v. • Lemma 3: For any nodes v in Sj ∩ Ve, f3R(v) <= tA(v) < fD(v), where tA(v) is the arrival time at vertex v on path A. • Theorem 4: Algorithm A returns a path P with ∏εP >= 1/9 ∏O(Ve), where ∏εP is the reward earned on a path P with constant ε and ∏O(Ve) is the reward earned on the optimal path on the subset Ve. 
Small Margin Case (Algorithm A) • Both paths A and O visits Sj ∩ Ve after fj+2Dmax and before fj-1Dmax • For all v in Sj ∩ Ve R(v) <= fj-1Dmax • tA(v) >= fj+2Dmax >= f3R(v) • D(v) <= fjDmax by definition • tA(v) <= fj-1Dmax <= fD(v) • f3R(v) <= tA(v) <= fD(v)
Small Margin Case (Algorithm A) • The algorithm looses a factor of 3 from P2POP • The algorithm looses a factor of 3 by omitting two thirds of the vertices in any given solution • Therefore the approximation is bounded by 1/9
Large Margin Case (Algorithm B) • α and β is an approximation parameters • D’(v) = D(v)/4 • Si is the partition of a subset of vertices whose D’(v) are within the interval [αi,αi+1] • Pi is the P2P path for the root, r, and Si of length i+1 • Ti is the tour following Pi and back to r.
Large Margin Case (Algorithm B) • Lemma 5: For any i, j and v in Sβi+j, ½ R(v) <= tQ(v) <= ½ D(v), where tQ(v) is the arrival time on the path Q and Q is the path from the root along a P2P orienteering path and back to the root. • Theorem 6: Algorithm B returns a path P with ∏P >= 1/24 ∏O(V1/4), where V1/4 is the subset of vertices whose arrival times on the optimal path are less that ¼ of their deadlines and ∏O(V1/4) is the reward earned on the optimal path for this subset. 
Large Margin Case (Algorithm B) • D(v) = 4D’(v) >= 4αβi+j • |Qj| = Σk<i |Tβk+j| + |Pβi+j| <= αβi+j+1(2/(αβ– 1)+1) • tQ(v) <= (α/4)(2/(αβ– 1)+1)D(v) • tQ(v) <= ½ D(v) given β = 8 and α = 1.2 • tQ(v) >= Σk<i |Tβk+j| = (2αβi+j+1)/(αβ– 1) • tQ(v) >= ½ D’(v) given β = 8 and D’(v) <= αβi+j+1 • tQ(v) >= ½ R(v) given R(v) < D’(v) • ½ R(v) <= tQ(v) <= ½ D(v)
Large Margin Case (Algorithm B) • The sets Sjmodβ are guaranteed to include all of V1/4 • ΠQj>= 1/3 ΣiΠO(Sβi+j) from P2POP • Therefore the algorithm returns 3β approximation • 24 for β = 8
General Case (Algorithm C) • ε is the approximation parameter • s is defined as the smallest integer that satisfies fS <= ¼, where S is (1.5)s. • s is bounded by O(log 1/ ε) • Theorem 7: Algorithm C returns a path P with ∏εP >= (1/(24(s + 2)) ∏O = Ω(1/(log 1/ε) ∏O. • Corollary 8: Algorithm C with ε = 1/Dmax gives an O(log Dmax) approxiamation of the Time Window TSP problem.
O(log n) Approximation of Deadline TSP (Algorithm D) • A vertex ui is considered minimal if either tO(uj) <= tO(ui) or D(uj) >= D(ui) for ui and any other vertex uj • For any three minimal vertices uh, uj, and uk there exists a set R(h,j,k) such that D(uj) <= D(u) <= D(uk) or tO(uh) <= tO(u) <= tO(uj) • R(h1,j1,k1) and R(h2,j2,k2) are disjoint if h2 >= j1 and j2 >= k1 • A collection of rectangular sets, Ci, is considered disjoint if all rectangular sets in Ci are disjoint • There at most log n collections of disjoint rectangular sets such that all vertices ui on the optimal path O is present in at least one collection Ci • The total reward of all collections is at most ΠO, therefore some collections have at least (1/log n) ΠO • This set of collections is denoted as a family, F
O(log n) Approximation of Deadline TSP (Algorithm D) • Using P2P we can find all the O(n4Dmax2) paths within 1/3 of the optimal for the minimal vertex pairs in polynomial time • Then using a dynamic algorithm we patch these sub-paths together • The O(1) approximation of P2P and the fact there exists some Ci with at least 1/log n reward implies a O(log n) approximation for DTSP
O(log n) Approximation of Deadline TSP (Algorithm D) • Lemma 9: For each vertex u, visited in the optimum path O, there is at least one collection Ci in F such that u lies in some rectangle in Ci, where F is a family of log m collections where log m <= log n. • Lemma 10: We can compute in polynomial time a feasible path that collects at least a third of the reward collected by the best collection Ci. • Theorem 11: Algorithm is an O(log n) approximation for the Deadline TSP problem.
Orienteering with Release Dates Problem Algorithm • Redefine time windows of the vertices to [0,T-R(v)] where T is the max deadline or distance and call this new graph G’(V,E) • Run Algorithm D on this G’(V,E) and return the result in reverse order • Theorem 12: Algorithm D gives a 3 log n approximation to the Orienteering with Release Dates Problem, when applied to the complimentary graph.
O(log2 n) Approximation of Time Window TSP • Using Algorithm D with the P2P subroutine replaced with the solution to the Orienteering with Release Dates Problem • Theorem 13: The algorithm for Time Window TSP gives a 3 log2 n approximation of the Time Window TSP.
Conclusions • This paper describes approximation algorithms for the deadline and time window TSP. • The first algorithm is shown to have an O(log 1/ε) approximation ratio or O(log Dmax) when ε = 1/Dmax. • We have O(log n) and O(log2 n) approximations for deadline and time window TSP respectively that run in polynomial time.
References • A. Blum, S. Chawla, D. Karger, T. Lane, A. Meyerson,and M. Minkoff. Approximation algorithms for orienteering and discounted-reward tsp. In Proceedings of the 44th Foundations of Computer Science, 2003. • N. Bansal, A. Blum, S. Chawla, and A. Meyerson, Approximation algorithms for deadline-TSP and vehicle routing with time-windows. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing, 2004. • M. Garey, and D. Johnson. Computers and Intractability, A Guide to the Theory of NP-Completeness. W. H. Freeman and Company. 1979. p. 211.
Questions? & Homework • The first algorithm for the TWTSP and DTSP utilize two optimizing criteria. Formulate another optimization problem using two or more criteria. • Describe an application of TWTSP or DTSP other than vehicle navigation. How would you convert that problem to TWTSP or DTSP • Formulate one of the problems presented using the outline presented in class