About a Ball Removal Process on Bins
Abstract
We consider a basic balls-and-bins question in which you have to distribute n balls into k bins. Then, round by round, a ball is removed from a nonempty bin chosen uniformly at random. The process ends when a single nonempty bin remains. The goal is to minimize the expected number of remaining balls. An open problem posed by Will Ma asks whether the initial assignment that minimizes the expected number of remaining balls is one that is as balanced as possible. Using a coupling argument, we answer this conjecture positively, and we discuss the case of nonuniform choice among the nonempty bins.
Funding: Financial support by the Israel Science Foundation [Grant 211/22] and by Agencia Nacional de Investigación y Desarrollo Chile through the Programa de Investigación Asociativa (Project FB210005) and Fondo Nacional de Desarrollo Científico y Tecnológico [Grant 1260036] is gratefully acknowledged.
1. Introduction
You have to distribute n balls into k bins. Then, round by round, a ball is removed from a nonempty bin chosen uniformly at random. The process ends when a single nonempty bin remains. The goal is to minimize the expected number of remaining balls. This problem was presented by Will Ma during an open problems session at the Simons Institute for the Theory of Computing. He conjectured that the initial assignments that minimize the expected number of remaining balls are those that distribute the n balls into the k bins as evenly as possible; in other words, the number of balls between any two bins differs by at most one. The purpose of this note is to affirmatively settle this conjecture.
Although this conjecture is very natural and interesting in its own right, one practical motivation comes from assortment optimization. At the beginning of the selling horizon, a seller selects the number of units to stock for each product. Each arriving customer makes a choice among the set of products with remaining inventory. The seller’s goal is to pick the stocking quantities to maximize the total expected revenue from the sales net of the stocking cost. Various approximations of the optimal solution under different assumptions on the data have been provided—for example, by Liang et al. (2021), Zhang et al. (2025), and Mouchtaki et al. (2026). The problem we study is a variation of this model, where products are perfect substitutes, customers are indifferent among them, and they are happy and make a purchase whenever they have a choice of products. In this case, they randomly purchase one unit of one product. The above conjecture is equivalent to determining how to initially distribute n items across k product types to maximize the expected number of happy customers. Although unrealistic as a model of customer behavior, it is arguably a particularly simple and mathematically interesting model that is not yet well understood. It is thus a relevant setting in which to develop tools for addressing more general and realistic models.
To formalize the problem, we assume that the k bins are labeled by and that an initial assignment of balls to bins is given by , where . Instead of the process implicit in the problem description, we consider the following process: at each round, a bin (possibly empty) is chosen according to the uniform distribution on [k], independently of past choices, and if the bin is nonempty, one ball is removed from it. Thus, the sample space is , and the probability distribution is the product probability measure under which the coordinates are independent and uniformly distributed on [k]. This representation is independent of the initial assignment, because a point in the sample space determines the sequence of selected bins.
For each initial assignment , denote by the (random) number of balls in the last nonempty bin. Thus, if there are two bins and two balls, then and equal one and two, respectively.
We number rounds starting at 0: round 0 refers to the initial configuration, and, for , the configuration at the end of round t is the configuration after the first t selections. Let denote the first (random) round at which the modified removal process started from has a unique nonempty bin. Note that is the number of balls remaining at round of the modified removal process. Crucially, this random variable has the same distribution as the number of balls remaining when the unmodified removal process terminates. Define
We abuse notation and extend, in the natural way, the domain of f to .
From the definition, we see that , , and
Our main result is:
Fix . The quantity is attained only by assignments satisfying and for every .
The result was previously proved for in Gutiérrez and Subercaseaux (2024). For , the proof argument is a complicated induction (on the initial number of balls n) of six mutually dependent claims. Each claim establishes, under suitable conditions, an inequality concerning the expected number of balls removed throughout the process. The complexity of the induction suggests that any generalization would require significant effort and provide little insight.
Independently of us, Zhou et al. (2026) proved Theorem 1 for any k, by embedding the discrete-time process into a continuous-time analytical framework. Specifically, the embedding recasts the time at which bins empty into independent Erlang random variables. This allows reframing the problem as one concerning order statistics of k independent Erlang variables. This yields a closed-form expression for the marginal contribution of adding one additional ball to any given bin. The closed-form expression is then analyzed and used to establish monotonicity of the expected number of balls removed throughout the process, with respect to the initial number of balls per bin. This directly translates into the optimality of the balanced initial assignment. As observed in Zhou et al. (2026), one key analytical difficulty in analyzing the process is that the objective function—the expected number of balls removed—is not Schur-concave. Thus, typical optimization techniques are not applicable to the problem under consideration. Our proof uses a standard coupling argument and is simpler and significantly shorter.
2. Proof of the Main Result
For completeness, we start by proving Theorem 1 for the case , which involves a coupling argument.
Fix . For every such that ,
with strict inequality whenever .
Without loss of generality, assume . If , then , , and there is nothing to prove. In what follows, we assume .
It suffices to show that , because the result then follows by repeatedly applying this inequality. To see that the inequality holds, run the process from the initial assignment and consider a sequence of removals in which, eventually, at some round, bin 1 contains exactly one ball more than bin 2. Denote by t the first round at which this happens and by the number of balls in bin 2 at the end of round t (so that bin 1 contains at the end of that round). Starting from the initial assignment , the same sequence of removals, up to round t, leaves bins 1 and 2 with and balls, respectively. By symmetry, in any such sequence of removals, the number of balls remaining when the process stops is identically distributed, no matter if the initial assignment is or .
Consider now the complementary situation in which a sequence of removals starting with the assignment results in bin 1 having, throughout all rounds, at least two more balls than bin 2. Then, bin 1 is the last nonempty bin. Moreover, on the same sequence of removals, but starting with the assignment , the process takes longer and ends with fewer balls. Finally, note that this complementary situation occurs with positive probability. Indeed, this situation contains, for example, the sequence of chosen bins of consecutive choices of bin 2. □
Lemma 1 in fact yields the stronger statement that for all with .
A simple property of f is the following:
, for every , with strict inequality whenever .
We prove the lemma by induction on r. For , we have . Assume that the lemma holds for a certain . Then,
We turn to Theorem 1. Fix an initial assignment such that for some i, j. We assume throughout that for every .
Denote by the i-th standard unit vector in . By definition, the random variable indicates the number of balls in the last nonempty bin when the initial assignment is . With this notation, for each i such that ,
Note that if , then by symmetry, . In what follows, fix i such that .
Given an initial assignment, for every point in our sample space, we can calculate the number of balls in each bin at every round. It will be convenient to assume that if bin j was selected times up to round t, and if , then at the end of round t, the bin contains a negative number of balls—that is, balls.
If has only one nonempty coordinate, transferring one ball from that bin to bin i strictly decreases the objective because . We may therefore assume henceforth that at least two bins are initially nonempty.
Central to our proof is the following stopping time. Given an initial assignment , let be the smallest such that, at the end of round t, one of the following conditions holds:1
Bin 1 contains exactly one ball more than bin i.
There are exactly two nonempty bins, and one of them contains exactly one ball. Denote by the number of balls in the other bin.
Thus, if (at least) one of the conditions (a) or (b) already holds in the initial configuration.2 Note also that is defined relative to the process started from , even when it is subsequently used to couple this process with the one started from .
From the definition of , we have . We next show that the same lower bound holds for . We include this result primarily for clarity, to help discard infeasible events.
.
If , the result is immediate. Assume henceforth that .
Take a specific sequence of bins that were selected along the process. If condition (a) is triggered, then at round , bin 1 has exactly one more ball than bin i. Hence, in the previous round, bin 1 contained exactly two more balls than bin i, and a ball was removed from bin 1 in round . Because condition (b) has not occurred earlier, there are at least two nonempty bins, and, if there are exactly two nonempty bins, both contain at least two balls. In both cases, when the initial assignment is , the removal process does not end at round , and hence, .
If condition (b) is triggered, then may be smaller than only if bin 1 contains one ball at round , so that when the initial assignment is , it would contain no balls (if bin i contained more than one ball, then for (b) to be triggered, bin 1 must contain one ball and condition (a) would have triggered before). Because condition (b) was not triggered before, either at round the last ball from a third bin j has been removed, or at round , the penultimate ball from bin 1 was removed. In both cases, when the initial assignment is , the removal process has not ended before round , and hence, . □
We will consider the following events:
: At round condition (a) occurs—that is, bin 1 contains exactly one ball more than bin i.
Outside , when condition (b) first occurs, exactly two nonempty bins remain, and one has one ball. We distinguish whether these bins are , neither of them, or for some ; in the last case, we further distinguish whether the occupancies are , , or . Note that because condition does not occur, bin 1 always contains at least two balls more than bin i, and therefore, it cannot be that i but not 1 is among the last two nonempty bins. We therefore define:
: Bins 1 and i are the last two nonempty bins.
: The last two nonempty bins include neither 1 nor i.
for and : Bins 1 and j are the last two nonempty bins, and at the first round in which condition (b) is triggered, bins 1 and j contain a and b balls, respectively.
Consequently, the following collection of events partitions the sample space.
Note that is defined relative to the stopping time , which assumes that the initial assignment is . Because these events cover the sample space, by the law of iterated expectations, we have
An analogous equality holds for . Note that although the random variable is defined relative to the initial assignment , the partition which is used in the analogous equality for is defined relative to the initial assignment . This coupling constitutes the core of our proof strategy.
Next, we show that the first four summands in (6) are at least as large as the corresponding summands in the analogous expression for .
The following hold:
.
.
on .
on , for every .
On , bin 1 contains one more ball than bin i at round . Hence, when the initial assignment is , bin 1 contains one ball fewer, whereas bin i contains one additional ball at round . By symmetry, conditioned on and conditioned on are identically distributed, and item (i) follows.
On the last two nonempty bins are 1 and i, and condition (b) triggers at round . Hence, bin 1 contains at least two more balls than bin i, which, in turn, contains one ball. By Remark 1, we have for every , and therefore, item (ii) follows.
On , bin 1 is empty, and hence, bin i contains a negative number of balls. Even if we transferred in the initial assignment a ball from bin 1 to bin i, it would not affect the identity of the last two bins. This establishes item (iii).
On , we have . Immediately before round , for some , bins 1, j, must each have contained one ball. Indeed, if bins 1 and j had contained two and one balls, respectively, or one and two balls, respectively, then condition (b) would have occurred earlier. Moreover, the additional nonempty bin cannot be i, because condition (a) was not triggered in an earlier round. Hence, in this case . As a result, item (iv) holds. □
Recall that denotes the number of times bin is selected in the first t rounds and that by symmetry. Observe that for :
Regarding the last equality, on bin 1 contains one ball at round , and because does not hold, bin i contains a negative number of balls. Moreover, because condition (b) is triggered, there are two possibilities for what happened at round : either a ball was removed from bin 1 or a ball was removed from some bin . In both cases, when the initial assignment is , at the beginning of round , there are r balls in bin j and one ball in another bin (1 or ), and at the end of that round, that other bin is empty.
Because , Lemma 4 implies that, to prove , it suffices to show that for every and every ,
Fix then . By Lemma 2, for every , we have , and hence, by (7), Equation (8) is implied by
By (1) and because for every , the inequality above holds, provided . Thus, all that remains to establish Theorem 1 is to show this last inequality. We do so in what follows.
Note that is the number of balls remaining in bin at the end of round t (possibly becoming negative). Let denote the first round at which condition (b) holds—that is, the first round at which exactly two bins are nonempty and one of them contains exactly one ball. With the above notation,
On , we have .
We now define the reflection map . Informally, this map swaps the selections of bins 1 and j after the last round in which they contain the same number of balls, thereby sending a path in to a path in while preserving the event . Formally, for with , let
The map is a measure-preserving involution of .
The map is clearly an involution and, in particular, a bijection. Moreover, is measure preserving. Indeed, for each , on the set , the function interchanges the symbols 1 and j after time s and, hence, is measure preserving; and on the set where is undefined, is the identity. □
For all and all , we have .
Note that is defined on . Indeed, , and on this event in round , bin 1 contains less balls than bin j, so there must be a round in which the two bins contain the same number of balls. We next assert that . Indeed, let . Observe that:
Because and coincide up to time and condition (a) is not triggered along up to that time (because ), it is not triggered along up to time as well.
Because , in each round between and , bin 1 contains more balls along than along . This is because is the last round in which the two bins contain the same number of balls, and along , at time bin j contains more balls than bin 1. Hence, if condition (a) is not triggered along between those rounds, it is not triggered also along .
These two items imply that , thus establishing the assertion.
Next, we assert that . Indeed, fix . At time , bins 1 and j contain the same number of balls—say, z. Because , along , between rounds and , the number of rounds in which bins 1 and j have been selected is and , respectively. Because up to time both and coincide, and after that time, the symbols 1 and j are swapped, .
The two established claims imply . To conclude, observe that
3. Nonuniform Selection of Bins
In the case where the bins from which balls are removed are chosen nonuniformly, it is natural to ask whether the optimal initial assignment of balls to bins is proportional to the probability of picking each bin. The goal of this section is to show that this is not the case, even for the two-bin scenario.
Consider the case where and . We claim that the initial assignment is not optimal when, at each round, bins 1 and 2 are chosen with probabilities and , respectively. Note that the assignment is perfectly proportional to the selection probabilities.
Let denote the expected number of balls remaining when the process stops, starting from the initial assignment , when bin 1 is selected with probability p and bin 2 with probability at each round. To achieve this section’s stated goal, it suffices to show that . That is, the perfectly proportional initial assignment is not optimal: moving one ball from the heavier bin to the lighter bin reduces the expected number of balls in the last nonempty bin.
First, note that satisfies the following recursion:
Using this relation, one can verify that the following expression holds for :
Similarly, one can verify that for :
Simple calculations show that
In particular, the proportional initial assignment is not optimal.
Although the optimal allocation is not balanced, we conjecture that for every number of bins, the distance between the optimal allocation and the balanced allocation is .
The authors thank Bernardo Subercaseaux for calling to their attention the problem addressed in this manuscript and for several insightful conversations. The authors also thank Will Ma and Elchanan Mossel for useful discussions and pointers to the literature. The authors acknowledge the use of Claude (Anthropic, July 2026) in identifying an error in an earlier proof of Lemma 6 and in developing the argument given here. Part of this work was done while the third author was a postdoc and the fourth author was a visitor at the Centro de Modelamiento Matemático at Universidad de Chile.
1 Although depends on i, we opt not to make the dependence explicit in the notation.
2 Both conditions are triggered simultaneously if at round , bin i contains zero balls; some bin contains more than one ball; bin 1 contains two balls at the beginning of the round and is selected at that round; and all other bins are empty.
References
- (2024) Assortment optimization for conference goodies with indifferent attendees. Preprint, submitted March 5, https://arxiv.org/abs/2403.03330.Google Scholar
- (2021) Assortment and inventory planning under dynamic substitution with MNL model: An LP approach and an asymptotically optimal policy. Technical report, University of Michigan, Ann Arbor, MI.Google Scholar
- (2026) Joint assortment and inventory planning under the Markov chain choice model. Management Sci., ePub ahead of print February 4, https://doi.org/10.1287/mnsc.2023.01322.Link, Google Scholar
- (2025) Technical note—Leveraging the degree of dynamic substitution in assortment and inventory planning. Oper. Res. 73(3):1248–1259.Link, Google Scholar
- (2026) Optimal inventory allocation for indifferent goods under dynamic substitution. Oper. Res. 74(4):2001–2012.Link, Google Scholar

