4. In the group, there are 6 Varaždinians, 6 Zadrians, and 6 Osijekians. In how many ways can they be divided into:
a) 6 groups of 3 people so that each group contains one Varaždinian, one Zadrian, and one Osijekian?
b) 3 groups of 6 people so that each group contains two Varaždinians, two Zadrians, and two Osijekians?
First method.

The selection of one of the six Varaždinians for the first group can be done in 6 ways, and the selection of one of the six Zadrians and one of the six Osijekians can be done in an equal number of ways, so this can be done in total $6 \cdot 6 \cdot 6=6^{3}$ ways.

$1 \text{POINT}$

After that, the selection for the second group can be done in $5^{3}$ ways, for the third in $4^{3}$, then in $3^{3}$ and in $2^{3}$ ways, that is, in total $(6 \cdot 5 \cdot 4 \cdot 3 \cdot 2)^{3}=720^{3}$ ways.

$1 \text{POINT}$

However, the order of these groups is not important, as they are equal, and since six groups can be arranged in $6 \cdot 5 \cdot 4 \cdot 3 \cdot 2=720$ ways, the total number of arrangements is $\frac{720^{3}}{720}=720^{2}$.

In total, the number of arrangements is $720^{2}=518400$.

## a)