Annals of Operations Research

, Volume 244, Issue 2, pp 313–348 | Cite as

Exact methods for solving the elementary shortest and longest path problems

  • Quoc Trung Bui
  • Yves Deville
  • Quang Dung Pham
Original Paper


We consider in this paper the problems of finding the elementary shortest and longest paths on a graph containing negative and positive cycles. These problems are NP-hard. We propose exact algorithms based on mixed integer programming for their solution, employing different valid inequalities. Moreover, we propose decomposition techniques which are very efficient for cases with special structure. Experimental results show the efficiency of our algorithms compared with state of the art exact algorithms.


Elementary shortest path Elementary longest path Negative cycles Mixed integer programming Decomposition 



We thanks the anonymous reviewers for their helpful and constructive comments. This research was partially sponsored by Vietnamese National Foundation for Science and Technology Development (project FWO.102.2013.04), and by the UCLouvain Action de Recherche Concertee ICTM22C1.


  1. Achterberg, T., & Berthold, T. (2009). Hybrid branching. In Proceeding of the 6th international conference on integration of AI and OR techniques in constraint programming for combinatorial optimization problems (pp. 309–311).Google Scholar
  2. Achterberg, T., Koch, T., & Martin, A. (2005). Branching rules revisited. Operations Research Letters, 33(1), 42–54.CrossRefGoogle Scholar
  3. Aráoz, J., Fernández, E., & Meza, O. (2007) A simple exact separation algorithm for 2-matching inequalities. Research Report DR-2007/13, EIO Departement, Technical University of Catalonia (Spain).
  4. Ascheuer, N., Jünger, M., & Reinelt, G. (2000). A branch & cut algorithm for the asymmetric traveling salesman problem with precedence constraints. Computational Optimization and Applications, 17(1), 61–84.CrossRefGoogle Scholar
  5. Balas, E., Ceria, S., & Cornuéjols, G. (1996). Mixed 0–1 programming by lift-and-project in a branch-and-cut framework. Management Science, 42(9), 1229–1246.CrossRefGoogle Scholar
  6. Balas, E., & Fischetti, M. (1993). A lifting procedure for the asymmetric traveling salesman polytope and a large new class of facets. Mathematical Programming, 58, 325–352.CrossRefGoogle Scholar
  7. Baldacci, R., Mingozzi, A., & Roberti, R. (2012). Recent exact algorithms for solving the vehicle routing problem under capacity and time window constraints. European Journal of Operational Research, 218(1), 1–6.CrossRefGoogle Scholar
  8. Beasley, J. E., & Christofides, N. (1989). An algorithm for the resource constrained shortest path problem. Network, 19, 379–394.CrossRefGoogle Scholar
  9. Belotti, P., et al. (2013). Mixed-integer nonlinear optimization. Acta Numerica, 22, 1–131.CrossRefGoogle Scholar
  10. Bienstock, D., et al. (1993). A note on the prize collecting traveling salesman problem. Mathematical Programming, 59, 413–420.CrossRefGoogle Scholar
  11. Boland, N., Dethridge, J., & Dumitrescu, I. (2006). Accelerated label setting algorithms for the elementary resource constrained shortest path problem. Operations Research Letters, 34(1), 58–68.CrossRefGoogle Scholar
  12. Comet Tutorial. Dynamic Decision Technologies, Inc, 2010.Google Scholar
  13. Cormen, T. H., et al. (2009). Introduction to algorithms, third edition (3rd ed.). Cambridge: The MIT Press.Google Scholar
  14. Costa, A. M., Cordeau, J. F., & Laporte, G. (2006). Steiner tree problems with profits. INFOR: Information Systems and Operational Research, 44, 99–116.Google Scholar
  15. Dell’Amico, M., Maffioli, F., & Värbrand, P. (1995). On prize-collecting tours and the asymmetric travelling salesman problem. International Transactions in Operational Research, 38, 1073–1079.Google Scholar
  16. Drexl, M., & Irnich, S. (2012). Solving elementary shortest-path problems as mixed-integer programs. OR Spectrum, 36(2), 281–296.Google Scholar
  17. Dror, M. (1994). Note on the complexity of the shortest path models for column generation in WRPTW. Operations Research, 42(5), 977–978.CrossRefGoogle Scholar
  18. Edmonds, J. (1965). Maximum matching and a polyhedron with 0, 1-vertices. Journal of Research of the National Bureau of Standards B, 69, 125–130.CrossRefGoogle Scholar
  19. Feillet, D., Dejax, P., & Gendreau, M. (2005). Traveling salesman problems with profits. Transportation Science, 39, 188–205.CrossRefGoogle Scholar
  20. Feillet, D., et al. (2004). An exact algorithm for the elementary shortest path problem with resource constraints: Application to some vehicle routing problems. Networks, 44(3), 216–229.Google Scholar
  21. Fischetti, M. (1991). Facets of the asymmetric traveling salesman polytope. Mathematics of Operations Research, 16(1), 42–56.CrossRefGoogle Scholar
  22. Fischetti, M., Lodi, A., & Toth, P. (2004). Exact methods for the asymmetric traveling salesman problem. In G. Gutin & A. P. Punnen (Eds.), The traveling salesman problem and its variations (pp. 169–205). US: Springer.Google Scholar
  23. Goemans, M. X., & Williamson, D. P. (1992). A general approximation technique for constrained forest problems. In Proceedings of the third annual ACM-SIAM symposium on discrete algorithms (pp. 307–316).Google Scholar
  24. Gondran, M., & Minoux, M. (1995). Graphes et algorithmes, 3e édition revue et augmentée. Paris: Eyrolles.Google Scholar
  25. Grötschel, M., & Padberg, M. (1985). Polyhedral theory. In E. L. Lawler, J. K. Lenstra & A. H. G. Rinnooy Kan (Eds.), The traveling salesman problem: A guided tour of combinatorial optimization (pp. 251–305). Wiley.Google Scholar
  26. Ibrahim, M. S., Maculan, N., & Minoux, M. (2009). A strong flow-based formulation for the shortest path problem in digraphs with negative cycles. International Transactions in Operational Research, 16, 361–369.CrossRefGoogle Scholar
  27. Irnich, S., & Desaulniers, G. (2005). Shortest path problems with resource constraints. In G. Desaulniers, J. Desrosiers & M. M. Solomon (Eds.), Column generation (pp. 33–65). US: Springer.Google Scholar
  28. Jepsen, M. K., Petersen, B., & Spoorendonk, S. (2008). A branch-and-cut algorithm for the elementary shortest path problem with a capacity constraint. Technical Report, Department of Computer Science, University of Copenhagen.Google Scholar
  29. Karger, D., Motwani, R., & Ramkumar, G. (1997). On approximating the longest path in a graph. Algorithmica, 18, 82–98.CrossRefGoogle Scholar
  30. Koch, T., & Martin, A. (1998). Solving Steiner tree problems in graphs to optimality. Networks, 32, 207–232.CrossRefGoogle Scholar
  31. Kulkarni, R. V., & Bhave, P. R. (1985). Integer programming formulations of vehicle routing problems. European Journal of Operational Research, 20(1), 58–67.CrossRefGoogle Scholar
  32. Little, J. D. C., et al. (1963). An algorithm for the traveling salesman problem. Operations Research, 11, 972–989.CrossRefGoogle Scholar
  33. Ljubić, I., et al. (2006). An algorithmic framework for the exact solution of the prize-collecting Steiner tree problem. Mathematical Programming, 105(2), 427–449.Google Scholar
  34. Lucena, A., & Beasley, J. E. (1998). A branch and cut algorithm for the Steiner problem in graphs. Networks, 31, 39–59.CrossRefGoogle Scholar
  35. Miller, C. E., Tucker, A. W., & Zemlin, R. A. (1960). Integer programming formulation of traveling salesman problems. Journal of the ACM (JACM), 7(4), 326–329.CrossRefGoogle Scholar
  36. Nguyen, V. H., & Nguyen, T. T. T. (2010). Approximating the asymmetric profitable tour. Electronic Notes in Discrete Mathematics, 36, 907–914.CrossRefGoogle Scholar
  37. Padberg, M., & Rinaldi, G. (1987). Optimization of a 532-city symmetric traveling salesman problem by branch and cut. Operations Research Letters, 6(1), 1–7.CrossRefGoogle Scholar
  38. Padberg, M., & Rinaldi, G. (1990). Facet identification for the symmetric traveling salesman polytope. Mathematical Programming, 47, 219–257.CrossRefGoogle Scholar
  39. Padberg, M. W., & Rao, M. R. (1982). Odd minimum cut-sets and b-matchings. Mathematics of Operations Research, 7, 67–80.CrossRefGoogle Scholar
  40. Padberg, M. W., & Grötschel, M. (1985). Polyhedral computation. In E. L. Lawler, J. K. Lenstra, & A. H. G. Rinnooy Kan (Eds.), The traveling salesman problem: A guided tour of combinatorial optimization (pp. 251–305). Wiley.Google Scholar
  41. Pham, Q. D & Deville, Y. (2012) Solving the longest simple path problem with constrains-based techniques. In Proceedings of the 9th international conference on integration of AI and OR techniques in constraint programming for combinatorial optimization problems (pp. 292–306).Google Scholar
  42. Portugal, D., Antunes, C. H., & Rocha, R. P. (2010). A study of genetic algorithms for approximating the longest path in generic graphs. In Systems man and cybernetics (SMC), 2010 IEEE international conference on (pp. 2539–2544).Google Scholar
  43. Portugal, D., & Rocha, R. P. (2010) Msp algorithm: Multi-robot patrolling based on territory allocation using balanced graph partitioning. In Proceedings of the 2010 ACM symposium on applied computing (pp. 1271–1276).Google Scholar
  44. Punnen, A. P. (2004) The traveling salesman problem: Applications, formulations and variations. In G. Gutin, & A. P. Punnen (Eds.), The Traveling salesman problem and its variations (pp. 1–28).Google Scholar
  45. Radulescu, A., López-Ibáñez, M., & Stützle, T. (2012). Automatically improving the anytime behaviour of multiobjective evolutionary algorithms. Technical Report TR/IRIDIA/2012-019, IRIDIA, Université Libre de Bruxelles, Belgium.Google Scholar
  46. Righini, G., & Salani, M. (2006). Symmetry helps: Bounded bi-directional dynamic programming for the elementary shortest path problem with resource constraints. Discrete Optimization, 3, 255–273.CrossRefGoogle Scholar
  47. Righini, G., & Salani, M. (2008). New dynamic programming algorithms for the resource constrained elementary shortest path problem. Network, 51, 155–170.CrossRefGoogle Scholar
  48. Schmidt, K., & Schmidt, E. G. (2010). A longest-path problem for evaluating the worst-case packet delay of switched ethernet. In Industrial embedded systems (SIES), 2010 international symposium on (pp. 205–208)Google Scholar
  49. Tarjan, R. (1972). Depth-first search and linear graph algorithm. SIAM Journal on Computing, 1(2), 146–160.Google Scholar
  50. Toth, P., & Vigo, D. (Eds.). (2002). The vehicle routing problem. SIAM monographs on discrete mathematics and applications. Philadelphia: SIAM.Google Scholar
  51. Tseng, I. L., Chen, H. W. & Lee, C. I. (2010) Obstacle-aware longest-path routing with parallel MILP solvers. In Proceedings of the world congress on engineering and computer science (pp. 827–831).Google Scholar
  52. Uchoa, E. (2006). Reduction tests for the prize-collecting Steiner problem. Operations Research Letters, 34(4), 437–444.CrossRefGoogle Scholar
  53. Volgenant, T., & Jonker, R. (1987). On some generalizations of the travelling-salesman problem. Journal of the Operational Research Society, 3, 297–308.Google Scholar
  54. Wong, W. Y. (2005). Information retrieval in p2p networks using genetic algorithm. In Proceedings of the 14th international world wide web conference (pp. 922–923).Google Scholar

Copyright information

© Springer Science+Business Media New York 2016

Authors and Affiliations

  • Quoc Trung Bui
    • 1
  • Yves Deville
    • 2
  • Quang Dung Pham
    • 3
  1. 1.FPT Technology Research InstituteFPT UniversityHanoiVietnam
  2. 2.ICTEAM InstituteUniversité catholique de LouvainLouvain-la-NeuveBelgium
  3. 3.School of Information and Communication TechnologyHanoi University of Science and TechnologyHanoiVietnam

Personalised recommendations