There are
4
children awaiting their presents.
7
elves come one-by-one and each of them gives
1
present to exactly
1
child. Every elf chooses the child randomly.
The probability that each child receives at least one present is of the form B A where A and B are co-prime positive integers. Find the value of B − A .
Assumptions
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The probability that every child gets a gift is not dependent on whether or not the gifts are different from each other. Thinking they are makes it easier for us to see the problem, but it does not change the outcome.
An easier way to solve the problem is to use the principle of inclusion and exclusion .
For this, let A i be the event that the i th child does not receive any present, i = 1 , 2 , 3 , 4 . We require the probability of the complement of the event E = A 1 ∪ A 2 ∪ A 3 ∪ A 4 . We have, P ( A 1 ∪ A 2 ∪ A 3 ∪ A 4 ) = i = 1 ∑ 4 P ( A i ) − 1 ≤ i < j ≤ 4 ∑ P ( A i ∩ A j ) + 1 ≤ i < j < k ≤ 4 ∑ P ( A i ∩ A j ∩ A k ) − P ( A 1 ∩ A 2 ∩ A 3 ∩ A 4 ) = 4 ( 4 3 ) 7 − ( 2 4 ) ( 4 2 ) 7 + ( 3 4 ) ( 4 1 ) 7 − 0 = 1 0 2 4 4 9 9 where each of the above probability terms should be self-explanatory. Thus the required probability is 1 − 1 0 2 4 4 9 9 = 1 0 2 4 5 2 5 .
Say you are watching the elves come one-by-one, and are counting how many children have gifts after each one has come.
If there is currently 1 child with a present, then there is a 4 1 chance that the next elf will give the present to that child, and a 4 3 chance that the elf will give the present to a new child.
If there are currently 2 children with presents, then there is a 4 2 chance that the next present will go to a child who already has a present, and a 4 2 chance it will go to a new child.
Similarly, with 3 children, the chance of one of them receiving the next present is 4 3 and the chance of the present going to the last child 4 1 . If all 4 children have presents, then a new present will not change the number of children with presents.
We summarize these results in this matrix. ⎣ ⎢ ⎢ ⎡ 4 1 4 3 0 0 0 4 2 4 2 0 0 0 4 3 4 1 0 0 0 1 ⎦ ⎥ ⎥ ⎤ Now say we know the probabilities p n that n children have a present at some point, n = 1 , 2 , 3 , 4 . We can use the matrix to calculate the probabilities after the next elf by the following multiplication. ⎣ ⎢ ⎢ ⎡ 4 1 4 3 0 0 0 4 2 4 2 0 0 0 4 3 4 1 0 0 0 1 ⎦ ⎥ ⎥ ⎤ ⎣ ⎢ ⎢ ⎡ p 1 p 2 p 3 p 4 ⎦ ⎥ ⎥ ⎤ = ⎣ ⎢ ⎢ ⎡ 4 1 p 1 4 3 p 1 + 4 2 p 2 4 2 p 2 + 4 3 p 3 4 1 p 3 + p 4 ⎦ ⎥ ⎥ ⎤ We know that after the first elf has come, exactly 1 child has a present. Therefore, the probability of n children having a present after 6 more elves come is ⎣ ⎢ ⎢ ⎡ 4 1 4 3 0 0 0 4 2 4 2 0 0 0 4 3 4 1 0 0 0 1 ⎦ ⎥ ⎥ ⎤ 6 ⎣ ⎢ ⎢ ⎡ 1 0 0 0 ⎦ ⎥ ⎥ ⎤ = ⎣ ⎢ ⎢ ⎡ 4 0 9 6 1 4 0 9 6 1 8 9 4 0 9 6 1 8 0 6 4 0 9 6 2 1 0 0 ⎦ ⎥ ⎥ ⎤ The probability of 4 children each having at least one present is 4 0 9 6 2 1 0 0 = 1 0 2 4 5 2 5 .
This gives A = 5 2 5 , B = 1 0 2 4 , and B − A = 4 9 9 .
wow!!! I am seeing a solution using matrices for the first time on Brilliant.
Total number of distributions is 4^7
Now will use the concept of grouping
The possible number of gifts that can be distributed to each child such that each gets atleast one are
(4,1,1,1) (3,2,1,1)(2,2,2,1)
Using the grouping formula we can find the number of ways of grouping which will be 350.
Now these groups can be distributed among children is 24 ways.
So our answer is 24*350/4^7
Problem Loading...
Note Loading...
Set Loading...
I'll assume that each elf has a different present, so essentially we are looking for the probability that, when 7 distinct presents are distributed at random to 4 children, each child receives at least one present.
Now without restrictions the 7 presents can be distributed in 4 7 = 1 6 3 8 4 ways. To find the number of ways in which each child receives at least one present, I will first find the number of ways in which just 1 , 2 and 3 children get all the presents, and then subtract the sum of these values from 4 7 .
There are 4 ways to distribute the presents so that all the presents go to one child.
There are ( 2 4 ) ∗ ( 2 7 − 2 ) = 7 5 6 ways in which all the presents can be distributed to just 2 children. That is, we can choose 2 of the children in ( 2 4 ) ways, and then in each of these cases there are 2 7 ways in which the presents can be distributed, 2 of which would result in all the presents going to just one child, (hence the need to subtract 2 from 2 7 ).
There are ( 3 4 ) ∗ [ 3 7 − 3 − ( 2 3 ) ( 2 7 − 2 ) ] = 7 2 2 4 ways in which all the presents can be distributed to just 3 children. That is, we can choose 3 of the children in ( 3 4 ) ways, and then in each of these cases there are 3 7 ways in which the presents can be distributed, 3 of which would result in all the presents going to just one child, and ( 2 3 ) ( 2 7 − 2 ) of which would result in all the presents going to just two children, (where each of the two would receive at least one present).
Thus the number of ways in which the presents can be distributed so that each child gets at least one present is 1 6 3 8 4 − 4 − 7 5 6 − 7 2 2 4 = 8 4 0 0 .
The desired probability is then 1 6 3 8 4 8 4 0 0 = 1 0 2 4 5 2 5 .
Thus A = 5 2 5 , B = 1 0 2 4 and B − A = 4 9 9 .
(Apologies for my long-winded explanation, but this problem is easy to mess up on so I felt the need to be as deliberate as possible.)