Let $p \in ]0,1[$, $q = 1-p$, $m = n^2$. We denote by $N$ the smallest index $k$ for which the matrix $M_k$ is completely filled.
a) Propose an approach to approximate the expectation of $N$ using a computer simulation with the functions above.
b) Give an expression for the exact value of this expectation involving $q$ and $m$.