Average of an expression over all permutations

Determine the average value of

a 1 a 2 + a 3 a 4 + a 5 a 6 + + a 197 a 198 + a 199 a 200 |a_{1} -a_{2}|+|a_{3}-a_{4}|+|a_{5}-a_{6}|+\cdots +|a_{197}-a_{198}|+|a_{199}-a_{200}|

over all arrangements (permutations) of 1 , 2 , 3 , . . . , 199 , 200 1,2,3,...,199,200 into a 1 , a 2 , a 3 , . . . , a 199 , a 200 a_{1},a_{2},a_{3},...,a_{199},a_{200} .


The answer is 6700.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Let Q j Q_{j} represent the j t h j'th arrangement of all values of a i a_{i} .
There are 200 ! 200! permutations of these values. Notice that the average value of Q Q can be thought of as the sum of Q i Q_{i} over all permutations divided by the total number of permutations
ie. a v g ( Q ) = j = 1 200 ! Q j 200 ! avg(Q) =\frac{\displaystyle\sum_{j=1}^{200!} Q_{j}}{200!} .
let s 1 s_{1} be the sum over all permutations of a 1 a 2 \mid a_{1} - a_{2} \mid , s 2 s_{2} be sum over all permutations of a 3 a 4 \mid a_{3} - a_{4} \mid , etc.
Then, j = 1 200 ! Q j = s 1 + s 2 + s 3 + . . . + s 99 + s 100 \displaystyle\sum_{j=1}^{200!} Q_{j} = s_{1} +s_{2}+s_{3}+...+s_{99}+s_{100}
however, notice that s 1 = s 2 = s 3 = . . . = s 99 = s 100 s_{1}=s_{2}=s_{3}=...=s_{99}=s_{100} because each case that shows up in one term for some j j in Q j Q_{j} also shows up as a case in another term for some other j j .
Thus, j = 1 200 ! Q j = 100 s 1 \displaystyle\sum_{j=1}^{200!} Q_{j} =100 s_{1} , and a v g ( Q ) = 100 s 1 200 ! avg(Q) = \frac{100 s_{1}}{200!}
To find s 1 s_{1} , consider summing all of the cases of u v \mid u - v \mid where u > v u > v , each case will happen in 2 × 198 ! 2 \times 198! of the 200! permutations, since there are 198 ! 198! permutations of the other 198 values of a i a_{i} and u v = v u \mid u-v \mid =\mid v-u \mid ... Thus s 1 = 2 × 198 ! × D s_{1} = 2 \times 198! \times D where D is the value of this sum
if you write out terms in D D as an array of values, and group terms into rows based on equivalent values, it becomes easy to notice the value 199 comes up once, 198 comes up twice, 197 three times, etc.
Thus D = 1 × ( 199 ) + 2 × ( 198 ) + 3 × ( 197 ) + . . . + 198 × ( 2 ) + 199 × ( 1 ) D = 1 \times (199) +2 \times (198) + 3 \times (197) +...+198 \times (2) + 199 \times (1)
In sigma notation D = k = 1 199 k ( 200 k ) = k = 1 199 ( 200 k k 2 ) = 200 k = 1 199 k k = 1 199 k 2 D= \displaystyle\sum_{k=1}^{199} k (200-k) =\displaystyle\sum_{k=1}^{199} (200k - k^{2}) =200 \displaystyle\sum_{k=1}^{199} k -\displaystyle\sum_{k=1}^{199} k^{2}
Now using the fact that k = 1 n k = n ( n + 1 ) 2 \displaystyle\sum_{k=1}^{n} k = \frac{n(n+1) }{2} and k = 1 n k 2 = n ( 2 n + 1 ) ( n + 1 ) 6 \displaystyle\sum_{k=1}^{n} k^{2} = \frac{n(2n+1)(n+1)}{6}
D = 200 × 199 ( 200 ) 2 199 ( 200 ) ( 399 ) 6 = 200 ( 199 ) 2 ( 200 399 3 ) = 200 ( 199 ) 2 ( 67 ) D = 200 \times \frac{199(200)}{2} - \frac{199(200)(399)}{6} = \frac{200(199)}{2} (200- \frac{399}{3}) =\frac{200(199)}{2} (67)
plugging this value into s 1 = 2 ( 198 ! ) D s_{1} = 2 (198!) D gives s 1 = 200 ! ( 67 ) s_{1} = 200! ( 67 )
recall a v g ( Q ) = 100 s 1 200 ! avg(Q) = \frac{100 s_{1} }{200!} subbing in our numerical value for s 1 s_{1} gives us a v g ( Q ) = 100 × ( 200 ! ) × 67 200 ! = 100 × 67 = avg(Q) = \frac{100 \times (200!) \times 67}{200!} = 100 \times 67 = 6700


I believe we can simplify this a little bit- due to symmetry, we only need to calculate the average value of one of the components of the expression (for example a 1 a 2 |a_1-a_2| ) and then multiply it by 100.

Freddie Hand - 2 years, 9 months ago

Log in to reply

True, you can see that is in effect what I have done, since s 1 200 ! \frac{s_{1}}{200!} is actually the average value of one component in the expression (over all 200! permutations). Then the average of the whole expression is 100 × s 1 200 ! 100 \times \frac{s_{1}}{200!} which appears in my solution as a v g ( Q ) = 100 s 1 200 ! avg(Q) = \frac{100s_{1}}{200!}

Mitchell Willemsen - 2 years, 9 months ago

Log in to reply

Ah ok. I was just thinking that it would be simpler to just quote symmetry and so avoid some calculations.

Freddie Hand - 2 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...