https://math.stackexchange.com/posts/2854522/edit
I was stuck on step 4 of the derivation below.
A secretary types n different letters together with matching envelopes, she then drops the pile down the stairs, and then places the letters randomly in the envelopes afterwards. Each arrangement is equally likely, and the task is to find the probability that exactly r are in their correct envelopes.
Solution:
Let $L_1, L_2,...,L_n$ denote the letters
A good letter means that is in the correct envelope
$A_i$ is the event that $L_i$ is good
$I_i$ is the indicator function of $A_i$
$j_1,..,j_r,k_{r+1}, ..., k_n$ is a random permutation of the numbers $1,...,n$
$S = \sum_{\pi}I_{j_1}...I_{j_r}(1-I_{k_{r+1}}),...,(1-I_{k_{n}})\tag{1}$
Where the sum is taken over all the permutations $\pi$
\begin{equation} S = \begin{cases} 0 & \text{if X $\neq$ 0}\\ r!(n-r)! & \text{if X = r}\tag{2} \end{cases} \end{equation}
Clearly the sum in equation 1 is only 1 $m=r$ and zero otherwise.
There are $r!$ permutations of the r matching letters and $(n-r)!$ permutations of the remaining numbers
Hence
$ I = \frac{S}{r!(n-r)!} \tag{3}$
Is the indicator function the exactly r letters are good.
it then says to take expectations of (4) and multiply out to obtain by a symmetry argument:
$E(S)=\sum_{\pi}\sum_{s=0}^{n-r}(-1)^s\binom{n-r}{s}E(I_{j_1}...I_{j_r}I_{k_{r+1}},...,I_{k_{r+s}})\tag{4}$
I'm coming back to this question after some time, as per the comment in the above question, the formula for rencontres numbers gives the $(-1)^s$ and ${n-r\choose s}$ but still like someone to explain the following two points?
Q1.) Why does the s count only start after $j_r$?
Q2.) Where and how is the symmetry argument used?