Skip to main content
Log in

On the shortest path problem with negative cost cycles

  • Published:
Computational Optimization and Applications Aims and scope Submit manuscript

Abstract

In this paper, the elementary single-source all-destinations shortest path problem is considered. Given a directed graph, containing negative cost cycles, the aim is to find paths with minimum cost from a source node to each other node, that do not contain repeated nodes. Two solution strategies are proposed to solve the problem under investigation and their theoretical properties are investigated. The first is a dynamic programming approach, the second method is based on the solution of the k shortest paths problem, where k is considered as a variable. Theoretical aspects related to the innovative proposed strategies to solve the problem at hand are investigated. The practical behaviour of the defined algorithms is evaluated by considering random generated networks and instances derived from vehicle routing benchmark test problems.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Ahuja, R.K., Mehlhorn, K., Orlin, J.B., Tarjan, R.E.: Faster algorithms for the shortest path problem. Technical Report CS-TR-154-88. Departement of Computer Science, Princeton University (1988)

  2. Ali, Al, Kennington, J.L.: The asymmetric m-traveling salesmen problem: a duality based branch-and-bound algorithm. Discret. Appl. Math. 13, 259–276 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  3. Allender, E.W.: On the number of cycles possible in digraphs with large girth. Discret. Appl. Math. 10, 211–225 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  4. Augerat, P., Belenguer, J.M., Benavent, E., Corberan, A., Naddef, D., Rinaldi, G.: Computational results with a branch and cut code for the capacitated vehicle routing problem. Technical Report 949-M. Universite Joseph Fourier, Grenoble, France (1995)

  5. Barndorff-Nielsen, O., Sobel, M.: On the distribution of the number of admissible points in a vector random sample. Theory Propability Appl. 11(2), 283–305 (1966)

    MathSciNet  Google Scholar 

  6. Beasley, J.E., Christofides, N.: An algorithm for the resource constrained shortest path problem. Networks 19(4), 379–394 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  7. Bektas, T.: The multiple traveling salesman problem: an overview of formulations and solution procedures. Omega 34(3), 209–219 (2006)

    Article  Google Scholar 

  8. Bellman, R.E.: On a routing problem. Q. Appl. Math. 16(1), 87–90 (1958)

    MATH  Google Scholar 

  9. Bentley, J.L., Kung, H.T., Schkolnick, M., Thompson, C.D.: On the average number of maxima in a set of vectors and applications. J. ACM 25(4), 536–543 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  10. Boland, N., Dethridge, J., Dumitrescu, I.: Accelerated label setting algorithms for the elementary resource constrained shortest path problem. Oper. Res. Lett. 34(1), 58–68 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  11. Chen, S., Ryan, D.R.: A comparison of three algoritms for finding fundamental cycles in a directed graph. Networks 11, 1–12 (1981)

    Article  MathSciNet  MATH  Google Scholar 

  12. Cherkassky, B.V., Goldberg, A.V., Radzik, T.: Shortest paths algorithms: Theory and experimental evaluation. Math. Program. 73(2), 129–174 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  13. Christofides, N., Mingozzi, A., Toth, P.: The vehicle routing problem. In: Christofides, N., Mingozzi, A., Toth, P., Sandi, C. (eds.) Combinatorial Optimization, chapter 11. John Wiley, Chichester (1979)

  14. Christofides, N., Eilon, S.: An algorithm for the vehicle dispatching problems. Oper. Res. Q. 20(3), 309–318 (1969)

    Article  Google Scholar 

  15. Dantzig, G.B.: On the shortest route through a network. Management Science, pp. 187–190, (1960)

  16. Daskin, M.S.: Network and Discrete Location. Wiley, New York (1995)

    Book  MATH  Google Scholar 

  17. Desrochers, M., Desrosiers, J., Solomon, M.: A new optimization algorithm for the vehicle routing problem with time windows. Oper. Res. 40(2), 342–354 (1992)

    Article  MathSciNet  MATH  Google Scholar 

  18. Di Puglia Pugliese, L., Guerriero, F.: Solution approaches for the elementary shortest path problem. Technical Report 5/10, University of Calabria, LOGICA, (2010). Downloadable from http://uweb.deis.unical.it/dipugliapugliese/

  19. Di Puglia Pugliese, L., Guerriero, F.: A computational study of solution approaches for the resource constrained elementary shortest path problem. Ann. Oper. Res. 201(1), 131–157 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  20. Di Puglia Pugliese, L., Guerriero, F.: A reference point approach for the resource constrained shortest path problems. Transp. Sci. 47(2), 247–265 (2013)

    Article  Google Scholar 

  21. Di Puglia Pugliese, L., Guerriero, F.: Shortest path problem with forbidden paths: the elementary version. Eur. J. Oper. Res. 227(2), 254–267 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  22. Di Puglia Pugliese, L., Guerriero, F.: A survey of resource constrained shortest path problem: exact solution appoaches. Networks 62(3), 183–200 (2013)

    MathSciNet  Google Scholar 

  23. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)

    Article  MathSciNet  MATH  Google Scholar 

  24. Drexl, M., Irnich, S.: Solving elementary shortest-path problems as mixed-integer programs. OR Spectrum 36(2), 281–296 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  25. Dreyfus, S.E.: An appraisal of some shortest path algorithms. Oper. Res. 17, 395–412 (1969)

    Article  MATH  Google Scholar 

  26. Feillet, D., Dejax, P., Gendreau, M., Gueguen, C.: An exact algorithm for the elementary shortest path problem with resource constraints: application to some vehicle routing problems. Networks 44(3), 216–229 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  27. Fisher, M.L.: Optimal solution of vehicle routing problems using minimum k-trees. Oper. Res. 42, 626–642 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  28. Floyd, R.W.: Algorithm 97: shortest path. Commun. ACM 5(6), 345 (1962)

    Article  Google Scholar 

  29. Ford, L.R., Fulkerson, D.R.: Flows in Networks. Princeton University Press, Princeton (1962)

    MATH  Google Scholar 

  30. Fredman, M.L., Tarjan, R.E.: Fibonacci heaps and their uses in improved network optimization algorithms. J. ACM 34(3), 596–615 (1987)

    Article  MathSciNet  Google Scholar 

  31. Gabow, H.N., Tarjan, R.E.: Faster scaling algorithm for network problems. SIAM J. Comput. 18(5), 1013–1036 (1989)

    Article  MathSciNet  MATH  Google Scholar 

  32. Gallo, G., Pallottino, S.: Shortest path algorithms. Ann. Oper. Res. 13(1), 1–79 (1988)

    Article  MathSciNet  Google Scholar 

  33. Gavish, B., Srikanth, K.: An optimal solution method for large-scale multiple traveling salesman problems. Oper. Res. 34(5), 698–717 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  34. Goldberg, A.V.: Scaling algorithms for the shortest path problem. In: \(4^{th}\) ACM-SIAM Symposium on Discrete Algorithms, pp. 222–231 (1993)

  35. Golden, B.L., Wasil, E.A., Kelly, J.P., Chao, I.-M.: Metaheuristics in vehicle routing. In: Crainic, T.G., Laporte, G. (eds.) Fleet Management and Logistics, pp. 33–56. Kluwer, Boston (1998)

    Chapter  Google Scholar 

  36. Guerriero, F., Musmanno, R., Lacagnina, V., Pecorella, A.: A class of label-correcting methods for the \(k\) shortest paths problem. Oper. Res. 49(3), 423–429 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  37. Guerriero, F., Di Puglia Pugliese, L.: Multi-dimensional labelling approaches to solve the linear fractional elementary shortest path problem with time windows. Optim. Methods Softw. 26(2), 295–340 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  38. Ibrahim, M.S., Maculan, N., Minoux, M.: A strong flow-based formulation for the shortest path problem in digraph with negative cycles. Int. Trans. Oper. Res. 16, 361–369 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  39. Irnich, S.: Resource extension functions: properties, inversion and generalization to segments. OR Spectrum 30(1), 113–148 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  40. Klingman, D., Napier, A., Stutz, J.: Netgen: A program for generating large-scale (un)capacitated assignment, transportation, and minimum cost flow network problems. Manag. Sci. 20 (1974)

  41. Kohl, N.: Exact methods for time constrained routing and related scheduling problems. PhD thesis, Informatics and Mathematical Modelling, Technical University of Denmark, DTU, Richard Petersens Plads, Building 321, DK-2800 Kgs. Lyngby (1995)

  42. Magnanti, T.L., Wong, R.T.: Network design and transportation planning: models and algorithms. Transp. Sci. 18, 1–55 (1984)

    Article  Google Scholar 

  43. Martins, E.Q., Pascoal, M.M., Santos, J.L.: Deviation algorithms for ranking shortest paths. Int. J. Found. Comput. Sci. 10(3), 247–261 (1999)

    Article  Google Scholar 

  44. Moore, E.F.: The shortest path through a maze. In: Interantional Symposium on the Theory of Switching, pp. 285–292. Harvard University Press (1959)

  45. Orloff, C.S.: Routing a fleet of m vehicles to/from a central facility. Networks 4, 147–162 (1974)

    Article  MathSciNet  Google Scholar 

  46. Rao, M.R.: A note on the multiple traveling salesman problem. Oper. Res. 28(3), 628–632 (1980)

    Article  MATH  Google Scholar 

  47. Read, R.C., Tarjan, R.E.: Bounds on backtrack algorithms for listing cycles, paths, and spanning trees. Networks 5, 237–252 (1975)

    MathSciNet  MATH  Google Scholar 

  48. Righini, G., Salani, M.: New dynamic programming algorithms for the resource constrained elementary shortest path problem. Networks 51(3), 155–170 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  49. Sedgewick, R., Wayne, K.: Shortest paths. http://www.cs.princeton.edu/rs/AlgsDS07/, (2007)

  50. Solomon, M.M.: Vehicle routing and scheduling with time window constraints: models and algorithms. PhD thesis, Department of Decision Science, University of Pennsylvania (1983)

  51. Subramani, K.: A zero-space algorithm for negative cost cycle detection in networks. J. Discret. Algorithms 5, 408–421 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  52. Taillard, D.: Parallel iterative search methods for vehicle routing problems. Networks 23, 661–673 (1993)

    Article  MATH  Google Scholar 

  53. Van Bredam, A.: An Analysis of the behavior of heuristics for the vehicle routing problem for a selection of problems with vehicle-related. Customer-related, and time-related constraints. PhD thesis, University of Antwerp (1994)

  54. Yamada, T., Kinoshita, H.: Finding all the nagative cycles in a directed graph. Discret. Appl. Math. 118, 279–291 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  55. Yen, J.Y.: Finding the k-shortest loopless paths in a network. Manage. Sci. 17, 711–715 (1971)

    Article  Google Scholar 

Download references

Acknowledgments

The authors would like to thank Professor Francesco Scarcello for his valuable comments and helpful suggestions related to the complexity analysis of the proposed solution approaches. They also wish to thank the editor and the anonymous referees having contributed to improve the quality and readability of the paper, with their constructive suggestions and comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Luigi Di Puglia Pugliese.

Appendix

Appendix

In this appendix, we show how the proposed Algorithm 1 and 4 work by considering the instance of Figure 5.

Fig. 5
figure 5

Graph example

1.1 Algorithm 1

In Table 6, we report set S, the labels at the end of Algorithm 2, the last selected label and the detected cycle C. The labels reported in Table 6 have the following form: \(<\pi (y)>\). The superscript reported next to the labels indicates that the related label is dominated.

Table 6 Labels associated with each node at the end of Algorithm 2 at each iteration of Algorithm 1

At the first iteration of Algorithm 1 (see column \(1^{st}\) iteration of Table 6), the label \(<s,2,5,4(-8)>\) is selected. When we try to extend the label to node 2 a \( NCC \) is detected. Indeed, path \(\pi _{s2} = \{s,2,5,4\} \cup \{2\}\) has a cost equal to \(-5\) that is less than the cost of path \(\pi _{s2}=\{s,2\}\) associated with label \(<s,2(-4)>\). The dummy resource is introduced to node 2. At the \(2^{nd}\) iteration, the \( NCC \,\{1,2,3,1\}\) is detected and node 1 is inserted in the set S. The introduction of the resource at node 2 and 1 avoids the generation of \( NCC s\) and the optimal solution is found at the \(3^{rd}\) iteration.

1.2 Algorithm 4

In Table 7, we report the paths and the related cost (\(<\pi _{si}^{k} (y_i[k])>\)) at the end of each iteration of Algorithm 4 when solving the ESPP on the network of Figure 5. At the \(1^{st}\) iteration, node 3 is selected. Since all the conditions of line 9 are verified, Algorithm 3 terminates and the cycle \(\{1,2,3,1\}\) is returned. The value of \(K_i, i=1,2,3\) is incremented of one and Algorithm 3 is executed again. Node 4 is selected (see \(2^{nd}\) iteration). When path \(\pi _{s4}^1=\{s,1,2,5,4\}\) is extended to node 2, conditions of line 9 are satisfied, thus the NCC \(\{2,5,4,2\}\) is detected and Algorithm 3 is stopped. The number of paths that need to be found for nodes 2, 5 and 4 is increased. After other three iterations, see \(3^{rd}\), \(4^{th}\) and \(5^{th}\) iteration of Table 7, condition of line 29 is verified. Since \(C = \emptyset \), Algorithm 4 terminates and \(y_i[1], \forall i \in \mathcal {N}\), is the optimal cost.

Table 7 Paths and costs that are found for each node at the end of Algorithm 3 in each iteration of Algorithm 4

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Di Puglia Pugliese, L., Guerriero, F. On the shortest path problem with negative cost cycles. Comput Optim Appl 63, 559–583 (2016). https://doi.org/10.1007/s10589-015-9773-1

Download citation

  • Received:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10589-015-9773-1

Keywords

Navigation