Candy time

A certain type of sugar-coated chocolate candies (let's call it N&N) is produced in 7 different colors.

If you have a bag with 9 of these candies, what are the approximate odds that you have at least one of each color?

Assumptions : All colors have the same odds, and the colors of the candies are independent of each other.

5% 0.5% 0.05% 50%

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.

1 solution

Arjen Vreugdenhil
Nov 22, 2017

There are 7 9 7^9 possible sequences of candies ( c 1 , , c 7 ) (c_1, \dots, c_7) we can draw.

One type "success" sequence has one color three times; there are 7 choices for that special color. For the remaining six colors, there are 9 places in the sequence for the first color, then 8 places left for the second color, etc. All in all, this makes for N 1 = 7 × 9 × 8 × 7 × 6 × 5 × 4 N_1 = 7\times 9\times 8 \times 7 \times 6 \times 5 \times 4 sequences of this type.

The other type of "success" sequence has two colors two times each; they can appear in the orders AABB, ABAB, and ABBA, giving a total of 7 × 6 × 3 7 \times 6 \times 3 orderings. For the remaining five colors, there are 9 places in the sequence for the first color, then 8 places left for the second color, etc. All in all, this makes for N 2 = 7 × 6 × 3 × 9 × 8 × 7 × 6 × 5 N_2 = 7\times 6 \times 3 \times 9\times 8 \times 7 \times 6 \times 5 sequences of this type.

In total, the number of "success" sequences is N 1 + N 2 = 7 × 9 × 8 × 7 × 6 × 5 × ( 4 + 6 × 3 ) , N_1 + N_2 = 7 \times 9 \times 8 \times 7 \times 6 \times 5 \times (4 + 6\times 3), and the odds therefore are N 1 + N 2 7 9 = 9 × 8 × 6 × 5 × 22 7 7 0.0577. \frac{N_1+N_2}{7^9} = \frac{9\times 8 \times 6\times 5 \times 22}{7^7} \approx 0.0577. Thus the answer is slightly more than 5 % \boxed{5\%} .

Challenge Why is the following solution incorrect ?

The nine candies may be represented by 9 stars, separated by 6 bars to describe their colors. ( stars and bars ) There are ( 15 6 ) = 5005 \binom{15}6 = 5005 different representations of this type.

A bag with each color at least once is represented by a sequence starting in a star, and each bar is also followed by a star. This leaves 2 "free" stars and 6 star-bar combinations to place, for a total of ( 8 2 ) = 28 \binom 8 2 = 28 possibilities.

Therefore the odds are 28 5005 0.0056 = 0.56 % incorrect! . \frac{28}{5005} \approx 0.0056 = 0.56\%\ \ \ \ \ \ \ \text{incorrect!}.

Arjen Vreugdenhil - 3 years, 6 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...