PathCount(A,L0)

Algorithm for counting simple paths of any length on any (weighted directed) network.
61 téléchargements
Mise à jour 24 juil. 2017

Afficher la licence

This is a Matlab implementation of the general purpose algorithm for counting simple paths presented in the article "A general purpose algorithm for counting simple cycles and simple paths of any length" available at https://arxiv.org/abs/1612.05531. Simple paths, a.k.a self-avoiding walks, are open walks that do not visit any vertex more than once.
The algorithm, a combinatorial sieve, counts simple paths of any length between any two vertices on both directed and undirected networks, returning a cell array, Primes, where Primes{i} is a matrix whose kl entry is the number of simple paths of length 1<=i<=L0 from vertex k to vertex l. The algorithm also works on weighted graphs, where it returns the sum of the weights of the simple paths of any given length.
This algorithm does not count the simple cycles, for these use CycleCount. If you want to count both simple cycles and simple paths use CyclePathCount. Both of these functions are on the Matlab File Exchange

Use as follows:
[Primes,elapsedTime] = PathCount(A,L0)
with Primes the cell-array with the number of simple paths, A the graph adjacency matrix and L0 the maximum length up to which to count the simple paths/cycles.

Citation pour cette source

Pierre-Louis Giscard (2024). PathCount(A,L0) (https://www.mathworks.com/matlabcentral/fileexchange/63850-pathcount-a-l0), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2017a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Directed Graphs dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0