3

No. of ways in which n letters can be put in n envelopes such that none is in the right one

I have tried a few approaches but I can't figure out the logic.

One approach:

No. of possible envelopes for the 1st letter=(n-1)
No. of possible envelopes for the 2nd letter=(n-1) in case previous letter was inserted in 2nd envelope, or, (n-2) in all other cases and so on.

But this doesn't seem to be the right way.

Another way is to count the no. of ways in which all or some are in the wrong place and then subtracting from total combinations.
No of permutations with 0 in wrong place=1
No of permutations with 1 in wrong place=1
No of permutations with 2 in wrong place=2
. . .

But I can't figure out the pattern.

I need help in solving this question

oshhh
  • 2,632
  • 1
    The term for this type of permutation is a "derangement." Searching for that term on this site or on the web on sites like wikipedia will give you all the information you could want for and more. If you wish to discover the formula yourself without looking, a common technique to use here is inclusion-exclusion. The calculation is important enough that it receives its own symbol: $!n$ (referred to as subfactorial). – JMoravitz Feb 26 '17 at 06:21

1 Answers1

2

Reffer Dearrangements,

Here the answer is $D[n] = n!\sum\limits_{i=0}^{n}\dfrac{(-1)^i}{i!}$