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

被引:0
|
作者
Pierre-Louis Giscard
Nils Kriege
Richard C. Wilson
机构
[1] Université du Littoral Côte d’Opale,Department of Computer Science
[2] EA2597-LMPA-Laboratoire de Mathématiques Pures et Appliquées Joseph Liouville,Department of Computer Science
[3] TU Dortmund,undefined
[4] University of York,undefined
来源
Algorithmica | 2019年 / 81卷
关键词
Simple cycles; Simple paths; Self-avoiding walks; Self-avoiding polygons; Elementary circuits; Connected induced subgraphs; Networks; Graphs; Digraphs; Labeled graphs; 68Q25; 68W40; 05C30; 05C38; 05C22;
D O I
暂无
中图分类号
学科分类号
摘要
We describe a general purpose algorithm for counting simple cycles and simple paths of any length ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document} on a (weighted di)graph on N vertices and M edges, achieving an asymptotic running time of ON+M+(ℓω+ℓΔ)|Sℓ|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O\left( N+M+\big (\ell ^\omega +\ell \Delta \big ) |S_\ell |\right) $$\end{document}. In this expression, |Sℓ|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$|S_\ell |$$\end{document} is the number of (weakly) connected induced subgraphs of G on at most ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document} vertices, Δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta $$\end{document} is the maximum degree of any vertex and ω\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\omega $$\end{document} 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ℓ|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(\ell ^{\omega -1}\Delta ^{-1}+1) |S_\ell |\le |\text {Cycle}_\ell |$$\end{document}, with |Cycleℓ|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$|\text {Cycle}_\ell |$$\end{document} the total number of simple cycles of length at most ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document}, 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 an asymptotic running time of ON+M+(nℓℓω+ℓΔ)|Sℓ|\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O\left( N+M+\big (n^\ell \ell ^\omega +\ell \Delta \big ) |S_\ell |\right) $$\end{document}. A Matlab implementation of the algorithm proposed here is available for download.
引用
收藏
页码:2716 / 2737
页数:21
相关论文
共 50 条
  • [32] A General and Simple Method for Camera Pose and Focal Length Determination
    Zheng, Yinqiang
    Sugimoto, Shigeki
    Sato, Imari
    Okutomi, Masatoshi
    2014 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2014, : 430 - 437
  • [33] A simple and efficient RWA algorithm based on priority of edge disjoint paths
    Yim, Soon-Bin
    Chung, Min Young
    Choo, Hyunseung
    Lee, Tae-Jin
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2006, PT 2, 2006, 3981 : 1121 - 1130
  • [34] A Simple Algorithm for Multiple-Source Shortest Paths in Planar Digraphs
    Das, Debarati
    Kipouridis, Evangelos
    Gutenberg, Maximilian Probst
    Wulff-Nilsen, Christian
    2022 SYMPOSIUM ON SIMPLICITY IN ALGORITHMS, SOSA, 2022, : 1 - 11
  • [35] VERTEX ELIMINATION ALGORITHM FOR ENUMERATING ALL SIMPLE PATHS IN A GRAPH.
    Fratta, L.
    Montanari, U.
    Networks, 1975, 5 (02): : 151 - 177
  • [36] A Simple Information Compression Algorithm for Directed Paths in Large Semantic Networks
    Trovati, Marcello
    Awan, Suleman
    ADVANCES IN INTELLIGENT NETWORKING AND COLLABORATIVE SYSTEMS, INCOS-2022, 2022, 527 : 239 - 242
  • [37] Finding the k Shortest Simple Paths: A New Algorithm and Its Implementation
    Hershberger, John
    Maxel, Matthew
    Suri, Subhash
    ACM TRANSACTIONS ON ALGORITHMS, 2007, 3 (04)
  • [38] Finding the k shortest simple paths:: A new algorithm and its implementation
    Hershberger, J
    Maxel, M
    Suri, S
    PROCEEDINGS OF THE FIFTH WORKSHOP ON ALGORITHM ENGINEERING AND EXPERIMENT, 2003, : 26 - 36
  • [39] A simple and general algorithm for integration of numerical models in plasticity
    Guy T. Houlsby
    Miad Saberi
    Archive of Applied Mechanics, 2025, 95 (5)
  • [40] A simple algorithm for digital line recognition in the general case
    Buzer, Lilian
    PATTERN RECOGNITION, 2007, 40 (06) : 1675 - 1684