Master 1 Informatique ISTIC Module AA 2016 Advanced Algorithmics Exercises on Approximation Algorithms Inapproximability Exercise 1 (Inapproximability of TSP) We recall Travelling Salesman (TSP) Input : A graph G = (V, E), for each e ∈ E, an integer de > 0. Output : A cycle that passes through every vertex exactly once with minimal cost. and its decision problem version Budget Travelling Salesman (budgetTSP) Input : A graph G = (V, E), for each e ∈ E, an integer de > 0, and a budget b ≥ 0. Output : Does there exist a cycle that passes through every vertex exactly once whose cost is at most b? We let G = (V, E) be an input of TSP, we write opt(G) the value of an optimal tour1 . 1) For a start, we suppose that G is such that the triangular inequality for the distances de holds2 , and aim at designing a 2-approximation algorithm. 1. With such an assumption on G, show that for any minimum spanning tree MST of G, we have opt(G) ≥ cost(MST) 2. Exploit the Euclidean assumption to build a tour from a (efficient) minimum spanning tree computation, and show it is a 2-aproximation (Hint: see Figures 1 and 2). 1 2 We take the convention that opt(G) = +∞ if G has no Hamiltonian cycle that is the Euclidean TSP problem. Advanced Algorithmics 2 Exercises on Approximation Algorithms Wichita Albuquerque Wichita Tulsa Amarillo Albuquerque 8 Little Rock 11 9 Amarillo 5 6 7 Tulsa 12 Little Rock 14 10 Dallas 3 Dallas 15 El Paso El Paso 4 13 16 Houston 2 Houston 1 San Antonio San Antonio Figure 1: TSP and MST. Wichita Tulsa Albuquerque Little Rock Amarillo Dallas El Paso Houston San Antonio Figure 2: Exploit the triangular inequality. 2) We suppose that G is arbitrary, and we write n its mumber of vertices. We recall the classic Hamiltonian cycle decision problem: Hamiltonian cycle (HAMCYCL) Input : A graph G = (V, E). Output : Is there a cycle that visits each vertex exactely once? 1. Given an arbitrary instance G = (V, E) of the Hamiltonian Cycle and C ∈ IN, I(G, C) of TSP as the very graph G with the following distances: d(u,v) = 1 if (u, v) ∈ E, and 1 + C otherwise. Justify the following two assertions (recall that n is the number of vertices): (a) If G has an Hamiltonian cycle, then opt(I(G, C)) = n, the number of vertices in G. (b) If G has no Hamiltonian cycle, then opt(I(G, C)) ≥ n + C. Also check that the distances of the graph I(G, 1) (case where C = 1) verify the triangular inequality. 2. From the reduction above and its properties, we show that an efficient solution for HAMCYCL can be deduce from an approximation algorithm for TSP. Advanced Algorithmics Exercises on Approximation Algorithms 3 Assume there exists a (polynomial-time) approximation algorithm A for TSP with ratio ρ. Use the reduction above to design a polynomial algorithm that answers the decision problem HAMCYCL. (Hint: C must be chosen big because of the Remark above, try out C = nρ). 3. What can you conclude regarding the existence of an approximation algorithm for TSP in the general case? Exercise 2 (Minimum Vertex Cover and Maximal Matching) Vertex Cover (VC) Input : An undirected graph G = (V, E) and k > 0. Output : Does there exist a subset of vertices S ⊆ V with |S| ≤ k that touches every edge. The Minimum Vertex Cover problem is to minimize the size of the vertex cover, we shall write opt the value of its cardinal. Maximal matchings will help us find good vertex covers. We consider an instance G = (V, E) of VC. 1. Define a matching of G as a subset M ⊆ E of edges that have no vertices in common. A matching is maximal if no more edges can be added to it while remaining a matching. 2. Show that maximal matching are easy to generate. 3. Show that any matching M ⊆ E provides a lower bound on opt, the optimal value for the minimum vertex cover problem. 4. Show how to build a vertex cover from a maximal matching. What is its cardinal? Deduce an upper bound for opt. 5. Use all previous questions to design an approximation algorithm for the minimal vertex cover problem. What is the ratio ρ? 6. Show that this ratio is optimal, in the sense that there are arbitrarily big instances where your algorithm computes a vertex cover computed whose size is ρopt.
© Copyright 2026 Paperzz