Problems For Creative Computing... Probability by David C. Johnson, University of Minnesota PREREOUISITES Basic notions of probability including P(E) = 1 - P(E') DISCUSSION The CAMP project, University of Minnesota, has conducted research and development activities on the use of the computer as a problem-solving tool in school mathematics grades 7 – 12. The following problem while a "take-off" on the classical Birthday Problem has a number of real applications relative to expected occurrence of given events: from the everyday: What is the probability of at least two girls wearing the same style and color outfit at a party with say 30 girls invited (assuming some given number of basic styles, say g, and number of colors, c, or gxc different outfits -- e.g., if g=8 and c=10 then gxc=80.) to a problem in manufacturing and sales: How many different styles and colors are needed to give a low probability (p<.10) to the event that two or more families in the same neighborhood (of 100 families) will purchase identical automobiles (if, on the average, 10% of the families purchase a new XXX each year.) Note: the problem is actually a little more complex than this, but the statement should provide a general idea -- the assumption is also made that people like their cars to be different. PROBLEM The situations posed above can be stated in purely mathematical terms. The three problems posed below appear in the CAMP exercises in the book Elements of Probability by Robert J. Wisner, Scott, Foresman and Company, 1973, appropriate for a high school course in probability. 1. First, to warm up - write a computer program to calculate the probability that at least two people in a group of n people will have the same birthday. (Hint: since the 365n may become very large, you will have to design a procedure to calculate 365/365 x 364/365 x 363/365 x 362/365 ...) 2. Now for the problem: a. Write a general program which considers n people selecting an alternative (or having a characteristic) from m equally likely possibilities. What is the probability that at least two will select the same alternative? You might think of this as n people each picking a number between 1 and m and writing it down -- what is the probability that at least two will pick the same number? (Of course, m>n or the probability is 1.) b. Use your program to determine how many numbers you will need to use at a party with 12 people to give yourself better than a 50-50 chance of having two pick the same number (you might like a probability of about .75). Do you see the similarity between this and the manufacturing problem? Actually conduct the number experiment with some groups of friends -- how well do the experimental results agree with the mathematical? Note that the experiment can be done by asking your friends to pick a favorite color or object from a list with m items -- but, you have to be cautious here; not all of the items may be equally liked by your friends -- what does this do to your computation? Compounding by Charles A. Reeves, Florida State University > Try to fold a sheet of paper onto itself as many times as you can (i.e., fold it in half, then in half again, then again, etc.). What is the largest number of folds you can make? Someone has claimed that it is impossible to make more than 8 folds, no matter what size you start with! But imagine for a moment that it is possible to fold it over onto itself a large number of times. The thickness of one sheet of notebook paper is about .004 inches. If you could fold it 50 times, how high would the stack be? > Your rich uncle deposited $1000 in a savings account for you the day you were born. The account draws 6% simple interest, and the earnings are added back into the account each year. But your uncle didn't tell you about this - you found out when his will was read. He died when you were forty years old - how much did you get? For those who want more: Same problem as above, but the interest rate is 1/2% each month instead of 6% per year. How much more money, if any, would you get this way? > Consumer prices rose an average of 8.8% during 1973. Let's round this off to 9%, and assume that prices continue to go up this much every year. Pick out an item that you think you might like to buy when you're an adult, and for which you know the present price. Write a program that will report to you how much the item will cost in the year 2000 AD. > Your father gives you a penny as a gift on your first birthday. He promises to double the amount of the gift each year until you reach your 21st birthday. How much will you get from him on this birthday? For those who want more: Have the computer print the amount you will receive on the 21st birthday, and also the total amount you will have gotten through the years. > Erie County in upstate New York is one of the most heavily polluted areas in the United States. In a study of the residents of the county it was found that the number of people dying from respiratory diseases is doubling every five years. In 1950 there were 263 deaths attributed to respiratory diseases. How many deaths will there be in the year 2050 AD, assuming this same rate of increase every 5 years? > The population of the world increases almost 2% each year over what it was the year before. In 1970, the world population was about 3.6 billion, or 3,600,000,000. Have the computer calculate what the world population will be in the year 2000 AD. > A salmon starts a 100 mile journey upstream to the placid lake where she was born. Each day she is able to swim 3 miles upstream, but each night when she sleeps she is pushed 2 miles back downstream. Exactly how many days will it take her to reach the quiet spawning grounds? > The bristleworm can reproduce by splitting itself into 24 segments, each of which grows a new head and a new tail. What is the maximum number of bristleworms that could be obtained in this fashion, starting with only 1 worm, after ten "splittings"? 180