I could not remember any of my combinatorial mathematics, so I did a brute force method. My apologies to the real mathematicians out there.
Let's name the stickers with lower case letters: a, b, c, d, e.
Each element in our sample set of equally likely outcomes is a 7-tuple of these letters.
Order matters! [aaaaaab] is different than, but equally likely as, [baaaaaa] even though they contain the same number of each type of sticker.
So there are five options for the first chocolate bar, five options for the second chocolate bar, etc.
That means there are 5*5*5*5*5*5*5 = 78125 equally likely outcomes.
How many of these outcomes contain all five stickers?
Let's take one of each sticker and find out how many ways we can place them on five different chocolate bars.
- I have seven options of where to place A.
- I have six remaining options of where to place B.
- I have five remaining options of where to place C.
- I have four remaining options of where to place D.
- I have three remaining options of where to place E.
That gives me 7*6*5*4*3 = 2520 combinations for placing 5 stickers. Let's call each option a "template".
- Template Example: [dXcbaYe] where X and Y have not yet been given stickers.
I can put any sticker I want on X or Y, and as there are 5 sticker choices, I have 5*5 or 25 variants for each template.
At this point, I might be tempted to say that we have 2520 possible templates each with 25 variants for a total of 2520*25 = 63,000 favorable outcomes. But that would be wrong, because I am counting outcomes multiple times.
- Example: These two templates, [abcdeXY] and [XXcdeab], can both produce the same variant [abcdeab].
So let's calculate duplication and eliminate it.
If X and Y get assigned the same sticker, then the outcome will appear as a variant of three separate templates. For example, the outcome [abcdeaa] is a variant of the following three templates:
- [abcdeXX]
- [XbcdeaX]
- [XbcdeXa]
If X and Y get assigned different stickers, then the outcome will appear as a variant of four separate templates. For example, the outcome [abcdeab] is a variant of the following four templates:
- [abcdeXY]
- [XbcdeaY]
- [aXcdeYb]
- [XYcdeab]
So, I have 2520 possible templates. For each template, I have 25 variants, of which 5 (the XX variants - aa, bb, cc, dd, ee) will be counted three times each and the other 20 (the XY variants) will be counted four times each. So the total number of options is:
- XX variant count - (2520 * 5 / 3) = 4200
- XY variant count - (2520 * 20 / 4) = 12600
- All variants = 4200 + 12600 = 16800
So the probability is 16800 / 78125 = 21.504%