Sorry, didn't notice it is the high school section. Please close this thread, I have put my question into the college/university section. Thx
The problem is the following:
We have an N-by-N square matrix of zeros. We turn M random elements of the matrix into 1-s. I need a closed formula for the expectation value of the number of connected 1-areas in the matrix (it is especially important, how it depends on M).
An element is connected to another, when it is in its 8-neighborhood in the matrix. (If it is easier to calculate for a 4-neighborhood, then we can go with that one...). So eg.
0 0 0
0 1 0
0 0 1
These two 1-s are connected in an 8-neigborhood-way.
In the following example, there are 2 connected areas:
0 0 0 1 1 0
0 0 0 0 1 0
0 1 0 0 0 0
0 0 1 1 0 0
0 0 0 0 0 0
I weren't able to solve this problem myself. Do you think there is a chance to obtain an analytic formula for this? I have already run simulations in MATLAB, here is the result:
I ask you for your help.
Thank you very much.