On approximating the longest path in a graph
 D. Karger,
 R. Motwani,
 G. D. S. Ramkumar
 … show all 3 hide
Rent the article at a discount
Rent now* Final gross prices may vary according to local VAT.
Get AccessAbstract
We consider the problem of approximating the longest path in undirected graphs. In an attempt to pin down the best achievable performance ratio of an approximation algorithm for this problem, we present both positive and negative results. First, a simple greedy algorithm is shown to find long paths in dense graphs. We then consider the problem of finding paths in graphs that are guaranteed to have extremely long paths. We devise an algorithm that finds paths of a logarithmic length in Hamiltonian graphs. This algorithm works for a much larger class of graphs (weakly Hamiltonian), where the result is the best possible. Since the hard case appears to be that of sparse graphs, we also consider sparse random graphs. Here we show that a relatively long path can be obtained, thereby partially answering an open problem of Broderet al.
To explain the difficulty of obtaining better approximations, we also prove hardness results. We show that, for any ε<1, the problem of finding a path of lengthnn ^{ε} in annvertex Hamiltonian graph isNPhard. We then show that no polynomialtime algorithm can find a constant factor approximation to the longestpath problem unlessP=NP. We conjecture that the result can be strengthened to say that, for some constant δ>0, finding an approximation of ration ^{δ} is alsoNPhard. As evidence toward this conjecture, we show that if any polynomialtime algorithm can approximate the longest path to a ratio of \(2^{O(\log ^{1  \varepsilon } n)} \) , for any ε>0, thenNP has a quasipolynomial deterministic time simulation. The hardness results apply even to the special case where the input consists of bounded degree graphs.
 S. Arora, C. Lund, R. Motwani, M. Sudan, and M. Szegedy, Proof verification and hardness of approximation problems,Proceedings of the 33rd Annual IEEE Symposium on Foundations of Computer Science, 1992, pp. 14–23.
 S. Arora and S. Safra, Approximating clique is NPcomplete,Proceedings of the 33rd Annual IEEE Symposium on Foundations of Computer Science, 1992, pp. 2–13.
 M. Bellare, Interactive Proofs and Approximation, IBM Research Report RC 17969, 1992.
 P. Berman and G. Schnitger, On the complexity of approximating the independent set problem,Information and Computation,96 (1992), 77–94. CrossRef
 A. Blum, Some tools for approximate 3coloring,Proceedings of the 31st Annual IEEE Symposium on Foundations of Computer Science, 1990, pp. 554–562.
 B. Bollobas,Random Graphs, Academic Press, New York, 1985.
 R. B. Boppana and M. M. Halldorsson, Approximating maximum independent sets by excluding subgraphs,Proceedings of the 2nd Scandanavian Workshop on Algorithmic Theory, Lecture Notes in Computer Science, No. 447, SpringerVerlag, Berlin, 1990, pp. 13–25.
 A. Broder, A. M. Frieze, and E. Shamir, Finding hidden Hamiltonian cycles,Proceedings of the 23rd Annual ACM Symposium on Theory of Computing, 1991, pp. 182–189.
 V. Chvatal, Tough graphs and Hamiltonian circuits,Discrete Mathematics,5 (1973), 215–228. CrossRef
 V. Chvatal, Edmonds polytopes and weakly Hamiltonian graphs,Mathematical Programming,5 (1973), 29–40. CrossRef
 V. Chvatal, Hamiltonian cycles, inThe Traveling Salesman Problem: A Guided Tour of Combinatorial Optimization (ed. E. L. Lawleret al.), Wiley, New York, 1985, pp. 402–430.
 R. Fagin, Generalized firstorder spectra and polynomialtime recognizable sets, inComplexity of Computer Computations (ed. R. Karp), American Mathematical Society, Providence, RI, 1974.
 U. Feige, S. Goldwasser, L. Lovász, S. Safra, and M. Szegedy, Approximating clique is almost NPcomplete,Proceedings of the 32nd Annual IEEE Symposium on Foundations of Computer Science, 1991, pp. 2–12.
 W. F. de la Vega and G. S. Lueker, Bin packing can be solved within 1+ε in linear time,Combinatorica,1 (1981), 349–355.
 M. Furer and B. Raghavachari, Approximating the minimum degree spanning tree to within one from the optimal degree,Proceedings of the 3rd Annual ACMSIAM Symposium on Discrete Algorithms, 1992, pp. 317–324.
 M. R. Garey and D. S. Johnson,Computers and Intractability: A Guide to the Theory of NPCompleteness, Freeman, San Francisco, CA, 1979.
 D. S. Johnson, The Tale of the Second Prover, The NPCompleteness Column: An Ongoing Guide,Journal of Algorithms,13 (1992), 502–524. CrossRef
 D. R. Karger, R. Motwani, and M. Sudan, Approximate graph coloring by semidefinite programming,Proceedings of the 35th Annual IEEE Symposium on Foundations of Computer Science, 1994, pp. 2–13.
 N. Karmakar and R. M. Karp, An efficient approximation scheme for the onedimensional bin packing problem,Proceedings of the 23rd Annual IEEE Symposium on Foundations of Computer Science, 1982, pp. 312–320.
 C. Lund and M. Yannakakis, On the hardness of approximating minimization problems,Proceedings of the 25th Annual ACM Symposium on Theory of Computing, 1993, pp. 286–293.
 B. Monien, How to find long paths efficiently,Annals of Discrete Mathematics,25 (1984), 239–254.
 R. Motwani, Lecture Notes on Approximation Algorithms, Technical Report No. STANCS921435, Department of Computer Science, Stanford University, 1992.
 C. H. Papadimitriou and M. Yannakakis, Optimization, approximation, and complexity classes,Proceedings of the 20th Annual ACM Symposium on Theory of Computing, 1988, pp. 229–234.
 C. H. Papadimitriou and M. Yannakakis, The traveling salesman problem with distances one and two,Mathematics of Operations Research,18 (1993), 1–11. CrossRef
 A. Subramanian, Personal communication, 1994.
 Title
 On approximating the longest path in a graph
 Journal

Algorithmica
Volume 18, Issue 1 , pp 8298
 Cover Date
 19970501
 DOI
 10.1007/BF02523689
 Print ISSN
 01784617
 Online ISSN
 14320541
 Publisher
 SpringerVerlag
 Additional Links
 Topics
 Keywords

 Long paths
 Hamiltonian paths
 Approximation algorithms
 Complexity theory
 Random graphs
 Industry Sectors
 Authors

 D. Karger ^{(1)}
 R. Motwani ^{(1)}
 G. D. S. Ramkumar ^{(1)}
 Author Affiliations

 1. Department of Computer Science, Stanford University, 94305, Stanford, CA, USA