Analysis of the Penney-Ante Game Using Di ff erence Equations : Development of an Optimal and a Mixed-Strategies Protocol

Penney-Ante is a well known two-player (Player I and Player II) game based on an information paradox. We present a new approach, using difference-equations, to analyzing the outcome for each player. One strategy yields a winning outcome of 75% for Player II, the player playing second. The approach also permits investigation of non-optimal strategies, and demonstrates how mixing of such strategies can be used to tune the winning edge of either player. We generalize the analysis to accommodate the possibility of a biased coin.


Introduction
Paradoxes are statements that lead to counterintuitive situations (Sorensen, 2005).One well known example is the Monty Hall paradox (Rosenthal, 2008).Another widely studied paradox is that of Penney-Ante, attributed to Walter Penney (1969) and publicized by Martin Gardner (1974).
Penney-Ante is a game with two players, Player I and Player II, who play with any device that has two equally probable outcomes, for example an unbiased coin (heads vs tails), dice or die (odd vs even), or cards from a large well shuffled deck (red vs black) with replacement.Player I chooses a triplet of outcomes, for example HHT; OEO; RBB and then Player II chooses a different ordered triplet.For Player I, there are of course 2 3 = 8 possible series to choose from, namely HHH, HHT, HTH, . . ., TTT while Player II is constrained to choose one of the seven remaining possibilities.For example, using coins, Player I might choose HHT and Player II THH.The game device is now played one at a time, generating outcomes (H or T) in a continuing sequence until there is a match between the last three elements played and either Player I's or Player II's selected triplet: that player wins.Since Player I chooses the first of the eight possible triplets and Player II must choose one of the remaining seven possibilities, it might be assumed that Player I would have the advantage in the game.Therein lies the paradox.Player II has information -Player I's choice of a series -and, with a smart strategy, it turns out that Player II can achieve a substantial winning edge!If the triplet that Player I has chosen is XYZ where X is the 1 st choice, Y the 2 nd choice and Z the 3 rd choice, it turns out that Player II's best strategy, which we designate as S1, is to choose Y' X Y where Y' represents the opposite of Y.For example, if Player I chooses HHT, then it turns out that Player II would be well advised to choose THH, or if Player I chooses HTH then Player II should choose HHT, and so on.
The game, together with the unexpected advantage of second player, Player II, can be easily simulated by creating a computer program, using e.g.EXCEL, to play all possible games.However, the statistics that underlie the game itself can be investigated analytically.Such analysis reveals that strategy S1 secures for Player II a winning edge of 3:1, i.e. he/she wins 75% of the time!It is not surprising, that, over the years, Penney-Ante has attracted much investigation, resulting in volumes of literature; and even some You-Tube videos ("The Coin Game . . .").The approaches to the statistical analysis are varied; for example, Reed (1996) investigates the game as an intransitive example of a Markov process.Alternatively Shuster (2006) uses a conditional-probability approach to generalizing the game to the case in which individual outcomes are biased, i.e. the case p 1/2, where p represents the probability of a coin toss resulting in a head H.
In the present communication we present a novel approach, using difference-equations, to predicting the outcomes, i.e. long-term expectations for the players, of the Penney-Ante game.Having determined the outcomes of individual games, and thus the outcomes of any particular strategy, such as the S1 above, the approach is used to explore alternative strategies, S2 . . .S5, and we show how these five strategies can be weighted to enable tuning of the outcomes.That is, we are suggesting a way in which Penney-Ante could be crafted into an entertaining casino-type game in which the second player is the casino house and House stands a statistically reasonable chance (e.g. an edge of 5% instead of 50%) of winning over the course of multiple plays of the game.For completeness sake, we also indicate how to extend the difference-equation method to the solution of the p 1/2 case (i.e. a biased coin), and obtain asymptotic solutions in agreement with those generated by Shuster (2006).Finally, we indicate how the difference-equation method can be extended to higher order Penney-Ante games involving quartics (e.g.HHTH) and beyond.

Analysis: Difference Equation Approach to Obtaining Outcome Expectations
There are four independent cases to examine in the analysis of the aforementioned strategy S1 (Player I chooses XYZ, Player II chooses Y'XY), viz: The possible outcomes of repeated coin tosses are summarized, for Case 1, in the "evolution tree" shown in Figure 1, in which the presence of a * or ** on a branch indicates that either Player I (*) or Player II (**) has won.Each column represents a successive time step (or, if you prefer, you can consider t to represent "turn" or "toss" of the next coin or presentation in the series), and at the head of each column we indicate the number of outcomes that yielded wins for PI and PII in the previous time step.Whenever there occurs a winning outcome (* or **) in a branch, the game restarts in that branch (i.e., next outcome H or T, next two outcomes HH or HT or TH or TT, and so on.)Each column also indicates the number of "open" HH's, HT's etc. (i.e.excluding those that resulted in wins) that have been accumulated, again as specified in the previous two steps.Note that in each successive column there are the expected twice as many outcomes as in the previous column.Conversion of the evolution tree into governing difference-equations proceeds as follows: Denote by n 1 (t) the number of "open" HH's at time t, n 2 (t) the number of HT's at time t, etc.To infer from Figure 1 the relationship between the n's, note -with reference to HH for example -that n 1 (6) = 15 is the sum of n 1 (5) = 7 and n 3 (5) = 5 AND the 3 in the t = 5 column which, in turn, is the sum of the PI and PII at the head of the t = 4 column which in turn is the sum of n 1 (3) = 2 and n 2 (3) = 1.Applying similar logic to HT, TH, and TT, we infer the following difference equations: (1) Using "initial conditions" n i (0) = n i (1) = 0, n i (2) = 1, the above equations yield the following values for n i : t 0 1 2 3 4 5 6 7 8 n 1 0 0 1 2 3 7 15 28 56 n 2 0 0 1 1 1 4 8 13 28 n 3 0 0 1 1 2 5 9 17 36 n 4 0 0 1 2 3 6 13 25 49 in agreement with Figure 1.
The exact solution of Equations ( 1)-( 4) can be obtained using a standard eigenvector-eigenvalue approach: Substitute n i ∼ λ t into the equation to yield an eigenvalue equation: Using the usual methods of matrix manipulation, this determinant reduces to the simple form in which the 16 coefficients α i , ..., δ i remain to be determined using suitable initial conditions on all four n s.
Alternatively, one can obtain the eigenvectors corresponding to the four eigenvalues and then determine the 4 remaining independent constants, e.g.α 1 ,..., δ 1 , by using initial conditions on just one of the n s, e.g.n 1 .In either approach, the aforementioned conditions n i (0) = n i (1) = 0, n i (2) = 1 can be used.For our fourth required initial condition we can use either the values in the t = 3 column (n 1 (3) = 2, . . ., n 4 (3) = 2) which can be easily obtained from the difference equations using the t = 0, 1, 2 values, or we can use n(−1) = 0. Either way, it is now a matter of straightforward algebra (which may be facilitated using EXCEL) to determine the four coefficients for each of the four n s.For n 1 (t), we obtain and the reader is invited to check that this yields all values in the n 1 (t) row, and beyond.
While exact solution of the equations, as described above, is straightforward, it is somewhat time consuming.However, if our primary interest is the long-term expectations that PI and PII will win then we have available a much quicker and simpler modification of the above approach.All we need to note is that the dominant eigenvalue is 2 and thus, for large t, every n has the asymptotic form n i = α i 2 t .Then the relationship between the four coefficients α 1 , ..., α 4 can be determined by simply substituting n i = α i 2 t into the governing equations and doing a bit of algebra.Note, this simplified approach will not yield the absolute values of the α's but, as will be seen below, these absolute values are not needed; only the relationship -specifically the ratios -between the α's will be needed.
But first, we need to determine how to use the n i = α i 2 t to deduce the long-term probabilities Prob(PI) and Prob(PII) of each player winning.To this end, note for the Case 1 under consideration, at time t the accumulated number of possible wins for PI is i=t−1 i=0 n 2 (i) and for PII, i=t−1 i=0 n 1 (i).But we don't even need to evaluate these two sums; all we need is the ratio Prob(PI)/Prob(PII) and since the n in each sum is dominated by the α i 2 t piece of the solution and i=t−1 i=0 2 i = 2 t − 1 ≈ 2 t we see that the ratio Prob(PI)/Prob(PII) for large t is given by the ratio n 2 (t)/n 1 (t) = α 2 /α 1 , that is, as noted above, we don't even need to know the exact values of the α's, just the relevant ratio.

Summary of Results for Alternative Strategies S2-S5
Here we summarize the results from analysis of four other, non-optimal, strategies, S2 . . .S5.
The results for all 5 strategies are summarized in Table 1.
Table 1.Summary of outcomes for five possible strategies for playing Penney-Ante * Here Q denotes "either A or B".

Mixing the Strategies
Clearly, given the choice, together with 20:20 hindsight, Player I would choose strategy S5 while the Player II would -equally obviously -prefer S1.However, if in a casino game -in which Player II is the House -the strategies S1 and S5 were chosen by the machine randomly but with equal probability, the long-term probability of the House winning would be 52%, i.e. it would have an edge of 4% over the player.Furthermore, by admitting the other three possible strategies, and also by adjusting the probabilities with which the 5 strategies are chosen, the edge of the House over the player can be accordingly adjusted.For example, if we choose S1 20% of the time, S2 20% of the time, S3 25% of the time, S4 30% of the time, and S5 just 5% of the time the long term probability of the House winning will be (20 × 74 + 20 × 50 + 25 × 50 + 30 × 50 + 5 × 36)/100 = 54%, i.e. it has an edge of 4% (or 54-46=8% depending on how you choose to define "edge".)Three other mixes, together with the corresponding House "edge" are shown in Table 2. Having applied the difference-equation method to the case of an unbiased coin (p = 1/2), we now show how it can be adapted to the case of a biased coin, i.e. p = 1/(1 + β), with β 1.The modification of the aforementioned method for the "biased coin" case p 1/2, is illustrated for the case Player I = HTT, Player II = THH in the evolution tree shown in Figure 5, in which we assume the outcome T occurs β times as often as outcome H.As previously, n' denotes n(t − 2).3) and ( 4), obtain βn 3 (t + 1) − n 4 (t + 1) = −βn 4 (t).Substituting into Equation (1) yields
In the evolution tree, it is understood that β is an integer (1, 2, 3, ...).However the final result in terms of p = 1/(1 + β) is valid for all p satisfying 0 < p < 1, that is β in the above solutions can be analytically continued from the set of integers to the set of real numbers.
As in the p = 1/2 case, exact solution of the p 1/2 case can be obtained using an eigenvalue/eigenvector approach via substituting into the governing difference-equations the general form n i = α i λ t and generating a "frequency" or "eigenvalue" equation from which we obtain the eigenvalues λ.For the system Player I = HTT, Player II = THH, we obtain [λ − (β + 1)][λ 4 − β 2 ] = 0, yielding eigenvalues λ = 1 + β, √ β, j √ β and a solution for n i (t) of the form with the coefficients a i , . . ., e i being determined using appropriate "initial" conditions to obtain the relevant eigenvectors.
For some cases, the eigenvalues might even be independent of β.For example, for the case Player I = THT, Player II = HHH, we obtain an eigenvalue equation In yet other cases, the eigenvalue equation may even be difficult to solve analytically.For example, the case Player I = THH, Player II = HHT yields [λ − (β + 1)][λ 4 − β(λ + 1)] = 0.However, the one thing that we can guarantee about all these systems is the presence of the dominant eigenvalue, λ = 1 + β, which is all that is necessary to determine the long-term expected outcomes of the game (the case considered by Shuster (2006)).
Generalization of the quad case for p 1/2 parallels the generalization of the triplet case but is not pursued here.

Conclusions
The game of Penney-Ante is based on a mathematical paradox in which the second player has information about the choices made by the first player giving the second player an unexpected advantage.Although it may appear at first that Player II would never want to play any strategy but Strategy 1, Player I would soon catch on that Player II "knows something".If the game were to be played in a gambling environment, it would be smart for Player II, the "House", to play a mix of strategies so that Player I would continue to participate while at the same time ensuring an overall House winning advantage with a mix of strategies to achieve an edge of say 4-5%.By mixing the strategies, Player I is unlikely to realize that he/she is at an overall disadvantage.Knowing the statistical outcomes for all possible strategies, it is possible to devise a mix of strategies played at random, for example play S1 20% of the time, S2 20% of the time, S3 25% of the time and S4 30% of the time and S5 5% of the time, such that Player II (the House) would have an adjustable but unexpected winning edge.
In the present communication we have described a) how one can use a difference -equation approach to determine the outcomes of various scenarios used to devise the various long term outcome expectations and have indicated how this can be generalized to the case of a biased coin, and b) we have also indicated how, by appropriate mixing, the Penney-Ante games can be combined to generate outcome probabilities that are marginally, rather than substantially, different for the two players involved.We have also indicated how the approach may be extended to the analysis of higher-order Penney-Ante games.

(
Case 1) Player I = HTH; Player II = HHT (equivalent to Player I = THT, Player II = TTH, hence two of the eight total possibilities.)(Case 2) Player I = HHT; Player II = THH (equivalent to Player I = TTH, Player II = HTT, hence two of the eight total possibilities.)(Case 3) Player I = HHH; Player II = THH (equivalent to Player I = TTT, Player II = HTT, hence two of the eight total possibilities.)(Case 4) Player I = HTT; Player II = HHT (equivalent to Player I = THH, Player II = TTH, hence two of the eight total possibilities.)2.1.1Case 1. Solution for the Scenario Player I = HTH and Player II = HHT

2. 1 . 3
Case 3.For the Scenario Player I = HHH and Player II = THH For Case 3, (Player I = HHH, Player II = THH) we obtain the evolution tree of Figure 3.

2. 1 . 4
Case 4. For the Scenario Player I = HTT and Player II = HHT For Case 4, (Player I = HTT, Player II = HHT) we obtain the evolution tree of Figure 4.

Table 2 .
Outcomes of a mix of strategies played by the house