Counters on a 5 by 5 grid

combinatorics

Given a $5\times5$ grid, find the number of ways of placing 5 counters in the squares, so that each row and each column contains exactly one counter. One possible way is this.

I know that there are 44 ways without the main diagonal from this link Placing 5 pieces on a 5×5 grid with no main diagonal assuming that answer is correct, but I don't know ho to find the number of ways with no missing main diagonals. Can someone help me?

Best Answer

You have $25$ choices for the first counter, $16$ for the second, $9$ for the third, $4$ for the fourth, and $1$ for the fifth. That is a total of $25\cdot16\cdot9\cdot4\cdot1=14400$. Since the counters are indistinguishable, you have to divide this number by $5!=120$. This yields $14400/120=120$.