<<

arXiv:1209.4936v2 [cond-mat.stat-mech] 8 Dec 2012 bet htsastesur.W olw[]i using in [4] follow We square. the spans overlapping of that cluster a objects exists there if percolates system etr saPisnpitpoeswt density with process Poisson a is centers L fsize of n magnitude. of orders several by known previously values transi- of accuracy the the of extend that values points tion numerical computing up by back claim we and our structures, of data aid additional the simple with some continuum to it adapted that be show We can percolation. lattice for algorithm known tcs(e iue1.Oragrtmi naato fthe Zi of and adaption Newman an of is algorithm algorithm union-find Our rotated 1). randomly Figure and (see sticks rotated, randomly or focus aligned that are we squares disks, here with objects; percolation two-dimensional shaped on arbitrarily dimen- for arbitrary perco- and in continuum sions, works in algorithm The transition models. the lation of location the pute crossing and experi- exponents universality . critical confirm measuring to by satisfying individually,mentally also models is has continuum it one and and threshold, discrete the non-universal, study of are location to that the uni- as properties same such For however, since the in reasonable class. lie is versality percolation This lattice fo- and has percolation. continuum work lattice numerical on and cused analytical [1–3]. perco- most continuum systems yet to lation, physical correspond systems disordered natural porous Most other of properties and dynamic and media static model to used † ∗ fpntal bet r hona admi square a in random at thrown are objects penetrable of [email protected] [email protected] ot nnt,tesaildsrbto fteobjects’ the of distribution spatial the infinity, to go ntodmninlcniumproain number a percolation, continuum two-dimensional In nti otiuinw ics nagrtmt com- to algorithm an discuss we contribution this In been has theory percolation years, 50 than more For L 2 ftema density mean the If . 2 h otpwru fteemtoscnit fmicrocanonic of consists methods these e to of algorithm powerful most the rmcnomlfil hoyfrtepoaiiy ttephase the at , the for theory field conformal from ieadmmr s foragrtmaeesnilylna a linear essentially are algorithm our criticality. ro of use squares, memory con and as disks, behave transitions for these percol that transition confirm to and percolation dimensions, approach or the this and of positions apply real-valued We values with objects torus. between the overlaps on exist clusters ntttfu hoeicePyi,Universit¨at Magdebur Physik, f¨ur Theoretische Institut ievreyo ehd aebe sdt opt percolati compute to used been have methods of variety wide A .INTRODUCTION I. otnu eclto hehlsi w Dimensions Two in Thresholds Percolation Continuum ffi inl eemn h once lses n i w dimen two (in and clusters, connected the determine ciently 1 at eIsiue 39Hd akR. at e M851 US 87501, NM Fe, Santa Rd., Park Hyde 1399 Institute, Fe Santa ρ = tpa Mertens Stephan n / L 2 sfiieas finite is ff 4,tefastest the [4], Dtd eebr1,2012) 11, December (Dated: ρ The . n ,2, 1, and ∗ n rsohrMoore Cristopher and ,Uiestaslt ,306Mgeug Germany Magdeburg, 39016 Universit¨atsplatz 2, g, ecltn lse xssi h limit the in exists cluster percolating rsigcutr noe onayconditions. boundary open e on clusters finite-size crossing better display clusters These wrapping both. or vertically, horizontally, clusters around on wrap that focusing and conditions, boundary periodic In color. by squares. marked is rotated cluster or wrapping disks, the aligned with example, each and percolation Continuum sticks, rotated online) randomly (Color 1. Figure ed nyo h product the on only pends uniyi aldthe called is quantity fraction nvraiycasfrayfie hp,telcto fthe of location the shape, fixed any for same class the in universality be to percolation continuum expect we While fec bethsarea has object each If rniin htvrosknso wrapping of kinds various that transition, ae qae,adrttdsik ntwo in sticks rotated and squares, tated ettos npriua,w n precise find we particular, In ientations. omlfil hoypeit.Terunning The predicts. theory field formal ucino h ubro bet at objects of number the of function a s φ to ncniummdl,finding models, continuum in ation lsmltosuigteunion-find the using simulations al ftepaecvrdb h objects, the by covered the of ntrsod.I atc percolation, lattice In thresholds. on 1, in)uigeatvalues exact using sions) † ligfactor filling φ = a 1 A hntepoaiiyta a that probability the then , − η e = − η ρ tas ie h total the gives also It . . a hsdimensionless This . L ∞ → lal de- clearly ff csthan ects (1) 2 transition, i.e., the critical filling factor ηc, dependsonthe 5 5   ^ shape of the objects. We write ηc , ηc , ηc , and ηc× for the percolation of disks, aligned squares, randomly rotated 4 3 4 squares, and randomly rotated sticks. In defining η, we 3 1 2 treat sticks of ℓ as if they have a = ℓ2. Table I lists the most accurate numerical values for 2 ηc from previous work and the work presented here. The best previous results on disk percolation are due to 1 Quintanilla, Torquato, and Ziff [5] who varied the den- sity of the Poisson process as a function of position and kept track of the front of the connected cluster. The best Figure 2. When we call find(i), we split and shorten the previous results on aligned squares are due to Torquato from i to its representative r(i) by setting the parent of each and Jaio [7], who rescale an initial set of so that object along the path to be its grandparent. This turns a path its density is close to rigorous bounds. The best previ- of length ℓ into two paths of length ℓ/2. ous results on rotated squares are due to Baker et al. [6]. The best previous results on sticks are due to Li and Zhang [8], who used an approach similar to ours but to its parent p(i), its grandparent p(p(i)), and so on, until with open boundary conditions. it reaches i’s representative r(i). Similarly, merge(i, j) uses Our results are consistent with the rigorous bounds find(i) and find(j) to obtain r(i) and r(j), and declares  one of them to be the parent of the other, unless r(i) = r(j) 1.127 ηc 1.12875 ≤  ≤ and they are already in the same cluster. 1.098 η 1.0995 , (2) ≤ c ≤ The running time of find(i) is proportional to the computed with 99.99% confidence by Balister, Bollob´as length of the path from i to r(i). If merge(i, j) sensi- and Walters [9] using a Monte Carlo estimate of a high- bly links the smaller cluster to the larger one, setting dimensional integral. On the other hand, it is a little sad p(r(i)) = r(j) whenever i’s cluster is smaller than j’s, a to dash the hope—which one might have entertained simple inductive argument shows that these paths never after reading [6, 7], and which is just barely consistent exceed log2 n in length. However, we can make these  paths even shorter using a trick called path compression. with (2)—that φc is exactly 2/3. In the following sections, we review the union-find Since r(i) is the representative of every object j along the algorithm of [4], how it finds wrapping clusters in peri- path from i to r(i), we can set p(j) = r(i) for all of them, odic boundary conditions, and how we extend it to the linking them directly to their representative so that find continuous case. We show that the running time of our will work in a single step the next time we call it. algorithm is essentially linear in the number of objects, As a result, the amortized cost of the find and merge i.e., linear in L2. In addition to estimating the threshold, operations—that is, the cost per operation over we also measure the finite-size exponent ν, giving strong the course of many operations—is nearly constant. evidence that these continuum models are in the same Specifically, it is proportional to α(n), when α is the in- as lattice percolation. Finally, we find verse of the Ackermann function [10]. The Ackermann that the probability of a wrapping cluster at criticality is function grows faster than any primitive recursive func- precisely that predicted by conformal field theory. tion, i.e., any function that can be computed with a fixed number of for-loops: faster than an exponential, an iter- ated tower of exponentials, and so on [11]. As a conse- II. THE ALGORITHM quence, α(n) grows incredibly slowly, and the smallest value of n such that α(n) > 4 is so large that it can only We will simulate percolation in the microcanonical en- be written with exotic notation. Thus the total running semble, i.e., where the number n of objects in the square is time for n objects is essentially O(n). fixed. In each trial, we add one object at a time, stopping In our implementation, we employ a form of path as soon as a percolating cluster appears. Following [4], compression that is faster and almost as effective: we we keep track of the connected components at each step link each object j on the path to its grandparent, setting using the union-find data structure. In union-find, each p(j) = p(p(j)). This is known as path splitting, since it cluster is represented uniquely by one of its members. turns a path of length ℓ into two paths of length ℓ/2, or We have access to two functions: find(i), which finds the (ℓ + 1)/2and(ℓ 1)/2 if ℓ is odd, as shown in Figure 2. It − representative r(i) of the cluster to which object i belongs, has the advantage of requiring only one pass along the and merge(i, j), which merges i’s cluster and j’s cluster path, and it takes just one of code (e.g. [4, Appendix together into a single one with the same representative. A]). Like path compression, it guarantees an amortized Internally, union-find works in a very simple way. running time of O(α(n)) [12]. Each object i is linked to a unique “parent” p(i) in the For lattice percolation as in [4], each time we add a same cluster, except for the representative which has no new occupied site, we can check which of its neighbors parent. When we call find(i), it follows the links from i are occupied, and merge them together with the new 3

  ^ ηc ηc ηc ηc× previous 1.128085(2) 1.0982(3) 0.9819(6) 5.63726(2) our work 1.12808737(6) 1.09884280(9) 0.9822723(1) 5.6372858(6)   ^ φc φc φc φc× previous 0.6763475(6) 0.6665(1) 0.6254(2) 0.99643738(7) our work 0.67634831(2) 0.66674349(3) 0.62554075(4) 0.996437475(2)

ηc Table I. Numerical values of critical filling factors ηc and area factors φc = 1 e− in continuum percolation for disks, aligned squares, randomly rotated squares, and randomly rotated sticks. Previous estimates− are from [5–8].

originally used for detecting crossing clusters in the [13]. We associate a vector with each object in the union-find data structure, recording the displacement between it and its parent. In principle this displacement is real-valued, but it suffices to record an integer vector giving the displacement between their respective bins. When we compress and splint a path, we sum these vectors to get the total displacement between each object on the path and its new parent. Now suppose that merge(i, j) finds that two overlap- ping disks i and j are already in the same cluster. Object i now has two paths to its representative; one that goes through its own parent, and another that consists of hop- ping to j and then going through j’s parents. We sum the displacement vectors along both these paths. If these sums are the same, then the cluster is simply-connected. But if they differ by L in either coordinate, then the Figure 3. (Color online) We divide the plane into square bins ± whose width equals the diameter of the disks. Each disk in a cluster has a nontrivial winding number around one or given bin (dashed) can only intersect with other disks in the both directions on the torus. same bin, or in the eight neighboring bins. Like the union-find algorithm itself, the time it takes to sum these vectors is proportional to the length of the paths from i and j to their representative. As Figure 4 site. In the continuous case, we have more work to do: if shows, the total running time of our entire algorithm— we add a new disk (say), we have to find which nearby the time it takes to carry out a trial on a lattice of size disks it intersects. To do this efficiently, we divide the L, adding objects one at a time until a wrapping cluster plane into square bins as shown in Figure 3. Each disk appears—is essentially linear in the number n of objects belongs to whichever bin its center lies in. The width of at criticality, or equivalently linear in L2. It slows down each bin is the diameter of the disks, so that a disk in a somewhat when the computer is forced to switch to parts given bin can only intersect with other disks in that bin of its memory with slower access, but this only affects or the eight bins in its neighborhood. the leading constant. On average, the number of disks in each bin is a con- stant proportional to ρ, so we can find all the disks inter- secting with each new one in constant time. We use the same approach for the other shapes; for rotated squares III. ANALYSIS AND RESULTS of width ℓ, the bins need to have width √2ℓ. A similar approach for rotated sticks was used in [8]. If in each trial we stop at the first n where a wrapping If we wished to detect crossing clusters—those that cluster appears, then the estimated probability PL(a, n) connect, say, the top and bottom edges of the square— that a wrapping cluster exists in the microcanonical en- we could add two special objects to the union-find data semble with n objects of area a is the fraction of trials that structure, which are connected by fiat to all the disks in stop on or before the nth step. To obtain the probabil- the bins along the top or bottom edge. We would then ity RL(η) of percolation in the grand check, at each step, whether these two objects are in the with filling fraction η, we convolve PL with the Poisson same cluster. However, as discussed below and in [4], distribution with mean λ = ρL2 = ηL2/a: the finite-size scaling is much better if we use periodic boundary conditions instead, and look for clusters that ∞ n λ λ wrap around the torus horizontally or vertically. R (η) = e− P (a, n) . (3) L n! L We detect these wrapping clusters using a technique n=0 X 4

1 0 10 sticks rot. squares 0.8 -1 disks 10 squares

0.6 -2 10 ) η ( e L R -3 0.4 10 CPU time in seconds -4 0.2 10

-5 10 1 2 3 4 5 6 0 10 10 10 10 10 10 0.8 0.9 1.0 1.1 1.2 1.3 L2 η

Figure 4. Average CPU time T for a single realization of an e Figure 5. Wrapping probabilities RL(η) for diskpercolation and L L lattice up to the percolation transition. T is measured on L = 16, 32, 64, 128, 256, 512. The dashed line is the exact value of × e a laptop with Intel Core 2 Duo 2.53 GHz CPU with 3 MB cache. the critical wrapping probability R (ηc) from conformal field 2 The dashed lines T L are guides for the eye. The slope theory. ∞ increases when the cache∝ memory is exhausted, forcing the computer to switch to regions of memory with slower access; however, the running time remains linear in n L2. ∝ h RL(η) is the probability of a cluster that wraps hor- • izontally. This is indicated by a winding number To avoid numerical difficulties where the numerator and that is nonzero in the first coordinate. denominator are both very large, we compute Poisson n b weights wn λ /n! inductively in two sequences wn¯ k R (η) is the probability of a cluster that wraps both ∝ − • L and w + to the left and right of the peak at n¯ = λ , horizontally and vertically. This is indicated by a n¯ k ⌊ ⌋ where we define wn¯ = 1: single winding number that is nonzero in both co- ordinates, or a pair of winding numbers that are 1 for k = 0 nonzero in the first and second coordinates respec- wn¯ k = n¯ (k 1) − − − = tively.  λ wn¯ (k 1) for k 1, 2,...  − −  and  1  RL(η) is the probability of a cluster that wraps hor- • izontally, but not vertically. This is indicated by a 1 for k = 0 w + = winding number that is nonzero in only the first n¯ k λ =  n¯ +k wn¯ +k 1 for k 1, 2,... coordinate.  −  The sum (3) only needs to be computed for a finite num-  For any L and any η, these probabilities obey ber of terms. In one direction, we only need to sum down to the smallest n where PL(a, n) is nonzero, i.e., the small- Re = 2Rh Rb = 2R1 + Rb . est value of n where we observed a wrapping cluster in L L − L L L at least one trial. In the other direction, once we pass the largest n where a wrapping cluster first appeared, We assume here that the torus is square, so that horizon- then PL(a, n) = 1. At that point, we sum the remaining tal and vertical wrapping probabilities are equal. terms until they are zero to within the numerical preci- Note that if the first nonzero winding number ob- sion of the computer. We then normalize the entire sum served in a given trial is nonzero in both coordinates, by dividing by wn. then a cluster of type 1 (horizontal but not vertical) does 1 Equipped with the data from the microcanonical sim- not occur at all in that trial. Thus RL(η) does not tend to ulations and thisP convolution routine, we compute the 1 as η increases. wrapping probability functions RL(η) for various system e b In practice, we focused on RL and RL. In each run, we sizes L and shapes. Like [4], we look for several kinds of recorded the number of objects nh at which horizontal wrapping in particular. Specifically: wrapping first occurred, and the number nv at which e vertical wrapping first occurred. Then ne = min(nh, nv) RL(η) is the probability of any kind of wrapping • cluster. This is indicated by a winding number and nb = max(nh, nv) are our estimates, in that run, of the e b that is nonzero in either coordinate. values of n at which RL and RL jump from 0 to 1. 5

2 10 -3 10 ) ! c η ( ) L e ∞ η R (

′ 1 -4 e L 10 − 10 ) R ! c η ( e L R

-5 10 0 10 1 2 3 10 10 10 L 10 L 100

e  Figure6. Slopeof R (η) at ηL, the estimated critical filling factor. e L Figure 7. Convergence with increasing system size L of RL(ηc ) The line is 0.361L3/4, confirming the universal to its known value at L = for disk percolation. The line is ν = 4/3 for finite-size scaling. 2 ∞ e proportional to L− , the conjectured convergence of RL(ηc).

1.09891 A beautiful fact is that, even though the ηc is not known for any of our models, confor- 1.09890 mal field theory implies exact values for these probabil- ities at the transition in the limit L [4, 14]. Specifi- 1.09889 cally, →∞ 1.09888 h R = 0.521058289248821787848... L ∞ η Re = 0.690473724570168677230... 1.09887 ∞ (4) Rb = 0.351642853927474898465... ∞ 1.09886 R1 = 0.169415435321346889383... ∞ 1.09885 For each L, and each type of wrapping cluster, we can estimate the critical filling factor η as the solution of the 1.09884 L 0 -5 -5 -5 -5 -4 equation 2!10 4!10 6!10 8!10 1!10 L−11/4

RL(ηL) = R . (5) ∞ e For instance, Figure 5 shows RL(η) for disks for L ranging Figure 8. Estimated critical filling factors for continuum per- e b up to 512. The filling factors ηL where these curves cross colation of squares, derived from (5) with RL (top) and RL e R rapidly converge to ηc. (bottom). Note the resolution of the η-axis. ∞The rate of convergence is determined by two factors. The first comes from the fact that the width of the tran- 1/ν sition window from RL 0 to RL 1 scales as L− the leading irrelevant renormalization exponent yi in the where ν = 4/3 is a universal≈ critical≈ exponent for two- Kac table [15]. Note that the periodic boundary condi- dimensional percolation. This scaling holds even for tions are responsible for this decay. With open boundary 1 small systems, as can be seen in Figure 6, where we plot conditions, this factor scales as L− [16], leading to more the slope of RL at the estimated critical filling factor ηL. severe finite-size effects. The slope scales perfectly like L3/4. These two factors combine to give The second factor comes from the fact that RL(η) not 2 1/ν 11/4 only becomes steeper but also moves upward in the crit- ηL ηc L− − = L− (6) ical region (see the inset in Figure 5). To measure the − ∼ contribution from this effect, we computed the differ- for the rate of convergence. Hence we expect a straight e 11/4 ence RL(ηc) R using the previously best known value line if we plot ηL vs. L− , and this is exactly what we − ∞ 2 for ηc from Table I. This difference scales like L− , as can observe in Figure 8. Extrapolating this line to zero then be seen from Figure 7. The exponent 2 correponds to gives our estimates of ηc shown in Table I. − 6

How do we compute the error bars in our estimates of The error bars shown in Table I are the result of sim- ηc? First consider the fluctuations in RL(η). Each of our ulating roughly D = 50 system sizes ranging from L = 8 microcanonical experiments contributes to our estimate to L = 2048, with sample sizes N ranging from 1010 for 9 6 of RL(η) for all η through the convolution (3). We can the systems with L 100, to 10 for 100 < L 500, to 10 imagine this as choosing n from the , for 500 < L 2048. ≤ ≤ ≤ adding n objects, and returning an estimate of RL(η) = 1 We ran these simulations in parallel on several or 0 depending on whether they percolate or not. If computer clusters with greatly varying computational we perform N trials, the number of trials that return 1 is power. In total, our simulations would have taken about binomially distributed with mean RL(η)N, and averaging 400 years if done only on the laptop on which this paper gives an estimate of RL(η) with standard deviation was written.

RL(η) 1 RL(η) IV. CONCLUSIONS − σRL = . (7) s  N  We have shown that the union-find approach to esti- Depending on which kind of wrapping cluster we are mating percolation thresholds introduced by Newman 1/2 looking for, this is roughly 0.4N− . and Ziff [4] can be applied in the continuous case. With When we look for the ηL where RL(η) crosses R , the the help of an algorithm for estimating ηc that runs in ∞ error on ηL is given by essentially linear time as a function of the number of ob- jects at criticality, we have obtained new estimates for σR L ηc in a variety of continuum percolation models that are σηL = . RL′ (ηL) several orders of magnitude more accurate than previous results. In the process, we have confirmed the predic- 3/4 tions of conformal field theory for these models, both for Since the slope RL′ (ηL) grows as 0.361L (see Figure 6) this gives the finite-size scaling exponent ν and the probabilities that various kinds of wrapping clusters exist at ηc on 1/2 3/4 σ N− L− . periodic boundary conditions. ηL ≈

These are the error bars shown in Figure 8. ACKNOWLEDGMENTS The extrapolated value for ηc is computed from simu- lations for D different system sizes L, which in a weighted linear regression as in Figure 8 yields an error roughly S.M. thanks the Santa Fe Institute for their hospitality. C.M. is supported by the National Science Foundation √D smaller than the error bars of the underlying through grant CCF-1219117 and by the Air Force Office data points. of Scientific Research and the Defense Advanced Re- Finally, we average our estimates of η from Re and c L search Projects Agency through grant FA9550-12-1-0432. b RL. Assuming that these estimates are only weakly cor- We are grateful to Robert Ziff and for related reduces the error bars by another factor of √2. helpful conversations.

[1] E. N. Gilbert, Journal of the Society for Industrial and [10] R. E. Tarjan, Journal of the Association for Computing Applied 9, 533 (1961). Machinery 22, 215 (1975). [2] D. Stauffer and A. Aharony, Introduction to Percolation The- [11] C. Moore and S. Mertens, The Nature of ory (Taylor & Francis, London, 1992). Computation (Oxford University Press, 2011) [3] M. Sahimi, Applications of (Taylor & www.nature-of-computation.org. Francis, London, 1994). [12] R. E. Tarjan and J. van Leeuwen, Journal of the Association [4] M. E. J. Newman and R. M. Ziff, Physical Review E 64, for Computing Machinery 31, 245 (1984). 016706 (2001). [13] J. Machta, Y. S. Choi, A. Lucke, T. Schweizer, and L. M. [5] J. A. Quintanilla and R. M. Ziff, Physical Review E 76, Chayes, Physical Review E 54, 1332 (96). 051115 (2007). [14] H. T. Pinson, Journal of Statistical 75, 1167 (1994). [6] D. R. Baker, G. Paul, S. Sreenivasan, and H. E. Stanley, [15] H. Hu, H. W.Bl¨ote, and Y.Deng, “Percolation in the canon- Physical Review E 66, 046136 (2002). ical ensemble,” http://arxiv.org/abs/1210.3463 (2012). [7] S. Torquato and Y. Jiao, Journal of Chemical Physics 137, [16] J.-P. Hovi and A. Aharony, Physical Review E 53, 235 074106 (2012). (1996). [8] J. Li and S.-L. Zhang, Physical Review E 80, 040104(R) (2009). [9] P. Balister, B. Bollob´as, and M. Walters, Random Struc- tures & Algorithms 26, 392 (2005).