Enumerating Simple Paths from Connected Induced Subgraphs

  • Pierre-Louis Giscard
  • Paul Rochet
Original Paper


We present an exact formula for enumerating the simple paths between any two vertices of a graph. Our formula involves the adjacency matrices of the connected induced subgraphs and remains valid on weighted and directed graphs. As a particular case, we obtain a relation linking the Hamiltonian paths and cycles of a graph to its dominating connected sets.


Directed graph Self-avoiding walks Simple cycles Hamiltonian paths Dominating sets Inclusion–exclusion 



P.-L. Giscard is grateful for the financial support from the Royal Commission for the Exhibition of 1851. The authors are grateful to an anonymous referee for its many constructive remarks that helped improve the paper.


  1. 1.
    Alon, N., Yuster, R., Zwick, U.: Finding and counting given length cycles. Algorithmica 17, 209–223 (1997)MathSciNetCrossRefGoogle Scholar
  2. 2.
    Bax, E.T.: Inclusion and exclusion algorithm for the hamiltonian path problem. Inf. Process. Lett. 47(4), 203–207 (1993)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Bax, E.T.: Algorithms to count paths and cycles. Inf. Process. Lett. 52(5), 249–252 (1994)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Bax, E., Franklin, J.: A finite-difference sieve to count paths and cycles by length. Inf. Process. Lett. 60(4), 171–176 (1996)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Björklund, A., Husfeldt, T., Kaski, P., Koivisto, M. (2009) Counting Paths and Packings in Halves. In: Fiat, A., Sanders, P. (eds) Algorithms - ESA 2009. ESA 2009. Lecture Notes in Computer Science, vol 5757, pp 578–586. Springer, Berlin, Heidelberg (2009)zbMATHGoogle Scholar
  6. 6.
    Björklund, A., Husfeldt, T., Kaski, P., Koivisto, M.: The travelling salesman problem in bounded degree graphs. ACM Trans Algorithms 8(2) (2012)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Cartwright, D., Harary, F.: Structural balance: a generalization of heider’s theory. Psychol. Rev. 63, 277–293 (1956)CrossRefGoogle Scholar
  8. 8.
    Cash, G.G.: The number of n-cycles in a graph. Appl. Math. Comput. 184(2), 1080–1083 (2007)MathSciNetzbMATHGoogle Scholar
  9. 9.
    Harary, F., Manvel, B.: On the number of cycles in a graph. Matematický časopis 21, 55–63 (1971)MathSciNetzbMATHGoogle Scholar
  10. 10.
    Karp, R.M.: Dynamic programming meets the principle of inclusion and exclusion. Oper. Res. Lett. 1(2), 49–51 (1982)MathSciNetCrossRefGoogle Scholar
  11. 11.
    Khomenko, N.P., Golovko, L.D.: Identifying certain types of parts of a graph and computing their number. Ukrainskii Matematicheskii Zhurnal 24, 385–396 (1972)Google Scholar
  12. 12.
    Madras, N., Slade, G.: The self-avoiding walk. Springer Science & Business Media (2013)Google Scholar
  13. 13.
    Perepechko, S.N., Voropaev, A.N.: The number of fixed length cycles in an undirected graph. explicit formulae in case of small lengths. In: Mathematical Modeling and Computational Physics (MMCP2009), pp. 148–149 (2009)Google Scholar
  14. 14.
    Ross, I.C., Harary, F.: On the determination of redundancies in sociometric chains. Psychometrika 17, 195–208 (1952)CrossRefGoogle Scholar
  15. 15.
    Schott, R., Staples, G.S.: Complexity of counting cycles using zeons. Comput. Math. Appl. 62(4), 1828–1837 (2011)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer Japan KK, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Department of Computer SciencesUniversity of YorkYorkUK
  2. 2.Laboratoire de Mathématiques Jean LerayUniversité de NantesNantesFrance

Personalised recommendations