A General Purpose Algorithm for Counting Simple Cycles and Simple Paths of Any Length - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Algorithmica Année : 2019

A General Purpose Algorithm for Counting Simple Cycles and Simple Paths of Any Length

Nils Kriege
  • Fonction : Auteur
  • PersonId : 1129430
Richard Wilson
  • Fonction : Auteur
  • PersonId : 1129414

Résumé

We describe a general purpose algorithm for counting simple cycles and simple paths of any length on a (weighted di)graph on N vertices and M edges, achieving a time complexity of O N + M + ω + ∆ |S |. In this expression, |S | is the number of (weakly) connected induced subgraphs of G on at most vertices, ∆ is the maximum degree of any vertex and ω is the exponent of matrix multiplication. We compare the algorithm complexity both theoretically and experimentally with most of the existing algorithms for the same task. These comparisons show that the algorithm described here is the best general purpose algorithm for the class of graphs where (ω−1 ∆ −1 +1)|S | ≤ |Cycle |, with |Cycle | the total number of simple cycles of length at most , including backtracks and self-loops. On Erdős-Rényi random graphs, we find empirically that this happens when the edge probability is larger than circa 4/N. In addition, we show that some real-world networks also belong to this class. Finally, the algorithm permits the enumeration of simple cycles and simple paths on networks where vertices are labeled from an alphabet on n letters with a time complexity of O N + M + n ω + ∆ |S |. A Matlab implementation of the algorithm proposed here is available for download.
Fichier principal
Vignette du fichier
Algo.pdf (441.14 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03597440 , version 1 (04-03-2022)

Identifiants

Citer

P.-L Giscard, Nils Kriege, Richard Wilson. A General Purpose Algorithm for Counting Simple Cycles and Simple Paths of Any Length. Algorithmica, 2019, 81 (7), pp.2716-2737. ⟨10.1007/s00453-019-00552-1⟩. ⟨hal-03597440⟩
34 Consultations
124 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More