Re: Another counting problem

Quote:

Originally Posted by

**alexmahone** How many 2 x 2 matrices are there with entries from the set {0, 1, ..., k} in which there are no zero rows and no zero columns.

No. of matrices in which there are no zero rows and no zero columns$\displaystyle =(k+1)^4-(4k^2+4k+1)=k^4+4k^3+2k^2$

That is the correct answer. I will show you another way to think of it.

The matrix pattern $\displaystyle ~\left(\begin{matrix} x & x\\x & x\end{matrix}\right)$ where $\displaystyle x$ is not zero can be formed in $\displaystyle k^4$ ways.

The matrix pattern $\displaystyle ~\left(\begin{matrix} 0 & x\\x & x\end{matrix}\right)$ where $\displaystyle x$ is not zero can be formed in $\displaystyle k^3$ ways, **but** there 4 of those patterns.

The matrix pattern $\displaystyle ~\left(\begin{matrix} 0 & x\\x & 0\end{matrix}\right)$ where $\displaystyle x$ is not zero can be formed in $\displaystyle k^2$ ways and there are 2 of those patterns.

That gives the same answer.