Reply
Wed 9 Nov, 2011 06:29 pm
A pack of Jellybeans contains 7 different flavors: Apricot, Banana, Coconut, Date, Eggplant, Fig, and Grape. You can Eat each flavor individually or come up with some crazy combinations. How many flavor combinations are possible with these 7 flavors alone or mixed? You can use only use one flavor per combination. Example, no ABBC, but ABDEF is good.
@Lindastanich,
The number of combination of 7 flavors, n at a time is 7!/n!/(7-n)!
1 at a time:= 7
2 at a time= 7*6/2 = 21
3 at a time= 7*6*5/6 = 35
4 at a time= 7*6*5*4/24 = 35
5 at a time = 21
6 at a time = 7
7 at a time= 1
Add them up and you have your answer.
@Lindastanich,
Now that you know the answer, I'll explain my hint. There are seven flavors. For every combination, each flavor is either included or excluded. So, there are two options for Apricot (in or out), two for Banana, ..., two for Grape. That means there are a total of 2^7=128 combinations. However, one of those combinations consists of no flavors at all. Therefore, the answer is 2^7 - 1 = 127.
@markr,
Neat approach for the solution. I used the method engineer used, summing all the combinations, but yours is much more elegant.
Rap
@markr,
Very nice. As Rap said, elegant.
@engineer,
You can also get there by noticing that the nth row of Pascal's triangle (which contains the numbers you gave) sums to 2^n.
@markr,
That kind of falls out if you take the (a+b)^n that is used to develop Pascal's triagl and assign a=b=1, s.t. (a+b)^n=(1+1)^n.
Rap
@markr,
I know that one in advance but thought that the person wouldn't understand it. Did you see the binary solution ahead of time or notice the answer was 127 and then see the correlation?
@engineer,
You're probably right. She doesn't seem to make any attempt to solve these problems. That'll bite her on the tests. I was already familiar with that method of "counting."