Solution (source code)

= Solution

Ignoring a factor independent of the parameters, the <likelihood function> is
$$
L(\theta)=\prod_{i,j}\theta_{ij}^{n_{ij}},\qquad
\ell(\theta)=\sum_{i,j}n_{ij}\log\theta_{ij}.
$$
Since every count is positive, a boundary value $\theta_{ij}=0$ has zero likelihood. At an interior optimum, a <Lagrange multiplier> for $\sum\theta_{ij}=1$ gives $n_{ij}/\theta_{ij}=\lambda$. Summing the resulting $\theta_{ij}=n_{ij}/\lambda$ gives $\lambda=N$, so
$$
\boxed{\widehat\theta_{ij}=\frac{n_{ij}}N.}
$$
The log <likelihood function> is strictly concave on the positive simplex, because its <Hessian matrix> is diagonal with entries $-n_{ij}/\theta_{ij}^2<0$. Hence this critical point is the unique global <maximum likelihood estimation>[maximum-likelihood estimate].