Context:
When studying percolation in finite sized systems, there exist various definitions and criteria for determining when a given system is percolating, i.e. it contains a spanning connected cluster. Such systems can e.g. be bond/site percolation in 2D.
Two commonly used definitions are (i) the side-to-side spanning one, where a connected cluster connects two side/walls of the system together. This is generally used when the system has open boundaries (no periodic conditions). (ii) the wrapping criterion, where a connected cluster wraps the system (box, domain, etc). This definition is used when the system domain is endowed with periodic boundary conditions. Wrapping is usually described in terms of: all constituent bonds/sites in the wrapping cluster being connected by a contiguous path to their own periodic image.
More formally, snippets from literature (Newman and Ziff 2001, also relevant is Fig 7.):
Cluster spanning: In many calculations one would like to detect the onset of percolation in the system as sites or bonds are occupied. One way of doing this is to look for a cluster of occupied sites or bonds which spans the lattice from one side to the other...
Cluster wrapping: An alternative criterion for percolation is to use periodic boundary conditions and look for a cluster which wraps all the way around the lattice...
However, at least to me, the latter is still a very counter-intuitive image of what such cluster might look like, and how it differs from the more conventional spanning definition.
I was wondering, whether it would be possible to visualise what it means to have a wrapping cluster, and to compare with the spanning one. For instance, highlighting the path that connects a given bond/site to its periodic image. Or maybe it would be more helpful didactically to also draw a number of periodic images of the system in order to capture the wrapping more intuitively. Another idea might be to map system to a graph and show that wrapping leads to loops in graph representation.
Question:
- Is there a way using Mathematica's built-in graphics functionalities to visualise what a wrapping cluster looks like, or possibly showing how it differs from a simple spanning one, such that the definition of wrapping the lattice or system becomes visually clear? Any ideas would be most appreciated. I have to add that in Mathematica, I do not have a detection routine for finding wrapping clusters, but below I copy a quick way of setting up a percolation problem in Mathematica.
(This is asked in the context of teaching, I figured it would be helpful to learn to visualise these different criteria for percolation, instead of just giving formal definitions.)
Dummy example:
g = GridGraph[{10, 10}];
SeedRandom[100];
g2 = Graph[VertexList[g],
RandomSample[EdgeList[g], Floor[EdgeCount[g] .49]],
VertexCoordinates -> GraphEmbedding[g],
EdgeStyle -> Thickness[.01], VertexStyle -> EdgeForm[],
VertexSize -> Medium];
HighlightGraph[g2, Subgraph[g2, #] & /@ ConnectedComponents[g2]]
Which results in:
but this is only with open boundaries (no periodicity, so no wrapping), and the big red cluster is a spanning one as it connect left-right side of the lattice.
Other related posts: