TITLE: Arrangement of balls in a grid
QUESTION [5 upvotes]: If I have $8$ red balls and $8$ blue balls, what are the total number of arrangements possible where each row and each column have $2$ red and $2$ blue balls in a $4 \times 4$ grid?
How will this answer differ if all the ball were distinct?
For the first part, an idea was to find the solutions to  $\sum_{i = 1}^4 x_{ij}= 0$, $j = 1, \cdots, 4$, $\sum_{j = 1}^4 x_{ij} = 0$, $i = 1, \cdots, 4$ where $x_{**} = \pm 1$, but that doesn't seem simple to solve.

REPLY [2 votes]: We can ignore the blue balls and just place two red balls in each row and column.
Place two balls in the first column, $\binom 42 = 6$ options.
Chose which column holds the other ball of the lower row, $\binom 31 =3$ options.
Then $2$ cases:  

the second ball in this column also matches the first column row ($1$ option); this determines the remaining ball positions.
the second ball is in one of the other two positions, $2$ options. Then choose which of the remaining columns also holds a ball in the same position as one of those in the first column, $2$ options, and the grid is determined.

Thus we have $6\times 3\times (1+2\times 2) = 90$ options to place the red balls.
If the balls are all distinct, we simply choose a ball for each space in succession and get $16!$ options.