Percolation Threshold: Including Next-Nearest Neighbours
In my previous post about estimating the Percolation Threshold on a square lattice, I only considered flow from a given cell to its four nearest neighbours. It is a relatively simple matter to extend the recursive flow algorithm to include other configurations as well.
Malarz and Galam (2005) considered the problem of percolation on a square lattice for various ranges of neighbor links. Below is their illustration of (a) nearest neighbour “NN” and (b) next-nearest neighbour “NNN” links.
Implementing Next-Nearest Neighbours
There were at least two options for modifying the flow function to accommodate different configurations of neighbours: either they could be given as a function parameter or defined as a global variable. Although the first option is the best from an encapsulation perspective, it does make the recursive calls more laborious. I got lazy and went with the second option.
We will add a third example grid to illustrate the effect.
Generating the compound plot with two different values of the global variable required a little thought. But fortunately the scoping rules in R allow for a rather nice implementation.
Here we have two plots for the same grid showing (left) NN and (right) NN+NNN percolation. Including the possibility of “diagonal” percolation extends the range of cells that are reachable and this grid, which does not percolate with just NN, does support percolation with NN+NNN.
No modifications are required to the percolation function.
Effect on Percolation Threshold
Finally we can see the effect of including next-nearest neighbours on the percolation threshold. We perform the same logistic fit as previously.
This agrees well with the result for NN+NNN from Table 1 in Malarz and Galam (2005).
A Larger Lattice
Finally, let’s look at a larger lattice at the percolation threshold.
- Malarz, K., & Galam, S. (2005). Square-lattice site percolation at increasing ranges of neighbor bonds. Physical Review E, 71(1), 016125. doi:10.1103/PhysRevE.71.016125.