Skip to main content
Log in

On approximating the longest path in a graph

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

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 lengthn-n ε in ann-vertex Hamiltonian graph isNP-hard. We then show that no polynomial-time algorithm can find a constant factor approximation to the longest-path problem unlessP=NP. We conjecture that the result can be strengthened to say that, for some constant δ>0, finding an approximation of ration δ is alsoNP-hard. As evidence toward this conjecture, we show that if any polynomial-time algorithm can approximate the longest path to a ratio of\(2^{O(\log ^{1 - \varepsilon } n)} \), for any ε>0, thenNP has a quasi-polynomial deterministic time simulation. The hardness results apply even to the special case where the input consists of bounded degree graphs.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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.

  2. S. Arora and S. Safra, Approximating clique is NP-complete,Proceedings of the 33rd Annual IEEE Symposium on Foundations of Computer Science, 1992, pp. 2–13.

  3. M. Bellare, Interactive Proofs and Approximation, IBM Research Report RC 17969, 1992.

  4. P. Berman and G. Schnitger, On the complexity of approximating the independent set problem,Information and Computation,96 (1992), 77–94.

    Article  MATH  MathSciNet  Google Scholar 

  5. A. Blum, Some tools for approximate 3-coloring,Proceedings of the 31st Annual IEEE Symposium on Foundations of Computer Science, 1990, pp. 554–562.

  6. B. Bollobas,Random Graphs, Academic Press, New York, 1985.

    MATH  Google Scholar 

  7. 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, Springer-Verlag, Berlin, 1990, pp. 13–25.

    Google Scholar 

  8. 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.

  9. V. Chvatal, Tough graphs and Hamiltonian circuits,Discrete Mathematics,5 (1973), 215–228.

    Article  MATH  MathSciNet  Google Scholar 

  10. V. Chvatal, Edmonds polytopes and weakly Hamiltonian graphs,Mathematical Programming,5 (1973), 29–40.

    Article  MATH  MathSciNet  Google Scholar 

  11. 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.

    Google Scholar 

  12. R. Fagin, Generalized first-order spectra and polynomial-time recognizable sets, inComplexity of Computer Computations (ed. R. Karp), American Mathematical Society, Providence, RI, 1974.

    Google Scholar 

  13. U. Feige, S. Goldwasser, L. Lovász, S. Safra, and M. Szegedy, Approximating clique is almost NP-complete,Proceedings of the 32nd Annual IEEE Symposium on Foundations of Computer Science, 1991, pp. 2–12.

  14. W. F. de la Vega and G. S. Lueker, Bin packing can be solved within 1+ε in linear time,Combinatorica,1 (1981), 349–355.

    MATH  MathSciNet  Google Scholar 

  15. M. Furer and B. Raghavachari, Approximating the minimum degree spanning tree to within one from the optimal degree,Proceedings of the 3rd Annual ACM-SIAM Symposium on Discrete Algorithms, 1992, pp. 317–324.

  16. M. R. Garey and D. S. Johnson,Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, San Francisco, CA, 1979.

    MATH  Google Scholar 

  17. D. S. Johnson, The Tale of the Second Prover, The NP-Completeness Column: An Ongoing Guide,Journal of Algorithms,13 (1992), 502–524.

    Article  MATH  MathSciNet  Google Scholar 

  18. 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.

  19. N. Karmakar and R. M. Karp, An efficient approximation scheme for the one-dimensional bin packing problem,Proceedings of the 23rd Annual IEEE Symposium on Foundations of Computer Science, 1982, pp. 312–320.

  20. 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.

  21. B. Monien, How to find long paths efficiently,Annals of Discrete Mathematics,25 (1984), 239–254.

    MathSciNet  Google Scholar 

  22. R. Motwani, Lecture Notes on Approximation Algorithms, Technical Report No. STAN-CS-92-1435, Department of Computer Science, Stanford University, 1992.

  23. 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.

  24. C. H. Papadimitriou and M. Yannakakis, The traveling salesman problem with distances one and two,Mathematics of Operations Research,18 (1993), 1–11.

    Article  MATH  MathSciNet  Google Scholar 

  25. A. Subramanian, Personal communication, 1994.

Download references

Author information

Authors and Affiliations

Authors

Additional information

D. Karger was supported by an NSF Graduate Fellowship, NSF Grant CCR-9010517, and grants from the Mitsubishi Corporation and OTL. R. Motwani was supported by an Alfred P. Sloan Research Fellowship, an IBM Faculty Development Award, grants from Mitsubishi and OTL, NSF Grant CCR-9010517, and NSF Young Investigator Award CCR-9357849, with matching funds from IBM, the Schlumberger Foundation, the Shell Foundation, and the Xerox Corporation, G. D. S. Ramkumar was supported by a grant from the Toshiba Corporation.

Communicated by M. X. Goemans.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Karger, D., Motwani, R. & Ramkumar, G.D.S. On approximating the longest path in a graph. Algorithmica 18, 82–98 (1997). https://doi.org/10.1007/BF02523689

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF02523689

Key Words

Navigation