4. 100 balls of the same mass move along a trough towards a metal wall with the same speed. After colliding with the wall, a ball bounces off it with the same speed. Upon collision of two balls, they scatter with the same speed. (The balls move only along the trough). Find the total number of collisions between the balls.
Answer: 4950.

Solution. We will assume that each ball has a flag. Imagine that upon collision, the balls exchange flags. Then each flag flies to the wall at a constant speed, and after hitting the wall, it flies in the opposite direction. The number of collisions between the balls is equal to the number of flag exchanges. Any two flags will swap places exactly once. Therefore, the total number of exchanges is $\frac{100 \cdot 99}{2}=4950$.

Evaluation. 14 points for a correct solution.

#