Not 24
Mar 07, 2026
Unnecessary proofs
[NOTE] This post is especially long with a lot of proofs, to make reading easier proofs can be collapsed by clicking on the QED square at the bottom of the environment.
Background
Consider the following game, loosely inspired by 24. Let's say we have 4 people. Each person names a digit between 1 and 9 (inclusive)1. Given only the operations 2 (and of course parentheses to dictate order), and the constraint that each digit must be used exactly once, construct a valid equation that evaluates to 10. If a digit is named more than once, it must be used exactly as many times as it was named.
This is simple enough, but what if I want to play with more people? We may also ask is it ever possible to get a set of numbers such that it is not possible to get to 10? I've been thinking about this problem since November and I've made some progress, but I thought it'd be interesting to sorta document how this goes.
Statement and Strategy
Statement
It will likely be helpful to formally state out exactly what we're looking for. Given a multiset of digits , and the operations list (where we note that is defined only for integer perfect squares), is there some valid expression in which we use all the digits exactly once (and use operations as many times as we wish) that will evaluate to 10?
We then seek the minimum such that the above is always true regardless of the multiset.
Strategy
Our strategy will be to construct increasingly tight upper and lower bounds until they meet (sort of how the Rubik's cube God's number proof was done). I also really want to do this without computer assistance, but we'll see how feasible that is.3
My first crack at this (roughly November to January) involved trying to construct some sort of homogeneity lemma (basically that a multiset where every digit is the same is the hardest case to solve). I still think this is right (particularly for 7 since it is the largest prime that is coprime to 10), but I cannot figure out how to prove it so for now we'll just leave it.4
Answer
The final answer is that the minimum is 5.
(sometime in Dec/Jan)
Claim 1 (Achievability for ). For every , we can construct 10 according to the rules of the game.
Before we proceed with the proof, it'll be helpful to introduce some notation and set things up.
Let our mutliset of digits be denoted . Let denote the multiplicity of each digit so . Note that we can construct 10 from 4 1s:
We may easily obtain via , which consumes 2 occurrences of the digit . Therefore, to build 4 1s of the form , we need 4 disjoint equal pairs among the digits. Define the number of disjoint equal pairs available in by
Now, we introduce the following lemma for convenience:
Lemma 2 (Pair-count lower bound). If , then for every multiset .
Suppose . Then each digit contributes at most pairs, so for each . Summing over , Thus, if , it is impossible to have ; hence .
Now we may prove the original claim.
By the above lemma, for we may choose four disjoint pairs (not necessarily unique digits) and form thus we can reach 10. To guarantee we can use all remaining digits without affecting the value 10, it suffices to have an additional equal pair disjoint from the 8 digits already used, because then we can form and multiply the entire leftover expression by 0.
So we want . From the same inequality as used in the lemma, Plugging in our desired (same logic as lemma), we have that , so to ensure , we require , as claimed.
(Feb 05)
We show this explicitly by counterexample.
Claim 3 (Counterexample for ). Given the operations in and the multiset , we can never construct 10.
Intuition. The only way to use exactly 4 leaves is via a full binary tree with 4 leaves. There are only 2 root shapes: and . The delicate point is that unary operations and may be applied at internal nodes without consuming digits, so we must account for them completely. We reduce the problem to a finite target-exclusion check.
Unary closure
Define the unary-closure operator on a set by Since unary operations act only on the value already produced at a node, the set of values attainable by any fixed subtree is closed under .
Classify all 2-leaf values from
Let denote the set of all values obtainable from exactly two leaves using operations in . We claim
Justification:
- Using only the binary operations on raw leaves gives , , , .
- Applying to and yields and . Applying to and returns and ; no other square roots are defined from two 7s.
- By allowing a unary operation on a single leaf before the binary root, we may use as a leaf value and form . Squaring yields .
(We will only need the displayed subset of small values in the later finite checks.)
Reduce the 4-leaf problem to two root shapes
Every full 4-leaf binary tree has root of type or . Concretely, any 4-leaf expression is of one of the following forms (up to swapping left/right): or where and denotes an (optional) finite composition of unary operations applied at the root (each application must be defined).
Unary operations at the root force a finite set of binary targets
The only unary operations are and (when defined). Since is neither a perfect square nor the square root of a perfect square integer other than 100, the only way a root unary chain can produce 10 is if the binary root value lies in ( has no rational solution; forces ; and can introduce an absolute value, hence .)
Thus, to show impossibility, it suffices to show that in either root shape, the binary root can never evaluate to any of .
Exclude root shape
In this shape, . Therefore the binary root lies in the finite set A direct check shows this set does not contain , , or . Hence the shape cannot yield 10.
Exclude root shape
In this shape, the binary root is or . To have the binary root in , must satisfy one of finitely many equations, giving the forced target set (These come from solving and for and .)
Now, any 3-leaf expression necessarily contains a 2-leaf subtree; evaluating that subtree first yields some , and then is obtained by combining with the remaining leaf using one binary operation, followed by unary closure: Therefore, it suffices to check the finite set on the right-hand side and verify it is disjoint from . This direct check succeeds: no element of appears.
Hence the shape cannot yield a binary root in , and therefore cannot yield 10 after any root-level unary operations.
Neither root shape nor can yield a binary root value in , hence no valid expression using exactly four 7s can evaluate to 10. This proves the claim.
(Feb 10)
Claim 4 (Achievability for ). For every , we can construct 10 according to the rules of the game.
The proof earlier "wastes" 2 digits to manufacture a spare equal pair so we can build and discard all remaining digits. At we cannot always guarantee a 5th equal pair, so we instead manufacture a duplicate-free zero using the unary operations.
We retain the pair-count notation from before. Let our multiset of digits be , let denote the multiplicity of each digit , and define
By Lemma 2, if then . Thus, for we may always select 4 disjoint equal pairs and form 4 1s: and hence we can build This uses exactly 8 digits (4 pairs). The remaining issue is: how do we force the remaining 8 digits to be used exactly once without changing the value?
We can resolve this via the following observation: when and , the multiset must contain all but at most one digit from . In particular, it must contain either or , which gives a zero without requiring duplicates.
Lemma 5 (Forced zero gadget at ). Let and suppose . Then at least one of the following holds: (i) digits 2 and 4 both occur in , or (ii) digits 3 and 9 both occur in . Hence, admits a duplicate-free zero: and hence .
Write Summing over , so . Since implies is odd (hence ), this means that at least 8 distinct digits appear in , i.e. at most one digit is missing from .
Now consider the set . If 2 is missing then 3,4,9 are present, so in particular . If digit 3 is missing then . Similarly, if 4 is missing then , and if 9 is missing then . If none are missing, then both and are present. Thus at least one of or occurs, and we can form or using each digit exactly once.
Lemma 6 (Zero gadget can be chosen without destroying the four pairs). Let and suppose . Then there exists a choice of such that the digits used to build can be reserved while still leaving at least four disjoint equal pairs among the remaining digits. In particular, after reserving the digits of , we still have enough pairs to build
Since and , write As in Lemma 5, summing gives . Hence exactly one digit has even multiplicity; call it . (All other digits have odd multiplicity, hence at least 1.)
Now note the following fact: if is odd, then reserving a single copy of does not decrease the number of available pairs contributed by , since The only way reserving digits can decrease is if we reserve a copy of the unique even-multiplicity digit .
By Lemma 5, at least one of the gadgets is available; choose so that reserving its digits leaves four disjoint equal pairs. Choose the zero gadget so that it does not use the digit :
- If , choose .
- If , choose .
- If , choose whichever of the two gadgets is available.
Because at most one digit is missing from , in the first two bullets the "other" gadget is guaranteed to be available: if (say) then digit 2 is present (even multiplicity) and so the only possible missing digit is not both 3 and 9, hence ; similarly for the other cases.
With this choice, the digits reserved for come only from odd-multiplicity digits, so reserving them does not reduce . Therefore there remain at least four disjoint equal pairs available to build .
We can now finish our original construction.
Fix . If , then we revert to the proof: use 4 pairs to build and use the 5th pair to build , absorbing all remaining digits.
So assume and . By Lemma 6, we can form a duplicate-free zero gadget with (choose whichever is available in ).
Independently, since , we can select 4 disjoint equal pairs and construct Let be any expression using every remaining unused digit exactly once (e.g. their product in any parenthesization). Then uses every digit exactly once and evaluates to 10.
(Feb 28)
Claim 7 (Achievability for ). For every and every multiset , there exists a valid expression using each digit exactly once that evaluates to .
The main improvement over the argument is that we no longer insist on manufacturing 1 exclusively from equal pairs . We can also obtain 1 from adjacent digits: or, if we wish to avoid ordering, Thus any disjoint pair with can be converted into a 1.
This reduces the combinatorics of “how many 1s can we force?” to a matching problem on a path.
Let denote the multiplicity of digit . Write
Define:
- , the number of disjoint equal pairs available.
- , the number of leftover “odd” tokens after removing all equal pairs.
Interpret the digits as tokens placed on the path A unit-producing pair is either:
- two tokens on the same vertex , or
- one token on and one on .
Let denote the maximum number of disjoint unit-producing pairs extractable from .
After removing all equal pairs (giving pairs), the remaining tokens lie on the vertices with , at most one per vertex. Among these, we may additionally match adjacent vertices along the path.
Let where denotes the matching number of a graph ; the number of pairwise disjoint edges in . Then
Lemma 8 (Four unit pairs from 12 digits). If , then .
Since we have
We argue by cases.
Case 1: . Then .
Case 2: . Then . So six vertices of the path carry an odd token.
But the path on nine vertices has independence number ; hence any subset of six vertices must contain at least one adjacent pair. Therefore , and
Case 3: . Then .
Now we claim any induced subgraph of the 9-vertex path on at least 7 vertices has matching number at least 2.
Indeed, if a subset of vertices satisfies , then the induced subgraph consists of isolated vertices together with at most one component containing an edge. In a path, such a component has size at most 3. The remaining vertices must be isolated and therefore pairwise nonadjacent; there can be at most 4 of these. Hence . Contrapositively, implies .
Applying this with , we obtain , and therefore
All cases give .
The bound is tight at 11 digits: for example, admits only three disjoint unit pairs. (We may note that we can construct a 4th 1 e.g. via , but figuring out how to formalize this is too much work; I'll likely revisit it later.)
Let . Since there are only 9 digit types, some digit appears at least twice. Reserve two copies and form
Remove these two digits; the remaining multiset has size
By Lemma 8, we have . Hence we may extract 4 disjoint unit pairs from and convert them into 4 1s.
Using these four 1s, construct
Let be any expression using all remaining unused digits exactly once (for instance, their product in any parenthesization). Then uses every digit exactly once and evaluates to .
(Mar 01)
Claim 9 (Achievability for ). For every and every multiset , there exists a valid expression using each digit exactly once that evaluates to .
We shall keep the same “absorb leftovers with a ” architecture as before, but sharpen the internal -kernel: instead of forcing four disjoint unit pairs (to make four s), we show that any multiset of size already contains a small kernel for . This drops the global threshold by 2.
We again view the digits as tokens on the path
A unit-producing pair is defined the same as before.
A nine-producing gadget is any of:
- a single digit , yielding directly,
- a single digit , yielding ,
- a distance-3 pair , yielding , or
- a sum-to-9 pair , yielding .
The main kernel identity is so it suffices to build a nine-gadget and a unit-pair disjointly.
We shall want a crude extremal identity for unit pairs, stated below.
Lemma 10 (Unit pair from six digits). If , then contains a unit-producing pair.
If some digit repeats, we have an equal pair and hence . Otherwise all digits are distinct. But the independence number of the 9-vertex path is , so any set of distinct vertices contains an adjacent pair . Then .
We will also need a 2-value reduction.
Lemma 11 (Two-value support at size 9 gives 10). Let . If is supported on at most two digit-values, then admits a valid expression using some of the digits of that evaluates to .
If is supported on at most two values, write Then the number of disjoint equal pairs is For any integers with , we have ; the minimum occurs at or , giving or .
Thus we can always select four disjoint equal pairs and form four s: Then gives a -kernel.
Now we will require a kernel lemma.
Lemma 12 (A 10-kernel from 9 digits). For every multiset , there exists a valid expression using some of the digits of (each at most once) that evaluates to .
We proceed by successive reductions. Throughout, we shall ignore unused digits.
Immediate 2-leaf kernels. If contains any of or contains two s, then we can form by addition and are done. Hence assume:
- no complement-to-10 pair occurs in , and
- .
Singleton nine gadgets. If , we have . If , we have . In either case, removing that one digit leaves 8 digits. By Lemma 10, the remaining digits contain a disjoint unit pair producing . Hence . So assume:
2-leaf nine gadgets. If contains any sum-to-9 pair among , then uses two digits, leaving 7 digits; by Lemma 10, these yield a disjoint , hence . Similarly, if contains a distance-3 pair , then and again the remaining 7 digits yield a disjoint . Hence we may assume:
- none of occurs in , and
- no distance-3 pair occurs in .
mod-3 chain collapse. The distance-3 edges partition the digits into chains: The absence of any distance-3 pair implies that the support of restricts on each chain to an independent set of that 3-vertex path. Thus:
- on , the allowed occupied subsets are ,
- on , the allowed occupied subsets are ,
- on , since , the only possibilities are and .
Now use the earlier exclusions:
- is forbidden because it is a complement-to-10 pair,
- and are forbidden because they are complement-to-10 pairs,
- is forbidden because it is a sum-to-9 pair.
Therefore the support of must be one of the following:
- one-value supports:
- two-value supports:
- multi-value supports:
If is supported on at most two values, then Lemma 11 applies and we are done. So it remains only to handle the seven explicit multi-value supports.
Support Let denote multiplicities of , so .
- If , use
- Else if , use
- Else if and , use
- Else if and , use
- Else if and , use
- Otherwise , so use
Support
- If , then .
- Otherwise , so .
- If , use .
- If , then ; form and then
Support
- If , then .
- Otherwise , so .
- If , use .
- If , then ; use
Support
- If , use .
- If , use
- Otherwise , so ; use
Support
- If , then .
- Otherwise , and since the support is exactly we may use
Support
- If , use
- Otherwise .
- If , use
- If , then ; use
Support
- If , then .
- Otherwise , and since 6 and 7 are present we may use
Thus in all cases, admits a -kernel.
Now the proof of our original claim is straightforward.
Let and . By pigeonhole, some digit appears at least twice. Reserve two copies and form Remove these two digits; the remaining multiset has size . By Lemma 12, contains a -kernel .
Let be any expression using all remaining unused digits of exactly once (for example, their product in any parenthesization). Then uses every digit exactly once and evaluates to .
(Mar 07)
Claim 13 (Achievability for ). For every and every multiset , there exists a valid expression using each digit exactly once that evaluates to .
The argument leaves two digits to manufacture and then searches for a 9-digit -kernel. We can push that architecture one step further by proving a 7-digit kernel.
Lemma 14 (Unit pair from 5 digits when are absent). If and , then contains a unit-producing pair.
If some digit repeats, we have an equal pair and therefore a unit pair.
So assume all five digits are distinct. If two are adjacent, we are done. Hence assume no two are adjacent. Then the support is an independent 5-set in the path But the unique independent 5-set in this path is Since , this is impossible. Therefore must contain a unit pair.
Lemma 15 (A 10-kernel from 7 digits). For every multiset , there exists a valid expression using some of the digits of (each at most once) that evaluates to .
For the case analysis below, it is convenient to fix a small kernel catalog: and the mixed kernels: We will explicitly track multiplicity thresholds against the number of digit occurrences each displayed kernel consumes.
Lemma 16 (Family kernel lemma : support inside ). If and , then contains a -kernel.
Let be multiplicities with .
- If , use .
- Else , so .
- If , then ; use .
- If , then ; use .
Lemma 17 (Family kernel lemma : support inside ). If and , then contains a -kernel.
Let be multiplicities with .
- If and , use .
- Else if , then ; use .
- Else and , hence ; use .
Lemma 18 (Family kernel lemma : support inside ). If and , then contains a -kernel.
Let be multiplicities of with .
- If , use .
- Else if , use .
- Else if and , use .
- Else if and , use .
- Else if and , use .
- Otherwise , so use .
Lemma 19 (Family kernel lemma : support inside ). If and , then contains a -kernel.
Let be multiplicities with .
If :
- If , use .
- Else if , use .
- Else , so ; use .
If , then :
- If , use .
- Else if , then ; use .
- Else if , then ; use .
- Else ; use .
Lemma 20 (Family kernel lemma : support inside ). If and , then contains a -kernel.
Let be multiplicities of with
If , use . So assume .
Case 1: .
- If , use .
- Else if and , use .
- Else if and , use .
- Else if and , use .
- The only remaining possibilities are pure supports or , so use or .
Case 2: . Then .
- If , use .
- Else if , use .
- Else if and , use .
- Else if and , use .
- Else if and , use .
- Else if and , use .
- Else if and , use .
- Else if , , and , use .
- Otherwise , so use .
As in the section, we use the identity and seek a disjoint nine-gadget and unit pair.
First remove immediate 2-leaf kernels:
- no complement-to-10 pair in occurs,
- and (so no kernel).
If or , we get a 1-leaf nine-gadget. Removing that one digit leaves 6 digits, and Lemma 10 yields a disjoint unit pair. So in the reduced case:
Now consider 2-leaf nine-gadgets. If contains any of then removing that gadget leaves 5 digits. By and Lemma 14, those 5 digits contain a disjoint unit pair. Hence .
Therefore, in the hard case we may assume all those pairs are absent. Equivalently, the support is an independent set in the forbidden graph on vertices with forbidden edges The maximal independent sets of are: Define Every reduced support is an independent set of , hence for some . Therefore it is enough to prove, for each , the stronger family statement: These are exactly lemmas Lemma 16 through Lemma 20. Hence the hard case is solved, and every 7-digit multiset admits a -kernel.
We may now prove our original claim.
Let and .
If some digit repeats, reserve two copies and set Removing those two digits leaves digits; pick any 7 of them and apply Lemma 15 to obtain a -kernel . Let be any expression using all remaining unused digits exactly once. Then uses every digit exactly once.
If no digit repeats and , then necessarily and we have an explicit full-use expression:
Hence every 9-digit multiset is solvable, so .
(Mar 07)
Theorem 21 (Exact threshold). Every multiset admits a valid expression (using each digit exactly once and operations in ) that evaluates to .
We will want the below lemma.
Lemma 22 (Triple lemma). For every multiset , there is a valid expression using exactly the three digits of that evaluates to either or .
We split by support size.
Case 1: one-value support
For , the following witnesses work:
Case 2: two-value support
Write with . Since , we can form , , and . Hence if , one of these is or .
So only remains. Exhaustive witnesses:
Case 3: three-value support with a consecutive pair
Let be distinct. If , then , so we can make ; if , then , so we can make . Thus only finitely many edge cases remain; witnesses:
Case 4: three-value support with no consecutive pair
The sparse triples ( total) are exhausted by the following witnesses:
All 3-digit multisets are covered, proving the lemma.
Lemma 23 (Pair graph for value ). Let be the graph on vertices where is an edge iff pair can make , and where loop exists iff can make . Then the available loops and edges are exactly:
Witnesses:
Let . If contains a -pair, use that pair to build . The complementary triple builds or by Lemma 22, so we get Therefore any counterexample must contain no -pair at all.
So we only need to solve 5-multisets independent in . The maximal independent supports are: These are obtained by exhaustive verification over all supports in . Because have loops, each can appear at most once inside these candidates.
It remains to list one witness per admissible 5-multiset family:
Family
Family
Family
Family
Family
Family
Family
Family
Family
Family
Family
Thus every -independent 5-multiset is solvable, and every non-independent one is solvable by the pair-plus-triple reduction above. Hence every 5-digit multiset is solvable. Together with Claim 3, this gives .
- We exclude 0 by convention, it makes the problem unsolvable; given all 0s we can't ever reach 10. ↩
- Square root is only defined for perfect integer squares, i.e., 1, 4, 9. ↩
- I ended up using a Python program for enumerating some of the casework (especially for ), but most of this was done without computer assistance. ↩
- This turned out to not be nearly as useful as I had hoped, most of the progress came from casting it as a graph problem. ↩