Percolation

Course of Sébastien Martineau

First, some python initializations.

In [1]:
%matplotlib inline
from matplotlib import rcParams
from matplotlib import pyplot as plt
from ipywidgets import interact, FloatSlider, RadioButtons
rcParams['figure.figsize'] = (8., 6.)  # Enlarge figure
sliderd = dict(min=0., max=1., step=0.1, value=0.5, continuous_update=False)

from percolation import PercolationRect, PercolationHex, percolation_vs_p, PercolationRectDual

Rectangular lattice

In [2]:
percorect = PercolationRect(20, 10)
interact(percorect.plot, p=FloatSlider(**sliderd));

Hexagonal lattice

In [3]:
percohex = PercolationHex(5, 5)
percohex.compute_clusters(0.2)
percohex.plot_clusters(add_cluster_id=True)
In [4]:
percohex15 = PercolationHex(30, 30)
interact(percohex15.plot, p=FloatSlider(**sliderd));

Probability of crossing as a function of $p$

Based on 300 simulations on a $25 \times 25$ lattice.

In [5]:
percolation_vs_p(25, 25, nsim=300)
  1% (4 of 300) |                        | Elapsed Time: 0:00:00 ETA:   0:00:08
Computing crossing probabilities for rectangular percolation
100% (300 of 300) |######################| Elapsed Time: 0:00:09 Time:  0:00:09
  2% (8 of 300) |                        | Elapsed Time: 0:00:00 ETA:   0:00:06
Computing crossing probabilities for hexagonal percolation
100% (300 of 300) |######################| Elapsed Time: 0:00:07 Time:  0:00:07

Initial and dual graph for a rectangular percolation

In [6]:
perco = PercolationRectDual(5)
interact(perco.plot_graph, p=FloatSlider(**sliderd),
        graph_type=RadioButtons(options=['initial', 'dual', 'both']));

Todo

  • Standard coupling on honeycomb lattice,
  • Duality of honycomb lattice
  • Standard coupling on square lattice and its dual #
  • Monte Carlo for crossing probabilities on square lattice, threshold phenomena #
  • Monte Carlo for crossing probabilities on honeycomb lattice
  • Percolation on 4 regular trees
  • Percolation on free group with 2 generators #
  • Percolation on the dual of seven triangular tilling

hex cells: https://stackoverflow.com/questions/46525981/how-to-plot-x-y-z-coordinates-in-the-shape-of-a-hexagonal-grid

graphs: networkx