## Mathematical Recreations

 MathRec Home Solutions to this Problem Last Month's Problem Older Problemsand Links Educational Resources Steve's Personal Page

#### Introductory Problem: Discussion

Smarties® come in six different colors and there are fifteen candies in each roll. There is an entire family of questions about the distribution of colors in a roll.

I've chosen this problem to introduce the site because it is an excellent example of how there are interesting math problems are all around us, while also having the hallmarks of a good puzzle. It's clearly possible to get brute-force solutions to specific questions about rolls of fifteen candies with six possible colors. Even so, some subtlety is required, since there are too many combinations to simply generate them all and count up the answers. Some approaches are "better" than others, and there are some general results that can be extracted for numbers of candies other than fifteen and numbers of colors other than six.

I first started thinking about this problem, because I noticed that the distribution of colors in actual rolls of Smarties® didn't seem to be quite random. It wasn't off enough for me to be sure, so I started thinking about how I could test the randomness of the distribution. It seemed to me that the number of rolls which contained all six colors would probably be a good test for just about any type of nonrandom distribution. From there I started exploring the space of problems around the original question.

As it turns out, there are a variety of mathematical techniques that can be used to get at the answers, and some questions are a little tricky to formulate. (Particularly about how often n consecutive colors occur in an infinite string.) So this problem offers a chance to look at how to formulate questions in the first place.

I hope you enjoy this problem, and I look forward to getting some interesting feedback. Most of the problems on this site will have a shelf life of two months. I'd like to have visitors to the site actively participate in finding a solution during the first month. During the second month (after I post a new problem), I want to clean up the best solution(s) and update the site. Certainly I'm interested in any "breakthroughs" that anyone finds for old problems, but my attentions will move on.

For this problem, however, I am interested in getting ongoing contributions, so that it can serve as a good introduction to the site. I want the site to attract a community of people who know how to play with math, and want to share that with each other.

Here are the specific questions that I came up with for this problem, with some notes:

Smarties® come in six different colors and there are fifteen candies in each roll.

• Assuming the colors are individually random with equal probability, what is the chance of getting a roll of candy with at least one of each color? (They aren't random, and that may be the subject of a future problem.)
• With the same assumption, what is the chance of getting a roll of candy with at least two of each color?
• With the same assumption, what is the chance of getting a roll of candy with k colors, 0<k<6?
• With the same assumption, what is the chance of getting a roll of candy with six consecutive candies, each a different color? (This question seems to require a completely different approach than the earlier ones...)
• With the same assumption, given that you have a roll with six different colors, what is the probability that the roll has six consecutive candies with different colors?
• With the same assumption regarding randomness, given n possible colors for each of m locations, what is the probability of having k different colors in the set? (This is the general form of the first set of questions. Some of the good approaches to the specific questions about fifteen candies and six colors don't seem to help much when answering the general problem.)
• With the same assumption, what is the probability of having at least one set of n consecutive locations where each is a different color? (I suspect that this may not be solvable in any closed form! Some well-formed questions may not have "neat" answers. At this point I'm not sure if this one does or not.)
• In an infinite string of ordered locations, each of which can be one of n different colors, what is the rate at which sequences of n different colors occur? The intent is that a location can only be part of one group of n. Specifically, the answer for n = 2 is not 1/2; it is 1/3 since a sequence like AABAA would count once, not twice. (There are three similar questions that I came up with. The other two are: "What is the probability that a particular sequence of n locations will all have different colors?" and "What is the probability that a particlar location will be part of at least one sequence of n different colors?" The first of these has a relatively trivial answer, but the other one might be interesting...)

You can look at my solutions here. Please send me yours!