    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: On High Rollers</title>
        <link>https://members.accu.org/index.php/articles/2307</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>




<div class="xar-mod-head"><span class="xar-mod-title">Programming Topics + CVu Journal Vol 28, #5 - November 2016</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c13/">Topics</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c65/">Programming</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/">All</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c76/">Journals</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c77/">CVu</a>

                     &gt;                         <a href="https://members.accu.org/index.php/articles/c367/">285</a>
<br />

                                            <a href="https://members.accu.org/index.php/articles/c65-367/">Any of these categories</a>

                    -                        <a href="https://members.accu.org/index.php/articles/c65+367/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;On High Rollers</h1>
<p><strong>Author:</strong>&nbsp;Martin Moene</p>
<p>
<strong>Date:</strong> 05 November 2016 17:02:16 +00:00 or Sat, 05 November 2016 17:02:16 +00:00</p>
<p><strong>Summary:</strong>&nbsp;A student investigates the Baronâ€™s last puzzle.</p>
<p><strong>Body:</strong>&nbsp;<p>In the Baronâ€™s most recent wager, he was to roll a twenty-sided die marked with the digits zero to nine twice apiece and place it either upon a space representing tens or upon another representing ones according to his fancy, after which Sir R----- was to do the same. Then the Baron and Sir R----- were to roll a second die each and place them upon their empty spaces. If the number thus made by the Baron was smaller than that made by Sir R-----, then Sir R----- was to have a prize of twenty nine coins from the Baron, otherwise the Baron was to have one of thirty coins from Sir R-----.</p>

<p>The key to figuring the fairness of the wager lies in recognising that there exists an optimal strategy that the Baron should have followed if he were at all desirous of victory and another that Sir R----- should have adopted if he were at all keen to frustrate him.</p>

<p>Indeed, I explained as much to the Baron, but I fear that he may not have entirely grasped its significance.</p>

<p>Specifically, if the Baronâ€™s first roll was five or greater then he should have placed the die upon his tens space, with the expectation that he was more likely than not to roll no greater with his second die, otherwise he should have placed it upon the ones, with precisely the opposite expectation.</p>

<p>In the first case, if Sir R----- rolled greater than the Baron then he should have placed his die upon his tens space for assured victory. If he instead rolled lower then he should have placed it upon his ones space to stave off assured defeat. Finally, if he rolled equally then he should have placed it upon the tens space with the same expectation that he was more likely than not to roll no better with his second die.</p>

<p>In the second case, Sir R----- should simply have taken the Baronâ€™s strategy and placed the die upon his ones space if he rolled less than five and upon his tens space otherwise.</p>

<p>If we label the Baronâ€™s first die <em>b</em><sub>1</sub> and Sir R-----â€™s <em>r</em><sub>1</sub> then we can express these contingencies as</p>

<p style="margin-left:1em"><img style="max-width:15%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-01.png" /></p>

<p>where âˆ§ stands for <em>and</em>.</p>

<p>Now Sir R----- is sure to win in the first case, which occurs with a probability of</p>

<p style="margin-left:1em"><img style="max-width:40%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-02.png" /></p>

<p>where âˆ‘ is the summation sign. Here weâ€™re exploiting the facts that each number from zero to nine has one chance in ten of being rolled and that there are 9 âˆ’ <em>b</em><sub>1</sub> numbers between zero and nine that are greater than <em>b</em><sub>1</sub>.</p>

<p>In the second case, Sir R----- must roll higher than the Baron with his second die to secure victory</p>

<p style="margin-left:1em"><img style="max-width:25%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-03.png" /></p>

<p>an eventuality that has a likelihood of</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-04.png" /></p>

<p>In the third case there are two possible conclusions in which Sir R----- prevails. Firstly, if his second roll is greater than the Baronâ€™s first</p>

<p style="margin-left:1em"><img style="max-width:25%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-05.png" /></p>

<p>and secondly if it is equal to it and the Baronâ€™s second roll is less than Sir R-----â€™s first</p>

<p style="margin-left:1em"><img style="max-width:35%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-06.png" /></p>

<p>The chances of these outcomes are</p>

<p style="margin-left:1em"><img style="max-width:70%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-07.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:75%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-08.png" /></p>

<p>Now the inner sum here is an arithmetic series and so, by the law that governs them, must satisfy</p>

<p style="margin-left:1em"><img style="max-width:30%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-09.png" /></p>

<p>and consequently</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-10.png" /></p>

<p>Similarly, there are two outcomes following from the fourth case in which Sir R----- takes the prize; if the Baronâ€™s second roll is less than Sir R-----'s first, or if it equals it and Sir R-----'s second roll is greater than the Baronâ€™s first</p>

<p style="margin-left:1em"><img style="max-width:35%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-11.png" /></p>

<p>We can figure the chances of these with</p>

<p style="margin-left:1em"><img style="max-width:52%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-12.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:65%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-13.png" /></p>

<p>Finally, in the last case Sir R----- wins if his second roll exceeds the Baronâ€™s or if it is equal and his first roll was greater than the Baronâ€™s</p>

<p style="margin-left:1em"><img style="max-width:35%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-14.png" /></p>

<p>which have likelihoods of</p>

<p style="margin-left:1em"><img style="max-width:70%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-15.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:85%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-16.png" /></p>

<p>Note that, since weâ€™re only considering those circumstances in which the Baronâ€™s and Sir R-----â€™s first rolls were less than five, there are but 4 âˆ’ <em>b</em><sub>1</sub> chances in ten that <em>r</em><sub>1</sub> was greater than <em>b</em><sub>1</sub>.</p>

<p>Having enumerated each and every way in which Sir R----- might have defeated the Baron, we need simply add their probabilities to figure the likelihood that he should have done so.</p>

<p style="margin-left:1em"><img style="max-width:70%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-17.png" /></p>

<p>Sir R-----â€™s expected winnings were therefore</p>

<p style="margin-left:1em"><img style="max-width:55%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-18.png" /></p>

<p>and I should have had no compunction whatsoever in suggesting that he take on the Baronâ€™s challenge!</p>

<p>But alas, I should have been wrong to do so; the diligent Mister O-- <a href="BaronM.xml#[1]">[1] </a>has deduced that the Baron should have been better served had he first cast a five if he had placed it upon his ones space!</p>

<p>Now it is still the case that, should the Baron have first rolled five or less and placed his die upon the ones, Sir R----- should have placed his first upon the tens if it were a five since he would have won the wager if either</p>

<p style="margin-left:1em"><img style="max-width:7%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-19.png" /></p>

<p>or</p>

<p style="margin-left:1em"><img style="max-width:18%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-20.png" /></p>

<p>which would happen with probabilities</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-21.png" /></p>

<p>since there are but six such outcomes for the Baronâ€™s first die, totalling 339 chances in 600. In contrast, if Sir R----- had placed his five in the ones space then he should have triumphed in the eventualities</p>

<p style="margin-left:1em"><img style="max-width:18%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-22.png" /></p>

<p>which have probabilities of</p>

<p style="margin-left:1em"><img style="max-width:68%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-23.png" /></p>

<p>totalling just 320 chances in 600. Sir R----- should therefore have adopted the former strategy and we must consider the cases</p>

<p style="margin-left:1em"><img style="max-width:17%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-24.png" /></p>

<p>The first of these occurs with probability</p>

<p style="margin-left:1em"><img style="max-width:65%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-25.png" /></p>

<p>and ensures victory for Sir R-----.</p>

<p>Once again, Sir R----- will emerge victorious in the second case only if his second roll exceeds the Baronâ€™s, which happens with a probability of</p>

<p style="margin-left:1em"><img style="max-width:80%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-26.png" /></p>

<p>In the third case Sir R----- will win if either his second die is greater than the Baronâ€™s first or if it is equal and the Baronâ€™s second is less than his first, for which we can figure the probabilities</p>

<p style="margin-left:1em"><img style="max-width:68%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-27.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:70%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-28.png" /></p>

<p>The two winning outcomes for Sir R----- in the fourth case are now</p>

<p style="margin-left:1em"><img style="max-width:35%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-29.png" /></p>

<p>having likelihoods of</p>

<p style="margin-left:1em"><img style="max-width:57%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-30.png" /></p>

<p>and</p>

<p style="margin-left:1em"><img style="max-width:68%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-31.png" /></p>

<p>In the fifth and final case Sir R----- needs his second die to be greater than the Baronâ€™s second or, if it equals it, his first to be greater than the Baronâ€™s first, having chances of</p>

<p style="margin-left:1em"><img style="max-width:57%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-32.png" /></p>

<p>in the first eventuality and</p>

<p style="margin-left:1em"><img style="max-width:82%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-33.png" /></p>

<p>in the second since Sir R-----â€™s first die could not possibly have exceeded the Baronâ€™s if it were a five.</p>

<p>Adding together these probabilities yields</p>

<p style="margin-left:1em"><img style="max-width:70%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-34.png" /></p>

<p>which unfortunately turns the tide against Sir R----- whose expected outcome was consequently</p>

<p style="margin-left:1em"><img style="max-width:55%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-35.png" /></p>

<p>and he would have been most ill-served by my advice! &emsp; â–¡</p>

<!--p style="margin-left:1em"><img style="max-width:VISUALLY_DETERMINED%" src="http://accu.org/content/images/journals/cvu28-5/Student/Eqn-36.png" /></p-->

<p>Courtesy of <a href="http://www.thusspakeak.com">www.thusspakeak.com</a></p>

<h2>Acknowledgement</h2>

<p><a id="[1]"></a>[1] With thanks to Roger Orr.</p>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
