Let $ p>2 $ be a prime number. For any permutation $ \pi = ( \pi(1) , \pi(2) , \cdots , \pi(p) ) $ of the set $ S = \{ 1, 2, \cdots , p \} $, let $ f( \pi ) $ denote the number of multiples of $ p $ among the following $ p $ numbers: \[ \pi(1) , \pi(1) + \pi(2) , \cdots , \pi(1) + \pi(2) + \cdots + \pi(p) \] Determine the average value of $ f( \pi) $ taken over all permutations $ \pi $ of $ S $.
Problem
Source: Middle European Mathematical Olympiad 2012 - Team Compt. T-4
Tags: function, modular arithmetic, number theory, combinatorics proposed, combinatorics, permutation statistics
14.09.2012 17:49
Form an equivalence relation on permutations as follows: $\sigma \sim \pi$ if and only if there is some $d$ such that for all $i$, $\pi(i) - \sigma(i) \equiv d \pmod{p}$. For any $i < p$ and any permutation $\pi$, the equivalence class of $\pi$ contains $p$ members, exactly one of which has the property that the sum of its first $i$ elements is divisible by $p$. Moreover, for every permutation $\pi$ we have $p \mid \pi(1) + \ldots + \pi(p)$. Thus, the expectation of $f(\pi)$ is precisely $\frac{1}{p} \cdot (p - 1) + 1$.
14.09.2012 21:34
I don't understand two things about this problem. 1. Why this was treated as combinatorics? It's number theory, it's as clear as day. 2. Why only two teams solved that problem? It's way easier than other problems (not that all other problems are hard ) and answer is obvious from the very beginning. And it's not even original. Such methods are very well known.
15.09.2013 15:09
JBL wrote: Form an equivalence relation on permutations as follows: $\sigma \sim \pi$ if and only if there is some $d$ such that for all $i$, $\pi(i) - \sigma(i) \equiv d \pmod{p}$. For any $i < p$ and any permutation $\pi$, the equivalence class of $\pi$ contains $p$ members, exactly one of which has the property that the sum of its first $i$ elements is divisible by $p$. Moreover, for every permutation $\pi$ we have $p \mid \pi(1) + \ldots + \pi(p)$. Thus, the expectation of $f(\pi)$ is precisely $\frac{1}{p} \cdot (p - 1) + 1$. Hi JBL! sorry but can u explain your solution more wisely and clearly, I couldn;t get it :S thanks beforehead
18.05.2018 12:40
Swistak wrote: I don't understand two things about this problem. 1. Why this was treated as combinatorics? It's number theory, it's as clear as day. 2. Why only two teams solved that problem? It's way easier than other problems (not that all other problems are hard ) and answer is obvious from the very beginning. And it's not even original. Such methods are very well known. It might because you are so smart
18.05.2018 12:47
zaurimeshveliani wrote: Hi JBL! sorry but can u explain your solution more wisely and clearly, I couldn;t get it :S thanks beforehead Let us take an example; say $p = 7$. Take any permutation $4,1,3,2,6,7,5$. Now consider the $7$ permutations related to this one, which is obtained by just adding $1$ modulo $7$. These are $$4,1,3,2,6,7,5$$$$5,2,4,3,7,1,6$$$$6,3,5,4,1,2,7$$$$\vdots$$$$3,7,2,1,5,6,4$$ Now consider the partial sums of these. The claim is that for each $1 \leq i < p$, exactly one of these permutations satisfies $p \mid \pi(1) + \cdots + \pi(i)$. Furthermore $p \mid \pi(1) + \cdots + \pi(p) $ is always true, obviously. Therefore for each such $p$ permutations related to each other, we have in all $(p-1) + p = 2p-1$ partial sums that are multiples of $p$. The average value is thus $$ \frac{2p-1}{p} = 2 - \frac{1}{p}$$as required.