<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,&nbsp; 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.&nbsp; 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.&nbsp; I have heard this problem phrased
    "If I roll the two dice a gazillion times, what number comes up the
    most."&nbsp;&nbsp; <br>
    <br>
    You have a variable in your program called max_rolls that determines
    how many times the dice get rolled.&nbsp; I think in the code I put out
    there for you it is set to roll the dice 10 times.&nbsp; When you roll
    the two six sided die 10 times you might get something like this...<br>
    <br>
    Roll&nbsp;&nbsp;&nbsp; Number of Occurrences<br>
    ------- ---------------------<br>
    1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>
    2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>
    3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>
    4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>
    5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>
    6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3<br>
    7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2<br>
    8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>
    9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>
    10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>
    11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br>
    12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp;
    If, however, I change max_rolls to 1000 I might get something
    like...<br>
    <br>
    Roll&nbsp;&nbsp;&nbsp; Number of Occurrences<br>
    ------- ---------------------<br>
    1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>
    2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 28<br>
    3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 54<br>
    4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 89<br>
    5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 115<br>
    6&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 112<br>
    7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 162<br>
    8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 141<br>
    9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 123<br>
    10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 84<br>
    11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61<br>
    12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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.&nbsp; We know that 7
    is "supposed" to come up, we also know that it takes 1000 rolls to
    get that result consistently.&nbsp; 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.&nbsp; 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. &nbsp; We'll call this the limiting case.&nbsp; Once
    you isolate the number from your limiting case, start decreasing the
    value of max_rolls.&nbsp; 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.&nbsp; By consistent we mean that
        we can run the program ten times and get the same result.&nbsp; <br>
      </li>
      <li>For the three six sided dice, what should be the value of the
        limiting case?&nbsp; Hint: It will be a number beteen 3 and 18.&nbsp; :)</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.&nbsp;
        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.&nbsp; 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...&nbsp; 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>