, Volume 61, Issue 2, pp 320–341 | Cite as

The Longest Path Problem has a Polynomial Solution on Interval Graphs

  • Kyriaki Ioannidou
  • George B. Mertzios
  • Stavros D. Nikolopoulos


The longest path problem is the problem of finding a path of maximum length in a graph. Polynomial solutions for this problem are known only for small classes of graphs, while it is NP-hard on general graphs, as it is a generalization of the Hamiltonian path problem. Motivated by the work of Uehara and Uno (Proc. of the 15th Annual International Symp. on Algorithms and Computation (ISAAC), LNCS, vol. 3341, pp. 871–883, 2004), where they left the longest path problem open for the class of interval graphs, in this paper we show that the problem can be solved in polynomial time on interval graphs. The proposed algorithm uses a dynamic programming approach and runs in O(n4) time, where n is the number of vertices of the input graph.


Longest path problem Interval graphs Polynomial algorithm Complexity Dynamic programming 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Arikati, S.R., Pandu Rangan, C.: Linear algorithm for optimal path cover problem on interval graphs. Inf. Process. Lett. 35, 149–153 (1990) MATHCrossRefGoogle Scholar
  2. 2.
    Asdre, K., Nikolopoulos, S.D.: The 1-fixed-endpoint path cover problem is polynomial on interval graphs. Algorithmica (2009). doi:10.1007/s00453-009-9292-5 Google Scholar
  3. 3.
    Bertossi, A.A.: Finding Hamiltonian circuits in proper interval graphs. Inf. Process. Lett. 17, 97–101 (1983) MathSciNetMATHCrossRefGoogle Scholar
  4. 4.
    Bulterman, R., van der Sommen, F., Zwaan, G., Verhoeff, T., van Gasteren, A., Feijen, W.: On computing a longest path in a tree. Inf. Process. Lett. 81, 93–96 (2002) MATHCrossRefGoogle Scholar
  5. 5.
    Chang, M.S., Peng, S.L., Liaw, J.L.: Deferred-query: an efficient approach for some problems on interval graphs. Networks 34, 1–10 (1999) MathSciNetMATHCrossRefGoogle Scholar
  6. 6.
    Damaschke, P., Deogun, J.S., Kratsch, D., Steiner, G.: Finding Hamiltonian paths in cocomparability graphs using the bump number algorithm. Order 8, 383–391 (1992) MathSciNetMATHCrossRefGoogle Scholar
  7. 7.
    Damaschke, P.: The Hamiltonian circuit problem for circle graphs is NP-complete. Inf. Process. Lett. 32, 1–2 (1989) MathSciNetMATHCrossRefGoogle Scholar
  8. 8.
    Damaschke, P.: Paths in interval graphs and circular arc graphs. Discrete Math. 112, 49–64 (1993) MathSciNetMATHCrossRefGoogle Scholar
  9. 9.
    Feder, T., Motwani, R.: Finding large cycles in Hamiltonian graphs. In: Proc. of the 16th Annual ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 166–175. ACM, New York (2005) Google Scholar
  10. 10.
    Gabow, H.N.: Finding paths and cycles of superpolylogarithmic length. In: Proc. of the 36th Annual ACM Symp. on Theory of Computing (STOC), pp. 407–416. ACM, New York (2004) Google Scholar
  11. 11.
    Gabow, H.N., Nie, S.: Finding long paths, cycles and circuits. In: Proc. of the 19th Annual International Symp. on Algorithms and Computation (ISAAC). LNCS, vol. 5369, pp. 752–763. Springer, Berlin (2008) Google Scholar
  12. 12.
    Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-completeness. Freeman, New York (1979) MATHGoogle Scholar
  13. 13.
    Garey, M.R., Johnson, D.S., Tarjan, R.E.: The planar Hamiltonian circuit problem is NP-complete. SIAM J. Comput. 5, 704–714 (1976) MathSciNetMATHCrossRefGoogle Scholar
  14. 14.
    Goldberg, P.W., Golumbic, M.C., Kaplan, H., Shamir, R.: Four strikes against physical mapping of DNA. J. Comput. Biol. 2, 139–152 (1995) CrossRefGoogle Scholar
  15. 15.
    Golumbic, M.C.: Algorithmic Graph Theory and Perfect Graphs. Annals of Discrete Mathematics, vol. 57. North-Holland, Amsterdam (2004) MATHGoogle Scholar
  16. 16.
    Itai, A., Papadimitriou, C.H., Szwarcfiter, J.L.: Hamiltonian paths in grid graphs. SIAM J. Comput. 11, 676–686 (1982) MathSciNetMATHCrossRefGoogle Scholar
  17. 17.
    Karger, D., Motwani, R., Ramkumar, G.D.S.: On approximating the longest path in a graph. Algorithmica 18, 82–98 (1997) MathSciNetMATHCrossRefGoogle Scholar
  18. 18.
    Keil, J.M.: Finding Hamiltonian circuits in interval graphs. Inf. Process. Lett. 20, 201–206 (1985) MathSciNetMATHCrossRefGoogle Scholar
  19. 19.
    Müller, H.: Hamiltonian circuits in chordal bipartite graphs. Discrete Math. 156, 291–298 (1996) MathSciNetMATHCrossRefGoogle Scholar
  20. 20.
    Narasimhan, G.: A note on the Hamiltonian circuit problem on directed path graphs. Inf. Process. Lett. 32, 167–170 (1989) MathSciNetMATHCrossRefGoogle Scholar
  21. 21.
    Ramalingam, G., Rangan, C. Pandu: A unified approach to domination problems on interval graphs. Inf. Process. Lett. 27, 271–274 (1988) MATHCrossRefGoogle Scholar
  22. 22.
    Takahara, Y., Teramoto, S., Uehara, R.: Longest path problems on Ptolemaic graphs. IEICE Trans. Inf. Syst. 91-D, 170–177 (2008) CrossRefGoogle Scholar
  23. 23.
    Uehara, R., Uno, Y.: Efficient algorithms for the longest path problem. In: Proc. of the 15th Annual International Symp. on Algorithms and Computation (ISAAC). LNCS, vol. 3341, pp. 871–883. Springer, Berlin (2004) Google Scholar
  24. 24.
    Uehara, R., Valiente, G.: Linear structure of bipartite permutation graphs and the longest path problem. Inf. Process. Lett. 103, 71–77 (2007) MathSciNetMATHCrossRefGoogle Scholar
  25. 25.
    Vishwanathan, S.: An approximation algorithm for finding a long path in Hamiltonian graphs. In: Proc. of the 11th Annual ACM-SIAM Symp. on Discrete Algorithms (SODA), pp. 680–685. ACM, New York (2000) Google Scholar
  26. 26.
    Zhang, Z., Li, H.: Algorithms for long paths in graphs. Theoret. Comput. Sci. 377, 25–34 (2007) MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2010

Authors and Affiliations

  • Kyriaki Ioannidou
    • 1
  • George B. Mertzios
    • 2
  • Stavros D. Nikolopoulos
    • 1
  1. 1.Department of Computer ScienceUniversity of IoanninaIoanninaGreece
  2. 2.Department of Computer ScienceRWTH Aachen UniversityAachenGermany

Personalised recommendations