The following problem is considered. Two players are each required to allocate a quota of counters among boxes labelled 1, 2, , . At times 1, 2, 3, a random box is identified; the probability of choosing box is . If a player has at least one counter in the chosen box, she removes one counter from it; otherwise she takes no action. The winner is the first player to remove all her counters. The game so described may be modified so that each player simultaneously, but independently, identifies a box at random.
This paper analyses this deceptively simple game, which has apparently not been studied in the literature. Some analytical and numerical results are then presented, followed by some challenges for further work.
Two players are each required to allocate a quota of counters among boxes labelled . At times a random box is identified; the probability of choosing box is and these probabilities are common knowledge. If a player has counters in the chosen box, she removes one counter from it; otherwise she takes no action. The winner is the first player to remove all her counters, except that if both players remove their respective last counters simultaneously then the game is a draw. As such the problem may be considered to be a two-person zero-sum game.
Further to the above, in which the same box is identified for each player (the “common throw” régime), the game may be modified so that each player simultaneously, but independently, identifies a box at random (the “separate throw” régime). In this case the two players may both use the same set of probabilities , or each player may use her own probabilities; however, unless otherwise stated in what follows, the two sets of probabilities will be identical.
Observe that, in contrast to allocation games such as Colonel Blotto [13] in which the units to be allocated are beneficial, here the units are detrimental. The game described here bears the same relation to resource allocation as chore division [12] does to cake division [5]: we call it “Alice’s game”.
The box probabilities will be arranged in a nonincreasing order, so that . The initial allocation of counters , with , is termed a strategy, written ; strategies thus comprise compositions in the language of Hankin [7]. Players may be identified with their strategies when this does not cause confusion.
Writing for the time at which the final counter is removed under strategy , and observing that this cannot be less than , it is convenient to consider the random variable , taking non-negative integer values, here denoted the number of “excess [die] throws to removal”.
This game is natural and easily specified, and may be played with nothing more than some plastic counters, a piece of paper, and a pair of dice. Applications might include inventory control (for example, allocating slow-selling goods amongst shops with different sales rates) and perhaps allocation of multiple indistinguishable tasks among workers of different efficiencies.
The game is equivalent to a weighted coupon collector’s problem [4], with removing a counter corresponding to collecting a coupon. However, in this paper, the allocation of counters amongst boxes is adjustable by the player at will subject to the overall sum (quota) being fixed. The game reduces to that considered by Myers [11] if each player allocates the same number of counters to each box.
The two-box game
Much of the flavour of the general game is visible in the simplest non-trivial case: that of two boxes with probabilities respectively. Then the probability mass function of , the number of excess throws to removal for the strategy of placing counters in box 1 and counters in box 2, is
where is the choose function. The two terms correspond to the final counter being removed from box 1 or box 2 respectively. Expectations may be calculated by observing that
where is the hypergeometric function [1]. Here is the rising factorial function. No analytical continuation is needed here because the primary argument does not intersect the function’s branch cut, conventionally defined as the interval .
Expected number of excess throws as a function of for different allocations of 9 counters in a two-box game; note log scale.
The two-box game: optimal strategies in expectation for 1(1)9 counters (horizontal axis) as a function of probability of box 1 (vertical axis).
The strategy which minimizes expected time to removal is
Conversely, the cut-off point of , at which strategy yields to strategy (assuming all integers non-negative) is given by solving the equation which may be solved numerically using the hypergeo package [9]. Figures 1 and 2 show some numerical results.
Game theoretic analysis
The counter removal process is now considered as a standard two-person zero sum game with payoff for a victory – that is, removing all one’s counters before the opponent, 1 for a loss and 0 for a draw. The situation is complicated by the fact that play stops when either player removes her last counter.
There are two natural interpretations: at each time, the players each randomly choose a box independently from the other players (“separate [dice] throw”); or alternatively, a random box is chosen for all the players simultaneously (a “common throw”). In the separate throw case, it is possible to allow the box probabilities to differ between the players but unless otherwise stated the probabilities will be identical.
Diagram showing vs game, separate throw game; expected payoff to player I is . Here , giving .
Diagram showing vs game, separate throw game; the term is derived in Fig. 3. The expected payoff to is .
Separate throws
Writing for the game-theoretic payoff to a player versus a player, Figs 3 and 4 show that and . The simplest non-trivial case with the players possessing an equal number of counters is versus for which the payoff to the player may be calculated by extending the methodology of Figs 3 and 4. Explicitly, the payoff to the player is given as
The first term is given in Fig. 3, the second is clearly zero, the third given in Fig. 4, and the fourth (in a different format) is given in Fig. 5 as . Combining these gives . Thus has a positive expected payoff against if and only if exceeds the unique real root of the numerator, about 0.643. Figure 6 shows the expected payoff to as a function of and exhibits an unexpected feature: a nontrivial local minimum near 0.225 of about 0.543. This observation is not useful in the general context of this paper in which a specified number of counters must be allocated, but might be relevant if a player is constrained to play against (and may vary at will).
Markov chain for vs ; separate calls. Absorbing states shown in gray. Players I and II have box probabilities . Using the fact that 0, it can be shown that the game value is .
Expected payoff to a player against a player as a function of (common) box 1 probability; separate calls.
It is possible to relax the requirement that the players’ probabilities are identical, although the algebra becomes complicated quickly. Figure 7 shows the expected payoff to I as a function of the players’ probabilities of choosing the first box. If viewed as a game on the unit square in the sense of Heuer [10], the expected payoff has a saddle point at 1, 1/2 at which the payoff to I is 0.5.
Expected payoff to (box probablities ) against (box probablities ).
Two boxes, common throw
The case where the throw is common to both players is qualitatively different, see Fig. 8. In the following, we suppose that are strictly positive integers.
Two box, common thow game with player I playing and player II playing . A game is represented by a coloured line in the form of a random walk from the origin; axes indicate total number of box 1 and box 2 throws. Line colours show the winner: red for player I winning and blue for player II winning, and line type shows the winning box: solid for winning by box 1 and dotted for winning by box 2. Shaded regions indicate a player clearing both boxes: red for player I and blue for player II.
Suppose player I plays and player II plays . Then player I may win in one of two ways: the final counter to be removed may be from box 1 (written “winning by box 1”), or from box 2.
The successive throws constitute an iid sequence of 1’s and 2’s. At any time, denote the total number of box 1 throws as and number of box 2 throws as . Player I wins by box 2 if, when , we have , and this occurs with probability , a negative binomial distribution. Similarly, player I wins by box 1 with probability .
Because the complementary cumulative distribution function of the negative binomial with parameters is given by the regularized incomplete beta function1
This is a standard function defined as . Here it is evaluated using the GSL library [8] or the hypergeo library [9].
, the probabilities of player I beating player II by box 1 is and by box 2 is .
Thus the total probability of player I winning is and, observing that a draw is impossible, the expected payoff to player I is thus . Note that these probabilities are functions only of the larger number of counters in each of the two boxes.
Expected game value for the two-box, five-counter game, , common throw. Saddle point at
I II
0.00
0.84
0.53
0.16
0.19
0.47
0.84
0.00
0.33
0.09
0.42
0.65
0.53
0.33
0.00
0.37
0.64
0.81
0.16
0.09
0.37
0.00
0.83
0.92
0.19
0.42
0.64
0.83
0.00
0.98
0.47
0.65
0.81
0.92
0.98
0.00
All 6 6 36 possible games played between two players with five counters each. For each game, the two rectangles represent the allocation of counters by player I (left) and player II (right); green indicates that that box’s counters are “active” in the sense that the number appears in the expression for the payoff to player I, viz .
Similar considerations apply if player I plays and II plays ; now player II cannot win but draws with probability (both players removing their final counter from box 2 simultaneously).
For completeness, we observe that certainly beats , and further that certainly draws against , even if one or both of and is zero.
The minimax strategy for the common-call two-category game is pure, except possibly at boundaries. This follows from the facts that: the payoff matrix is antisymmetric (see Fig. 9 and Table 1); each row is decreasing with column number on the left of the diagonal, and increasing to the right (because for ); and, for any one has .
Critical points for are found by solving for 0, 1, , . For example, the range of for which is the dominant strategy is given by ; numerically this is about (0.686, 0.871).
Three boxes
The three box case is now considered, partly motivated by the fact that the space of probabilities is easily visualized on a ternary plot.
The simplest nontrivial case for three boxes is with three counters, in which case there are are 10 strategies, from 3, 0, 0 through 1, 1, 1 to 0, 0, 3. The optimal strategy for any box probabilities is shown in Fig. 10.
Triangular plot showing optimal strategies in expectation as a function of the three box probabilities , where . Different coloured regions show the extent of the different strategies.
Diagram showing mapping used for the ternary diagrams.
It is possible to streamline graphical results by taking advantage of the fact that we may assumet, without loss of generality, that (Fig. 11). In what follows, we will consider only strategies for which – restricted partitions in the language of Hankin [7] – as strategies not satisfying this constraint may be improved in expectation.2
To see this, consider the general case of and a strategy that violates the constraint, that is, there exist with and . Then split the boxes into two sets: and its complement . Then removal of a counter from either set may be embedded into two independent Poisson processes, following [4]. Then consider transferring a counter from box to box . The process is unaffected, but the process has lower expected time to completion. Proof: consider the common throw game with player I playing and player II ; here and . We shall show that player I’s expected throws is strictly less than player II’s. First, define I’s margin of victory as the number of throws needed for II to clear her counters after I clears her counters ( means she lost; note that ). Then may be calculated as . From Fig. 8, we see that the two conditional distributions are geometric and so . This is strictly positive because . Thus a player may increase her game value by transferring a counter from box to box .
Proof: for the common throw case, we observe that and imply . For the separate throw case we observe that the existence of with and 0 implies that and 0 with 0. The result follows from the fact thatthat 0.
.
Expectation
The probability mass function for (that is, the time to removal of the final counter, minus ) is given by
Here, the three terms correspond to the final counter being removed from boxes 1, 2, 3 respectively; and corresponds to the number of “wasted” box throws (that is, the number of times box is called when box is empty). This equation is analytically challenging; the first term is algebraically equal to
Triangular plot showing optimal strategy in expectation for allocating 3 counters among 3 boxes, as a function of . The three points of the triangle correspond to , , and . The line common to the 3, 0, 0 and 2, 1, 0 regions is straight, but the line common to 2, 1, 0 and 1, 1, 1 is not.
Triangular plot showing optimal strategy in expectation for allocating 7 counters among 3 boxes, as a function of .
However, because the hypergeometric functions each have an upper argument of a strictly negative integer, the expressions are a polynomial in . However, Eq. (3.1) is the preferred form for numerical evaluation [9]. The other terms are analogous, unless one of the 0, in which case that term is omitted. These results may be used to show that the expected times to removal for the three consistent strategies are:
(the first result is more easily determined as the expectation of an inverse binomial distribution with parameters 2 and , and the third is a special case of the Coupon Collector’s problem with 3 [2]).
To find the boundaries of the regions in which the three strategies are optimal in expectation, solve and . These yield relationships showing that while the boundary of the 3, 0, 0 region is linear, the boundary of 1, 1, 1 is not; thus not all the regions in Fig. 12 are polygonal, despite appearances.
More than three counters
For the three-box case with an arbitrary number of counters, one natural strategy would be to allocate one’s quota in proportion to (or at least as close as this as possible). However, this is not necessarily optimal in expectation. Consider the game with probabilities (0.7, 0.2, 0.1) and ten counters; one might think strategy 7, 2, 1 to be superior to, say, 9, 1, 0. However, numerical methods show that the former strategy has expected time to removal of 6.09 (to 2dp), compared with the latter which has 3.37.
Figure 13 shows a triplot of the best strategy in expectation for distributing seven counters among three boxes over the region .
Game theoretic analysis
For both the common throw game and the separate throw game, natural extensions of the methods of Figs 3 and 4 may be applied. Here the simplest non trivial case, that of three counters, is considered. For the common throw game, Table 2 shows the payoff matrix as a function of the probabilities; but the equivalent calculation for the separate case is algebraically more involved. To illustrate of this, if Table 3 is written in exact, rational form with fractions in their lowest terms, one of the entries has denominator exceeding 5 10. In the absence of intelligible algebraic formulas, Table 3 shows the payoff matrix for the three counters, three box case, written to three decimal places, for both the common throw and separate throw games. The tables show perhaps unexpected differences; for example, the sign of the payoff to 3, 0, 0 when playing against 2, 1, 0 changes; also note that the common throw game has a saddle point at 2, 1, 0, the separate throw game at 3, 0, 0.
Expected game value for the three-box, three counter common throw game with probabilities
I II
300
210
111
300
0
210
0
111
0
Expected game value, to three decimal places, for the three-box, three counter game with probabilities . Left, common throw game; right, separate throw game
II
300
210
111
300
0
0.059
0.595
210
0.059
0
0.483
111
0.595
0.483
0
II
300
210
111
300
0
0.200
0.707
210
0.200
0
0.519
111
0.707
0.519
0
It is possible to conduct numerical experiments for larger numbers of counters. Figure 14 shows the appropriate strategy for the case with three boxes and seven counters.
Triangular plot showing regions which are game-theoretic optimal for the 7 counter, 3 box case (separate throws).
Figure 15 illustrates the optimal strategy in a game-theoretic sense for the case of 7 counters and shows that, for some probabilities, the minimax strategy is not pure. Thus if, for example, , a minimax strategy is to play 7, 0, 0 with probability 0.156, 6, 1, 0 with probability 0.189, and 5, 1, 1 with probability 0.655.
Triangular plot showing regions in which the minimax strategy is pure, marked in eight different colours for the eight different strategies 7, 0, 0 through 3, 2, 2. White signifies regions in which the minimax strategy is mixed.
The game with an arbitrary number of boxes
The PMF for the exact number of throws required to remove the final counter in the general case is considerably more complicated. We have that is
Here the are the number of “wasted” throws in box . The outer summation is over the number of the box whose counter is removed last; the inner summation is over all distributions of wasted throws among the other boxes.
Expected time to removal for the three box, ten-counter game with probabilities as calculated numerically; figures accurate to 4 decimal places
Strategy
10, 0, 0
4.2840
9, 1, 0
3.3731
8, 2, 0
3.9637
8, 1, 1
5.4261
7, 3, 0
6.3922
7, 2, 1
6.0878
6, 4, 0
10.4550
6, 3, 1
8.6927
6, 2, 2
12.2692
5, 5, 0
15.0561
5, 4, 1
12.2627
5, 3, 2
13.7832
4, 4, 2
16.6344
4, 3, 3
21.8522
The original case [6] was to place 11 counters on boxes corresponding to the total of two independent six-sided dice, that is, with probabilities . There are 56 ways in which the counters may be arranged if is required. Of these, 0, 0, 1, 1, 2, 3, 2, 1, 1, 0, 0 is optimal in expectation and game-theoretic value. There does not seem to be any way of ascertaining this fact other than direct numerical evaluation of all 56 expectations.
A more interesting example would arise from Zipf’s law [14]. If there are 4 boxes then probabilities proportional to would be indicated; with seven counters, there are 11 distinct strategies from 7, 0, 0, 0 through 2, 2, 2, 1.
Expected time to removal is minimized by 5, 1, 1, 0, while the separate throw game has minimax strategy of 4, 2, 1, 0. With a common throw, the minimax strategy is mixed; specifically, play 4, 1, 1, 1 with probability 0.26 and 3, 2, 1, 1 with probability 0.73.
Conclusions and further work
The liability allocation problem described here bears the same relation to Blotto-type resource allocation as chore division does to cake division. The games discussed here do not appear to have been discussed in the literature, even though they are simple to state, and potentially rich in applications. They are unusual in that the simplest non-trivial cases are algebraically involved; numerical methods have to be used for even small numbers of counters and boxes.
Further work might include relaxing the assumption that the box probabilities are common knowledge; perhaps one or both players have to infer the box probabilities from previous calls, as in multi-armed bandit problems [3].
The three-box case shows a variety of results using the triplot device; it would be interesting to understand why the boundary lines are so close to perfect straight lines.
Footnotes
Acknowledgments
The author thanks S. Marshall for valuable discussions; and also A. M. Hankin (“Alice”) for bringing this problem to his attention, making the (then) unintuitive observation that placing all one’s counters on the maximal probability box is suboptimal in expectation and game value.
References
1.
AbramowitzM. and StegunI.A., Handbook of mathematical functions with formulas, graphs and mathematical tables (AMS-55), National Bureau of Standards, 1965.
2.
BerenbrinkP. and SauerwaldT., Computing and Combinatorics, 15 annual international conference, COCOON 2009, Niagara Falls NY, USA, July 2009, chapter The weighted coupon collector’s problem and applications, Springer, 2009, pp. 449–458.
3.
BerryD.A. and FristedtB., Bandit problems: sequential allocation of experiments, Springer Netherlands, 1985.
4.
BonehA. and HofriM., The coupon collector problem revisited – a survey of engineering problems and computational methods, Communications in Statistics – Stochastic Models13(1) (1997), 39–66.
5.
BramsS.J. and TaylorA.D., On envy-free cake division, Journal of Combinatorial Theory, Series A70 (1995), 170–173.
6.
HankinA.M., Personal communication, 2014.
7.
HankinR.K.S., Additive integer partitions in R, Journal of Statistical Software, Code Snippets16(1) (2006).
8.
HankinR.K.S., Special functions in R: introducing the gsl package, R News6 (October 2006).
9.
HankinR.K.S., Hypergeo: the hypergeometric function for complex R package number 1.2–5, URL http://CRAN.R-project.org/package=hypergeo, 2013.
10.
HeuerG.A., Three-part partition games on rectangles, Theoretical Computer Science259 (2001), 639–661.
11.
MyersA.N. and WilfH.S., Some new aspects of the coupon collector’s problem, SIAM Review48(3) (2006).