How to prove that all the $a_i$ will be the same after inf operations?

Given some real number :$$a_1,a_2,...,a_n$$Every time I chose two of them $a_i$ and $a_j$ and set both of them to $\frac{a_i+a_j}{2}$.
Now I have operated $T$ times,when $T$ is infinite,I guess that every number is equal to $$\frac{\Sigma_{1}^{n}a_i}{n}$$ If I'am right,can anyone show me how to prove it?
To be clear,$i$ and $j$ are two random numbers in $[1,n]$ OR $a_i$ and $a_j$ are the smallest and the biggest of all (there are now two questions...)
Further more,I think I can chose 3,4,5 or more each time,and if I chose $n$ of the numbers,all of $a_i$ are set to the same at once!
I want to know whether this is a simple problem because it seems to be but I can't prove it.

-
First, I think you want to "set them both" to $\frac{a_i+a_j}{2}$ (if not, just what is $b_i$?) But how are you "operating $n$ times"? In what order do you select the pairs? – Arturo Magidin Oct 12 '11 at 16:37
Are we doing this to an countable or uncountable collection of real numbers? Are we assuming the axiom of choice? – simplicity Oct 12 '11 at 16:41
We really shouldn't be using algebra anymore, so... any good tagging suggestions? – J. M. Oct 12 '11 at 16:48
@ArturoMagidin you're right,I have corrected it,and I think I can select any pairs each time,but if $a_i$ and $a_j$ are the most value of all,the final result is more quickly to reach I guess. – bigeast Oct 12 '11 at 16:48
@J.M., stochastic-processes, perhaps? – Henning Makholm Oct 12 '11 at 17:36

Yes, this is easy. First of all, it doesn't matter if you are choosing $i,j$ randomly or if you are picking them to be the biggest and the smallest, just so long as you are not deliberately picking the two that are closest together.
Now look at $\sum_{1\leq i < j \leq n} |a_i - a_j|$. This sum decreases by a factor which is at most $(1 - 4/n(n-1))$ each time we pick the largest and smallest numbers. So we wind up multiplying by this number (which is smaller than 1) infinitely many times -- so this sum must go to zero in the limit and all the $a_i$ are the same in the limit. Since the sum of the $a_i$ is preserved by the algorithm, each $a_i$ equals the average value in the limit.