Four letters, $2$ '$a$'s and $2$ '$b$'s are to be filled in a $4×4$ matrix such that no $2$ same letters are in the same row or the same column. One cell can hold a maximum of one letter. In how many ways can this be done? Answer provided is $3960$.
I tried case analysis. Firstly, I assigned the 'a's in $(16 \cdot 9)/2! = 72$ ways. Then, I tried counting the number of ways as per the different possibilities for 'b's position. First I considered that one b is in the same column as a, second that one b is in the same row as a, third that it is in the same row as one a and the same column as another a. And fourth it isn't in any row or column as that of the previously assigned 'a's. But, in this method there is clearly over counting. And I don't know how to bypass that.
Hint: There are 16 ways to put down the first $a$.
There are 9 ways to put down the second $a$.
Hence there are $\frac{16*9}{2}=72$ ways to put down the two $a$s.
The key part is to count the number of ways to place the $b$s. Split into three cases.
The first case: $b$ is placed in a spot where there is an $a$ in the column and there is an $a$ in the row.