Skip to main content

A very fast, practical algorithm for finding a negative cycle in a digraph

  • Conference paper
  • First Online:
Book cover Automata, Languages and Programming (ICALP 1986)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 226))

Included in the following conference series:

Abstract

We present an algorithm which can find a negative cycle in a directed graph in worst case time O(n·e), where n is the number of nodes and e the number of edges, using only space O(n + e). Our algorithm is implemented on a pointer machine. Assuming that the input to our algorithm is a weighted random digraph, we prove that its average time complexity for dense graphs lies between O(n·logn) and O(min{n 2/log 2 n,e}), the exact value depending on the probability with which an edge is present in the random graph, and for sparse random graphs is Θ(n 2).

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  • AHO A., HOPCROFT J., ULLMAN J. "Design and Analysis of Computer Algorithms", Addison Wesley (1974)

    Google Scholar 

  • ANGLUIN D. and VALLANT L. "Fast Probabilistic Algorithms for Hamiltonian Circuits and Mathings" J. Computers and System Sciences, Vol.18, pp.155–193 (1979)

    Google Scholar 

  • CHERNOFF H. "A Measure of Asymptotic Efficiency for Tests of a Hypothesis based on the Sum of Observations", Annals of Math. Statistics, Vol.23 (1952)

    Google Scholar 

  • ERDOS P. and RENYI A. "On Random Graphs", in the "Art of Counting", J.Spencer editor, MIT Press, also "Publicationes Mathematicae", Vol. 6, pp. 290–297 (1959)

    Google Scholar 

  • ERDOS P. and RENYI A. "On the evolution on random graphs", Publications of the Mathematical Institute of the Hungarian Academy of Sciences, 5, (1960)

    Google Scholar 

  • HAREL D. and TARJAN R.E. "Fast Algorithms for finding Nearest Common Ancestors", SIAM Journal of Computing, Vol. 13, pp. 338–355 (1984)

    Google Scholar 

  • KARP R. and TARJAN R. "Linear Expected-Time Algorithms for Connectivity Problems", 12th ACM Symp. on Theory of Computing, pp. 368–377 (1980)

    Google Scholar 

  • LAWLER E.L. "Combinatorial Optimization: Networks and Matroids", Holt, Rinehart and Winston (1976)

    Google Scholar 

  • LENGAUER T. "Efficient Algorithms for The Constraint Generation for Intergrated Circuit Layout Compaction", Proc. of 9-th Workshop on Graphtheoretic Concepts in Computer Science, Trauner Verlag, pp.219–230 (1983)

    Google Scholar 

  • MAIER D. "An Efficient Method for Storing Ancestor Information in Trees", SIAM Journal of Computing, Vol.8, No 4, pp.599–618 (1979)

    Google Scholar 

  • MEHLHORN K. "Data Structures and Algorithms, Vol.2: Graph-Algorithms and NP-Completeness", EATCS Monographs on Theoretical Computer Science, Springer Verlag (1984)

    Google Scholar 

  • PAPADIMITRIOU CH. and STEIGLITZ K. "Combinatorial Optimization: Algorithms and Complexity", Prentice-Hall (1982)

    Google Scholar 

  • REIF J. and SPIRAKIS P. "Random Matroids", 12th ACM Symp. on Theory of Computing, pp.385–397 (1980)

    Google Scholar 

  • REIF J. and SPIRAKIS P. "K-Connectivity of Random Undirected Graphs" to appear in Journal of Discrete Mathematics

    Google Scholar 

  • SPIRAKIS P. and TSAKALIDIS A. "A Very Fast, Practical Algorithm for Finding a Negative Cycle in a Digraph", Technischer Bericht, FB 10, Universität des Saarlandes (1986)

    Google Scholar 

  • TARJAN R.E. "Data Structures and Network Algorithms", Society for Industrial and Applied Mathematics, Philadelphia, PA (1983)

    Google Scholar 

  • TSAKALIDIS A.K. "Maintaining Order in Generalized Linked List", Acta Informatica, Vol. 21, pp. 101–112 (1984)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Laurent Kott

Rights and permissions

Reprints and permissions

Copyright information

© 1986 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Spirakis, P., Tsakalidis, A. (1986). A very fast, practical algorithm for finding a negative cycle in a digraph. In: Kott, L. (eds) Automata, Languages and Programming. ICALP 1986. Lecture Notes in Computer Science, vol 226. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-16761-7_89

Download citation

  • DOI: https://doi.org/10.1007/3-540-16761-7_89

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-16761-7

  • Online ISBN: 978-3-540-39859-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics