3

I am practicing exclusion/ inclusion principle and trying to solve the following problem:

How many permutations of $1,2,3,...,n$ are there in which only the odd integers must be deranged (even integers may be in their own positions)?

My answer is:

$\sum_{j=0}^{n/2} (-1)^j\binom{n/2}{j}(n-j)!$ if $n$ is even

$\sum_{j=0}^{(n-1)/2+1} (-1)^j\binom{(n-1)/2+1}{j}(n-j)!$ if $n$ is odd

Am I right?

zesy
  • 2,565
  • What does inclusion/exclusion have to do with it? Simply shuffle the odd integers in $\lceil{n/2}\rceil!$ ways. Second thought - does that "must" mean that no odd number can be at its original position? – barak manos Feb 25 '15 at 22:59
  • @barak: Yes, it does. – Brian M. Scott Feb 25 '15 at 23:22
  • @barakmanos "must" means that no odd number can be at its original position, i.e. they all must be deranged. If you shuffle odd integers (i.e. produce their all possible permutations), then 1) among those permutations there will be some in which some odd integers stayed in their original positions (and we do not want such permutations) 2) what about all the different ways to arrange even integers? – zesy Feb 26 '15 at 09:24
  • Doesn't this count all non-derangements? If $j=1$ there are $(n-1)!$ ways to permute the rest of the $n-1$ numbers; you hold one odd number in its place. This logic follows for all odd numbers. Wouldn't it then be that you subtract this from all permutations of $n$ numbers (i.e. $n!$)? Also see: http://math.stackexchange.com/questions/112174/how-many-permutations-of-1-2-n-derange-the-odd-numbers – Kenneth Worden Mar 03 '17 at 01:33

1 Answers1

3

Your answers are correct. Ignoring the alternating sign, in each summation the $j$ term is the number of ways to choose a set $F$ of $j$ odd numbers from $[n]$ and form a permutation of $[n]$ that fixes $F$ pointwise, so the alternating sum is exactly what the inclusion-exclusion argument requires: $j=0$ starts it off with all possible permutations of $[n]$, $j=1$ subtracts those with at least one specified fixed point, $j=2$ restores those that were subtracted twice, and so on.

Brian M. Scott
  • 616,228
  • Thanks for the answer. I noticed that you have some intuitive understanding of the way inclusion/ exclusion works in this case (while I am using it quite mechanically). Could you please explain how "$j=2$ restores those that were substructure twice"? – zesy Feb 27 '15 at 22:57
  • @Sergey: You’re welcome. To save myself some typing (maybe), let me ask you to take a look at this explanation of a use of inclusion-exclusion and see if it helps; it’s in a very different context, but the basic idea is the same. If you still have questions after reading it, I’ll be happy to try to answer them. – Brian M. Scott Feb 27 '15 at 23:02
  • I think I got it thanks to your link. Thanks! – zesy Mar 02 '15 at 22:42
  • @Sergey: Excellent. You’re welcome! – Brian M. Scott Mar 02 '15 at 22:46