{{Percolation Simulation}}
Let be a 2D boolean square matrix of values of either 1 or 0 where the
probability of any value being 1 is , (and of 0 is therefore ).
We define a ''cluster'' of 1's as being a group of 1's connected vertically or
horizontally (i.e., using the [[wp:Von Neumann neighborhood|Von Neumann neighborhood rule]]) and bounded by either or by the limits of the matrix.
Let the number of such clusters in such a randomly constructed matrix be .
Percolation theory states that (the mean cluster density) will satisfy as tends to infinity. For , is found numerically to approximate ...
;Task
Show the effect of varying on the accuracy of simulated for and
for values of up to at least .
Any calculation of for finite is subject to randomness, so an approximation should be
computed as the average of runs, where ≥ .
For extra credit, graphically show clusters in a , grid.
Show your output here.
;See also
* [http://mathworld.wolfram.com/s-Cluster.html s-Cluster] on Wolfram mathworld.