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