0

Suppose we select a permutation of the sequence 1,...,n, uniformly at random, where n ≥ 2 is even. What is the probability that none of numbers 1, . . . , n/2 stays in its place? Justify your answer.

I am struggling as to where to start any suggestions would be appreciated.

  • 1
    The same logic to calculating the derangements works here as well. Just run inclusion-exclusion however only over the $n/2$ events rather than all $n$ of the events. – JMoravitz Mar 10 '21 at 16:06

2 Answers2

1

Comments: For $n=10,$ here is an approximate answer $(0.5988 \pm 0.0005)$ from a simulation in R. With a million iterations, one expect two (maybe three) place accuracy.

set.seed(2021)
stay = replicate(10^6, sum(1:5==sample(1:10)[1:5]))
mean(stay)
[1] 0.498965     # aprx n/2 = 5
mean(stay==0)
[1] 0.598818     # aprx answer
sd(stay==0)/1000
[1] 0.000490138  # aprx 95% margin of sim error for ans
table(stay)/10^6
stay
       0        1        2        3        4        5 
0.598818 0.315199 0.075046 0.010108 0.000795 0.000034 

Notes: The most likely outcome is that none of the first five 'stay' in place.

It is trivial to see that the answer for $n=2$ is $1/2.$ And enumeration is within reach for $n=4.$

Using indicator variables one can see that the mean number staying in place among $1,2 \dots n/2$ is $n/2.$ (But indicator variables are not independent, so getting the variance is not so easy.)

I suppose an analytic solution to your question for general $n$ would require use of the inclusion-exclusion rule.

BruceET
  • 51,500
0

Applying the inclusion exclusion principle one ends up with the expression: $$ \frac1{n!}\sum_{i=0}^{n/2}(-1)^i\binom{n/2}i(n-i)! $$

In particular for $n=10$ the probability is $\frac{18089}{30240}\approx0.598181$ in a good agreement with numerical result of the previous answer.

user
  • 26,272