Few months ago my scientific adviser asked me to use probabilistic ideas in such problem :

Consider a matrix NxN. Each element of matrix is a number 1 or 0. We may change all elements of this matrix by major element of neighbors (if there is equal number of '1'-s and '0'-s we choose '0'). Also all changes execute at one moment (to have no indefinite behavior). Now we want to know how many '1'-s we need(lower bound) to reach a $\mathbb{1}$-matrix, which contains only '1'-s.

First of all I've considered this elements as random variable with Bernoulli distribution. So we have $\{X_{i,j}\}_{i,j = 1}^{N}$ are independent random variables (let's suppose they are mutually independent) :$X_{i,j} = 1$

$\begin{equation*} X_{i,j} = \begin{cases} 1 &\text{with $p$}\\ 0 &\text{with $1-p$} \end{cases} \end{equation*}$. , where $p \in(0,1)$. And we need to find $p_{min}$, which guarantee us the good result (for $90 \%$ of experiments).

There is a first problem to deal with. After some matrix changes we miss independence between elements. There occurs some correlation.

However, using Python I've simulated this matrices and make a huge numbers of 'changes'-iterations to reach the result. This simulations shown that there can be 3 possible results : matrix will be $\mathbb{0}$, $\mathbb{1}$ or it cycled. Also I've shown that cycled elements looks like : $\begin{pmatrix} \dots & 0 & 1 & 1\\ \dots& 1 & 1 & 1\\ \dots& 0 & 0 & 1 \\ \dots& \dots & \dots & \dots\\ \end{pmatrix}$. So if $N$ is sufficient large the probability of cycled elements should be small (I guess).

But that's give me only Python-buffing. I've know that cellular-automata are very explored. So maybe there are exist some books or article to read about this? I've found something , but in most of them doesn't go the question of stability of system or finding probability of this elements.

So **the main question** : maybe there are some books or article, where the author consider this type of problem. It would be amazing if you reccomend me some of them! I'm not interesting in the final answer , I just want to understand it and reach it.