# Background

In an old card game we draw 2 cards from a pile of 2 red and 2 black cards without replacement. If the two cards have the same color (for instance red and red) you win. However, if the cards have opposite color you lose.

This is a rich problem, especially if we instead look at the broader problem of drawing $$2$$ cards from a pile of $$(n,m)$$ cards, where we now have $$n$$ red and $$m$$ blue cards. After sorting out the information one can show that any solution must satisfy

$$(n-m)^2 = n + m$$

from which it is not hard to deduce that every solution must be a pair of consecutive triangular numbers.

$$(1,3), \ (3,6), \ (6,10), \ (10,15), \ldots$$

In other words we have

$$T_2(n) = T_2(n-1) + n, \qquad T(n)=0, n\leq 1$$

Which of course also can be expressed as $$T_2(n) = n(n+1)/2$$. So $$\bigl(T_2(n), T_2(n+1)\bigl)$$ forms every solution.

My question is if similar beautiful patterns appear when we increase the number of cards we draw.

# Main statement

Assume we have a pile of $$(n,m)$$ cards, where $$n$$ of the cards are red and $$m$$ are black and we draw $$c$$ cards from the pile (where $$c \leq n + m$$). Fix $$n$$, how do we have to choose $$m$$ to obtain a fair game? E.g. a game where the probability of drawing a pile of cards of similar colors (red, red ..., red or black, black, ..., black) equals the probability of drawing cards of opposite color (any combination of red and black cards)

For $$c = 3$$ it seems we have to find integer solutions to

$$n(n-1)(n-2) + m(m-1)(m-2) = 3mn(n+m-2)$$

and this seems really hard. However, it seems $$(1,5,3)$$ is a solution. After an extensive computer search it seems

$$(1,5), \ (5,20), \ (20,76), \ (76,285), \ (285,1065), \ (1065,3976), \ \ldots$$

Are the first few solutions when drawing three cards. It seems these satisfy $$T_3(u) = 5 T_3(u-1) - 5 T_3(u-2) + T_3(u-3) \ \text{with} \ T_3(1) = 1 \ \text{and} \ T_3(u) = 0 \ \text{if} \ u \leq 0.$$

EDIT: Seems to boiling down to finding all integer pair such that

$$\binom{m}{c}\binom{n}{0} \Bigl/\binom{m+n}{c}\Bigr. + \binom{m}{0}\binom{n}{c} \Bigl/\binom{m+n}{c}\Bigr. = \frac{1}{2},$$ Where again $$c \in \mathbb{N}_{\geq 2}$$ and $$c \leq n < m$$. The expression above can be "simplified" to $$\prod_{i=0}^{n-1} \frac{m+n-k-i}{m+n-i} + \prod_{i=0}^{m-1} \frac{n+m-k-i}{n+m-i} = \frac{1}{2}$$ and can be quite easily be numerically approximated. However, it does not lead me closer to finding every solution for every $$c$$.

EDIT 2: While I thought all solutions would be on the form $$(a,b)$$, $$(b,c)$$, $$(c,d), \ldots$$ this does not seem to be the case. In particular for $$c = 6$$ we $$T_6(1) = (1,11), \qquad T_6(2) = (2,19)$$ interesting!

# Problems

Let $$T_c(n)$$ be the $$n$$'th solution when drawing $$c$$ cards.

• Is it true that $$T_c(1) = 2c - 1$$ for every $$c\geq 2$$?
• Is there a general recurrence relation for $$T_c(n)$$? Is there a closed expression for $$T_c(n)?$$
• Given a particular $$c$$ how can we find all pairs $$(n,m)$$ that form a fair game?
• Here's the corresponding OEIS sequence. – joriki Nov 24 at 21:18
• Are you only considering games where you win by drawing $c$ cards of the same color? Or also games where you win by drawing $c-k$ cards of one color and $k$ of the other? Your description sounds like the latter, but for the $c=3$ game you don't say whether $k=0$ or $k=1$, so I'm a bit confused. – saulspatz Dec 2 at 19:32
• @saulspatz I updated the notation in the question, is it clearer now? – N3buchadnezzar Dec 2 at 23:11
• Yes, it's perfectly clear now. – saulspatz Dec 3 at 1:02
• To simplify your edit, $\binom{n}{0} = \binom{m}{0} = 1$. – automaticallyGenerated Dec 3 at 2:39

Is it true that $$T_c(1) = 2c - 1$$ for every $$c\geq 2$$?

Yes, it is.

Since\begin{align}\frac{1}{2}\binom{m+1}{c}-\binom mc&=\frac 12\cdot\frac{(m+1)!}{(m+1-c)!c!}-\frac{m!}{(m-c)!c!} \\\\&=\frac{m!}{c!(m+1-c)!}\bigg(\frac{m+1}{2}-(m+1-c)\bigg) \\\\&=\frac{m!}{c!(m+1-c)!}\cdot\frac{2c-1-m}{2}\end{align} we have$$\frac{1}{2}\binom{m+1}{c}-\binom mc=0\iff m=2c-1$$

So, we can say that

• If $$m\lt 2c-1$$, then $$\frac{1}{2}\binom{m+1}{c}\not=\binom mc$$.

• If $$m=2c-1$$, then $$\frac{1}{2}\binom{m+1}{c}=\binom mc$$.

Therefore, it follows that $$(1,2c-1)$$ is the first solution for every $$c\ge 2$$.

Is there a general recurrence relation for $$T_c(n)$$? Is there a closed expression for $$T_c(n)?$$

For $$c=3$$, as you noticed, it seems that we have $$T_3(u) = 5 T_3(u-1) - 5 T_3(u-2) + T_3(u-3)\qquad (u\ge 4)$$ $$T_3(1)=1,\qquad T_3(2)=5,\qquad T_3(3)=20$$ Since $$x^3-5x^2+5x-1=(x-1)(x-(2-\sqrt 3))(x-(2+\sqrt 3))$$, we get $$T_3(u)=\frac{1}{12}\bigg((3 - \sqrt 3)(2 - \sqrt 3)^u+ (3 + \sqrt 3)(2 + \sqrt 3)^u-6\bigg)$$

For $$c=4$$, it seems that $$(1,7)$$ is the only solution.

Let $$m+n-2=t\ (\ge 3)$$. Then, the equation $$\binom m4+\binom n4=\frac 12\binom{m+n}{4}$$ can be written as $$(2m^2-2mt-4m+2t^2-t+1)^2=3t^4-6t^3+6t^2+1$$So, $$t\ (\ge 3)$$ has to be an integer such that $$3t^4-6t^3+6t^2+1$$ is a perfect square.

Though it seems that $$t=6$$ is the only such integer, no proof can be obtained. If this is true, then we can say that $$(1,7)$$ is the only solution.

For $$c=5$$, it seems that $$(1,9)$$ is the only solution.

Let $$m+n=k\ (\ge 6)$$. Then, the equation $$\binom m5+\binom n5=\frac 12\binom{m+n}{5}$$ can be written as $$(2m^2-2mk+k^2-4k+5)^2=\frac{3k^4-28k^3+108k^2-188k+125}{5}$$So, $$k\ (\ge 6)$$ has to be an integer such that $$\frac{3k^4-28k^3+108k^2-188k+125}{5}$$ is a perfect square.

Though it seems that $$k=10$$ is the only such integer, no proof can be obtained. If this is true, then we can say that $$(1,9)$$ is the only solution.

• Interesting. I wonder why 3 and 2 have aboundant solutions. And whether there exists more than one solution when $c \neq (2,3,6)$. – N3buchadnezzar Dec 7 at 17:20
• @N3buchadnezzar: For $c=7$, I noticed that $2\cdot 7!\binom n7+2\cdot 7!\binom m7-7!\binom{m+n}{7}$ has a factor $(m+n-6)$. However, the remaining polynomial cannot be written as the form $(f(m,k))^2=g(k)$ where $k=m+n$. So, the method does not work in this case. I spent a lot of hours on the cases for $c\ge 7$, but I got nothing. So, I cannot say anything about whether there exist more than one solution for $c\ge 7$. – mathlove Dec 8 at 12:31

For part 1 we have:

$$\binom{2c-1}{c}=\frac{(2c-1)!}{c!(c-1)!}=\frac{c}{2c}\binom{2c}{c}=\frac12\binom{2c}{c}$$

• What is this saying, what is this solving or showing? – N3buchadnezzar Dec 3 at 11:50
• That $T_c(1)=2c-1$, because $\binom{2c-1}{c}+\binom{1}{c}=\frac12\binom{2c}{c}$, therefore $(1,2c-1)$ is the first solution. – JMP Dec 3 at 12:17

"n an old card game we draw 2 cards from a pile of 2 red and 2 black cards without replacement. If the two cards have the same color (for instance red and red) you win. However, if the cards have opposite color you lose. This is a rich problem, especially if we instead look at the broader problem of drawing cards from a pile of (n,m) cards, where we now have n red and m blue cards."

Actually, there is no problem here! What do you want to find? The probability of winning?

If so drawing two cards, blue or red, leads to four possible results, BB, BR, RB, of RR (B stands for "blue" and R stands for "red"). If there are m blue and n red cards, the probability of "BB" is $$\frac{m}{m+ n}\frac{m-1}{m+n-1}$$ and the probability of "RR" is $$\frac{n}{m+ n}\frac{n-1}{m+n-1}$$. The probability of winning, getting either "BB" or "RR" is the sum of those two.

• The OP wants to know for what values of $(m,n)$ is the game fair? That is, the probability of winning is $\frac12$. – saulspatz Dec 2 at 19:28
• Yes @saulspatz is correct. Given the number of cards to draw$c =1,2,\ldots$ list all the pairs $(n,m)$ such that it forms a fair game with $m>n$. I have already done the cases where we draw $2$ cards (triangular numbers), I am interested in obtaining general sequences that generate the solutions when drawing more than $2$ cards. – N3buchadnezzar Dec 2 at 23:03