## FlowFraction(A,H)

Version 1.0.0.0 (1.46 KB) by
Calculates the fraction of all network flows intercepted by a cycle c or subgraph H of a graph

Updated 9 Oct 2017

This function calculates the centrality of a subgraph H or cycle c in a (weighted di)graph G as per the article "Loop-centrality in economic and biological networks", to appear in the Proceedings of the Sixth International Conference on Complex Networks and Their Applications, also available at https://arxiv.org/abs/1707.00890
We recall that the centrality of cycle c or subgraph H is defined as the fraction of all networks flows intercepted by c (or H), that is passing through at least once by at least one vertex of c (or H). Equivalently, this fraction asymptotically determines the number of hikes on the entire graph, which are walks left-multiples of the prime c, in the context of the semi-commutative extension of number theory valid for walks on graphs ("Algebraic Combinatorics on Trace Monoids: Extending Number Theory to Walks on Graphs", SIAM J. Discrete Math., 31(2), 1428–1453).
To compute the centralities of all subgraphs H on L vertices of a graph G, use the function SubgraphCentrality on the File Exchange (https://fr.mathworks.com/matlabcentral/fileexchange/64677).

USAGE: f = FlowFraction(A,H), A the adjacency matrix of the (weighted di)graph, H the list of vertices in the vertices or subgraph, the centrality of which is desired. Output: f the centrality of H, a fraction guaranteed to be between 0 and 1 if all entries of A are positive or nil.

### Cite As

Pierre-Louis Giscard (2023). FlowFraction(A,H) (https://www.mathworks.com/matlabcentral/fileexchange/64678-flowfraction-a-h), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2017a
Compatible with any release
##### Platform Compatibility
Windows macOS Linux