2

The choices are lemon, cherry, strawberry, orange, and pineapple.

How many ways are there to chose $35$ candies? I thought it would be $35^5$ because there are $35$ choices with $5$ options but that is not correct.

Next, how many ways can you get at least one of each flavor?

Then, how many ways can you get at least $2$ cherry and at least $4$ lemon?

user52045
  • 1,430
  • 13
  • 25
Chris
  • 23

4 Answers4

2

You have 35 candies to choose. Let's say you have four "bars"; they separate the types of candies from each other. e.g.:

-------|-------|-------|-------|-------

Means 7 candies of each. The answer is 39C4 because this is only a rearrangement problem.

The second one, assume that each has one candies. Then it's just 30 candies to choose and 4 bars again.

Same for the last one; you choose 35-2-4=29 candies with 4 bars.

If you want to learn more, search "sticks and bars". It's a powerful method.

snowfall512
  • 2,114
1

Choosing $35$ candies with $5$ options, is the same as partitioning $35$ to a sum of $5$ integers (decide that every integer will be for a specific candy).
One way to do this, is looking at $35+4=39$ place holders, choosing $4$ of them as dividers and deciding that every area between placeholders represents the number of candies you take from a specific type is exactly the partition of $35$ candies to $5$ flavors.
That is, the solution to your first question is ${35+4}\choose{4}$.

The second and third follow the same logic, if you have at least one of each flavor, you have only $30$ left to choose, so the solution is ${30+4}\choose{4}$.

And finally, with $2$ cherry and $4$ lemon, there are $29$ left to choose from, so the solution is ${29+4}\choose{4}$.

1

Answer $1$

You have $5$ types of candies, but this types are always available.

Now you want to choose $35$ candies, each time you have the possibility to choose from one of the $5$ types.

So we have $5^35$ ways, means $34359738368$ possibilities.

Answer 2

$${n\choose k} = \frac{n!}{(n-k)! k!}$$

means

${35\choose 5} = 7791168$ different ways.

Tim Ratigan
  • 7,247
Erdinc Ay
  • 133
0

I know painfully little about higher math, but perhaps I can help you phrase the question another way.

You are talking about a domain of five: l, c, s, o, p. One can think of this a 35-digit number in base 4 (we ignore the blank, or zero, value). Given that we never have an empty slot, we could count

ppppppppppppppppppppppppppppppppppp
ppppppppppppppppppppppppppppppppppo
pppppppppppppppppppppppppppppppppps
ppppppppppppppppppppppppppppppppppc
ppppppppppppppppppppppppppppppppppl
pppppppppppppppppppppppppppppppppop
...

So the number of possible combinations is

lllllllllllllllllllllllllllllllllll