Skip to main content

Enumeration of Paths, Cycles, and Spanning Trees

  • Reference work entry
  • First Online:
Encyclopedia of Algorithms

Years and Authors of Summarized Original Work

  • 1975; Johnson

  • 1975; Read and Tarjan

  • 1994; Shioura, Tamura, Uno

  • 1995; Kapoor, Ramesh

  • 1999; Uno

  • 2013; Birmelé, Ferreira, Grossi, Marino, Pisanti, Rizzi, Sacomoto, Sagot

Problem Definition

Let G = (V, E) be a (directed or undirected) graph with n =  | V | vertices and m =  | E | edges. A walk of length k is a sequence of vertices v0, , v k  ∈ V such that v i and vi+1 are connected by an edge of E, for any 0 ≤ i < k. A path π of length k is a walk v0, , v k such that any two vertices v i and v j are distinct, for 0 ≤ i < j ≤ k: this is also called st-path where s = v0 and t = v k . A cycle (or, equivalently, elementary circuit) C of length k + 1 is a path v0, , v k such that v k and v0 are connected by an edge of E.

We denote by \(\mathcal{P}_{st}(G)\) the set of st-paths in G for any two given vertices s, t ∈ V and by \(\mathcal{C}(G)\) the set of cycles in G. Given a graph G, the problem of st-path enumerationasks for generating all the...

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 1,599.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 1,999.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Recommended Reading

  1. Bezem G, Leeuwen Jv (1987) Enumeration in graphs. Technical Report RUU-CS-87-07, Utrecht University

    Google Scholar 

  2. Birmelé E, Ferreira R, Grossi R, Marino A, Pisanti N, Rizzi R, Sacomoto G, Sagot MF (2013) Optimal listing of cycles and st-paths in undirected graphs. In: Proceedings of the twenty-fourth annual ACM-SIAM symposium on discrete algorithms, New Orleans. SIAM, pp 1884–1896

    Chapter  Google Scholar 

  3. Chen Y, Flum J (2007) On parameterized path and chordless path problems. In: IEEE conference on computational complexity, San Diego, pp 250–263

    Google Scholar 

  4. Chudnovsky M, Robertson N, Seymour P, Thomas R (2006) The strong perfect graph theorem. Ann Math 164:51–229

    Article  MathSciNet  MATH  Google Scholar 

  5. Conforti M, Rao MR (1992) Structural properties and decomposition of linear balanced matrices. Math Program 55:129–168

    Article  MathSciNet  MATH  Google Scholar 

  6. Diestel R (2005) Graph theory. Graduate texts in mathematics. Springer, Berlin/New York

    Google Scholar 

  7. Duffin R (1959) An analysis of the wang algebra of networks. Trans Am Math Soc 93:114–131

    Article  MathSciNet  MATH  Google Scholar 

  8. Ferreira RA, Grossi R, Rizzi R, Sacomoto G, Sagot M (2014) Amortized \(\tilde{O}(\vert V \vert )\)-delay algorithm for listing chordless cycles in undirected graphs. In: Proceedings of European symposium on algorithms. LNCS, vol 8737. Springer, Berlin/Heidelberg, pp 418–429

    Google Scholar 

  9. Feussner W (1902) Uber stromverzweigung in netzformigen leitern. Ann Physik 9:1304–1329

    Article  MATH  Google Scholar 

  10. Feussner W (1904) Zur berechnung der stromstarke in netzformigen leitern. Ann Physik 15:385–394

    Article  MATH  Google Scholar 

  11. Gabow HN, Myers EW (1978) Finding all spanning trees of directed and undirected graphs. SIAM J Comput 7(3):280–287

    Article  MathSciNet  MATH  Google Scholar 

  12. Haas R, Hoffmann M (2006) Chordless paths through three vertices. Theor Comput Sci 351(3):360–371

    Article  MathSciNet  MATH  Google Scholar 

  13. Hakimi S (1961) On trees of a graph and their generation. J Frankl Inst 272(5):347–359

    Article  MathSciNet  MATH  Google Scholar 

  14. Halford TR, Chugg KM (2004) Enumerating and counting cycles in bipartite graphs. In: IEEE Communication Theory Workshop, Cancun

    Google Scholar 

  15. Horváth T, Gärtner T, Wrobel S (2004) Cyclic pattern kernels for predictive graph mining. In: Proceedings of 10th ACM SIGKDD, Seattle, pp 158–167

    Google Scholar 

  16. Johnson DB (1975) Finding all the elementary circuits of a directed graph. SIAM J Comput 4(1):77–84

    Article  MathSciNet  MATH  Google Scholar 

  17. Kapoor S, Ramesh H (1995) Algorithms for enumerating all spanning trees of undirected and weighted graphs. SIAM J Comput 24:247–265

    Article  MathSciNet  MATH  Google Scholar 

  18. Kawarabayashi K, Kobayashi Y (2008) The induced disjoint paths problem. In: Lodi A, Panconesi A, Rinaldi G (eds) IPCO. Lecture notes in computer science, vol 5035. Springer, Berlin/Heidelberg, pp 47–61

    Google Scholar 

  19. Khachiyan L, Boros E, Borys K, Elbassioni K, Gurvich V (2006) Generating all vertices of a polyhedron is hard. In: Proceedings of the seventeenth annual ACM-SIAM symposium on discrete algorithm, society for industrial and applied mathematics, Philadelphia, SODA ’06, Miami, pp 758–765

    Google Scholar 

  20. Klamt S et al (2006) A methodology for the structural and functional analysis of signaling and regulatory networks. BMC Bioinform 7:56

    Article  Google Scholar 

  21. Klamt S, von Kamp A (2009) Computing paths and cycles in biological interaction graphs. BMC Bioinform 10:181

    Article  Google Scholar 

  22. Liu H, Wang J (2006) A new way to enumerate cycles in graph. In: AICT and ICIW, Washington, DC, USA pp 57–59

    Google Scholar 

  23. Mateti P, Deo N (1976) On algorithms for enumerating all circuits of a graph. SIAM J Comput 5(1):90–99

    Article  MathSciNet  MATH  Google Scholar 

  24. Minty G (1965) A simple algorithm for listing all the trees of a graph. IEEE Trans Circuit Theory 12(1):120–120

    Article  MathSciNet  Google Scholar 

  25. Moon J (1970) Counting labelled trees. Canadian mathematical monographs, vol 1. Canadian Mathematical Congress, Montreal

    Google Scholar 

  26. Ponstein J (1966) Self-avoiding paths and the adjacency matrix of a graph. SIAM J Appl Math 14:600–609

    Article  MathSciNet  MATH  Google Scholar 

  27. Read RC, Tarjan RE (1975) Bounds on backtrack algorithms for listing cycles, paths, and spanning trees. Networks 5(3):237–252

    MathSciNet  MATH  Google Scholar 

  28. Ruskey F (2003) Combinatorial generation. Preliminary working draft University of Victoria, Victoria

    Google Scholar 

  29. Sankar K, Sarad A (2007) A time and memory efficient way to enumerate cycles in a graph. In: Intelligent and advanced systems, Kuala Lumpur pp 498–500

    Google Scholar 

  30. Schott R, Staples GS (2011) Complexity of counting cycles using Zeons. Comput Math Appl 62:1828–1837

    Article  MathSciNet  MATH  Google Scholar 

  31. Seinsche D (1974) On a property of the class of n-colorable graphs. J Comb Theory, Ser B 16(2):191–193

    Article  MathSciNet  MATH  Google Scholar 

  32. Shioura A, Tamura A, Uno T (1994) An optimal algorithm for scanning all spanning trees of undirected graphs. SIAM J Comput 26:678–692

    Article  MathSciNet  MATH  Google Scholar 

  33. Sussenguth E (1965) A graph-theoretical algorithm for matching chemical structures. J Chem Doc 5:36–43

    Article  Google Scholar 

  34. Syslo MM (1981) An efficient cycle vector space algorithm for listing all cycles of a planar graph. SIAM J Comput 10(4):797–808

    Article  MathSciNet  MATH  Google Scholar 

  35. Szwarcfiter JL, Lauer PE (1976) A search strategy for the elementary cycles of a directed graph. BIT Numer Math 16:192–204

    Article  MathSciNet  MATH  Google Scholar 

  36. Tarjan RE (1973) Enumeration of the elementary circuits of a directed graph. SIAM J Comput 2(3):211–216

    Article  MathSciNet  MATH  Google Scholar 

  37. Tiernan JC (1970) An efficient search algorithm to find the elementary circuits of a graph. Commun ACM 13:722–726

    Article  MathSciNet  MATH  Google Scholar 

  38. Uno T (1998) New approach for speeding up enumeration algorithms. Algorithms and computation. Springer, Berlin/Heidelberg, pp 287–296

    Google Scholar 

  39. Uno T (1999) A new approach for speeding up enumeration algorithms and its application for matroid bases. In: COCOON, Tokyo, pp 349–359

    Google Scholar 

  40. Uno T (2003) An output linear time algorithm for enumerating chordless cycles. In: 92nd SIGAL of information processing society Japan, Tokyo pp 47–53, (in Japanese)

    Google Scholar 

  41. Uno T (2003) Two general methods to reduce delay and change of enumeration algorithms. National Institute of Informatics, Technical Report NII-2003-004E, Tokyo, Apr. 2003

    Google Scholar 

  42. Wang K (1934) On a new method for the analysis of electrical networks. Nat Res Inst for Eng Academia Sinica Memoir (2):19

    Google Scholar 

  43. Welch JT Jr (1966) A mechanical analysis of the cyclic structure of undirected linear graphs. J ACM 13:205–210

    Article  MathSciNet  MATH  Google Scholar 

  44. Wild M (2008) Generating all cycles, chordless cycles, and hamiltonian cycles with the principle of exclusion. J Discret Algorithms 6:93–102

    Article  MathSciNet  MATH  Google Scholar 

  45. Yau S (1967) Generation of all hamiltonian circuits, paths, and centers of a graph, and related problems. IEEE Trans Circuit Theory 14:79–81

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Roberto Grossi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer Science+Business Media New York

About this entry

Cite this entry

Grossi, R. (2016). Enumeration of Paths, Cycles, and Spanning Trees. In: Kao, MY. (eds) Encyclopedia of Algorithms. Springer, New York, NY. https://doi.org/10.1007/978-1-4939-2864-4_728

Download citation

Publish with us

Policies and ethics