[Combinatorics]
Problem: A permutation of a list of numbers is an ordered arrangement of the numbers in that list. For example, $3,2,4,1,6,5$ is a permutation of $1,2,3,4,5,6$. We can write this permutation as $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}$, where $a_{1}=3, a_{2}=2, a_{3}=4, a_{4}=1, a_{5}=6$, and $a_{6}=5$.
Determine the average value of

$$
a_{1}-a_{2}+a_{3}-a_{4}+a_{5}-a_{6}+a_{7}
$$

over all permutations $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, a_{7}$ of $1,2,3,4,5,6,7$.

Solution: There are $7 !=7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1$ permutations of $1,2,3,4,5,6,7$, because there are 7 choices for $a_{1}$, then 6 choices for $a_{2}$, and so on.

We determine the average value of $a_{1}-a_{2}+a_{3}-a_{4}+a_{5}-a_{6}+a_{7}$ over all of these permutations by determining the sum of all 7 ! values of this expression and dividing by $7 !$.

To determine the sum of all 7 ! values, we determine the sum of the values of $a_{1}$ in each of these expressions and call this total $s_{1}$, the sum of the values of $a_{2}$ in each of these expressions and call this total $s_{2}$, and so on.

The sum of the 7 ! values of the original expression must equal $s_{1}-s_{2}+s_{3}-s_{4}+s_{5}-s_{6}+s_{7}$. This uses the fact that, when adding, the order in which we add the same set of numbers does not matter.

By symmetry, the sums of the values of $a_{1}, a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, a_{7}$ will all be equal. That is, $s_{1}=s_{2}=s_{3}=s_{4}=s_{5}=s_{6}=s_{7}$.

This means that the desired average value equals

$$
\frac{s_{1}-s_{2}+s_{3}-s_{4}+s_{5}-s_{6}+s_{7}}{7 !}=\frac{\left(s_{1}+s_{3}+s_{5}+s_{7}\right)-\left(s_{2}+s_{4}+s_{6}\right)}{7 !}=\frac{4 s_{1}-3 s_{1}}{7 !}=\frac{s_{1}}{7 !}
$$

So we need to determine the value of $s_{1}$.

Now $a_{1}$ can equal each of $1,2,3,4,5,6,7$.

If $a_{1}=1$, there are 6 ! combinations of values for $a_{2}, a_{3}, a_{4}, a_{5}, a_{6}, a_{7}$, since there are still 6 choices for $a_{2}, 5$ for $a_{3}$, and so on.

Similarly, there are 6 ! combinations with $a_{1}$ equal to each of $2,3,4,5,6,7$.

Thus, $s_{1}=1 \cdot 6 !+2 \cdot 6 !+3 \cdot 6 !+4 \cdot 6 !+5 \cdot 6 !+6 \cdot 6 !+7 \cdot 6 !=6 !(1+2+3+4+5+6+7)=28(6 !)$.

Therefore, the average value of the expression is $\frac{28(6 !)}{7 !}=\frac{28(6 !)}{7(6 !)}=\frac{28}{7}=4$.

Final answer: 4