All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Box of Chocolates (Posted on 2012-03-02) Difficulty: 3 of 5
A certain brand of candy is sold in boxes containing a specific number, lower than 50, of chocolates--a mix of creams and nut clusters, always the same number of each in each box.

If you choose one candy at a time at random without considering its type (cream or nut cluster), you are four times as likely to have one nut cluster left after eating the last cream as you are to have two nut clusters left after the last cream.

But also, if you were to flip a coin before eating each piece, to decide whether to eat a cream or a nut cluster, and then specifically choose one of those, it would be true that you'd be four times as likely to have X nut clusters left after eating the last cream as you'd be to have X+1 nut clusters left after the last cream, where of course X is a number smaller than the number of nut clusters in the box.

How many of each type are in each such box?

See The Solution Submitted by Charlie    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Life is like ... | Comment 2 of 3 |
Let c= number of creams, n = number of nut clusters, 
     t = total = c+n

The probability of having one nut cluster left over after eating all the creams = probability of eating exactly one nut cluster before eating your first cream = probability of eating first a nut cluster and then a cream = (n/t)*(c/(t-1))

The probability of having two nut clusters left over after eating all the creams = probability of eating exactly two nut cluster before eating your first cream = probability of eating first two nut clusters and then a cream = (n/t)*((n-1)/(t-1))*(c/(t-2))

So  (n/t)*(c/(t-1)) = 4 (n/t)*((n-1)/(t-1))*(c/(t-2))
Divide by left side to get 1 = 4(n-1)/(t-2)
Solving for t,                  t = 4n - 2 
            and c = t - n = 3n - 2

So, possible values are
n   t
-- ---
2    6  (I agree with Jer!)
3   10
4   14
5   18
6   22
7   26
8   30
9   34
10 38
11 42
12 46

But we have yet to apply the 2nd piece of information

The probability of have X nut clusters left after eating all the c creams is the probability of eating (c-1) creams and (n - x) clusters in any order, and then eating a cream.
=  (1/2)^(c-1) * (1/2)^(n-x) * C((t-x),(c-1)) * (1/2)

And this needs to be 
   4* (1/2)^(c-1) * (1/2)^(n-x-1) * C((t-x-1),(c-1)) * (1/2)

Setting these equal and simplifying gives
   (1/2)*C((t-x),(c-1)) =  4 * C((t-x-1),(c-1))

or C((t-x),(c-1)) = 8 * C((t-x-1),(c-1))

We are looking for an entry in Pascal's triangle that is 8 times the diagonally above entry in a row above it.  The first case I notice is row 7 has a 1 C(7.7) and row 8 has C(8,7) = 8.  This is the case where t-x = c. But c-1 = 7 is not one of the possible values from above.

The next row I notice is pascal row #15, where C(15,14) = 15
and C(16,14) = 120.  This is the case where t-x = c + 1.  But c-1 = 14 is not a possible value either.

I don't have a big enough pascal's triangle, so I'll do the math.
8* C(m,m-2) =C(m+1,m-2).  
8* m*(m-1)/2! = (m+1)*m*(m-1)/3!
m+1 = 24

so. C(24,21) = 8*C(23,21).  c - 1 = 21  is in the above table.

so c = 22
    n = 8
    t = 30
    t - x = 24 (i think), so X = 6

In other words, if you have 22 creams and 8 nut clusters, and use a coin flip to choose which to eat next, the probability of having 6 nut clusters when you eat your last cream is 4 times the probability of having 7 nut clusters.  It is a very low probability.

I need to get back to work, so I'm not checking.  I'm sure that somebody will tell me where I've gone wrong.   
 
    


      




  Posted by Steve Herman on 2012-03-03 11:50:30
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (24)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information