6

What are the total number of ways to arrange $N$ objects such that first $K$ are deranged? That is, how many permutations of $N$ objects do not fix the first $K$?

I know the general formula for the derangement of $N$ objects. Is there any way the above problem be reduced to this one?

ViHdzP
  • 4,582
  • 2
  • 18
  • 44
Salena
  • 638
  • By "the first $K$ are deranged", do you mean that the first $K$ objects occur in the first $K$ positions of the permutation, none of them in their original position, or do you mean that none of the first K objects in the permutation occur in the same position as in the original sequence? – deinst Sep 27 '13 at 16:12
  • @deinst I mean that the first K objects don't occur at their original positions – Salena Sep 27 '13 at 16:16
  • 1
    How about solving the problem using inclusion-exclusion? The same way of proving derangement but tweaking some things. Just an idea. – chowching Sep 27 '13 at 16:41

2 Answers2

4

Let $S$ be the set of all permutations of the $N$ objects, and let $E_{i}$ be the set of permutations which fix the element $i$, for $1\le i\le k$.

Then

$$\left\vert \overline{E_{1}}\cap\cdots\cap\overline{E_{n}}\right\vert=\vert S\vert-\sum_{i}\vert E_{i}\vert+\sum_{i<j}\vert E_{i}\cap E_{j}\vert-\cdots $$

$$=N!-\binom{k}{1}(N-1)!+\binom{k}{2}(N-2)!-\cdots+(-1)^k\binom{k}{k}(N-k)!.$$

ViHdzP
  • 4,582
  • 2
  • 18
  • 44
user84413
  • 27,211
3

I do not think that there is any way to reduce this to the general case. On can use the standard argument to get a recurrence as follows:

Let $D(n, k)$ be the number of ways of distributing $n$ hats among $n$ heads such that none of the first $k$ heads receives its own hat. As a base cases we know that $D(n, 0) = n!$ and $D(n, 1) = (n-1) (n-1)!$. For $k>1$ the first head can get any of $n-1$ hats, let $n-1$ get hat $i$. There are three cases to consider:

1) Head $i$ does not get hat 1. This means that each of the next $k-1$ heads has precisely one hat that it cannot get, so there are a total of $(n-1)D(n-1, k-1)$ permutations in this case.

2) Head $i$ gets hat 1 and $i\le k$. This means that there are $n-2$ remaining heads, and $k-2$ heads that need to get a different hat. There are $(k-1)D(n-2,k-2)$ permutations in this case.

3) Head $i$ gets hat 1 and $i > k$. This means that there are $n-2$ remaining heads, and $k-1$ heads that need to get a different hat. There are $(n-k)D(n-2,k-1)$ permutations.

Putting it all together, we get. $$D(n,k) = (n-1)D(n-1,k-1) + (k-1)D(n-2,k-2) + (n-k)D(n-2,k-1)$$ for $k>1$. This recurrence does not seem to have a nice solution (I may be missing something).

A decent first approximation is $$D(n,k) \approx \frac{n-k}{n-k+1}n!$$ for large enough $n$.

deinst
  • 5,646