33

Kent Haines describes the game of Integer Solitaire, which I find to be excellent for young kids learning arithmetic. I'm sure they will be motivated by this game to get a lot of practice.

Kent asks a question about his game, which I find very interesting, and so I am asking here, in the hopes that Math.SE might be able to answer.

The child draws 18 cards from an ordinary deck of cards, and then regards the cards to have values Ace = 1, 2, 3, ..., Jack = 11, Queen = 12, King = 13, except that Black means a positive value and Red means a negative value.

Using 14 of the 18, the child seeks to find solutions of four equations:

Target equations

For example, a successful solution would look like:

Successful play of Integer Solitaire

Question. Does every set of 18 cards admit a solution?

Kent Haines says, "I have no idea whether all combinations of 18 cards are solvable in this game. But I have played this game for five years with dozens of students, and I have yet to see a combination of 18 cards that is unsolvable."

Follow up Question. In the event that the answer is negative, what is the probability of having a winning set?

For the follow up question, it may be that an exact answer is out of reach, but bounds on the probability would be welcome.

JDH
  • 45,373
  • 8
    First... it can be simplified considerably by moving all minuses to the other sides as plusses. You have then two lines of the form ___ + ___ = ___ and two lines of the form ___ = ___ + ___ + ___ – JMoravitz Feb 12 '21 at 20:23
  • the probability problem is probably NP-hard (it looks like a variant of the packing problem) – Jasen Feb 13 '21 at 09:35
  • 2
    I'm a little confused by the instructions. It says, "using 14 of the 18 [cards]," (implying that each card is used once), yet the solution diagram repeats 2 of Diamonds and Queen of Spades. It doesn't matter in this case (can replace the repeat with the like-colored suit), but for the answer, should we assume that there are no repeated cards, or do we allow repeats? If we do allow repeats, can we repeat entire equations? If so, by @JMoravitz's reduction, we have two equations, not four. – Charles Baker Feb 18 '21 at 02:14
  • 1
    @CharlesBaker the image was poorly made, yes. It seems clear from context that cards may not be repeated. The image can be corrected as you say by replacing by the offsuit of the same color. If we were allowed repeats it would be quite trivial otherwise and there would have been no reason to have the third and fourth equation to fill. – JMoravitz Feb 18 '21 at 02:58
  • @JMoravitz I’d say just some careless drawing. You can have for example zero, one or two red 2s. – gnasher729 Jun 16 '25 at 19:49

4 Answers4

36

Unsatisfyingly, a counterexample is (all black):

$$(5,5,6,6,7,7,8,8,9,9,10,10,J,J,Q,Q,K,K)$$

which does not satisfy the last two equations, since

$$\_+\_+\_ \ge 5+5+6 =16>13 = K$$

Extending this result, we need at least $22$ cards to guarantee a solvable $14$-tuple since we have the $21$-card counterexample

$$(3,4,4,5,5, \dots , K, K)$$

where $3+4+4+5+5+6 = 27 > 26 = 2K$, so the last two equations cannot both be satisfied. I do not know whether a counterexample to $22$ cards exists at this moment.

player3236
  • 16,600
21

28 card counterexample:

$$ black: K, K, J, J, 9, 9, 7, 7, 5, 5, 3, 3, A, A $$ $$ red: K, K, J, J, 9, 9, 7, 7, 5, 5, 3, 3, A, A $$

cannot satisfy __ + __ = __ because 2 odds make an even (whether added or subtracted), and there are no evens in the set.

Edit: it's 28 cards, not 26.

The 29th counterexample is easy: with only one additional even, it isn't enough to satisfy both of the top two equations. So, 2 evens are needed to be added.

pkr
  • 749
  • The same analysis can be carried out for the sets of cards in the form of $5k\pm1$ and $5k \pm2$, and would help establish a lower bound for the probability in the Follow up Question. – player3236 Feb 13 '21 at 07:44
5

Introduction, Part 1

We here present some lower bounds on the probability of success.

Although the complete problem is still out of our grasp, we sought to check what we could by computer programming. This creates the obvious weakness that our results are conditional on the correctness of our code, but we tested as many small cases as we could. The Python 3 code for this work is available at https://github.com/ch83baker/cards_eq_solver.

Unhappily, our presentation is sitting around 40,000 characters, so we split the work into two parts.

Summary, Part 1

In this part, after introducing the general strategy, we tabulate the probabilities that selections of cards from a single suit can solve various combinations of 1-3 equations. This allows us to explore how to estimate the success probability if we restrict to the case that each equation could only be solved by a single suit (a weak analogue of 'monochromatic' solutions to equations in Integer Ramsey Theory). Everything is thankfully parallel between suits if we do this (for, e.g., $a + b = c$ if and only if $(-a) + (-b) = -c$). Sadly, this approach does not give us good bounds, at least in our simplistic conditional-probability setup.

Proposition 1: Any selection of $43$ cards can solve all four equations.

Proposition 2: For an $18$-card set, the probability of success is at least $0.73\%$.

Summary, Part 2

Stretching the limits of our new-ish computer, we explored the possibilities that a pair of suits (either like-colored or opposite-colored) could solve one or two equations simultaneously. (Three equations are too much to handle.) Then we attempted to solve the full system by assigning two equations to one pair of suits, and the other two equations to the other pair of suits. This gave much better results:

Proposition 3: Any selection of $37$ cards can solve all four equations.

Proposition 4: For an $18$-card set, the probability of success is at least $62.96\%$.

Preliminaries

Notation

  • By the rewriting of the user, @jmoravitz, we have two equations of the form $a + b = c$ (hereafter, a short equation) and two equations of the form $a + b + c = \ell$ (hereafter, a long equation).
  • We let $D$ be the deck we are sampling from, with $|D| = n$; in the original problem, $n = 52$. (We need the letter $d$ for something else.) We will frequently let $D$ be a deck with all cards from 1 or 2 suits.
  • We let $T$ be the subset or selection of cards from which we try to find a solution. We declare $|T| = m$; in the original problem, $m = 18$. (Why not $S$? Because spade and small equation are already using up the letter s.)
  • We let $V$ be the set of variables we need to solve the given set of equations; for example, at least with @jmoravitz's reduction, we might transcribe the given equations as: \begin{align*} x_0 + x_1 & = x_2\\ x_3 + x_4 & = x_5\\ x_6 + x_7 + x_8 & = x_9\\ x_{10} + x_{11} + x_{12} &= x_{13}, \end{align*} and hence $V = \lbrace x_0, x_1, \dotsc , x_{13} \rbrace$. We let $|V| = k$.
  • For a particular selection $T$, we may refer to the number of spades, clubs, hearts, and diamonds in the selection by $|\spadesuit(T)|$ $|\clubsuit(T)|$, $|\heartsuit(T)|$, and $|\diamondsuit(T)|$, respectively, omitting the explicit reference to $T$ as appropriate. We generally let $s, c, h, d$ denote the same sequence, except in conditional probability computations, when we will want to write things such as $$ \sum_{s + c + h + d = 18} \left( \begin{aligned} & P (|\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d) \\ & \cdot P \bigg(\text{event } \bigg| |\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d \bigg) \end{aligned} \right) $$
  • We will call subsets/selections that possess a solving sub-subset either satisfactory subsets or just (by abuse of notation) solutions. In particular, we will call satisfactory subsets of minimal size (i.e., $|T| = |V|$ or $m = k$) basic solutions.

Big-Picture Strategy

For each collection of suits and equations, we divide the basic probability calculation into two steps.

  1. Find the basic solutions; in other words, of all the $\displaystyle \binom{|D|}{|V|}$ subsets with $|V|$ elements, which ones permit a simultaneous solution of the given set of equations.

  2. Find the larger solutions from the list of smaller solutions.

The advantage of this split is modularity and speed. In particular, our symbolic equation-testing code is very slow, so just finding super-sets of the good sets is much faster. In addition, I do not have to permute the larger sets at all (which would naturally slow us down).

After all of this searching is done, then we will start tabulating conditional probabilities to get lower bounds on the success rate for the original problem.

Notes, Implementing Step 1

I am not seeing a way to avoid testing all $\displaystyle \binom{|D|}{|V|}$ subsets of size $|V|$. Given that I am having trouble enumerating related problems correctly for much smaller test-cases by hand, I am not trusting some "obvious" enumeration of all solutions.

On the other hand, for each such subset, I do not need to test all $|V|!$ permutations of that subset. We have some symmetries. For example, for the original problem, I can see the following symmetries:

\begin{align*} \left. \begin{matrix} \underbrace{x_0 + x_1}_{\text{can permute these}} & = x_2 \\ \underbrace{x_3 + x_4}_{\text{can permute these}} & = x_5 \end{matrix} \right \rbrace \text{ can permute these (entire) Equations}\\ \left. \begin{matrix} \underbrace{x_6 + x_7 + x_8}_{\text{can permute these}} & = x_9 \\ \underbrace{x_{10} + x_{11} + x_{12}}_{\text{can permute these}} & = x_{13} \end{matrix} \right \rbrace \text{ can permute these (entire) Equations}\\ \end{align*}

Hence, we have an action of the symmetric group of 14 elements on this (ordered) list of equations (permute the variables) that has a significant kernel. Hence, we only need a representative of each coset of the kernel. Fortunately, Python's Symbolic Python, or sympy, package understands permutations and permutation groups, and has a convenient G.coset_transversal(H) function that gives such a list of representatives of each (right) coset of permutation-group H in permutation-group G.

For our sub-problems, the kernel is more modest; however, for the two-suit cases, we need every speedup we can reasonably get.

Hence, the total number of orderings to check for a particular sub-problem (with $K$ as the kernel) is $$ \binom{|D|}{|V|} \cdot \frac{|V|!}{|K|} = \frac{|D|!}{|K| \cdot (|D| - |V|)!}. $$

Notes, Implementing Step 2

I tried two variations for this step.

  1. Just model the graph of subsets directly and bubble up the good sets. Unfortunately, for 26-card decks, keeping the entire subset graph risks running out of memory, but just incrementing $|T|$ keeps the size below 13.5 GB of RAM (and probably a fair bit of virtual memory).
  2. Ignore the in-between sets entirely, and for each large subset, just loop through the basic solution sets and ask if each basic solution set is a subset of the large set in turn. This variation is parallelizable, and takes less memory, but takes more time even with the parallelization. In particular, a larger set of solutions makes it easier to say "yes," but also increases the cost of a "no"; worst-case analysis is obviously (number of subsets of $D$ of size above $|V|$) $\times$ (number of basic solutions).

I can go into more details if requested, but I'm not seeing a way of making an inclusion/exclusion argument that is an obvious time-saver.

Investigating Single-Suit Solutions

Basic Observations

We first say what we can without resort to brute-force computer elimination. We order our discussion by the number of variables required.

Single Short Equation. For a single short equation, a selection of all 7 odd cards clearly runs into the parity obstruction noted by user @pkr. There is also a size obstruction for 7 cards; if we take the cards 7-K of the suit, then the left-hand side of the short equation is at least $7 + 8 = 15 > 13$, so there are no solutions. Hence, 8 cards is necessary to guarantee a solution to a single short equation.

Single Long Equation. For a single long equation, if we take the cards 4-K (10 cards), then the left-hand side of the single long equation is at least $4 + 5 + 6 = 15 > 13$. Hence, 11 cards are necessary to guarantee a solution to a single long equation.

I flatter myself that I can guarantee a solution by hand with 11 cards, but I am likely to be overlooking a case by accident.

Two Short Equations. If we take the cards 5-K (9 cards), then there is no solution. Case 1 If the left-hand sides are not from $\lbrace 5, 6, 7, 8 \rbrace$ exactly, then the average of the left-hand sides is at least $\frac{5 + 6 + 7 + 9}{2} = 13 + \frac{1}{2} > 13$.
Case 2 If the left-hand side is $\lbrace 5, 6, 7, 8 \rbrace$ then we must pair $5$ with $8$ and $6$ with $7$, else one left-hand side will be too large, but then I need two kings, which is impossible.
Hence, 10 cards are required.

One Short, One Long Equation. As with a single long equation, the cards 4-K are not enough to solve one short and one long equation, so 11 cards are necessary. Again, I flatter myself that I have an enumeration of cases that ensures solvability with any 11 cards, but I am not certain.

Two Long Equations. Without the ace, we cannot solve two long equations, for the left-hand sides will average out to $\frac{2 + 3 + 4 + 5 + 6 + 7}{2} = 13 + \frac{1}{2} > 13$. Hence, generically, $13$ cards are required. $13$ cards are sufficient as well; see \begin{align*} A + 2 + 7 & = 10\\ 3 + 4 + 5 & = Q. \end{align*}

Two Short Equations, One Long Equation. If we omit both the ace and deuce of the suit, then it is impossible to solve this system of equations with one suit. By pure size considerations, the only solutions remaining for the long equation are $3 + 4 + 5 = Q$ and $3 + 4 + 6 = K$, and so the short-equation left-hand sides must average to at least $\frac{6 + 7 + 8 + 9}{2} = 15 > 13$ in the former case and $\frac{5 + 7 + 8 + 9}{2} = 14.5 > 13$ in the latter case, so at least one short equation cannot be solved.

We can solve both short equations and one long equation with any selection of 12 cards. A proof by exhaustion of cases: \begin{align*} \text{No A, 9, J} && \begin{aligned} 2 + 3 + 7 & = Q\\ 4 + 6 & = 10\\ 5 + 8 & = K \end{aligned} \\ \text{No 2, 9, Q} && \begin{aligned} A + 3 + 7 & = J\\ 4 + 6 & = 10\\ 5 + 8 & = K \end{aligned} \\ \text{No 3, 9, K} && \begin{aligned} A + 2 + 7 & = 10\\ 4 + 8 & = Q\\ 5 + 6 & = J \end{aligned} \\ \text{No 4, 5, 7} && \begin{aligned} A + 2 + 10 & = K\\ 3 + 6 & = 9\\ 4 + 8 & = 12 \end{aligned} \\ \text{No 5, 6, 8} && \begin{aligned} A + 2 + 10 & = K\\ 3 + 9 & = Q\\ 4 + 7 & = J \end{aligned} \\ \text{No 9, 10, Q} && \begin{aligned} A + 2 + 3 & = 6\\ 4 + 7 & = J\\ 5 + 8 & = K \end{aligned} \\ \end{align*}

One Short, Two Long Equations. As with just two long equations, 13 cards are necessary. They are also sufficient. See, e.g.,

\begin{align*} A + 2 + 8 & = J\\ 3 + 4 + 6 & = K\\ 5 + 7 & = Q. \end{align*}

Two short, Two Long Equations. Impossible; there are 13 cards and 14 positions to fill.

Probability Tables

We here give the probabilities for selections from a single-suit, of specified sizes, to solve any collection of up to 3 equations from our list (without repeats).

Single-suit, 1 Equation

$$ \begin{array}{c| c| c} |T| & P(1 \text{ short}) & P(1 \text{ long}) \\\hline 0 & 0 & 0\\ 1 & 0 & 0\\ 2 & 0 & 0\\ 3 & \frac{36}{286} = 12.58741\% & 0\\ 4 & \frac{328}{715} = 45.87413\% & \frac{31}{715} = 4.33566\%\\ 5 & \frac{1063}{1287} = 82.59518\% & \frac{267}{1287} = 20.74592\%\\ 6 & \frac{1672}{1716} = 97.43590\% & \frac{835}{1716} = 48.65967\%\\ 7 & \frac{1712}{1716} = 99.76690\% & \frac{1265}{1716} = 73.71795\%\\ 8 & 1 & \frac{1142}{1287} = 88.73349\%\\ 9 & 1 & \frac{688}{715} = 96.22378\%\\ 10 & 1 & \frac{284}{286} = 99.30070\%\\ 11 & 1 & 1\\ 12 & 1 & 1\\ 13 & 1 & 1\\ \end{array} $$

Single-suit, 2 Equations

$$ \begin{array}{c| c| c| c} |T| & P(\text{2 short}) & P(\text{1 short, 1 long}) & P(\text{2 long}) \\\hline 0 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 2 & 0 & 0 & 0\\ 3 & 0 & 0 & 0\\ 4 & 0 & 0 & 0\\ 5 & 0 & 0 & 0\\ 6 & \frac{253}{1716} = 14.74359\% & 0 & 0\\ 7 & \frac{1210}{1716} = 70.51282\% & \frac{159}{1716} = 9.26573\% & 0\\ 8 & \frac{1252}{1287} = 97.28050\% & \frac{652}{1287} = 50.66045\% & \frac{17}{1287} = 1.32090\%\\ 9 & \frac{714}{715} = 99.86014\% & \frac{578}{715} = 80.83916\% & \frac{78}{715} = 10.90909\%\\ 10 & 1 & \frac{272}{286} = 95.10490\% & \frac{91}{286} = 31.81818\%\\ 11 & 1 & 1 & \frac{46}{78} = 58.97436\%\\ 12 & 1 & 1 & \frac{11}{13} = 84.61538\%\\ 13 & 1 & 1 & 1\\ \end{array} $$

Single-suit, 3 Equations

$$ \begin{array}{c| c| c} |T| & P(\text{2 short, 1 long}) & P(\text{1 short, 2 long}) \\\hline 0 & 0 & 0\\ 1 & 0 & 0\\ 2 & 0 & 0\\ 3 & 0 & 0\\ 4 & 0 & 0\\ 5 & 0 & 0\\ 6 & 0 & 0\\ 7 & 0 & 0\\ 8 & 0 & 0\\ 9 & 0 & 0\\ 10 & \frac{58}{286} = 20.27972\% & 0\\ 11 & \frac{63}{78} = 80.76923\% & \frac{1}{78} = 1.28205\%\\ 12 & 1 & \frac{2}{13} = 15.38462\%\\ 13 & 1 & 1\\ \end{array} $$

Large-Selection Guarantees (Proposition 1)

We now discuss the case for the full deck and the original 4 equations, with the amendment that the selection size is not forced to be $18$. First, between the elementary arguments and the probability tables, we have the following:

Observation 5.

  • 8 cards from a single suit are guaranteed to solve a single short equation.
  • 11 cards from a single suit are guaranteed to solve both a short equation and a long equation.
  • 13 cards from a single suit can solve both long equations and a short equation.

Corollary 6.

  • If I have a selection $T$ with at least 11 cards in each of two suits, the selection can solve the problem.

  • If I have a selection $T$ with all 13 cards of one suit and at least 8 cards in another suit, the selection can solve the problem.

Proof In the former case, each suit can solve one long equation and one short equation. In the latter case, the full suit can solve both long equations and one short equation, and the 8-card suit can solve the other short equation, by Observation 5, and we are again done.

Proposition 1 (again). Any selection $T$ with 43 cards or more will solve the problem.

Proof We divide into cases.

Case 1: 13 cards in at least 1 suit. If we have 13 cards in 1 suit, say spades, then $$ \begin{split} s + c + h + d \geq 43\\ 13 + c + h + d \geq 43\\ c + h + d \geq 30\\ \frac{c + h + d}{3} \geq 10, \end{split} $$ and hence there must be 10 cards of at least 1 other suit, since the average count per suit is 10. By Lemma 5, we are done.

Case 2: 11-12 cards in at least 1 suit. If there are 11 or 12 cards in 1 suit, then we must avoid 11 cards in any other suit, or else we are done by Lemma 5. Then the total count of the selection is at most $12 + 10 + 10 + 10 = 42 < 43 \leq |S|$. Contradiction. Hence, we must have 11 cards in a second suit, and we are done by Lemma 1.

Case 3: At most 10 cards in each suit. This case is vacuous: if there are at most 10 cards in every suit, then the selection size must be at most $4 \times 10 = 40 < 43 \leq |S|$. This case is empty.

The cases being exhausted, we are done. $\square$.

18-Card Selection Probability Bounds (Proposition 2)

Proposition 2 The probability of getting a solution with 18 cards is at least $0.74\%$.

Proof. Since every quadruple of suit-counts $(s, c, h, d)$ is disjoint, and the rules of conditional probability, we may write

\begin{align*} P(\text{18-card set is good}) &= \sum_{\substack{s + c + h + d = 18 \\ s, c, h, d \in \mathbb{Z} \cap [0, 13]}}&& P(\text{18-card solving set with } |\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d) \\ &= \sum_{\substack{s + c + h + d = 18 \\ s, c, h, d \in \mathbb{Z} \cap [0, 13]}} && \bigg( P(|\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d) \\ & && \cdot P \big(\text{solving set} \big| |\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d \big) \bigg). \end{align*} We first find the probability of a given suit-count. If we choose $s$ out of 13 spades for our 13-tuple, there are $\displaystyle \binom{13}{s}$ ways to do that, and similarly for the other suits (computed independently); there are $\displaystyle \binom{52}{18}$ choices of 18 out of 52 cards in general. Hence, the probability of a particular suit-count $(|\spadesuit| = s, |\heartsuit| = h, |\clubsuit| = c, |\diamondsuit| = d)$ is $$ P(|\spadesuit| = s, |\clubsuit| = c, |\heartsuit| = h, |\diamondsuit| = d) = \frac{\displaystyle \binom{13}{s} \binom{13}{c} \binom{13}{h} \binom{13}{d}}{\displaystyle \binom{52}{18}}. $$ We estimate the conditional probability of success (given the suit count) from below by various methods. The various cases below are presumably not all disjoint, so we take the maximum of the various lower bounds for each $(s, c, h, d)$ 4-tuple.

In this section, let $p_{SSL}(t)$ denote the probability of solving two short equations and one long equation with $t$ cards from a single suit, and similarly for all other combinations of equations. (Yes, this probability is $0$ for most relevant values of $t$.)

  1. Assign three equations to one suit and the remaining equation to a second suit. This gives lower bounds of the form $p_{SSL}(s) \cdot p_{L}(c)$ and $p_{SLL}(s) \cdot p_{S}(c)$ (and the variations with permutations of the suits).

  2. One suit solves two equations; another suit solves the other two equations. This gives lower bounds of the form $p_{LL}(s) \cdot p_{SS}(c)$ and $p_{SL}(s) \cdot p_{SL}(c)$ (and permutations thereof).

  3. One suit solves two equations; a second suit solves one equation; a third suit solves one equation. This gives lower bounds of the form $p_{SL}(s) p_{S}(c) p_L(h)$, $p_{SS}(s) p_{L}(c) p_L(h)$, and $p_{LL}(s) p_{S}(c) p_{S}(h)$ (and permutations thereof).

  4. Each suit attempts to solve a different equation. This gives lower bounds of the form $p_L(s) p_L(c) p_S(h) p_S(d)$ (and permutations thereof).

Summing up over all cases, we get $\dfrac{527,874,044}{71,357,821,675} \approx 0.739\%$. $\square$

Remark 7 In the first type above, if we have, say 12 cards in a single suit, and attempt to have that collection solve 3 equations, why do we not put all of the other 6 cards together to solve the remaining equation? The trouble is that this split does not mix well with the prior suit-count split; e.g., 2 clubs, 2 diamonds, 2 spades is not representative of collections of 6 cards from 3 suits.

Besides, this requires 10+ cards in one suit to have a positive effect, and that happens with probability about $0.176\%$, so this case is unlikely to matter much anyway.

Charles Baker
  • 1,264
  • 12
  • 21
4

Introduction, Part 2

This is the continuation of our answer to get some lower bounds on the probability. Please read Part 1 first to get a sense of our solution strategy.

Summary, Part 1

We studied the probability that selections from a single suit solved 1-3 equations from our list. Our results were not helpful:

Proposition 1: Any selection of $43$ cards can solve all four equations.

Proposition 2: For an $18$-card set, the probability of success is at least $0.73\%$.

For Part 2, we should also recall Observation 5.

Observation 5.

  • 8 cards from a single suit are guaranteed to solve a single short equation.
  • 11 cards from a single suit are guaranteed to solve both a short equation and a long equation.
  • 13 cards from a single suit can solve both long equations and a short equation.

Summary, Part 2

Stretching the limits of our new-ish computer, we explored the possibilities that a pair of suits (either like-colored or opposite-colored) could solve one or two equations simultaneously. (Three equations are too much to handle.) Then we attempted to solve the full system by assigning two equations to one pair of suits, and the other two equations to the other pair of suits. This gave much better results:

Proposition 3: Any selection of $37$ cards can solve all four equations.

Proposition 4: For an $18$-card set, the probability of success is at least $62.96\%$.

Our guess would be that the probability is still higher (given the simplicity of our restricted-solution method, and Kent Haines's comment that failure is empirically rare), but our current method cannot be pushed farther without hitting a combinatorial explosion. Hence, other methods would be needed to get better bounds on the true probability.

Investigating Two-Suit Solutions to Equations

Basic Observations

We can port over the following guarantees using our one-suit answers and the pigeonhole principle.

Single Short Equation. If we have $2 \times (8-1) + 1 = 15$ cards in two suits, we must have 8 cards in 1 suit, and hence we can solve one short equation.

By contrast, it is impossible to guarantee a solution to a short equation with 14 cards by the parity obstruction noted by user @pkr. If we take the 7 odd cards per suit (A, 3, 5, 7, 9, J, K), that is $7 \times 2 = 14$ cards in general.

Single Long Equation. If we have $2 \times (11-1) + 1 = 21$ cards in two suits, we must have 11 cards in 1 suit, and hence we can solve a single long equation.

For the case of two like-colored suits, we have the size obstruction of the style given by user @player3236: if we take our sample to be 4-K$\spadesuit$ and 5-K$\clubsuit$, we have that the left-hand side of the three-term sum is at least $4 + 5 + 5 = 14 > 13$, so there is no possible solution to the long equation. Hence, 10 + 9 = 19 cards is insufficient to guarantee success in this case, and 20 cards are necessary.

For the case of two opposite-colored suits, no obvious lower bound shows itself to us.

Two Short Equations. If we have $2 \times (10-1) + 1 = 19$ cards in two suits, we must have 10 cards in 1 suit, and hence we can solve two short equations.

The parity obstruction in this case only rules out $15$ cards (since we cannot solve both short equations with one even number).

One Short and One Long Equation. If we have $2 \times (11-1) + 1 = 21$ cards in two suits, we must have 11 cards in 1 suit, so we can solve 1 short equation and 1 long equation.

For the case of two like-colored suits, we have the size obstruction of the style given by user @player3236: if we take our sample to be 5-K from both black suits, plus one of the 4's, we have that the left-hand side of the three-term sum is at least $4 + 5 + 5 = 14 > 13$, so there is no possible solution to the long equation. Hence, 10 + 9 = 19 cards is insufficient to guarantee success in this case, and 20 cards are necessary.

For the case of two opposite-colored suits, there is no obvious obstruction beyond the 15-card lower bound for the short equation by itself.

Two Long Equations. If we have $2 \times (13-1) + 1 = 25$ cards in two suits, we must be able to solve both long equations.

For the case of two like-colored suits, the size obstruction of @player3236 holds exactly, as the 21-card selection (3-K)$\spadesuit$ with 4-K$\clubsuit$ cannot solve both long equations

No obvious obstruction exists for the opposite-colored case.

Probability Tables, Like-Colored Suits

Here we give the probability tables for selections from a two-like-suit deck (e.g., $\spadesuit, \clubsuit$) for solving the given sets of equations.

Like-Colored Suits, 1 Equation

$$ \begin{array}{c| c| c} |T| & P(\text{1 short}) & P(\text{1 long}) \\\hline 0 & 0 & 0\\ 1 & 0 & 0\\ 2 & 0 & 0\\ 3 & \frac{300}{2600} = 11.53846\% & 0\\ 4 & \frac{5934}{14950} = 39.69231\% & \frac{624}{14950} = 4.17391\%\\ 5 & \frac{46578}{65780} = 70.80876\% & \frac{12056}{65780} = 18.32776\%\\ 6 & \frac{205023}{230230} = 89.05138\% & \frac{93908}{230230} = 40.78878\%\\ 7 & \frac{635060}{657800} = 96.54302\% & \frac{407492}{657800} = 61.94770\%\\ 8 & \frac{1546979}{1562275} = 99.02092\% & \frac{1206313}{1562275} = 77.21515\%\\ 9 & \frac{3116496}{3124550} = 99.74223\% & \frac{2716722}{3124550} = 86.94762\%\\ 10 & \frac{5308393}{5311735} = 99.93708\% & \frac{4929877}{5311735} = 92.81105\%\\ 11 & \frac{7725106}{7726160} = 99.98636\% & \frac{7433766}{7726160} = 96.21553\%\\ 12 & \frac{9657466}{9657700} = 99.99758\% & \frac{9475588}{9657700} = 98.11433\%\\ 13 & \frac{10400568}{10400600} = 99.99969\% & \frac{10309178}{10400600} = 99.12099\%\\ 14 & \frac{9657698}{9657700} = 99.99998\% & \frac{9621228}{9657700} = 99.62235\%\\ 15 & 1 & \frac{7714858}{7726160} = 99.85372\%\\ 16 & 1 & \frac{5309115}{5311735} = 99.95068\%\\ 17 & 1 & \frac{3124124}{3124550} = 99.98637\%\\ 18 & 1 & \frac{1562232}{1562275} = 99.99725\%\\ 19 & 1 & \frac{657798}{657800} = 99.99970\%\\ 20 & 1 & 1\\ 21 & 1 & 1\\ 22 & 1 & 1\\ 23 & 1 & 1\\ 24 & 1 & 1\\ 25 & 1 & 1\\ 26 & 1 & 1\\ \end{array} $$

Like-Colored Suits, 2 Equations

$$ \begin{array}{c| c| c| c} |T| & P(\text{2 short}) & P(\text{1 short, 1 long}) & P(\text{2 long}) \\\hline 0 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 2 & 0 & 0 & 0\\ 3 & 0 & 0 & 0\\ 4 & 0 & 0 & 0\\ 5 & 0 & 0 & 0\\ 6 & \frac{23940}{230230} = 10.39830\% & 0 & 0\\ 7 & \frac{308684}{657800} = 46.92673\% & \frac{50658}{657800} = 7.70112\% & 0\\ 8 & \frac{1224668}{1562275} = 78.39004\% & \frac{599283}{1562275} = 38.35964\% & \frac{30771}{1562275} = 1.96963\%\\ 9 & \frac{2897768}{3124550} = 92.74193\% & \frac{2044450}{3124550} = 65.43182\% & \frac{394982}{3124550} = 12.64124\%\\ 10 & \frac{5195668}{5311735} = 97.81489\% & \frac{4300803}{5311735} = 80.96795\% & \frac{1572988}{5311735} = 29.61345\%\\ 11 & \frac{7679338}{7726160} = 99.39398\% & \frac{6967050}{7726160} = 90.17481\% & \frac{3631926}{7726160} = 47.00816\%\\ 12 & \frac{9643138}{9657700} = 99.84922\% & \frac{9209464}{9657700} = 95.35877\% & \frac{6057076}{9657700} = 62.71758\%\\ 13 & \frac{10397372}{10400600} = 99.96896\% & \frac{10195040}{10400600} = 98.02358\% & \frac{7870432}{10400600} = 75.67287\%\\ 14 & \frac{9657256}{9657700} = 99.99540\% & \frac{9585504}{9657700} = 99.25245\% & \frac{8248387}{9657700} = 85.40736\%\\ 15 & \frac{7726132}{7726160} = 99.99964\% & \frac{7707122}{7726160} = 99.75359\% & \frac{7111664}{7726160} = 92.04655\%\\ 16 & 1 & \frac{5308074}{5311735} = 99.93108\% & \frac{5106118}{5311735} = 96.12900\%\\ 17 & 1 & \frac{3124058}{3124550} = 99.98425\% & \frac{3073350}{3124550} = 98.36136\%\\ 18 & 1 & \frac{1562232}{1562275} = 99.99725\% & \frac{1553229}{1562275} = 99.42097\%\\ 19 & 1 & \frac{657798}{657800} = 99.99970\% & \frac{656750}{657800} = 99.84038\%\\ 20 & 1 & 1 & \frac{230160}{230230} = 99.96960\%\\ 21 & 1 & 1 & \frac{65778}{65780} = 99.99696\%\\ 22 & 1 & 1 & 1\\ 23 & 1 & 1 & 1\\ 24 & 1 & 1 & 1\\ 25 & 1 & 1 & 1\\ 26 & 1 & 1 & 1\\ \end{array} $$

Probability Tables, Opposite-Colored Suits

Here we give the probability tables for selections from a two-opposite-suit deck (e.g., $\spadesuit, \heartsuit$) for solving the given sets of equations.

Opposite-Colored Suits, 1 Equation

$$ \begin{array}{c| c| c} |T| & P(\text{1 short}) & P(\text{1 long}) \\\hline 0 & 0 & 0\\ 1 & 0 & 0\\ 2 & 0 & 0\\ 3 & \frac{228}{2600} = 8.76923\% & 0\\ 4 & \frac{4750}{14950} = 31.77258\% & \frac{1384}{14950} = 9.25753\%\\ 5 & \frac{40960}{65780} = 62.26817\% & \frac{26472}{65780} = 40.24324\%\\ 6 & \frac{195859}{230230} = 85.07102\% & \frac{183868}{230230} = 79.86275\%\\ 7 & \frac{627892}{657800} = 95.45333\% & \frac{640686}{657800} = 97.39830\%\\ 8 & \frac{1543463}{1562275} = 98.79586\% & \frac{1560057}{1562275} = 99.85803\%\\ 9 & \frac{3115188}{3124550} = 99.70037\% & \frac{3124390}{3124550} = 99.99488\%\\ 10 & \frac{5307975}{5311735} = 99.92921\% & \frac{5311727}{5311735} = 99.99985\%\\ 11 & \frac{7724994}{7726160} = 99.98491\% & 1\\ 12 & \frac{9657446}{9657700} = 99.99737\% & 1\\ 13 & \frac{10400566}{10400600} = 99.99967\% & 1\\ 14 & \frac{9657698}{9657700} = 99.99998\% & 1\\ 15 & 1 & 1\\ 16 & 1 & 1\\ 17 & 1 & 1\\ 18 & 1 & 1\\ 19 & 1 & 1\\ 20 & 1 & 1\\ 21 & 1 & 1\\ 22 & 1 & 1\\ 23 & 1 & 1\\ 24 & 1 & 1\\ 25 & 1 & 1\\ 26 & 1 & 1\\ \end{array} $$

Opposite-Colored Suits, 2 Equations

$$ \begin{array}{c| c| c| c} |T| & P(\text{2 short}) & P(\text{1 short, 1 long}) & P(\text{2 long}) \\\hline 0 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 2 & 0 & 0 & 0\\ 3 & 0 & 0 & 0\\ 4 & 0 & 0 & 0\\ 5 & 0 & 0 & 0\\ 6 & \frac{15706}{230230} = 6.82187\% & 0 & 0\\ 7 & \frac{236622}{657800} = 35.97172\% & \frac{131366}{657800} = 19.97051\% & 0\\ 8 & \frac{1133326}{1562275} = 72.54331\% & \frac{1255503}{1562275} = 80.36376\% & \frac{316134}{1562275} = 20.23549\%\\ 9 & \frac{2854990}{3124550} = 91.37284\% & \frac{3095130}{3124550} = 99.05842\% & \frac{2649562}{3124550} = 84.79819\%\\ 10 & \frac{5181320}{5311735} = 97.54478\% & \frac{5307710}{5311735} = 99.92422\% & \frac{5295834}{5311735} = 99.70064\%\\ 11 & \frac{7675138}{7726160} = 99.33962\% & \frac{7724994}{7726160} = 99.98491\% & \frac{7725852}{7726160} = 99.99601\%\\ 12 & \frac{9642050}{9657700} = 99.83795\% & \frac{9657446}{9657700} = 99.99737\% & \frac{9657692}{9657700} = 99.99992\%\\ 13 & \frac{10397178}{10400600} = 99.96710\% & \frac{10400566}{10400600} = 99.99967\% & 1\\ 14 & \frac{9657236}{9657700} = 99.99520\% & \frac{9657698}{9657700} = 99.99998\% & 1\\ 15 & \frac{7726132}{7726160} = 99.99964\% & 1 & 1\\ 16 & 1 & 1 & 1\\ 17 & 1 & 1 & 1\\ 18 & 1 & 1 & 1\\ 19 & 1 & 1 & 1\\ 20 & 1 & 1 & 1\\ 21 & 1 & 1 & 1\\ 22 & 1 & 1 & 1\\ 23 & 1 & 1 & 1\\ 24 & 1 & 1 & 1\\ 25 & 1 & 1 & 1\\ 26 & 1 & 1 & 1\\ \end{array} $$

Large-selection Guarantees (Proposition 3)

By observing the above tables, one conclusion leaps out.

Corollary 8 In order to solve one long and one short equation, it suffices to gather 20 cards in like-colored suits, or 15 cards in opposite-colored suits.

We also should recall Observation 5 from the previous part.

Observation 5 (again)

  • 8 cards from a single suit are guaranteed to solve a single short equation.
  • 11 cards from a single suit are guaranteed to solve both a short equation and a long equation.
  • 13 cards from a single suit can solve both long equations and a short equation.

We are now in a position to prove Proposition 3.

Proposition 3 (again) Any selection from a standard deck with 37 or more cards is enough to solve all 4 equations.

Proof, given Observation 5 and Corollary 8 We work by cases on the number of cards in each suit.

Case 1: At least 11 cards in at least 1 suit. If there are 11+ cards in at least 1 suit, say spades, then the spades can solve one short and one long equation. Also, as the number of cards in any one suit is at most 13, the number of cards in the other three suits is at least $37 - 13 = 24$.

Suppose, by way of contradiction, then there is no solution to the other short and long equation. Then:

  • $h + d \leq 19$ (since by Corollary 4, 20 cards from like-colored suits would solve one short and one long equation),

  • $c + d \leq 14$ (since by Corollary 4, 15 cards from opposite-colored suits would solve one short and one long equation),

  • $c + h \leq 14$ (ditto).

and adding these, $2(c + h + d) \leq 47$, so $c + h + d \leq 23 + \frac{1}{2}$. Yet our prior observation is that $c + h + d \geq 24$. Contradiction. Hence, this case also has a guaranteed solution.

Case 2: At most 10 cards in all suits. If every suit has at most 10 cards, then there must be 7 cards in each suit in the selection (essentially, because $10 + 10 + 10 + 6 = 36 < 37$). Moreover, there cannot be two suits with exactly 7 cards in the selection (because $10 + 10 + 7 + 7 = 34 < 37$). Hence, we must have that both $s + h$ and $c + d$ are bounded below by $7 + 8 = 15$; hence, the spades-hearts pair of suits solves one short and one long equation, and same for the clubs-diamonds pair of suits. Hence, we have a solution to the system of equations.

The list of cases being exhaustive, we are done. $\square$

18-card probabilities argument (Proposition 4)

Proposition 4 (again) If one selects 18 cards from a deck of cards (uniformly at random across all such 18-card subsets), then the probability of solving the equations is at least $62.9\%$.

Proof. We consider the split $\left \lbrace \spadesuit, \heartsuit \right\rbrace$, $\left\lbrace \clubsuit, \diamondsuit \right\rbrace$. We have $$ \begin{aligned} P(18\text{-card solution set}) = \sum_{j = 0}^{18} & \bigg( P(|\spadesuit| + |\heartsuit| = j, |\clubsuit| + |\diamondsuit| = 18-j)\\ & \cdot P \big( \text{solution set } \big| |\spadesuit| + |\heartsuit| = j |\clubsuit| + |\diamondsuit| = 18-j \big) \bigg) \end{aligned} $$
Similarly to the discussion in Proposition 2, the first probability is counting the number of ways to choose $j$ out of the $26$ spades and hearts, and independently choosing $18 - j$ out of $26$ clubs and diamonds, out of the $\binom{52}{18}$ selections of 18 cards. Hence, we have $$ P(|\spadesuit| + |\heartsuit| = j, |\clubsuit| + |\diamondsuit| = 18-j) = \frac{\displaystyle \binom{26}{j} \cdot \binom{26}{18-j}}{\displaystyle \binom{52}{18}}. $$

To efficiently write our underestimates for the conditional probabilities, let us write:

  • $p_{SS}^{\text{Opp}}(t)$ to be the probability that a selection of $t$ cards from two opposite-color suits solves two short equations;
  • $p_{SL}^{\text{Opp}}(t)$ to be the probability that a selection of $t$ cards from two opposite-color suits solves one short and one long equation;
  • $p_{LL}^{\text{Opp}}(t)$ to be the probability that a selection of $t$ cards from two opposite-color suits solves two long equations.

Then we have three simple ways to solve the collection of 4 equations with a selection with $|\spadesuit| + |\heartsuit| = j$ and $|\clubsuit| + |\diamondsuit| = 18-j$:

  1. Use spades and hearts to solve both short equations, and (independently) use clubs and diamonds to solve both long equations, with probability $p_{SS}^{\text{Opp}}(j) p_{LL}^{\text{Opp}}(18-j)$.

  2. Use spades and hearts to solve one long and one short equation, and independently use clubs and diamonds to solve the other short and other long equation, with probability $p_{SL}^{\text{Opp}}(j) \cdot p_{SL}^{\text{Opp}}(18-j)$.

  3. Use spades and hearts to solve both long equations, and clubs and diamonds to solve both short equations, with probability $p_{LL}^{\text{Opp}}(j) p_{SS}^{\text{Opp}}(18-j)$.

These three events of solution types are not disjoint (see Remark 9), but for each choice of $j$, however, we may as well lower-bound by the option that gives us the best opportunities. Putting it all together, our lower bound is \begin{align*} P(18\text{-card solution set}) &= \sum_{j = 0}^{18} && \bigg( P(|\spadesuit| + |\heartsuit| = j, |\clubsuit| + |\diamondsuit| = 18-j)\\ & && \cdot P\big(\text{solution set } \big| |\spadesuit| + |\heartsuit| = j, |\clubsuit| + |\diamondsuit| = 18-j \big) \bigg)\\ & \geq \sum_{j = 0}^{18} && \Bigg( \frac{\displaystyle \binom{26}{j} \cdot \binom{26}{18-j}}{\displaystyle \binom{52}{18}}\\ & && \cdot \max \lbrace p_{SS}^{\text{Opp}}(j) p_{LL}^{\text{Opp}}(18-j), p_{SL}^{\text{Opp}}(j) \cdot p_{SL}^{\text{Opp}}(18-j), p_{LL}^{\text{Opp}}(j) p_{SS}^{\text{Opp}}(18-j) \rbrace \Bigg). \end{align*} With computational assistance, this sum turns out to be $\dfrac{13,433,550,949,076}{21,335,988,680,825} \approx 62.962\%$. $\square$.

Remark 9 Of course, splitting by pairing spades with diamonds and clubs with hearts yields the same result. By contrast, pairing spades with clubs and hearts with diamonds (pairing the like-colored suits) yields a weaker lower bound of $\dfrac{24,021,902,309}{86,380,520,975} \approx 27.809\%$.

Remark 10 We now justify our claim of non-disjointness. We present a $16$-card selection can solve the equation in all three ways. Take the A-3 and 6 of spades and clubs, and A-4 of hearts and diamonds. Then we can solve the system of equations via all three assignments of two equations to the pairs $\left \lbrace \spadesuit, \heartsuit \right\rbrace$ and $\left \lbrace \clubsuit, \diamondsuit \right\rbrace$ as follows: $$ \begin{array}{c | c} \left \lbrace \spadesuit, \heartsuit \right\rbrace \text{ 1 Long, 1 Short} & \left \lbrace \clubsuit, \diamondsuit \right\rbrace \text{1 Long, 1 Short}\\ \hline A_{\spadesuit} + 3_{\spadesuit} + (-2)_{\heartsuit} = 2_{\spadesuit} & A_{\clubsuit} + 3_{\clubsuit} + (-2)_{\diamondsuit} = 2_{\clubsuit}\\ (-A)_{\heartsuit} + (-3)_{\heartsuit} = (-4)_{\heartsuit} & (-A)_{\diamondsuit} + (-3)_{\diamondsuit} = (-4)_{\diamondsuit} \end{array} $$

$$ \begin{array}{c | c} \left \lbrace \spadesuit, \heartsuit \right\rbrace \text{2 Long} & \left \lbrace \clubsuit, \diamondsuit \right\rbrace \text{2 Short}\\ \hline A_{\spadesuit} + 3_{\spadesuit} + (-2)_{\heartsuit} = 2_{\spadesuit} & A_{\clubsuit} + 2_{\clubsuit} = 3_{\clubsuit}\\ 6_{\spadesuit} + (-3)_{\heartsuit} + (-4)_{\heartsuit} = (-A)_{\heartsuit} & (-A)_{\diamondsuit} + (-3)_{\diamondsuit} = (-4)_{\diamondsuit} \end{array} $$

$$ \begin{array}{c | c} \left \lbrace \spadesuit, \heartsuit \right\rbrace \text{2 Short} & \left \lbrace \clubsuit, \diamondsuit \right\rbrace \text{2 Long}\\ \hline A_{\spadesuit} + 2_{\spadesuit} = 3_{\spadesuit} & A_{\clubsuit} + 3_{\clubsuit} + (-2)_{\heartsuit} = 2_{\clubsuit}\\ (-A)_{\heartsuit} + (-3)_{\heartsuit} = (-4)_{\heartsuit} & 6_{\clubsuit} + (-3)_{\diamondsuit} + (-4)_{\diamondsuit} = (-A)_{\diamondsuit} \end{array} $$

Miscellaneous Remarks (can skip this)

Measuring the Combinatorial Explosion (or, why we have not proceeded further)

We split the discussion by each frontier.

"Why not extend the two-suit case to three equations?"

Let us just consider the difficulty of finding the basic solutions. For the one-suit case, it took between 50 minutes and 1 hour to find the basic solutions, for each of the cases, 2-short-1-long and 1-short-2-long. Moreover, these equation sets have $|V| = 10$ or $|V| = 11$. As $\frac{\displaystyle \binom{26}{10}}{\displaystyle \binom{13}{10}} = 18572 + \frac{1}{2}$ and $\frac{\displaystyle \binom{26}{11}}{\displaystyle \binom{13}{11}} = 99053 + \frac{1}{3}$, it would likely take tens of thousands of hours of computing time on my current machine to get these results. This is not feasible for me.

Can we say anything about three-suit or four-suit cases, for one equation?

For a single equation, even with the full deck, I can find the basic solutions in a reasonable amount of time. The super-set-finding phase is much harder here, just because of the number of subsets to check. For example, for a three-suit deck and a single long equation, around $|T| = 9$, I had to switch from a parallel approach to a serial approach, because I used a simple parallelization protocol (to simplify error-testing) and the overhead was using up too much RAM. In the serial approach (still 3 suits and 1 long equation), checking $|T| = 10$ took more than half a day by itself. This is just for the relatively small $\displaystyle \binom{39}{9} = 211,915,132$ and $\displaystyle \binom{39}{10} = 635,745,396$.

Handling the complete problem by brute-force would tax a supercomputer.###

Note that $\displaystyle \binom{52}{18} = 42,671,977,361,650$, or over 42 quadrillion. To solve the problem in a (non-leap) year on a single processor, each subset would have to be checked in (just) under 0.74 microseconds. To put it another way, to finish in a non-leap year, and assuming each case was solved in a tenth of a second, we would need 13,531 processors to run for the whole year, plus about a fifth of the year from a 13,532nd processor. This seems unrealistic to me.

An Extension that Might Work

Note that we could not really combine our one-suit statistics with our two-suit statistics, as the cases are not disjoint. For example, "solving a single short equation in spades and clubs" and "solving a single short equation in spades alone" has obvious overlap.

What might work is to break down our two-suit results by per-suit counts: for example, replacing "all 10-card selections from hearts and diamonds" with "all selections of 8 hearts and 2 diamonds". That might allow us to eke out a little more evidence. Each individual case would presumably be faster, but the total would probably take longer, and I would need to greatly re-work the code. I am getting burnt out, so I will not proceed with this unless there is great interest.

An Emergent Phenomenon That Might be its own Question

Comparing the like-colored suits and opposite-colored suits statistics, we see one easy-to-state phenomenon.

For all subset sizes, like-colored suits have the advantage when solving one or two short equations, and opposite-colored suits have the advantage when solving one or two long equations.

One might be tempted to suppose that it is merely whichever case has the more numerous basic solutions, but this is easy to repudiate. We need only consider the statistics for a deck of two opposite-color suits and the single-equation statistics:

$$ P(1 \text{ short equation solved with } 4 \text{ cards}) = \frac{4750}{14950} > \frac{1384}{14950} = P (1 \text{ long equation solved with } 4 \text{ cards}) $$

but

$$ P(1 \text{ short equation solved with } 7 \text{ cards}) = \frac{627892}{657800} < \frac{640686}{657800} = P(1 \text{ long equation solved with } 7 \text{ cards}) $$

It is a matter of the spread of the subsets, as well as their count, that influence the number of solving supersets.

It would be nice if we could get a human-readable explanation for why this would happen. If there is interest, it should probably be its own Math.SE question.

Charles Baker
  • 1,264
  • 12
  • 21
  • Just curious, did you try running a monte carlo simulation? – Older Amateur Jun 16 '25 at 20:24
  • @OlderAmateur, I don't see how that is practical. Take a single 18-card selection. Yes, we only have $\binom{18}{14} = 3,060$ 14-element subsets. Yet I can't generate the basic solutions, so for each subset, I would have to check on the order of $14! \approx$ 87 billion permutations. That's over a quarter of a quadrillion cases to check. (Here, $|K| = 144$, so that only gets you a little savings, if you can even store over 600 million permutations in the first place.) I'm not seeing how you sample enough 18-card selections. – Charles Baker Jun 17 '25 at 00:07
  • @OlderAmateur, I did quickly double-check how quickly things were being solved, and it took 23.2-24.5 minutes to check 10 million permutations. At that rate, it would take between 8.18 years and 8.65 years of processor time to resolve a single 18-card selection by brute force (if we could somehow store all those permutations). I'm afraid that my current setup definitely does not scale that far. – Charles Baker Jun 17 '25 at 01:24