Joana must place three chips on a $5 \times 5$ board, where the cells are numbered from 1 to 25, with one chip in each cell. In how many ways can she do this, if:

a) The 3 chips are of different colors?

b) The 3 chips are identical?

c) The chips are of different colors and no two can be in the same row or column?
Solution

a) Since there are 25 houses for the first chip, we have 25 possibilities, for the second chip, we have 24 possibilities, and for the third chip, we have 23 possibilities. Therefore, there are $25 \cdot 24 \cdot 23=13,800$ possibilities.
b) For pieces of the same color, we need to subtract the number of repeated situations that we will count using the reasoning from the previous item. Let's choose the first three houses on the board and the colors white (B), yellow (A), and green (V). For these houses, we have the following possibilities:

| $\mathrm{A}$ | $\mathrm{B}$ | $\mathrm{V}$ |
| :---: | :---: | :---: |
| $\mathrm{A}$ | $\mathrm{V}$ | $\mathrm{B}$ |
| $\mathrm{B}$ | $\mathrm{A}$ | $\mathrm{V}$ |
| $\mathrm{B}$ | $\mathrm{V}$ | $\mathrm{A}$ |
| $\mathrm{V}$ | $\mathrm{A}$ | $\mathrm{B}$ |
| $\mathrm{V}$ | $\mathrm{B}$ | $\mathrm{A}$ |

We see that there are 6 different distributions for each set of 3 houses. In the case of chips of the same color, these 6 distributions are exactly the same, that is, only $\frac{1}{6}$ of the 13,800 distributions from before. Therefore, the total number of distributions for chips of the same color is $\frac{13,800}{6}=2,300$.

c) First, we will choose the 3 rows where the chips will be placed: using the same reasoning as in the previous item, we have $\frac{5 \cdot 4 \cdot 3}{6}=10$ combinations of 3 rows out of a total of 5. Now we will distribute the chips in one of the combinations of 3 rows, for example, the first three rows: in the first row, there are 5 possibilities; in the second row, there are 4, as we cannot use the column of the chip that is in the first row; and in the last row, there are 3, as we cannot use the columns of the chips already placed. Therefore, the total number of ways to distribute 3 chips, one of each color, on a board without repeating rows or columns is $10 \cdot 5 \cdot 4 \cdot 3=600$.