{{Percolation Simulation}} Let v be a vector of n values of either 1 or 0 where the probability of any value being 1 is p; the probability of a value being 0 is therefore 1-p. Define a run of 1s as being a group of consecutive 1s in the vector bounded either by the limits of the vector or by a 0. Let the number of such runs in a given vector of length n be R_n. For example, the following vector has R_{10} = 3
[1 1 0 0 0 1 0 1 1 1]
 ^^^       ^   ^^^^^
Percolation theory states that :K(p) = \lim_{n\to\infty} R_n / n = p(1 - p) ;Task Any calculation of R_n / n for finite n is subject to randomness so should be computed as the average of t runs, where t \ge 100. For values of p of 0.1, 0.3, 0.5, 0.7, and 0.9, show the effect of varying n on the accuracy of simulated K(p). Show your output here. ;See also * [http://mathworld.wolfram.com/s-Run.html s-Run] on Wolfram mathworld.