I am trying to learn how to use Mathematica for analyzing graphs, more specifically in the context of connectivity and percolation.
For the sample graph that I have included in this post, we have a random graph to work with (see below).
- I am wondering, given how fast Mathematica is with its built-in randomgraph functionalities (e.g. FindPath, SpatialGraphDistribution, RandomGraph generation etc.), does there exist an efficient way of extracting or highlighting the backbone of the (percolating) cluster that connects two chosen nodes of the graph? The backbone is the conducting part of the cluster, that is, comprised of current carrying edges only, so e.g., the backbone is free of dangling ends of the percolating cluster.
Working graph example:
SeedRandom[123]
n = 15;
m = 20;
weights = ConstantArray[1., m];
G = RandomGraph[{n, m}, VertexLabels -> "Name"];
HighlightGraph[g, VertexDelete[g, IGTreelikeComponents[g]]]
with the IGraph/M package. But that's not cycle-free (if that's what you mean by loop-free). It's exactly the opposite. $\endgroup$