To show that the process always ends after a finite number of moves and to determine all possible configurations where people can end up standing, we will proceed as follows:
1. Invariant of the Average Position:
- Initially, each person stands on a whole number from 0 to 2022. The average position of all people is:
Average=20230+1+2+⋯+2022=202322022⋅2023=1011
- Each move involves two people moving towards each other by 1 unit each. This does not change the sum of their positions, and hence the average position remains 1011.
2. **Sum of Distances S:**
- Let S be the sum of distances between every pair of people. We will show that S decreases with each move.
- Consider two people A and B standing at positions a and b respectively, with a+2≤b. They move to a+1 and b−1 respectively.
3. **Effect on S:**
- We categorize the effect on S based on the positions of other people relative to A and B:
- **People standing on a or less:** Their distance to A increases by 1, but their distance to B decreases by 1. Thus, their contribution to S is unchanged.
- **People standing on b or greater:** Their distance to A decreases by 1, but their distance to B increases by 1. Thus, their contribution to S is unchanged.
- **People standing in (a,b):** Their distance to A decreases by 1, and their distance to B decreases by 1. Thus, their contribution to S decreases by 2 per person.
- Additionally, the distance between A and B themselves decreases by 2.
4. **Decrease in S:**
- Even if no one is in the interval (a,b), the distance between A and B decreases by 2. Therefore, S decreases by at least 2 per move.
- Since S is a non-negative integer and decreases by at least 2 per move, the process must terminate after a finite number of moves.
5. Final Configuration:
- The final configuration must have all people standing at the same position, as any other configuration would allow further moves.
- Given the invariant that the average position is 1011, the only possible final configuration is that all people stand at position 1011.
■
The final answer is all people standing at position 1011.