Computational
Techniques in Theoretical Physics
Assignment for Lab 2: Percolation.

Write a C code for:
Generating a configuration of site percolation on an
N x N square lattice with occupation probability p

Use one of the random number generators you wrote in Lab
1 to generate a series of N^{2} random numbers in (0, 1).

Check each random number against p to determine whether a
site is occupied or not. Assign s(i)=1 for occupied and s(i)=0 for unoccupied
site (i=1,2,..., N^{2}).

Compile and run this code on a Digital workstation to generate
a configuration for a 6 x 6 matrix.

Print the output s(i) as a 6 x 6 matrix.

Compile the cluster identification with recursive function
code shown in the lecture and run it using the above computed s(i) as input.

Print the cluster index for each s(i). Preferablly s(i) in
the first column, and cluster index number(i) in the second column.