Sum of Scores for Permutations

Consider a random permutation of the values 1, 2, 3, 4, 5, and 6, for example (1, 2, 3, 4, 6, 5). Let a distance of a number be defined as the number of places between the number's position from the position indexed by the number. For example, the distance of 6 in (1, 2, 3, 4, 6, 5) is 1 because 6 is in the 5th position, which is 1 place away from the 6th position. The score of a permutation is the total distance of all numbers in the permutation. In the example (1, 2, 3, 4, 6, 5), the score would be 2 = 1 + 1 for 5 and 6. Find the total score across all permutations of the values 1, 2, 3, 4, 5, and 6.


The answer is 8400.

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.

2 solutions

Shaurya Gupta
Nov 11, 2015

A number x x is at position y y in 6 ! 6 \frac{6!}{6} permutations and it's distance is x y \lvert x-y \rvert . Since the contribution of a number to the score in a particular case is always independent of the position of other numbers, so we can add the distance of each number individually. Therefore the score is 6 ! 6 x = 1 6 y = 1 6 x y = 8400 \frac{6!}{6} \sum_{x=1}^{6}\sum_{y=1}^{6}\lvert x-y \rvert = \boxed{8400}

Did the same way!

Vinayak Verma - 5 years, 6 months ago
Eli Ross Staff
Nov 11, 2015

Great problem, @Kevin Zhang I'll let someone post a solution, but if anyone needs a hint toward an elegant solution, you should think about Linearity of Expectation .

Thank you!

Kevin Zhang - 5 years, 7 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...