<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Azimuth]]></provider_name><provider_url><![CDATA[https://johncarlosbaez.wordpress.com]]></provider_url><author_name><![CDATA[John Baez]]></author_name><author_url><![CDATA[https://johncarlosbaez.wordpress.com/author/johncarlosbaez/]]></author_url><title><![CDATA[Game Theory (Part&nbsp;10)]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>Last time we solved some probability puzzles involving coin flips.  This time we&#8217;ll look at puzzles involving cards.</p>
<h3> Permutations </h3>
<p><b>Example 1.</b>  How many ways are there to order 3 cards: a jack (J), a queen (Q), and a king (K)?</p>
<p>By <b>order</b> them I mean put one on top, then one in the middle, then one on the bottom.  There are three choices for the first card: it can be A, Q, or K.  That leaves two choices for what the second card can be, and just one for the third.  So, there are </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=3+%5Ctimes+2+%5Ctimes+1+%3D+6+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='3 &#92;times 2 &#92;times 1 = 6 ' title='3 &#92;times 2 &#92;times 1 = 6 ' class='latex' />
</div>
<p>ways to order the cards.  </p>
<p><b>Example 2.</b>  How many ways are there to order all 52 cards in an ordinary deck? </p>
<p>By the same reasoning, the answer is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=52+%5Ctimes+51+%5Ctimes+50+%5Ctimes+%5Ccdots+%5Ctimes+2+%5Ctimes+1+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='52 &#92;times 51 &#92;times 50 &#92;times &#92;cdots &#92;times 2 &#92;times 1 ' title='52 &#92;times 51 &#92;times 50 &#92;times &#92;cdots &#92;times 2 &#92;times 1 ' class='latex' />
</div>
<p>This is a huge number.  We call it 52 <b>factorial</b>, or 52! for short.  I guess the exclamation mark emphasizes how huge this number is.  In fact</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=52%21+%5Capprox+8.06+%5Ctimes+10%5E%7B67%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='52! &#92;approx 8.06 &#92;times 10^{67} ' title='52! &#92;approx 8.06 &#92;times 10^{67} ' class='latex' />
</div>
<p>This is smaller than the number of atoms in the observable universe, which is about <img src='https://s0.wp.com/latex.php?latex=10%5E%7B80%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='10^{80}.' title='10^{80}.' class='latex' />  But it&#8217;s much bigger than the number of galaxies in the observable universe, which is about <img src='https://s0.wp.com/latex.php?latex=10%5E%7B11%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='10^{11}' title='10^{11}' class='latex' />, or even the number of stars in the observable universe, which is roughly <img src='https://s0.wp.com/latex.php?latex=10%5E%7B22%7D.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='10^{22}.' title='10^{22}.' class='latex' />   It&#8217;s impressive that we can hold such a big number in our hand&#8230; in the form of possible ways to order a deck of cards!</p>
<h3> A well-shuffled deck </h3>
<p><b>Definition 1.</b>  We say a deck is <b>well-shuffled</b> if each of the possible ways of ordering the cards in the deck has the same probability.</p>
<p><b>Example 3.</b>  If a deck of cards is well-shuffled, what&#8217;s the probability that it&#8217;s in this order?</p>
<div align="center"><a href="http://math.ucr.edu/home/baez/mathematical/cards.png"><img width="450" src="https://i2.wp.com/math.ucr.edu/home/baez/mathematical/cards.png" /></a></div>
<p>Since all orders have the same probability, and there are <img src='https://s0.wp.com/latex.php?latex=52%21&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='52!' title='52!' class='latex' /> of them, the probability that they&#8217;re in <i>any</i> particular order is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B52%21%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{52!} } ' title='&#92;displaystyle{ &#92;frac{1}{52!} } ' class='latex' />
</div>
<p>So, the answer is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B52%21%7D+%5Capprox+1.24+%5Ctimes+10%5E%7B-68%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{52!} &#92;approx 1.24 &#92;times 10^{-68} } ' title='&#92;displaystyle{ &#92;frac{1}{52!} &#92;approx 1.24 &#92;times 10^{-68} } ' class='latex' />
</div>
<h3> A hand from a well-shuffled deck </h3>
<p>Suppose you take the top <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> cards from a well-shuffled deck of <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> cards.  You&#8217;ll get a subset of cards&mdash;though card players call this a <b>hand</b> of cards instead of a subset.  And, there are <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> choose <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> possible hands you could get!  Remember from last time:</p>
<p><b>Definition 2.</b>  The <b><a href="http://en.wikipedia.org/wiki/Binomial_coefficient">binomial coefficient</a></b> </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7Bn%7D%7Bk%7D+%3D+%5Cfrac%7Bn%28n-1%29%28n-2%29+%5Ccdots+%28n-k%2B1%29%7D%7Bk%28k-1%29%28k-2%29+%5Ccdots+1%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{n}{k} = &#92;frac{n(n-1)(n-2) &#92;cdots (n-k+1)}{k(k-1)(k-2) &#92;cdots 1}} ' title='&#92;displaystyle{ &#92;binom{n}{k} = &#92;frac{n(n-1)(n-2) &#92;cdots (n-k+1)}{k(k-1)(k-2) &#92;cdots 1}} ' class='latex' />
</div>
<p>called <b><img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> choose <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /></b> is the number of ways of choosing a subset of <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> things from a set of <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> things.  </p>
<p>I guess card-players call a set a &#8216;deck&#8217;, and a subset a &#8216;hand&#8217;.  But now we can write a cool new formula for <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> choose <img src='https://s0.wp.com/latex.php?latex=k.&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k.' title='k.' class='latex' />  Just multiply the top and bottom of that big fraction by </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B++%28n-k%29%28n-k-1%29+%5Ccdots+1%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{  (n-k)(n-k-1) &#92;cdots 1} ' title='&#92;displaystyle{  (n-k)(n-k-1) &#92;cdots 1} ' class='latex' />
</div>
<p>We get</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cbegin%7Barray%7D%7Bccl%7D+%5Cdisplaystyle%7B+%5Cbinom%7Bn%7D%7Bk%7D%7D+%26%3D%26+%5Cdisplaystyle%7B++%5Cfrac%7Bn%28n-1%29%28n-2%29+%5Ccdots+1%7D%7B%28k%28k-1%29%28k-2%29+%5Ccdots+1%29%28%28n-k%29%28n-k-1%29+%5Ccdots+1%29%7D+%7D+%5C%5C+%26%3D%26+%5Cdisplaystyle%7B+%5Cfrac%7Bn%21%7D%7Bk%21+%28n-k%29%21%7D+%7D+%5Cend%7Barray%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;begin{array}{ccl} &#92;displaystyle{ &#92;binom{n}{k}} &amp;=&amp; &#92;displaystyle{  &#92;frac{n(n-1)(n-2) &#92;cdots 1}{(k(k-1)(k-2) &#92;cdots 1)((n-k)(n-k-1) &#92;cdots 1)} } &#92;&#92; &amp;=&amp; &#92;displaystyle{ &#92;frac{n!}{k! (n-k)!} } &#92;end{array} ' title='&#92;begin{array}{ccl} &#92;displaystyle{ &#92;binom{n}{k}} &amp;=&amp; &#92;displaystyle{  &#92;frac{n(n-1)(n-2) &#92;cdots 1}{(k(k-1)(k-2) &#92;cdots 1)((n-k)(n-k-1) &#92;cdots 1)} } &#92;&#92; &amp;=&amp; &#92;displaystyle{ &#92;frac{n!}{k! (n-k)!} } &#92;end{array} ' class='latex' />
</div>
<p>I won&#8217;t do it here, but here&#8217;s something you can prove using stuff I&#8217;ve told you.  Suppose you have a well-shuffled deck of <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> cards and you draw a hand of <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> cards.  Then each of these hands is equally probable! </p>
<p>Using this we can solve lots of puzzles.</p>
<p><b>Example 4.</b>  If you draw a hand of 5 cards from a well-shuffled standard deck, what&#8217;s the probability that you get the 10, jack, queen, king and ace of spades?</p>
<p>Since I&#8217;m claiming that all hands are equally probable, we just need to count the number of hands, and take the reciprocal of that.</p>
<p>There are </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B52%7D%7B5%7D+%3D+%5Cfrac%7B52+%5Ctimes+51+%5Ctimes+50+%5Ctimes+49+%5Ctimes+48%7D%7B5+%5Ctimes+4+%5Ctimes+3+%5Ctimes+2+%5Ctimes+1%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{52}{5} = &#92;frac{52 &#92;times 51 &#92;times 50 &#92;times 49 &#92;times 48}{5 &#92;times 4 &#92;times 3 &#92;times 2 &#92;times 1} } ' title='&#92;displaystyle{ &#92;binom{52}{5} = &#92;frac{52 &#92;times 51 &#92;times 50 &#92;times 49 &#92;times 48}{5 &#92;times 4 &#92;times 3 &#92;times 2 &#92;times 1} } ' class='latex' />
</div>
<p>5-card hands drawn from a 52-card deck.  So, the probability of getting any particular hand is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B++%5Cfrac%7B1%7D%7B%5Cbinom%7B52%7D%7B5%7D%7D+%3D+%5Cfrac%7B5+%5Ctimes+4+%5Ctimes+3+%5Ctimes+2+%5Ctimes+1%7D%7B52+%5Ctimes+51+%5Ctimes+50+%5Ctimes+49+%5Ctimes+48%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{  &#92;frac{1}{&#92;binom{52}{5}} = &#92;frac{5 &#92;times 4 &#92;times 3 &#92;times 2 &#92;times 1}{52 &#92;times 51 &#92;times 50 &#92;times 49 &#92;times 48} } ' title='&#92;displaystyle{  &#92;frac{1}{&#92;binom{52}{5}} = &#92;frac{5 &#92;times 4 &#92;times 3 &#92;times 2 &#92;times 1}{52 &#92;times 51 &#92;times 50 &#92;times 49 &#92;times 48} } ' class='latex' />
</div>
<p>We can simplify this a bit since 50 is 5 &times; 10 and 48 is twice 4 &times; 3 &times; 2 &times; 1.  So, the probability is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B++%5Cfrac%7B1%7D%7B52+%5Ctimes+51+%5Ctimes+10+%5Ctimes+49+%5Ctimes+2%7D+%3D+%5Cfrac%7B1%7D%7B2598960%7D+%5Capprox+3.85+%5Ccdot+10%5E%7B-7%7D%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{  &#92;frac{1}{52 &#92;times 51 &#92;times 10 &#92;times 49 &#92;times 2} = &#92;frac{1}{2598960} &#92;approx 3.85 &#92;cdot 10^{-7}} ' title='&#92;displaystyle{  &#92;frac{1}{52 &#92;times 51 &#92;times 10 &#92;times 49 &#92;times 2} = &#92;frac{1}{2598960} &#92;approx 3.85 &#92;cdot 10^{-7}} ' class='latex' />
</div>
<h3> A royal flush </h3>
<div align="center"><img width="300" src="https://i2.wp.com/math.ucr.edu/home/baez/mathematical/royal_flush.jpg" /></div>
<p>The hand we just saw:</p>
<div align="center">
{10♠, J♠, Q♠, K♠, A♠}
</div>
<p>is an example of a &#8216;royal flush&#8217;&#8230; the best kind of hand in poker!</p>
<p><b>Definition 3.</b>  A <b><a href="http://en.wikipedia.org/wiki/Poker_hand%29#Straight">straight</a></b> is a hand of five cards that can be arranged in a consecutive sequence, for example:</p>
<div align="center">
 {<font color="red">7♥</font>, 8♣, 9♠, 10♠, <font color="red">J♦</font>}</div>
<p><b>Definition 4.</b> A <b><a href="http://en.wikipedia.org/wiki/Poker_hand%29#Straight_flush">straight flush</a></b> is a straight whose cards are all of the same suit, for example:</p>
<div align="center">
{7♣, 8♣, 9♣, 10♣, J♣}
</div>
<p><b>Definition 5.</b>  A <b><a href="http://en.wikipedia.org/wiki/Poker_hand%29#Straight_flush">royal flush</a></b> is a straight flush where the cards go from 10 to ace, for example:</p>
<div align="center">
{10♠, J♠, Q♠, K♠, A♠}
</div>
<p><b>Example 5.</b>  If you draw a 5-card hand from a standard deck, what is the probability that it is a royal flush?</p>
<p>We have seen that each 5-card hand has probability</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B%5Cbinom%7B52%7D%7B5%7D%7D+%3D+%5Cfrac%7B1%7D%7B2598960%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{&#92;binom{52}{5}} = &#92;frac{1}{2598960} } ' title='&#92;displaystyle{ &#92;frac{1}{&#92;binom{52}{5}} = &#92;frac{1}{2598960} } ' class='latex' />
</div>
<p>There are just 4 royal flushes, one for each suit.   So, the probability of getting a royal flush is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B4%7D%7B%5Cbinom%7B52%7D%7B5%7D%7D+%3D+%5Cfrac%7B1%7D%7B649740%7D+%5Capprox+0.000154%5C%25%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{4}{&#92;binom{52}{5}} = &#92;frac{1}{649740} &#92;approx 0.000154&#92;%} ' title='&#92;displaystyle{ &#92;frac{4}{&#92;binom{52}{5}} = &#92;frac{1}{649740} &#92;approx 0.000154&#92;%} ' class='latex' />
</div>
<h3> Puzzles </h3>
<p>Suppose you have a well-shuffled standard deck of 52 cards, and you draw a hand of 5 cards.</p>
<p><b>Puzzle 1.</b>  What is the probability that the hand is a straight flush?</p>
<p><b>Puzzle 2.</b>  What is the probability that the hand is a straight flush but not a royal flush?</p>
<p><b>Puzzle 3.</b>  What is the probability that the hand is a straight?</p>
<p><b>Puzzle 4.</b>  What is the probability that the hand is a straight but not a straight flush?</p>
]]></html><thumbnail_url><![CDATA[https://i2.wp.com/math.ucr.edu/home/baez/mathematical/cards.png?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[181]]></thumbnail_height><thumbnail_width><![CDATA[440]]></thumbnail_width></oembed>