<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 07/04/2012 10:25 PM, wrote:
<blockquote
cite="mid:CA765D0D95A04D449667AFA14377899C555374AA51@MERCERMAIL.MercerU.local"
type="cite">
<pre wrap="">Professor Pounds,
Happy 4th of July!!! I am a little confused on the assignment Program 2. Are we looking for the number of rolls it would take for the person to get the number 7 10 times or the number that every time I enter it seven is the number that is rolled the most frequently?? Sorry I may be over thinking the assignment completely.
</pre>
</blockquote>
<br>
<br>
Good question. Let me see if I can help you out here.<br>
<br>
We are ultimately looking at probabilities in this little exercise
and the limit of large numbers. I have heard this problem phrased
"If I roll the two dice a gazillion times, what number comes up the
most." <br>
<br>
You have a variable in your program called max_rolls that determines
how many times the dice get rolled. I think in the code I put out
there for you it is set to roll the dice 10 times. When you roll
the two six sided die 10 times you might get something like this...<br>
<br>
Roll Number of Occurrences<br>
------- ---------------------<br>
1 0<br>
2 1<br>
3 1<br>
4 0<br>
5 0<br>
6 3<br>
7 2<br>
8 0<br>
9 1<br>
10 1<br>
11 1<br>
12 0<br>
<br>
The number that was rolled most frequently was 6<br>
<br>
I could roll again and again and the roll that comes up the most
would change because I don't have enough samples in my set to
represent a good probability distribution for the problem at hand.
If, however, I change max_rolls to 1000 I might get something
like...<br>
<br>
Roll Number of Occurrences<br>
------- ---------------------<br>
1 0<br>
2 28<br>
3 54<br>
4 89<br>
5 115<br>
6 112<br>
7 162<br>
8 141<br>
9 123<br>
10 84<br>
11 61<br>
12 31<br>
<br>
The number that was rolled most frequently was 7<br>
<br>
In fact, I can rerun this version of the program (with max_rolls at
1000) and get this same result over and over again. We know that 7
is "supposed" to come up, we also know that it takes 1000 rolls to
get that result consistently. I wonder if you can find a smaller
number for max_rolls.<br>
<br>
Now, for the next two systems (the three six sided dice and the
platonic solids) you don't even know which number SHOULD come up the
most. By experimenting with the value of max_rolls, you should be
able figure out pretty quickly what the number is that comes up the
most. Hint: pick a big number (like a billion) and let your computer
run for a minute or so. We'll call this the limiting case. Once
you isolate the number from your limiting case, start decreasing the
value of max_rolls. Once you find a smaller value of max_rolls that
gives you the same result as your limiting case, see if you can use
that value to get the limiting case consistently (ten times in a
row).<br>
<br>
So, here is another way to read the questions.<br>
<br>
<ol>
<li>To what value (10,100,500,1000,20000,etc,) do you have to set
the variable max_rolls so that produces the roll of 7 (the value
of the limiting case) consistently. By consistent we mean that
we can run the program ten times and get the same result. <br>
</li>
<li>For the three six sided dice, what should be the value of the
limiting case? Hint: It will be a number beteen 3 and 18. :)</li>
<li>For the three six sided dice, to what value do you have to set
max_rolls to get the value of the limiting case consistently.
Hint: It should be greater than the value you found for the two
six sided dice.</li>
<li>For the five platonic solids dice, what should be the most
probable rolss resulting from the limiting case. Basically the
same question as 2 -- but now using the five platonic solids.<br>
</li>
<li>Same question as 1 and 3, but now using the case of the five
platonic solids.</li>
</ol>
<p><br>
Hope that helps... but let me know if you still have questions...<br>
</p>
<br>
<br>
<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds@theochem.mercer.edu">pounds@theochem.mercer.edu</a>)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
</pre>
</body>
</html>