[Proof] If the n initial numbers are not all equal, then after n steps, the maximum number in this set must decrease, and the minimum number must increase.
Since the maximum and minimum numbers obtained at each step are integers, after a finite number of steps, a set of equal numbers (a,a,⋯,a) can certainly be obtained.
Assume that from a set of numbers z1,z2,⋯,zn that are not all equal, we first obtain a set of identical numbers
2z1+z2=2z2+z3=⋯=2zn−1+zn=2zn+z1
Then the numbers zi are equal at every other position. When n is odd, this is impossible. Therefore, n must be even.
Let z2i−1=a,z2i=b(1⩽i⩽2n). If the array z1,z2,⋯,zn is directly obtained from the array y1,y2,⋯,yn, then we have
2y1+y2=2y3+y4=⋯=2yn−1+yn=a2y2+y3=2y4+y5=⋯=2yn+y1=b
From (1), we get y1+y2+⋯+yn=21na,
From (2), we get y2+y3+⋯+yn+y1=21nb,
Thus, a=b.
This contradicts the fact that z1,z2,⋯,zn are not all equal. This proves that the array a,b,a,b,⋯,a,b is the initial array, hence the conclusion of the problem is established.