Sunday, October 26, 2014

Playing with Chances (Tuklas Vol. 16, No. 2 - October 25, 2014)

PLAYING WITH CHANCES

One popular card game in the Philippines is Pusoy Dos. The goal of the game is simple: be the first player to use all of his or her cards. A player can either use a single card, pair, three of a kind, or a five-card combination, depending on the current play. Each player must play a card that has the same number of cards as the previous player, but should have a higher rank than the previous. The rank of single, pair and three cards are based on its face value and suit. What is interesting to look at is the ranking of five-card hands. Have you ever wondered why they are ranked as such?

The allowable five-card combinations, ranked in increasing order, are: straight, flush, full house, four of a kind, straight flush, and royal flush. Notice that they are similar to poker hands. At first glance, it would seem that the combinations are ranked based on the chances of a player forming that combination from any five randomly chosen cards from his or her hand. Now, let us try to put a number on that chance.

Probability
The probability of an event refers to a measure of the chances that the said event will occur. The most common definition of probability of an event \(E\) occurring is the ratio between the number of times the event can occur and the number of times an outcome (let us call it \(S\)) can happen. In formula, \(P(E) = \frac{n(E)}{n(S)}\), where \(n(\cdot)\) refers to the number of times it can occur.

In this case, \(E\) refers to the different five-card combinations mentioned above, while \(S\) refers to any set of five cards. For easier computation, let us assume that we are choosing five cards from a standard deck of cards (meaning we have 52 cards), rather than just the 13 cards in our hand. Notice that regardless of \(E\), your \(S\) is fixed. That is, the number of combinations you can do with five cards is always \({52 \choose 5}= 2,598,960\).

Royal Flush
To form a royal flush, your five cards must be '10', 'J', 'Q', 'K', 'A', all with the same suit. Since there are four suits, then the number of times to get a royal flush is 4. Then, the probability of getting a royal flush is \(\frac{4}{2,598,960}\), or a mere \(0.0002\%\).

Straight Flush
Next, to form a straight flush, your five cards must have consecutive face values, all with the same suit. Counting the number of straight flushes is similar to counting the number of times you can choose your lowest card, since the next four cards depends on the first card. However, we should be careful not to form a royal flush. After choosing the face value, we can now choose what the suit of the five cards will be. Since there are 9 cards to choose from for the lowest (`10' is excluded since this will form a royal flush) and 4 suits to choose from, the number of times we can get a straight flush is \({9\choose 1} \times {4\choose 1} = 36\). Then, the probability of getting a straight flush is \(\frac{36}{2,598,960}\) or \(0.0014\%\).

Four of a Kind
Forming a four of a kind is straightforward. You need to have all four suits of a particular card, then one other card. There are 13 values to choose from for the 'four' cards, and 12 values (since the value of the `four' cards cannot be used) for the `one' card. After choosing the value of the 'one,' its suit will be chosen. Then, the number of times we can get a four of a kind is \({13\choose 1}\times {12 \choose 1} \times {4\choose 1} = 624\). Then, the probability of getting a four of a kind is \(\frac{624}{2,598,960}\) or \(0.024\%\).

Full House
Forming a full house is similar to forming a four of a kind. Instead of having all four suits for a particular card, you just need three. The remaining two cards, however, must also have the same value. There are 13 values to choose from for the `three' cards, and 12 values for the 'two' cards. After choosing the values of the 'three' and 'two,' we are now going to choose the suits for the 'three' and 'two' separately. Then, the number of times we can get a full house is \({13\choose 1}  \times {4\choose 3} \times {12 \choose 1} \times  \times {4\choose 2} = 3,744\). Then, the probability of getting a full house is \(\frac{3,744}{2,598,960}\) or \(0.1441\%\).

Flush
Next, to form a flush, your five cards must have the same suit, regardless of their face values. However, we must be careful not to count the straight and royal flushes. We have four suits to choose from, and 13 values for the five cards. Then, the number of times we can get a flush is \({4 \choose 1}\times {13 \choose 5} - \left(36 + 4\right) = 5,108\). Then, the probability of getting a flush is \(\frac{5,108}{2,598,960}\) or \(0.1965\%\).

Straight
Lastly, to form a straight, your five cards must have consecutive face values. Counting the number of straights is similar to counting the number of times you can choose your lowest card, since the next four cards depends on the first card. After choosing the face value, we can now choose what the suit of each of the five cards will be. We have 10 cards to choose from for the lowest, and 4 suits for each  card. However, we should be careful not to count the straight and royal flushes. Hence, the number of times we can get a straight is given by \({10\choose 1} \times {4\choose 1}\times {4\choose 1}\times {4\choose 1}\times {4\choose 1}\times {4\choose 1}  - \left(36 + 4\right) = 10,200\). Then, the probability of getting a straight is \(\frac{10,200}{2,598,960}\) or \(0.3925\%\).

Playing the Game
After doing all the computations, our guess is indeed valid. The five-card combination rankings are based on the probability of getting them. Since royal flushes have the smallest probability, then they are ranked highest. Same is true for straights. Since they have the highest probability of getting formed, they are ranked lowest.

Now, the next time you play five cards in Pusoy Dos, it might help to think of the chances of your opponents having a higher set of five cards, given you already know that there are 13 cards not in his hand. This may be your secret to winning.

ABOUT THE AUTHOR:
Jeric Briones is an Instructor at the Ateneo de Manila University. He obtained his Master of Applied Mathematics major in Mathematical Finance degree at the same university in 2013.

OLYMPIAD CORNER
from the Asian Pacific Mathematics Olympiad, 2014

Problem: For a positive integer \(m\) denote by \(S(m)\) and \(P(m)\) the sum and product, respectively, of the digits of \(m\). Show that for each positive integer \(n\), there exist positive integers \(a_{1}, a_{2}, \ldots, a_{n}\) satisfying the following conditions: \[ S(a_{1}) < S(a_{2})<\cdots <S(a_{n}) \]\[ S(a_{i}) = P(a_{i+1}), i=1,2,...n \] (We let \(a_{n+1}=a_{1}\))

Solution: 
Let \(k\) be a sufficiently large positive integer. For each \(i=2,3,...,n\), the digits of \(a_{i}\) are such that the number 2 appears exactly \(k+i-2\) times, the number 1 appears exactly \(2^{k+i-1}-2\left( k+i-2\right)\) times, and no other number appears. Then\[ S\left( a_{i}\right)  = 2\times \left( k+i-2\right) +1\times \left[ 2^{k+i-1}-2\left( k+i-2\right) \right] =2^{k+i-1} \]\[ P\left( a_{i}\right)  = 2^{k+i-2} \]Observe that\[ S\left( a_{i}\right) =2^{k+i-1}<2^{k+i}=S\left( a_{i+1}\right) \]and\[ S\left( a_{i}\right) =2^{k+i-1}=P\left( a_{i+1}\right) \]for \(i=2,3,..,n-1\).

Next, set the digits of \(a_{i}\) so that the number 2 appears exactly \(k+n-1\) times, the number 1 appears exactly \(2^{k}-2\left( k+n-1\right)\) times, and no other number appears. Then\[ S\left( a_{1}\right)  = 2\times \left( k+n-1\right) +1\times \left[2^{k}-2\left( k+n-1\right) \right] =2^{k} \]\[ P\left( a_{1}\right)  = 2^{k+n-1} \]Observe that\[ S\left( a_{1}\right) =2^{k}<2^{k+1}=S\left( a_{2}\right) \]and\[ S\left( a_{1}\right) =2^{k}=P\left( a_{2}\right) \]\[ S\left( a_{n}\right) =2^{k+n-1}=P\left( a_{1}\right) =P\left( a_{n+1}\right) \]Moreover, such a choice of \(a_{1}\) is possible if we take \(k\) to be large enough to satisfy \(2^{k}>2\left( k+n-1\right)\). Therefore, the numbers \(a_{1},a_{2},...,a_{n}\) that are chosen based on the above conditions satisfy the given requirements. 

PROBLEMS
  1. Is there a triangle where the three altitudes have lengths \(1\), \(\sqrt{5}\), and \(1+\sqrt{5}\)? 
  2. Let \(0<a<b<c<d\) be odd integers such that \(ad=bc\) and \(a+d=2^{k}\), \(b+c=2^{m}\), for some integers \(k\) and \(m\). Determine the value of \(a\).
  3. Show that the interval \(\left[0,1\right]\) cannot be partitioned into two disjoint sets \(A\) and \(B\) such that \(B=A+a\) for some real number \(a\).
We welcome readers to submit solutions to the problems posed below for publication consideration. Solutions may ONLY be submitted online via vantonio@ateneo.edu. Solutions must be preceded by the solver's name, school affiliation and year level. The deadline for submission is 4:00 PM November 8, 2014.

No comments:

Post a Comment