In the (monochromatic) urn depletion game, you are given $n$ vases, each containing some number of balls $a_1,\ldots, a_n \geq 0$. You win the game if you can remove all of the balls from the vases; you must draw them one at a time, and the only rule is that you cannot draw from the same vase twice in a row.
The problem is to decide, given the occupancy numbers $a_1, \ldots, a_n$, whether the game is winnable.
Example: The game [AAA, A] (three in one vase; one in another) is unwinnable.
I've already got an efficient algorithm for winning the game: at each step, draw from the vase with the largest number of balls $a_i$ (among vases you can legally choose). If the game is winnable at all, this algorithm will win it.
So instead of an algorithm, I am looking for a property of the numbers $a_1,\ldots, a_n$ which would enable someone to calculate whether the game is winnable. Evidently there's a formula implicit in the algorithm above, but I wonder if it's possible to find an explicit and simple one.
I've tried establishing the result for small $n$: if $n=1$, $a_1$ must be 0 or 1. If $n=2$, then $|a_1-a_2|$ must be 0 or 1. If $n=3$, the condition is slightly more complicated but might be expressible in terms of the differences $|a_i-a_j|$.
It also seems to me that a game instance is solvable just if you can find a perfect or near-perfect matching in a particular graph—the graph has one node for every ball in every vase, and each ball is connected to all the balls in the other vases. Rationale: Given such a matching, you can win the game as follows: iterate over the edges in an arbitrary order; for each edge, at least one of the two endpoints will belong to a legal urn; draw that one, then the other. Conversely, a winnable game has at least one winning sequence of draws. Form a [near]-perfect matching by pairing consecutively drawn balls, starting with the first and second, third and fourth, etc.
The graph matching approach seems like a potentially fruitful avenue, but I don't know much about matching or matching polynomials to do much more.
(I previously asked a related question about the multicolor version of this game)
Proof ($\Rightarrow$) You can see that the condition is necessary: if it fails, then you can never empty the largest vase, even if you draw from it as often as possible, i.e. every other turn.
$(\Leftarrow)$. To see that the condition is sufficient (that every winnable game has this property), fix a specific game $\{a_i\}$ and suppose it is winnable. If it is winnable, then you can empty all the vases by drawing in some specific legal sequence of vases $v_1,v_2,v_3,\ldots$.
Now we play the game in reverse, returning the balls to the vases, and see that the invariant is maintained (the game is winnable and satisfies the condition). Initially, all the vases are empty and the condition holds. If there were one ball in a vase, the invariant would also hold.
We will be returning the balls in pairs each time, except for perhaps the first step: if the total number of balls is odd, return the first ball $v_1$ alone. In every subsequent step, return the next two balls to their vases. These balls belong to different vases, since $\{v_i\}$ is a legal sequence of moves. Hence (a) at least one of the balls belongs to a different vase than the last ball we returned so the game is still winnable, and (b) the game still satisfies the condition, since the max increases by at most one, while the sum increases by two. By induction, the game will be winnable and satisfy the condition at every step. In the final step, we have reconstructed the entire game through the invariant-preserving process, which establishes that it satisfies the condition, QED.