Home » Ask & Discuss » Mathematics. » Algebra « Back to Discussion
Algebra
Comments (9)
ok actually i dont know much about latex
here is the short form of my working
we can see that if we consider any pair in the sum
ak and ak+1
let us take the cases where ak = p (any integer in(123...n)
then ak+1 can have the values from 1 to n except p
so we can calulate the sum
which comes out to be p2/2-p/2+(n-p)2/2+(n-p)/2
now p will be varying over all integers from
1 to n
so summing up this expression again by varying p from 1 to n
we get the sum as = n/6(2n2+1)-n/2
now this covers all possible pairs for ak and ak+1 but for each pair
there will be n-2 factorial permutations of the rest terms
thus each pair will come in n-2 factorial permutations
hence the above sum must be multiplied by n-2 fac.
but then we have considered only ak and ak+1
there are a total of n/2 expressions
hence the above sum must be multiplied by n/2 again to get our final result
but as the average is reqd we divide the above by n fac. and simplify to get
n(n+1)/6
Yeah. the basic thing is to recognise that each term will vary from 1 to n-1 and our job is to count the number of times each one of these numbers occurs. Suppose you list all these sums and sum up the
columns. You can also easily see that the sum should be the same for each column.
Hence all we need to do is to sum one column and multiply the sum obtained by
.
Now consider in a column how many times will the number k appear where 
You can see this happens for 2(n-k) ordered pairs
For an ordered pair, the number of permutations in which it occurs is (n-2)!
Hence the average we are looking for is ![\frac{n}{2} \times \frac{2 (n-2)! [\sum_{k=1}^{n-1} k(n-k)]}{n!}](http://alt2.artofproblemsolving.com/Forum/latexrender/pictures/e/c/e/ece3f9179ea4c3f1f0fc42fdb7ef383d71966bd3.gif)
Writing
as
and simplifying, we get the average as

Incidentally, this is from the problem Art and Craft of Problem Solving by Paul Zeitz gifted by someone to me recently. They had given for the case n = 10 (Good problems but no answers in that dratted book!)













i think the answer should be =
n(n+1)/6