# Difference between revisions of "1997 AIME Problems/Problem 8"

## Problem

How many different $4\times 4$ arrays whose entries are all 1's and -1's have the property that the sum of the entries in each row is 0 and the sum of the entries in each column is 0?

## Solution

### Solution 1

For more detailed explanations, see related problem (AIME I 2007, 10).

The problem is asking us for all configurations of $4\times 4$ grids with 2 1's and 2 -1's in each row and column. We do casework upon the first two columns:

• The first two columns share no two numbers in the same row. There are ${4\choose2} = 6$ ways to pick two 1's in the first column, and the second column is determined. For the third and fourth columns, no two numbers can be in the same row (to make the sum of each row 0), so again there are ${4\choose 2}$ ways. This gives $6^2 = 36$.
• The first two columns share one number in the same row. There are ${4\choose 1} = 4$ ways to pick the position of the shared 1, then ${3\choose 2} = 3$ ways to pick the locations for the next two 1s, and then $2$ ways to orient the 1s. For the third and fourth columns, the two rows with shared 1s or -1s are fixed, so the only things that can be changed is the orientation of the mixed rows, in $2$ ways. This gives $4 \cdot 3 \cdot 2 \cdot 2 = 48$.
• The first two columns share two numbers in the same row. There are ${4\choose 2} = 6$ ways to pick the position of the shared 1s. Everything is then fixed.

Adding these cases up, we get $36 + 48 + 6 = \boxed{090}$.