A person writes letter to 6 friends and addresses the corresponding envelopes. In how many ways the letter be placed in envelops so that---

(i) Atleast 2 of them are in wrong envelop
(ii) All the letters are in wrong envelop

To solve this problem, we can use the concept of derangements. A derangement is a permutation of a set where none of the elements appear in their original position.

(i) At least 2 letters are in the wrong envelope:

To calculate the number of ways where at least 2 letters are in the wrong envelope, we can subtract the total number of ways from the number of ways where all the letters are in the correct envelope.

Total number of ways = 6! (since there are 6 letters)

Number of ways where all letters are in the correct envelope = 1 (since there is only one correct arrangement)

Therefore, the number of ways where at least 2 letters are in the wrong envelope = 6! - 1

(ii) All the letters are in the wrong envelope:

To calculate the number of ways where all the letters are in the wrong envelope, we can use the concept of derangements.

The number of derangements of a set of n elements is given by the formula:

D(n) = n!(1 - 1/1! + 1/2! - 1/3! + ... + (-1)^n/n!)

For n = 6, the number of derangements would be:

D(6) = 6!(1 - 1/1! + 1/2! - 1/3! + 1/4! - 1/5! + 1/6!)

You can calculate this value using a calculator or computer software.

Therefore, the number of ways where all the letters are in the wrong envelope is D(6).