966 views
0 votes
0 votes
Four different pens (1, 2, 3, 4) are to be distributed at random in four pen stands marked as 1, 2, 3, 4. What is the probability that none of the pen occupies the place corresponding to its number ?

a. 17/18
b. 3/8
c. 1/2
d. 5/8

How will we use the formula for derangements here? Using the direct formula of !n is giving wrong answer.

1 Answer

Best answer
4 votes
4 votes
Ques is asking the probability
so ans will be:

$Probability$ $ = \frac{Dearrangement}{Total\_Permutations}\\ =\frac{n!(1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!})}{n!}\\ =1-\frac{1}{1!}+\frac{1}{2!}-\frac{1}{3!}+\frac{1}{4!}\\ =\frac{1}{2}-\frac{1}{6}+\frac{1}{24}\\ =\frac{12-4+1}{24}\\ =\frac{9}{24} = \frac{3}{8}$
selected by

Related questions

0 votes
0 votes
1 answer
3
rsansiya111 asked Dec 18, 2021
379 views
0 votes
0 votes
1 answer
4
Sumit Singh Chauhan asked Aug 18, 2018
3,402 views
What is time complexity of fun()?int fun(int n){ int count = 0; for (int i = n; i 0; i /= 2) for (int j = 0; j < i; j++) count += 1; return count;}(A) O(n^...