{{Percolation Simulation}} Let c be a 2D boolean square matrix of n \times n values of either 1 or 0 where the probability of any value being 1 is p, (and of 0 is therefore 1-p). 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 0 or by the limits of the matrix. Let the number of such clusters in such a randomly constructed matrix be C_n. Percolation theory states that K(p) (the mean cluster density) will satisfy K(p) = C_n / n^2 as n tends to infinity. For p = 0.5, K(p) is found numerically to approximate 0.065770... ;Task Show the effect of varying n on the accuracy of simulated K(p) for p = 0.5 and for values of n up to at least 1000. Any calculation of C_n for finite n is subject to randomness, so an approximation should be computed as the average of t runs, where t5. For extra credit, graphically show clusters in a 15\times 15, p=0.5 grid. Show your output here. ;See also * [http://mathworld.wolfram.com/s-Cluster.html s-Cluster] on Wolfram mathworld.