Example 1-14 There are 7 male athletes and 3 female athletes lining up to enter the venue. If it is required that the first and last athletes must be male, and female athletes must not be adjacent, how many arrangements are possible? If the female athletes are together and placed at either the beginning or the end of the line, how many arrangements are possible? How many arrangements are possible if the female athletes are together, regardless of their position?
This example can be seen as first performing a full permutation of male athletes, then inserting female athletes. Let the permutation of 7 male athletes be $m_{1} m_{2} m_{3} m_{4} m_{5} m_{6} m_{7}$, and the positions for inserting female athletes be $\bigcirc$, as shown in the diagram below:
$$
m_{1} \bigcirc m_{2} \bigcirc m_{3} \bigcirc m_{4} \bigcirc m_{5} \bigcirc m_{6} \bigcirc m_{7}
$$

The first female athlete has 6 choices, the second has 5 choices, and the third has 4 choices, so the number of solutions for the first problem is
$$
7! \times 6 \times 5 \times 4 = 5040 \times 120 = 604800
$$

If the 3 female athletes are together, either at the head or the tail of the line, the number of solutions is
$$
2 \times 3! \times 7! = 60480
$$

If the 3 female athletes are treated as a single unit and inserted into the middle of the male athletes' permutation, the number of solutions should be
$$
7! \times 6 \times 6 = 181440
$$