Chef Fabio went to the store and bought 2 cans of beans, 2 cans of tomatoes, and 2 cans of tuna, all of which were the same shape and size. On his way home, it rained hard and the labels became soaked and fell off the cans. He wants to make a dish using one can of each type, and begins to open the cans one at a time. The expected number of cans he will have to open to get one can of each type can be expressed as b a , where a and b are coprime positive integers. What is the value of a + b ?
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.
Three different cases are possible:-
i) When Fabio gets one can of each by opening just three cans ABCABC, both ABC can be permuted in 3! ways, so 3!*3! = 36 ways
ii) When Fabio get one can of each by opening exactly 4 cans. Then last two cans should be of different type and 3rd last can should be same as one of last two cans. Now first three can be permuted in 3 ways So, no of ways = 3 2 2*3 = 36 ways
iii) When Fabio gets one can of each only by opening 5 cans. Then last two cans should be of same type and first 4 cans can be permuted in 4!/(2!2!) = 6 ways So, 3*6 = 18 ways
Expected no of cans to be open = 3(36/90) + 4(36/90) + 5(18/90) = 19/5
It's easy to see that, the can that should fabio open are between 3 and 5 (include). Because, if fabio open 1 or 2 can, it's impossible to get can that at least one can each type, as we know that, there are 3 type of can. And, if we open 6 can, definitely when he open the 5 ^th can, he had open at least one can each type.
So, Assume that, for the easiest writing, the type of can is A , B , and C . Where A , B , C can be permutated each other (then, we should multiple them by 3 ! = 6 ) for this case :
Case 1 : We only open 3 can ABC, so the probability is 3 ! ( 6 2 . 5 2 . 4 2 ) = 5 2
Case 2 : We only open 4 can. The possibilities are A A B C , A B B C , A B A C , so the probability are : 3 ( 6 ) ( 6 . 5 . 4 . 3 2 . 2 . 2 . 1 ) = 5 2
Case 3 : We only open 5 can. The possibilities are A A B B C , A B B A C , A B A B C , so the probability are : 3 ( 6 ) ( 6 . 5 . 4 . 3 . 2 2 . 2 . 2 . 1 . 1 ) = 5 1
Then, the ecpectation number can that he should open is :
3 ( 5 2 ) + 4 ( 5 2 ) + 5 ( 5 1 ) = 5 1 9 ,
then, a + b = 1 9 + 5 = 2 4
Fabio picks cans one at a time, and when he opens them, he sees which type the can is. He needs to open one can of each type, and he will stop opening them if he gets all three. If he opens two cans of the same type, then the second one doesn't matter. (Hopefully he'll store it away in the fridge to use later.)
The process that I solved this involves calculating the probability of mutually exclusive events:
He won't need to pick 6 times, because he is guaranteed to get the third type on the fifth pick if he had not already.
The minimum number of cans he needs to open is 3. If he gets lucky, then he will get a different can each time, and he won't need to open any more. Disregarding the order in which he picks the cans, there are 2 cans of each type, so the number of different ways he can pick 3 different cans is 2 × 2 × 2 = 8 . The order in which he picks does matter, so the number of different permutations of each of these ways is 3 × 2 × 1 = 6 .
Thus, the number of ways he can get all three cans on the first three tries is 8 × 6 = 4 8 .
There are 6 cans, so the total number of ways he can pick three cans is 6 × 5 × 4 = 1 2 0 .
Thus, the probability that he will get all three different types of cans on the first three tries is 1 2 0 4 8 , or 5 2 .
It's possible for Fabio to open 4 cans before he gets the 3 different types. To do this, he needs to open 2 cans of the same type and another can of a different type before he opens the fourth can of the third type.
Let's first calculate the number of ways he can open beans and tomatoes before he opens tuna. There are 4 cans that are either beans or tomatoes and he needs to pick 3 of them, so the number of different ways he can pick 3 cans of beans or tomatoes is 4 × 3 × 2 = 2 4 . He will then pick a can of tuna, of which there are 2, so the number of ways he can open beans and tomatoes before he opens tuna is 2 4 × 2 = 4 8 .
There are 3 different ways he could pick 3 cans of 2 types before he picks a 4th can of the third type:
Thus, the total number of ways he could get the third type of can on the 4th pick is 4 8 × 3 = 1 4 4
Now, the total number of ways he can pick 4 cans is 6 × 5 × 4 × 3 = 3 6 0 .
Thus, the probability that he will get the third type of can on the fourth pick is 3 6 0 1 4 4 , or 5 2 .
If he had not received the third type of can by the fourth pick, then he is certain to get the third type of can on the fifth pick. Thus, the probability that he gets the third type of can on the fifth pick is 1 − 5 2 − 5 2 = 5 1 .
To calculate the expected value for the number of picks, we calculate the sum of the products of the number of picks and their respective probabilities:
3 ( 5 2 ) + 4 ( 5 2 ) + 5 ( 5 1 ) = 5 1 9
Thus, a = 1 9 and b = 5 , and a + b = 2 4
There are only 3 possible cases for us to see:
In the first case, the probability of success (taking one of each type) is:
(choose a type) * (take that type) * (choose another type) * (take this type) * (choose last type) * (take last type)
In numbers, we have: 3 * (2/6) * 2 * (2/5) * 1 * (2/4) = 2/5
In the second case, Fabio will get one type twice. There are tree ways: AABC , ABAC, BAAC
AABC:
(choose a type) * (take that type) * (take that type again) * (choose another type) * (take this type) * (choose last type) * (take last type) In numbers: 3 * (2/6) * (1/5) * 2 * (2/4) * 1 * (2/3) = (2/15)
BAAC:
(choose a type) * (take that type) * (choose another type) * (take this type) * (take this type again) * (choose last type) * (take last type) In numbers: 3 * (2/6) * 2 * (2/5) * (1/4) * (2/3) = (2/15)
ABAC:
(choose a type) * (take that type)* (choose another type) * (take this type) * (choose last type) * (take first type again) * (take last type) In numbers: 3 * (2/6) * 2 * (2/5) * (1/4) * (2/3) = (2/15)
Total: 6/15 = 2/5
In the last case, there also 3 ways: AABBC, ABABC, ABBAC:
AABBC:
(choose a type) * (take that type) * (take that type again) * (choose another type) * (take this type) * (take this type again) * (choose last type) * (take last type)
In numbers: 3 * (2/6) * (1/5) * 2 * (2/4) * (1/3) * (2/2) = (1/15)
ABBAC:
(choose a type) * (take that type) * (choose another type) * (take this type) * (take this type again) * (take first type) * (choose last type) * (take last type)
In numbers: 3 * (2/6) * 2 * (2/5) * (1/4) * (1/3) * (2/2) = (1/15)
ABABC:
(choose a type) * (take that type) * (choose another type) * (take this type) * (take first type again) * (take second type again) * (choose last type) * (take last type)
In numbers: 3 * (2/6) * 2 * (2/5) * (1/4) * (1/3) * (2/2) = (1/15)
Total: 3/15 = 1/5
Now, the Expected Value is: 3 (2/5) + 4 (2/5) + 5*(1/5) = 19/5
19 + 5 = 24
An expectation value is given by the sum of the products of all possible random variables and their probabilities, i.e. summation x*px
Here our random variable is the number of cans he opens before he has one of each kind. The possible values are 3, 4 and 5. If it's less than 3, he cannot have all kinds because there are 3 kinds of cans. Pidgeon-hole-principle-type logic demands that 5 cans must contain at least one of each type.
Now, the probability of getting it in 3 cans is : P(1st can beans) x P(2nd can tuna) x P(3rd can tomatoes) = 2/6 x 2/5 x 2/4. If we include the 6 possible permutations, we have 6 x 2/6 x 2/5 x 2/4 = 2/5.
The probability of getting it in 4 cans is : P(1st can beans) x P(2nd can tuna) x P(3rd can tuna) x P(4th can tomatoes). Here, keep the following in mind : one of the three is repeated. The repeated type cannot be the last can (otherwise the first three cans would satisfy one-of-each-kind property). Thus, the probability is 3(choice of repeated can) x 6(permutations given repeated cannot be last) x 2/6 x 1/5 x 2/4 x 2/3 = 2/5
The probability of getting 5 cans is P(1st can beans) x P(2nd can tuna) x P(3rd can tuna) x P(4th can beans) x P(5th can tomatoes). Keep in mind : There is only one non-repeated can. The non-repeated can must come last. Thus, the probability is 3(choice of non-repeated can) x 6(permutations with non-repeated can last) x 2/6 x 1/5 x 2/4 x 1/3 = 1/5 expectation= 3 2/5+4 2/5+5*1/5 = 19/5. hence, a+b =24
Notice that if Fabio opens 5 cans he will have to have opened at least one of each type, and if he opens 2 cans, he clearly cannot have opened one of each. Thus, he will either open 3, 4, or 5 cans. We count the probability that each case will occur. If he only needs to open 3 cans, then the first can can be anything. The probability that the second can is different is 5 4 and the probability that the third can is also different is 4 2 , so the probability that the first 3 cans are different is 5 2 . If he needs to open 5 cans, then there will be one can which is not opened, which would have to be the same type as the 5th can that he opened. This occurs with probability 5 1 . Since there are only 3 possibilities, the probability that he opens 4 cans is 1 − 5 2 − 5 1 = 5 2 . Thus, the expected number of cans he opens is 5 2 ( 3 ) + 5 2 ( 4 ) + 5 1 ( 5 ) = 5 1 9 . So a + b = 1 9 + 5 = 2 4 .
An expectation value is given by the sum of the products of all possible random variables and their probabilities, i.e. summation x px Here our random variable is the number of cans he opens before he has one of each kind. The possible values are 3, 4 and 5. If it's less than 3, he cannot have all kinds because there are 3 kinds of cans. Pidgeon-hole-principle-type logic demands that 5 cans must contain at least one of each type. Now, the probability of getting it in 3 cans is : P(1st can beans) x P(2nd can tuna) x P(3rd can tomatoes) = 2/6 x 2/5 x 2/4. If we include the 6 possible permutations, we have 6 x 2/6 x 2/5 x 2/4 = 2/5. The probability of getting it in 4 cans is : P(1st can beans) x P(2nd can tuna) x P(3rd can tuna) x P(4th can tomatoes). Here, keep the following in mind : one of the three is repeated. The repeated type cannot be the last can (otherwise the first three cans would satisfy one-of-each-kind property). Thus, the probability is 3(choice of repeated can) x 6(permutations given repeated cannot be last) x 2/6 x 1/5 x 2/4 x 2/3 = 2/5 The probability of getting 5 cans is P(1st can beans) x P(2nd can tuna) x P(3rd can tuna) x P(4th can beans) x P(5th can tomatoes). Keep in mind : There is only one non-repeated can. The non-repeated can must come last. Thus, the probability is 3(choice of non-repeated can) x 6(permutations with non-repeated can last) x 2/6 x 1/5 x 2/4 x 1/3 = 1/5 expectation= 32/5+42/5+5 1/5 = 19/5. hence, a+b =24
Problem Loading...
Note Loading...
Set Loading...
Note that he must open at least three cans and at most five cans to guarantee that he has one of each type. We first calculate the probability that he must open n cans to get one of each type, where n = 3 , 4 , 5 .
We can assume that the two cans of beans are distinct, the two cans of tomatoes are distinct, and the two cans of tuna are distinct because we are calculating probabilities and the overcounting is canceled out. Let A , B , C denote the three types of cans.
If n = 3 , he must open A , B , C in some order. There are 3 ! ways for the ordering, and 2 3 ways to pick which can of each type. There are 6 ∗ 5 ∗ 4 ways total to open three cans, so the probability is 6 ∗ 5 ∗ 4 3 ! ∗ 2 3 = 5 2 .
If n = 4 , he opens two cans of one type, and one can for each of the other two types. Also, the second can of one type he opens cannot be the last can he opens. WLOG, let type A be opened twice, so we must have A A B C or A A C B , where the first three letters can be permutated. There are 2 ∗ 3 ! ways to determine the order, 3 ways to choose which can will appear twice, and 2 2 ways to choose the specific cans for the types that appear once. Since there are 6 ∗ 5 ∗ 4 ∗ 3 ways to choose four cans total, the probability is 6 ∗ 5 ∗ 4 ∗ 3 2 ∗ 3 ! ∗ 3 ∗ 2 2 = 5 2 .
For n = 5 , two types must appear twice. WLOG, let A , B be the types that appear twice. Then we must have the ordering A A B B C , where the first four letters can be permutated (the last type must be opened last). There are 3 ways to choose which type does not appear twice, 4 ! ways to order the opening of the cans, and 2 ways to choose which can of type C is opened. There are 6 ∗ 5 ∗ 4 ∗ 3 ∗ 2 ways to open 5 cans, so the probability is 6 ∗ 5 ∗ 4 ∗ 3 ∗ 2 3 ∗ 4 ! ∗ 2 = 5 1 .
It follows that the expected value is 5 2 ∗ 3 + 5 2 ∗ 4 + 5 1 ∗ 5 = 5 1 9 , so the answer is 2 4 .