algorithms in percolation problem: how to identify and measure
TRANSCRIPT
Algorithms in Percolation
Problem: how to identify and measure cluster size
distribution
1
Single-Cluster growth “Leath-Alexandrowicz method”
2
P. L. Leath, Phys. Rev. B 14, 5046 (1976) Z. Alexandrowicz, Phys. Lett. A 80, 284 (1980).
Paul Leath Rutgers University
Leath-Alexandrowicz Algorithm
• “Grow” clusters by adding sites one at a time from an initial seed
• Two methods: – “Breadth first” or “First-In-First-Out” (FIFO)
• Requires making a list or queue – “Depth first” or “Last-In-Last-Out” (LIFO)
• Can be done using stack and recursion
3
4
FIFO site percolation
Start with a seed site that is “wet”
Check neighbors in this order:
1
2
3
4
5
Occupy a site with probability p
Orange = first shell
FIFO site percolation
Unchecked sites queue:
6
Occupy a site with probability p
Orange = first shell
FIFO site percolation
Unchecked sites queue:
7
FIFO site percolation
Make site “vacant” with probability 1-p
Orange = first shell
Unchecked sites queue:
8
FIFO site percolation
Make site “vacant” with probability 1-p
Orange = first shell
Unchecked sites queue:
9
FIFO site percolation
Make site “vacant” with probability 1-p
Orange = first shell
Unchecked sites queue:
10
FIFO site percolation
Green = second shell
Unchecked sites queue:
11
FIFO site percolation
Green = second shell
Unchecked sites queue:
12
FIFO site percolation
Green = second shell
Unchecked sites queue:
13
FIFO site percolation
Green = second shell
Unchecked sites queue:
14
FIFO site percolation
Green = second shell
Unchecked sites queue:
15
FIFO site percolation
Blue = third shell
Unchecked sites queue:
16
FIFO site percolation
Blue = third shell
Unchecked sites queue:
17
FIFO site percolation
Blue = third shell
Unchecked sites queue:
18
FIFO site percolation
Blue = third shell
Unchecked sites queue:
19
FIFO site percolation
Violet = fourth shell
Unchecked sites queue:
20
FIFO site percolation
Violet = fourth shell
Unchecked sites queue:
FIFO algorithm
“Pop” new growth site from queue For (neighbors = 1 to 4)
if (neighbor == unvisited) if (randomnumber < prob) neighbor = occupied “push” neighbor on queue else neighbor = vacant.
22
LIFO site percolation
23
LIFO site percolation
Orange = growth from first neighbor of seed
24
LIFO site percolation
Orange = growth from first neighbor of seed
25
LIFO site percolation
Orange = growth from first neighbor of seed
26
LIFO site percolation
Orange = growth from first neighbor of seed
27
LIFO site percolation
Orange = growth from first neighbor of seed
28
LIFO site percolation
Orange = growth from first neighbor of seed
Put all growing sites on a stack
29
LIFO site percolation
Orange = growth from first neighbor of seed
30
LIFO site percolation
Orange = growth from first neighbor of seed
31
LIFO site percolation
Orange = growth from first neighbor of seed
32
LIFO site percolation
Orange = growth from first neighbor of seed
33
LIFO site percolation
Orange = growth from first neighbor of seed
34
LIFO site percolation
Orange = growth from first neighbor of seed
35
LIFO site percolation
Orange = growth from first neighbor of seed
36
LIFO site percolation
Blue = growth from third neighbor of seed
37
LIFO site percolation
Violet = growth from fourth neighbor of seed
LIFO algorithm (can also use recursion)
Get new growth site from stack For (neighbors = 1 to 4)
if (neighbor == unvisited) if (randomnumber < prob) neighbor = occupied put neighbor on stack else neighbor = vacant.
39
FIFO bond percolation
Red = seed “activated” or “wet” site
40
FIFO bond percolation
Orange = first shell of bonds
Add bonds to dry sites with probability p
41
FIFO bond percolation
Orange = first shell of bonds
Add bonds to dry sites with probability p
42
FIFO bond percolation
Orange = first shell of bonds
Vacant bond with probability 1 - p
43
FIFO bond percolation
Orange = first shell of bonds
Vacant bond with probability 1 - p
44
FIFO bond percolation
Green = second shell of bonds
45
FIFO bond percolation
Green = second shell of bonds
46
FIFO bond percolation
Green = second shell of bonds
47
FIFO bond percolation
Green = second shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
48
FIFO bond percolation
Green = second shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
49
FIFO bond percolation
Blue = third shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
50
FIFO bond percolation
Blue = third shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
51
FIFO bond percolation
Blue = third shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
52
FIFO bond percolation
Blue = third shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
53
FIFO bond percolation
Violet = fourth shell of bonds
Here we are concerned with the wet sites only and do not add bonds already wet sites
54
FIFO bond percolation
Violet = fourth shell of bonds
The final object is a minimally spanning tree that connects to every wet site of the cluster
FIFO bond percolation (finding wetted sites)
“Pop” new growth site from queue For (neighbors = 1 to 4)
if (neighbor == unvisited) if (randomnumber < prob) neighbor = occupied “push” neighbor on queue else neighbor = vacant.
Identical to FIFO site perc. except for this line being taken out
Hoshen-Kopelman algorithm 1976
56
J. Hoshen and R. Kopelman, Phys. Rev. B 14:3438 (1976).
Raoul Kopelman, University of Michigan
57
Hoshen-Kopelman Algorithm
Look at last row of growing inteface.
Each color represents a connected cluster
(Bond percolation)
58
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
59
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
60
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
61
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
62
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
63
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
64
Hoshen-Kopelman Algorithm
Add bonds sequentially with probability p
(Bond percolation)
65
Hoshen-Kopelman Algorithm
Repeat!!!!
(Bond percolation)
Can simulate lattices as large as 100,000,000 x 100,000,000 this way!!!!!
Newman-Ziff algorithm 2000
66
67
Newman-Ziff Algorithm
Start with an empty lattice, compute Q(Γ0) = Q0
68
Newman-Ziff Algorithm
Randomly occupy a bond, compute Q(Γ1)
69
Newman-Ziff Algorithm
Randomly occupy an unoccupied bond, compute Q(Γ2)
70
Newman-Ziff Algorithm
And so on and compute Q(Γb) with b number of bonds
71
Newman-Ziff Algorithm
Until all bonds are occupied, compute Q(ΓM)
M is the total number of bonds
72
• Any quantity as a function of p is computed as
where Qb = Q(Γb). • Each sweep takes time of O(N)
0
! (1 )!( )!
Mb M b
bb
MQ p p Qb M b
−
=
= −−∑
Newman-Ziff Algorithm
M. E .J. Newman and R. M. Ziff, Phys. Rev. Letters 85, 4104 (2000)
• Bonds are added one at a time, and a bookkeeping scheme is used to keep track of the cluster structure.
Mark Newman, U. Michigan
data structure
• At each lattice site is a variable, ptr[i] • If the ptr[i] > 0, it gives the position of another site on
the cluster (a link). • If ptr[i] < 0, “i” is the root of the cluster, and |ptr[i]|
gives the number of sites belonging to the cluster.
procedure • Initially, a random ordering of the bonds of the system is
made • 1. A bond is chosen randomly, and findroot is used to
find the root at each end (and the link paths are collapsed)
• a) If the two ends belong to different clusters, the two are merged.
• b) If both ends of the bond are in the same cluster, nothing is done.
findroot
-- findroot jumps from link to link until it gets to the root -- when the recursive calls “unwind”, they rename every link to point to the root
Before
After
merging
-- the root of the smaller cluster is linked to the root of the larger cluster, and the size is adjusted accordingly
convolution To go from the canonical (fixed number of bonds) to the grand-canonical (fixed occupancy p), one must convolve with a
binomial distribution:
Qn = quantity (such as mean size) for a system of fixed n Q(p) = same quantity for a fixed probability p
Example of Exact canonical-grand canonical: the crossing probability of a square system, up to 7 x 7 (from exact enumeration):
example: probability of wrapping a square torus in one direction but not
the other for all values of p • L x L, L = 32, 64, 128, 256 • Reaches maximum ≈ pc
• Excellent convergence:
Easily find • pc = 0.5927462..
p
“Percolation Threshold” Wikipedia page
ns = number of clusters of size s, at the critical threshold pc. τ = 187/91.
Used Cardys’ result for crossing of an annulus
to find size distribution
Simulation results – up to 2.5 x 1011 clusters up to size s = 1000.
Explosive growth in clusters created through a biased “Achlioptas” growth
process on a regular lattice
Achlioptas process • Recently, Achlioptas, D’Sousa, and Spencer considered cluster growth
on random (Erdös-Rényi ) lattices by the so-called Achlioptas process: – Pick two bonds – Calculate weight = product of masses of the two clusters the bond connects – Choose bond of lower weight
• ER = Erdös-Rényi (regular percolation), BF = Bounded size rule, PR = product rule. C/n = maximum cluster size divided by the number of sites
• They find “Explosive Growth” in the PR model.
Explosive growth
Achlioptas et al, Science 2009
Dimitris Achlioptas, UCSC
Raissa D’Sousa, UCD
Joel Spencer, NYU
Alfréd Rényi 1921-‐1970
My Erdös number is 2 by way of Mark Kac Tree form
Minimum spanning tree
Achlioptas processes on a regular (percolation) lattices
• Define t = time = number of bonds added to
connect distinct clusters. • Then, the number of clusters is n – t, where n
is the initial number of sites, since adding additional
Regular percolation transition at t/n = 1 – Nc/n = (7 – 3 √3)/2 =
0.9019
t/n
C/n
For laQce percolaRon, I find (1024x1024 laQce):
Product Rule (PR)
The SIR model on a square lattice
Susceptible-Infected-Recovered
With David de Souza and Tânia Tomé.
• That is S → I with rate (1-c)Ineighbors/4 • I →R with rate c
• (I remains I for an exponentially distributed time)