Example 1. 6 students line up, where one of them does not stand at the head or the tail of the line, how many ways are there to arrange them? (Question 4, page 157)
Solution 1: The total number of possible arrangements for 6 people is $6!$; the number of possible arrangements with the restricted person at the head of the line is $5!$, and the number of possible arrangements with the restricted person at the tail of the line is also $5!$, which are not allowed; therefore, the number of allowed arrangements is $6!-2 \times 5!=4 \times 5!=480$.

Solution 2: The restricted person cannot stand at the head or the tail of the line, so the head and tail positions are restricted, but the other 5 people can all stand there. First, arrange 2 people to stand in these positions, which can be done in $\mathrm{P}_{5}^{2}$ ways; the remaining 4 positions can be filled by anyone, which can be done in $4!$ ways, so the total number of arrangements is $P_{5}^{2} \times 4!=4 \times 5 \times 4!=480$.

Solution 3: The restricted person cannot stand at the head or the tail of the line, but can stand in the other 4 positions. First, let him stand in one of these positions, which can be done in 4 ways; the remaining 5 people can stand in the remaining 5 positions in $5!$ ways, so the total number of arrangements is $4 \times 5!=480$.

Solution 4: First, arrange the 5 unrestricted people, which can be done in $5!$ ways. The restricted person cannot stand at the head or the tail of the line, so there are only 4 possible positions for him, which can be done in $4 \times 5!=480$ ways.