Picking Fortune Cookies

A Problem posed by BASILIO THE TAXMAN

"In a basket we have 100 fortune cookies there are 5 each of 20 different fortunes, how many cookies we have to eat to have a 50/50 chance of reading all the fortunes?"

Let us generalize the problem a little bit. A basket contains N fortune cookies. There are k different fortunes and exactly m of each are present in the basket. So N=km. There are many probability questions that may be asked which involve randomly picking cookies out of this basket. We shall start by anwsering Basilio's question by picking 35 cookies and reading the fortunes. In order to get an idea how probable it is to read all of the fortunes we will have to repeat this experiment many times and determine the percentage of times we get to read all of the fortunes. So as not to get sick of eating cookies, we will simulate this on the computer.

Below is an applet which eats x cookies and reads the fortunes. It will allow you to specify the number k of different fortunes and the number of times m that each fortune is repeated. After you enter your choices for k, m and x, press the "Go" button and the computer will display the state of the basket as you specified it, the number of cookies that were eaten and the number of different fortunes that were read. To answer Basilio's question try for instance entering k=20, m=5, and x=35. Then press "Go" as many times as you want and see how often it reads all the fortunes. If this does not happen half of the time, then keep increasing the value of x until you reach a value that appears to answer Basilio's question.

When you get tired of pushing the "Go" button CLICK HERE.