Manuscript Offprint
arXiv:2610.10446Subset Sum via Partial Match
Abstract
We show that the subset sum problem can be solved in time , breaking the meet-in-the-middle barrier.
Our approach builds on the representation technique framework of Randolph and Wegrzycki (STOC 2026). We choose a representation for which testing the compatibility of pairs of partial solution vectors is exactly the partial match problem. To beat exponent 1/2 for subset sum, it then suffices to give a nontrivial partial match algorithm in a certain parameter regime. We achieve this by designing a depth-2 linear circuit for the partial match matrix, which yields an efficient algorithm via the framework of Alman and Li (FOCS 2025).
Declaration. A result of a similar type was recently released by OpenAI: Subset Sum in Time [Ope26], dated 4 October 2026. Our result was developed independently of that work and uses a different approach; see AI disclosure and timestamps at the end of the paper for details.
This version is mathematically complete, but its presentation is preliminary; a more comprehensive version is in preparation.
1 Introduction
Given integers and a target, the subset sum problem asks whether some subset of the integers sums to the target. Formally, given a vector and a target , it asks for a vector such that .
In their foundational work, Horowitz and Sahni [HS74] gave an -time algorithm for subset sum, a method now known as meet-in-the-middle. Whether subset sum can be solved exponentially faster, say in time for some constant , remains a central open question in exact algorithms.
Howgrave-Graham and Joux [HGJ10] were the first to break the meet-in-the-middle barrier in an average-case setting of subset sum, with running time . Their algorithm was subsequently improved in [BCJ11, BBSS20]. Although these algorithms are not worst-case algorithms, [HGJ10] introduced the representation technique, which later proved very fruitful. Mucha, Nederlof, Pawlewicz, and Wegrzycki [MNPW19] showed that the representation technique also yields a faster worst-case algorithm for a related problem, equal subset sum, in which the coefficient vector ranges over and the target is 0. Compared with the meet-in-the-middle bound , they achieved time .
Recently, Randolph and Wegrzycki [RW26] systematically studied a class of problems related to subset sum, which we call generalized subset sum (GSS). Here the target is 0, and the
*Institute for Interdisciplinary Information Sciences, Tsinghua University. ylx25@mails.tsinghua.edu.cn.
Columbia University. bl3052@columbia.edu.
We use to suppress polynomial factors.
coefficient vector ranges over or for a fixed finite set that defines the problem. Their starting point is the earlier work of Nederlof and Wegrzycki [NW21], which used an algorithm for detecting sparse Orthogonal Vectors to improve the space complexity of the -time, -space subset sum algorithm of Schroeppel and Shamir [SS81] to , while keeping the time . Randolph and Wegrzycki observed that this Orthogonal Vectors subroutine generalizes to a wider family of problems, which they call compatibility testing. Combining compatibility testing with the representation technique, they showed that GSS can be solved in time for a large family of sets , beating meet-in-the-middle. In particular, they beat meet-in-the-middle for for every , and for for every . They also improved the equal subset sum bound of [MNPW19] to . For , GSS is equivalent to subset sum via the affine change of coefficients . This leaves the tantalizing possibility that their method extends to subset sum itself.
In this paper, we show that this line of approach indeed solves subset sum in time below .
Theorem 1.1 (Theorem 4.1). The subset sum problem can be solved in time .
The starting point of the representation technique is to carefully choose sets and then search for and such that is a solution. For example, the classical meet-in-the-middle algorithm takes
At first glance, this approach cannot break the barrier: to cover all candidate solutions, we need , so at least one of and has size at least . The key observation of the representation technique [HGJ10], as used in [MNPW19], is that one need not list and for all and . The idea is that, instead of making and as small as possible, one should first enlarge them: the benefit is that each solution then admits many representations with and .
Mixing and hashing. Suppose that the choice of and guarantees that every solution has at least representations . Following [AKKN16, MNPW19, RW26], one first analyzes the algorithm under an idealized mixing assumption, and then complements this analysis with a mixing dichotomy: whenever the mixing assumption fails, the instance can be solved by a different, faster algorithm. The algorithm of [RW26], as well as ours, relies on a more technically involved form of this dichotomy. Nonetheless, throughout this overview the reader may keep in mind the simplest form of the mixing assumption, which is the easiest to analyze: the sums are pairwise distinct over all representations .
In this case, one can avoid listing all sums as follows. Pick a random prime of size near , and then a uniformly random residue modulo .
-
List all with and all with ; denote these sets by and , respectively.
-
Find and such that is a solution.
With suitable hashing parameters and repetitions, a representation survives with high probability. In each trial, the expected filtered list sizes are roughly and , up to polynomial factors.
When and are sufficiently structured, and can be listed in time roughly , together with the cost of generating suitable partial lists, so this part can run well below . However, another technical problem arises: if , then step 2 becomes harder, since one must sift out the pseudosolutions, i.e., pairs with but .
The insight of [RW26] is that a carefully optimized algorithm for detecting true solutions can be used to speed up certain generalized subset sum problems. As an illustrative application, consider the case where the coefficient vector may range over . In [MNPW19], the authors showed how to beat the meet-in-the-middle bound by taking and . Then [RW26] improved this exponent by taking and to be carefully chosen subsets of larger sets,
The values of are given by the following table:
\begin{array}{c|ccc}{{{a_{i}\backslash b_{i}}}}&{{{-2}}}&{{{-1}}}&{{{0}}} \\{{{\hline0}}}&{{{-2}}}&{{{-1}}}&{{{0}}} \\{{{1}}}&{{{-1}}}&{{{0}}}&{{{1}}} \\{{{2}}}&{{{0}}}&{{{1}}}&{{{2}}} \\\end{array}where the entries in bold are those with . Since a true solution must lie in , the relevant compatibility matrix is
P_{\mathrm{RW}}=\begin{array}{c|ccc}{{{a_{i}\backslash b_{i}}}}&{{{-2}}}&{{{-1}}}&{{{0}}} \\{{{\hline0}}}&{{{0}}}&{{{1}}}&{{{1}}} \\{{{1}}}&{{{1}}}&{{{1}}}&{{{1}}} \\{{{2}}}&{{{1}}}&{{{1}}}&{{{0}}}\end{array}.Sifting out pseudosolutions in step 2 thus leads to the following algorithmic problem: given sets of vectors and , find and such that the corresponding entry of is 1, i.e., for every . Randolph and Węgrzycki [RW26] call this problem compatibility testing; they designed a fast compatibility testing algorithm for , which improves the exponent obtained in [MNPW19]. One of our key technical contributions is a different choice of representation, whose compatibility matrix admits a surprisingly fast testing algorithm.
1.2 Algorithm overview
We now describe our algorithm at a level of detail sufficient to verify its running time; Sections 2–4 give the formal proof. Throughout, denotes the binary entropy function, with .
The representation and its compatibility matrix. We represent as with and , using
For , let be the set of vectors with exactly nonzero entries. The values of are given by the following table:
\begin{array}{c|ccc}{{{a_{i}\backslash b_{i}}}}&{{{-1}}}&{{{0}}}&{{{1}}} \\{{{\hline0}}}&{{{-1}}}&{{{0}}}&{{{1}}} \\{{{1}}}&{{{0}}}&{{{1}}}&{{{2}}} \\\end{array}where the entries in bold are those with . Accordingly, the compatibility matrix is
and compatibility testing asks, given and , whether some and satisfy , i.e., whether the corresponding entry of is 1.
Relabeling the columns via , , and , and ordering them as , turns into the partial match matrix
P_{1}=\frac{\begin{array}{c|ccc}{{{0}}}&{{{1}}}&{{{*}}} \\{{{\hline0}}}&{{{1}}}&{{{0}}}&{{{1}}} \\{{{1}}}&{{{0}}}&{{{1}}}&{{{1}}}\end{array}},where * is a wildcard matching both 0 and 1. Under this relabeling, becomes the set of queries with exactly wildcards. Thus compatibility testing for our representation is exactly partial match. A key technical ingredient of our algorithm is the following lemma for the “half-stars” case .
Lemma 1.2 (Proposition 4.2). There are nonnegative constants and a constant with such that the compatibility for can be tested in time
Without the requirement , the lemma would be trivial: the pair is achieved by letting each query enumerate all completions of its wildcards. As we show below, beating this trivial bound by any positive constant already yields a faster subset sum algorithm.
Other support densities reduce to by padding.
Corollary 1.3. For , compatibility for can be tested in time
Proof sketch. Append dummy pairs , which are always compatible, to every left and right vector. The padded vectors have length , and exactly of the query positions are specified, which is half. Apply Lemma 1.2.
The search space. We use representations only on the first coordinates, which we call the prefix, and plain meet-in-the-middle on the remaining ; this lets us balance the asymmetric costs of the two sides. For a parameter chosen below and a support density , let
so that
We run the algorithm for every possible value of s. We remark that the constant 1/3 is not essential for a qualitative improvement; the representation region only needs to be sufficiently small.
Mixing case: many correct keys. Fix a solution c. The representations with differ only on the prefix, and each binary prefix of determines . Let be the number of distinct subset sums of the first input numbers. The mixing assumption discussed above corresponds to the perfect case , in which all representations of have distinct keys . We replace it by the weaker assumption that is large, and determine below how large it needs to be.
We first observe that some support layer contains many distinct keys. Pair each binary prefix of with its complement . The corresponding vectors and have prefix support sizes and , respectively, and the prefix sums of and add up to the total prefix sum, which is fixed. Hence at least distinct prefix sums have a representation with prefix support size at most , so some layer contains distinct correct keys.
Since we run over all s, it suffices for the algorithm to succeed in this layer. We hash the keys modulo a random prime of size near , as described above. The surviving lists A, B then have expected sizes roughly
and they can be generated from meet-in-the-middle partial lists in time close to their sizes.
We then apply Corollary 1.3 with to the prefixes of the surviving vectors, grouping them by their complete integer key so that compatibility and the target-sum condition are checked together. Using , the expected cost is, up to subexponential factors,
Choosing
balances the two terms, and their common exponent is
Since for and , this exponent is increasing in . Its maximum, attained at , is therefore at most
using . Consequently, we beat by an exponential factor whenever for some constant .
We remark that the formal proof uses a slightly different hash function, which avoids some technicalities arising when the input integers have up to bits.
Mixing dichotomy. When is small, we instead use the few-sums meet-in-the-middle procedure of [AKKN16], which runs in time . For a threshold ,
• if , the procedure of [AKKN16] takes time at most ;
• otherwise, the many-sums procedure above takes time at most .
Choosing makes both exponents . Thus subset sum can be solved in time . Our circuit gives , yielding the exponent of Theorem 4.1.
1.3 Partial match via depth-2 circuits
Finally, we briefly explain how we obtain the partial match algorithm of Lemma 1.2. We use the framework of Alman and Li [AL25], which turns a depth-2 circuit for a matrix into an algorithm.
Depth-2 circuits. Let be a large, implicitly given 01 matrix. Given a subset of the row indices and a subset of the column indices, both much smaller than and , we want to decide whether some has ; this is compatibility testing for .
A depth-2 linear circuit for is simply a matrix factorization . It can be viewed as a circuit computing : the input passes through a layer of middle gates, each computing a linear combination of the inputs, and then to the outputs. The relevant measure here is the pair of degrees: the circuit has degrees if every row of has at most nonzero entries and every column of has at most nonzero entries.
Given such a circuit, a simple algorithm solves compatibility testing in time , up to the cost of arithmetic. Writing , we obtain
and by the degree bounds, the two vectors on the right have at most and nonzero entries, respectively. When the factorization holds over the integers, the left-hand side is exactly the number of compatible pairs; we call such circuits EXACT circuits.
Many known compatibility testing algorithms implicitly construct such a circuit, with the caveat that their arithmetic is over the Boolean semiring rather than the integers; we call these OR circuits. For example, the Orthogonal Vectors algorithm of [NW21] covers the Orthogonal Vectors matrix by combinatorial rectangles, each of which is a rank-one 01 matrix, that is, a single middle gate.
The partial match matrix. Partial match corresponds to taking and restricting the columns to ; after the relabeling above, this is the matrix of Section 3.1. For , the trivial algorithm noted after Lemma 1.2 corresponds to a circuit with degrees 1 and , in which each completion of a query is a gate connected to a single row. Interestingly, OR circuits do not help in this regime: a simple combinatorial argument [BFK81, FV82] shows that is optimal for them. Our improvement comes from a genuinely integer construction that exploits algebraic cancellation, balancing a random covering argument against inclusion-exclusion. The construction is technically involved, and we defer the details to Section 3.
1.4 Organization
Section 2 reduces subset sum to a counting algorithm for “half-stars” partial match (Theorem 2.2). Section 3 constructs such an algorithm from depth-2 circuits, and Section 4 combines the two with explicit parameters to prove Theorem 4.1: subset sum can be solved by a randomized algorithm in worst-case time .
2 Reducing subset sum to partial match
Formally, an instance of subset sum consists of integers and a target , and the task is to find with , or to report that none exists. We assume that the total binary length of the input is , and all running times count bit operations.
Throughout this section, denotes the binary entropy function, with . For a subset sum instance with , the prefix consists of the first coordinates, and denotes the number of distinct subset sums of . For , the left key of is and the right key of is ; thus is a solution if and only if the two keys are equal and .
2.1 Partial match
Let , with rows indexed by 0, 1 and columns by 0, 1, *. For , put . Thus if and only if for every , that is, matches every specified position of ; denotes the Kronecker product [AL25, Section 3.1].
Definition 2.1 (Keyed half-stars partial match). We call a pair an admissible exponent pair if for every there is a deterministic algorithm which, given a list of pairs with and a list of pairs with and , where the keys are integers of bit length at most , outputs the number of pairs with and , in time
Clearly admissibility is closed upward: if is an admissible exponent pair, and , then is also admissible.
2.2 The reduction
Theorem 2.2. Suppose is an admissible exponent pair and for some . For every , subset sum has a randomized algorithm in time .
Proof of Theorem 2.2. Add at most five zero inputs so that . It suffices to prove the exponent with arbitrarily small additive slack. Thus we may use rational upper approximations to and a rational lower approximation to , preserving the inequality and charging the resulting loss to less than . Relabel these approximations as . Use the algorithm of Definition 2.1 with slack less than .
Enumerate all subset sums of the prefix and retain one representative of each of the distinct sums.
Few distinct sums. Use the argument of [AKKN16, Lemma 3.2]: combine the representatives with outside coordinates and apply meet-in-the-middle [HS74] against the remaining coordinates. The list sizes are and . Including preprocessing and bit arithmetic, the time is
Many distinct sums. We use representations [HGJ10] only on the prefix: , using and . Combining representations on a subset with meet-in-the-middle outside it, according to whether that subset generates many or few sums, appears in [AKKN16, Section 3]; see also [MNPW19, Section 3.2]; [RW26, Sections 2.1–2.2].
For each , require exactly nonzero prefix entries of . Split the outside coordinates into blocks of sizes and . The conceptual left list is binary on the prefix and first outside block; the right list is ternary on the prefix with the required support size, and binary on the second outside block. Both are zero elsewhere. Thus
Only records passing the filter below are actually generated.
In a prefix coordinate, precisely when row bit matches query symbol for , respectively. Prepend dummy pairs of input weight zero. The resulting row and query have length , with exactly half the query positions specified. The dummy positions always match.
Choose within a constant additive error of
For example, compute this expression in polynomial time to error less than , take the floor, and clip to . Since , the exact expression is already in , so this changes list sizes by only a constant factor. The two unscreened partial match costs balance at an exponent at most
The slack of Definition 2.1 adds less than to this exponent.
Many correct keys. Fix a solution c. Each binary prefix a determines b := c - a. Complementing a changes the support size of this b from k to , and maps its prefix sum to the total prefix sum minus that sum. Consequently, at least distinct prefix sums have a representation with : every sum without one has a distinct complementary sum with one. Among the layers, some layer therefore has at least distinct correct keys. Placing the outside part of c on the designated sides merely translates these keys by a fixed amount.
Filtering. We filter records by their keys k, the left key for a and the right key for b. Choose the smallest power of two , and put
Choose independently and uniformly modulo , and keep a key when . This is a multiply-add-shift filter [Die96]; we prove the needed independence property directly.
Each key survives with probability . Candidate keys differ by at most . For distinct keys put . Then and , since both are powers of two. Conditional on the first hash value being , remains uniform, so the second value is uniform on the coset . Exactly of its values lie in . Survival events are therefore pairwise independent; equal keys always survive together.
If counts surviving correct keys in the good layer, then and . Cauchy–Schwarz gives
By linearity of expectation, filtering reduces the expected partial match cost by a factor of at least .
Generating the surviving records. Use the meet-in-the-middle enumeration idea of [MNPW19, Lemma 3.8]. Split the prefix into equal halves, and each outside block into halves differing in size by at most one. Enumerate partial assignments. On the right enumerate only half-prefixes with at most nonzeros, grouping them by their support size. Sort the first partial list by . For each second partial contribution , report entries in the cyclic interval on the left, or on the right, modulo . Each is a union of at most two ordinary intervals. On the right search only the group whose support count completes . Preserve all assignments, including equal residues.
This takes time proportional to the partial lists plus the reported records, times for arithmetic and sorting. Reporting costs are covered by the partial match cost, which is at least linear in the numbers of records. A binary partial list has at most entries. The number of right half-prefixes is at most
After adjoining its outside variables and substituting , a right partial list has exponent at most , using , , and .
Counting and recovery. Write for the padded row and query. Run the algorithm of Definition 2.1 on the surviving records, keying by the left key of and by the right key of . Since the dummy positions always match, it returns
the exact number of compatible pairs with equal keys. A positive count permits repeated bisection of the two record lists, always retaining a half with positive count. After such tests one pair remains; verify its sum and compatibility. Keys have bits.
A deterministic time bound. For one attempt in a fixed layer the expected cost is at most
The list-size formulas, rational survival probability, and the fixed algorithm of Definition 2.1 provide a computable upper bound on this expectation. Abort after times that bound. Markov's inequality loses at most success probability, so the good layer succeeds before the cutoff with probability at least for sufficiently large . Perform independent attempts per layer; failure is at most . Small lengths can be solved exhaustively.
Use the few-sums procedure when , and the many-sums procedure otherwise. At this threshold both principal costs are because
The right partial-list exponent is smaller by ; preprocessing and binary partial lists are also smaller. Rational approximation, the slack of the partial match algorithm, polynomial repetitions, and input arithmetic fit within the prescribed . The cutoffs hold for every random outcome, proving the worst-case bound.
3 Depth-2 circuits and a faster partial match algorithm
3.1 Preliminaries
A depth-2 linear circuit has a middle-gate set and computes [JS13, Section 1.2]; [AL25, Section 3.2]. It is an exact integer circuit, or circuit, for a 01 matrix if have integer entries and over the integers. The gates incident to a row are the with , and those incident to a query are the with ; the nonzero entries are their coefficients. The circuit size is , where counts nonzero entries. Define and ; omitting the endpoint means taking its maximum.
Besides exact integer circuits, we compare the following models, with all products taken over the integers.
| Model | Allowed coefficients | Requirement for computing a 01 matrix |
|---|---|---|
| PAR | ||
| OR | ||
| all integers | ||
| all integers |
Here PAR denotes a partition into all-one rectangles.
For , put , so that . Let restrict to queries with , retaining all rows.
Let consist of the pairs for which, for every and all sufficiently large , an circuit for has degrees at most and . Our objective is to reduce .
For , put , with ; thus is the binary entropy function. For a string and a symbol , let count the occurrences of in .
Colored volume. Remove middle gates with no incident edge on either side. A coloring uses only nonempty color classes. Let retain all endpoints and just the gates of color . Its colored volume is
3.2 The Fredman–Volper circuit
For , the covering lemma of [FV82, Lemma 2] gives a family of -subsets covering all -subsets, with
Choose one from this family. For each and , create a gate and set
Exactly one gate contributes to a matching pair. This is a PAR circuit with degrees and , giving .
The weighted-rectangle method of [BFK81, Theorem 1], specialized to partial match in [FV82, Equations (8)–(16)], gives the matching OR lower bound. Split the middle gates into two classes according to whether their rectangles contain at least rows or fewer than this threshold. In the first class, at most coordinates are constant across all rows of a rectangle. Every query in that rectangle must specify only such coordinates, so the rectangle has at most columns. Each row belongs to at most rectangles of this class. In the second class, each rectangle has fewer than rows, and each column belongs to at most such rectangles. The matrix has rows, columns, and ones. Bound the first class's total area by summing over rows and the second class's by summing over columns. Their rectangles cover all the ones, so dividing by the number of ones gives
For an asymptotically feasible OR pair with , take and then let . This yields . Consequently, the optimal PAR and OR value of is for , and otherwise, attained by . At it is .
3.3 From circuits to partial match algorithms
Lemma 3.1. For even and integer , a circuit for gives an integer circuit for with
Proof of Lemma 3.1. Split the coordinates into blocks of length . Describe a query by the numbers of specified positions in these blocks; there are at most descriptions. For a fixed description, sort the blocks by these numbers, breaking ties by position, and deal them cyclically into groups of blocks. If are the sorted numbers, define the group totals by
Their average is . Append 2k zero bits to each row group, and append zeros and the remaining number of stars to its query group. Each enlarged group now has exactly specified positions; all new positions match. Restrict to these embeddings. Use disjoint middle gates for different descriptions: a row uses every description, whereas a query uses only its own. This proves the bounds and preserves exactness.
Corollary 3.2. For and , there are deterministic algorithms which, given respectively or with , enumerate its incident gates and coefficients in a common exact integer circuit computing matching on these endpoints. Their times are and . Gate names and coefficients have bits.
Proof of Corollary 3.2. Fix a sufficiently large even and hardcode a circuit for with degree exponents . Choose so that
Pad to . Append zero row bits and query zeros, with stars elsewhere. These counts are valid because . Apply Lemma 3.1 to the -fold tensor power of the hardcoded circuit. Neighbors are Cartesian products of its finite adjacency lists, together with the descriptions from Lemma 3.1. Processing a description or a reported gate takes polynomial time in . The degree exponents are at most , , and , so the remaining slack pays for this processing. A gate name records choices from fixed finite sets; an edge weight is a product of fixed integers.
Corollary 3.3. Every pair in is an admissible exponent pair.
Proof of Corollary 3.3. Let and , and let and the common circuit be as in Corollary 3.2. Given and , enumerate the incident gates and coefficients of every record, and label each resulting entry by the pair of its key and gate. Sort the entries by label, sum the coefficients separately on each side for every label, and output
where the identity holds because equals on these endpoints. Gate names and coefficients have bits, so all intermediate sums have bits, and sorting costs only a polynomial factor in .
Boolean factorizations with small average endpoint degrees support compatibility testing in [NW21, Definition 6.4 and Lemma 6.5], whose Remark 4.14 links an exponential improvement for the relevant Orthogonal Vectors problem to one for subset sum. Our compatibility test uses maximum endpoint degrees of exact integer factorizations; compare [RW26, Sections 2.4–2.5]; [AL25, Section 7].
3.4 Colored volume, hole fixing, and rebalancing
Numerical rebalancing. The rebalancing approach builds on [JS13, Lemma 4.2]; [AGP23, Sections 2 and 4]; [Ser22, Section 2]. We use the numerical rebalancing argument of [AL25, Appendix B, Lemmas B.2–B.4 and Theorem B.2] in the following list form. For a fixed finite family of nonempty lists with entries at least one, put , , and
Suppose a list attaining the minimum at has termwise, and one attaining it at has the reverse inequalities. Then
uniformly over , with the error depending only on the fixed family. This is the numerical statement extracted from their proof: that proof uses the lists and endpoint monotonicity, independently of their matrix interpretation. The power follows from . We give the circuit interpretation needed here below.
Lemma 3.4. Let be continuous. Suppose that for every there is a fixed such that, for all sufficiently large multiples of some fixed even integer, the submatrix of with
has a colored exact integer circuit satisfying for every . If and
then
Proof of Lemma 3.4. Apply the window hypothesis with , and extend its circuit by zero at missing endpoints. In the “half-stars” query layer, the omitted fraction on either side is , by binomial concentration. Coordinate permutations and simultaneous flips of row bits and specified query bits preserve matching and act transitively on each side. Hole fixing [AL25, Theorem 6.1 and its proof] therefore assembles the full matrix from restricted, permuted copies of the window circuit. The proof partitions the matrix into disjoint rectangular regions, so the copies sum exactly, without double counting. Permutations and restrictions preserve integer coefficients and cannot increase any color’s degrees within a copy. Add the copy index to each color; the constant number of copies costs at most for large .
Fix a sufficiently large even , divisible by the required integer, and take . Adjoin the single-color circuits and . Their degree pairs are and , respectively. All active degrees are at least one, so these circuits attain and satisfy the numerical endpoint conditions. Their volume exponents are at most and .
For each available circuit , use its color-degree pairs as the list . Inductively, for every there is a circuit for with . For use the one-gate circuit for (1). At the root choose circuit , and write , where is computed by its color subcircuit. For color , use the induction hypothesis at weight to choose a circuit for . Tensor the color subcircuit with and concatenate the results. They compute
and their weighted degree is at most . Minimizing over proves the recurrence. A color may contain many gates; it is not being treated as a rank-one term.
The hypothesis gives . Take in the numerical bound. The two degrees are at most and . Lemma 3.1 reduces the length to ; its extra exponents tend to zero as . Padding as in Corollary 3.2 handles all lengths. First choose small and large, then let grow. This proves membership in ; Corollary 3.2 supplies fixed enumeration algorithms.
3.5 An EXACT circuit with
Fix rational with and . Initially take divisible by four and by their denominators, rows with , and queries with .
Choosing . Uniformly order all -subsets. For each query choose the first leaving exactly an zeros and an ones outside, and put . A random set succeeds with probability . Keep a prefix of the ordering of length the ceiling of times its reciprocal, or the entire ordering if shorter. A union bound covers every query with positive probability.
Expanding on the complement. On the complement,
where . Put , so .
Lookup sets of size . Independently for every and every admissible , uniformly order the -subsets of . Assign each -subset to the first superset in this ordering. Keep a prefix of length the ceiling of
or the whole ordering if shorter. These prefixes cover all required U with positive probability. Their lengths are independent of D. Group the monomials by their assigned Q:
Gates. Create middle gates for , and , with
Each monomial belongs to exactly one . For fixed endpoints, only and contribute, so the expansion proves exactly over . Reading the extra coordinates in adds no matching constraints. Formally setting , hence , recovers the lookup circuit of Section 3.2.
Colors. Remove gates with a zero side. The color of a gate is , where and . Nonzero right coefficients require : a contributing monomial needs ones on all positions of . There are colors. For a fixed color, all contributing monomials have the same sign.
Shared orderings and degree bounds. Both covers use shared orderings, fixed to satisfy the coverage and sampling requirements below.
Right Degree. Inside there are stars. Choose the zero-symbol positions added to to form ; its assigned is then fixed. Choose the remaining ones in . Counting a gate once for each contributing monomial can only overcount, so
Left Degree. We need only the following consequence of [Hoe63, Theorem 4]. If is the sum of entries sampled uniformly without replacement from a finite list in of mean , then for . The elementary symmetric mean of the numbers is at most the th power of their arithmetic mean: pairwise averaging preserves their sum and increases the elementary symmetric polynomial. Hence , and Markov's inequality proves the claim.
Fix a row and color. Apply this fact with first to each prefix, with weights indicating . Then apply it to the prefix, with weights equal to these conditional probabilities. The resulting bound is
The cardinality is the same for every . Choosing a uniform and then a uniform makes uniform among all -subsets. Hence, for a central row,
All coverage and sampling requirements number , each failing with probability at most , so fix orderings satisfying them simultaneously. Substitution gives
A volume bound. For the parameters selected below, the following strict inequalities hold:
They make the third left-degree term dominate the first two at exponential scale, for every color. For the second term use and ; for the first use concavity to obtain . Thus Stirling's estimates and the polynomial number of colors give , uniformly in , where
Extending to central windows. Keep . For a nearby query type the first covering denominator becomes , while the right-degree bound is unchanged. A row of weight changes the probability estimate by at most the factor . By continuity, a sufficiently narrow fixed window changes the exponents by less than any prescribed , uniformly over colors and . Construct the circuits separately for each pair of row weight and query type, and add this pair to the color. There are only polynomially many pairs. This supplies the window circuits of Lemma 3.4.
4 Putting everything together
Theorem 4.1. Subset sum has a randomized algorithm taking bit operations in the worst case, where . If a solution exists, it returns one with probability at least 99%; otherwise it returns . It never returns an incorrect solution.
We instantiate the circuit of Section 3.5 at explicit parameters, convert it by Lemma 3.4 and Corollary 3.3 into a partial match algorithm, and apply Theorem 2.2.
The function V is convex, being a maximum of affine functions of . We use only its values at , and replace it by the two line segments joining these values. Convexity makes this an upper bound on all of .
Take the following exact rational parameters, obtained by truncating a numerical optimum to 26 decimal places:
They satisfy the strict conditions of Section 3.5 and . The anchor values can be computed without further relaxation. At maximize the two right-side entropy terms; at maximize , which is increasing up to because . Therefore
At , the maximum over is attained at , and . The remaining objective is strictly concave in . Its unique maximum satisfies
equivalently . Substituting this root into the displayed definition of gives the middle anchor.
Let be the intersection of the first anchor segment with , and the intersection of the second with . Explicitly,
The computed values satisfy . The secant joining and lies above the two-segment bound between its endpoints, above to their left, and above to their right. Write it as , where
Lemma 3.4 therefore gives , and Corollary 3.3 shows that is an admissible exponent pair. Only the circuit at this one fixed pair and the two trivial circuits are used.
All following values were recomputed at the exact parameters above, with more than 40 digits of precision. Each displayed decimal is truncated after 20 places; ... denotes the continuation of the exact value defined by the formulas, and is not part of a finite decimal bound.
| Quantity | Value |
|---|---|
| 0.49268569663735450584... | |
| 0.24997913372377961141... | |
| 0.00757766963945240565... | |
| at the middle anchor | 0.00069649211514613618... |
| at the middle anchor | 0.00092865615352818158... |
| 0.33168260605143320534... | |
| 0.50137304583751125366... | |
| 0.00727587055962990941... | |
| 0.49268405898808998771... | |
| 0.24997996477385994856... | |
| 0.00002003522614005143... | |
| 0.49999777386376221650... |
Numerical certificate. These decimal prefixes and the strict inequalities were also checked with rational interval arithmetic. For reproducibility, round each interval operation outward to a grid, enclose the quadratic root by integer square roots, and evaluate logarithms after binary rescaling using
for , so ; compute by the same formula, undo rescaling by adding the appropriate integer multiple of , and divide by to obtain . Evaluate the root as . The resulting enclosures have width less than and certify every displayed prefix, the dominance conditions in Section 3.5, and .
Proposition 4.2. The pair above is an admissible exponent pair, and with .
Proof. Admissibility follows from Lemma 3.4 and Corollary 3.3 as shown above, and the bound on is certified by the interval computation.
Finally, choose the specific slack in Theorem 2.2. The same interval calculation certifies
The theorem already includes enumeration, input arithmetic, repetitions, and worst-case cutoffs. It therefore gives the claimed bit-operation bound and success probability at least 99%, proving Theorem 4.1.
AI disclosure and timestamps
In July and August 2026, we were developing a general theory of depth-2 linear circuits, building on [JS13], [AL25], and [Ye26]. In August, while looking for applications, we found reductions from GSS through the representation technique of [NW21] and [RW26]. We knew that GSS could break meet-in-the-middle if a suitable circuit at achieved .
On 5 September, GPT-6 Pro constructed the first circuit in our project achieving this improvement. From 5 to 28 September, we worked to incorporate the new GSS result into the existing theory. We shifted from to ; the broader criterion allows any fixed , comparing with the corresponding OR benchmark rather than always with .
On 28 September, around 5–6 a.m. Beijing time, GPT-6 Astra ultra found a reduction showing that ordinary subset sum could also break meet-in-the-middle using the same circuit improvement. This marks the ordinary subset sum breakthrough. Record 3 contains a detailed reduction at 06:22, and the numerical candidate 0.499664500303 ... at 06:42, where the complete formal proof is explicitly still pending.
We then pursued the simplest self-contained proof, even at a substantial cost in the exponent. The manuscript locked on 4 October at 02:49 gives a worst-case randomized algorithm. Record 6 reports computational reproduction at 03:51 that morning.
Imagine you are given two sets of symbols along with a compatibility relation. Two arrays are compatible when their respective symbols are compatible at every position. The compatibility test is a computation task with two collections of arrays and a channel: each array acts individually, emitting records, to learn whether there are—or how many—compatible arrays on the other side.
Two important problem families are closely related to this test: Orthogonal Vectors (OV) straightforwardly, and GSS, for different C, through representation-technique reductions. Our thesis is that depth-2 linear circuits are the right framework to characterize, understand, and obtain substantial improvements for compatibility testing and problems reducible to it.
The broader project's contributions include:
-
New perspectives on depth-2 linear circuits. A deeper understanding of their theory and design, including an algorithmic enumeration interface for attainable circuit bounds [Theorem 3.6 of the broader draft].
-
Improved disjointness circuits and counting-OV algorithms. Upper bounds and .
-
Conditional reductions for Equal Partition and GSS, at target 0, to circuit measures of and , respectively: even a strict improvement in the specified SUP model over the relevant OR construction would break meet-in-the-middle.
These broader statements are announced here without proofs. The simplified subset sum proof is in Sections 1–4; the records also contain preliminary claims and subsequent corrections.
All timestamps are Beijing time (UTC+8) from original message metadata. The earlier history is retrospective. These records were made public on 7 October 2026. Reading order: ; Records 4 and 5 overlap.
| Record | Link | Original message range, 2026 |
|---|---|---|
| 3 | Computation Trees Criterion | Sep 16, 14:34–Sep 28, 06:48 |
| 1 | View recent files | Sep 28, 07:16–07:31 |
| 2 | View project conversations | Sep 28, 18:03–Sep 30, 23:39 |
| 4 | Recover the improved P1 construction | Oct 1, 03:46–Oct 4, 02:49 |
| 5 | Conceptual simplification | Oct 3, 05:57–19:07 |
| 6 | Reproduce correctness check | Oct 4, 03:46–03:51 |
References
[AGP23] Josh Alman, Yunfeng Guan, and Ashwin Padaki. Smaller low-depth circuits for Kronecker powers. In Proceedings of the 34th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4159–4187. Society for Industrial and Applied Mathematics, 2023. doi:10.1137/1.9781611977554.ch160. ↑13
[AKKN16] Per Austrin, Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Dense subset sum may be the hardest. In Proceedings of the 33rd Symposium on Theoretical Aspects of Computer Science (STACS), volume 47 of Leibniz International Proceedings in Informatics (LIPIcs), pages 13:1–13:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016. doi:10.4230/LIPIcs.STACS.2016.13. ↑2, ↑6, ↑8
[AL25] Josh Alman and Baitian Li. Kronecker powers, orthogonal vectors, and the asymptotic spectrum. In Proceedings of the 66th IEEE Annual Symposium on Foundations of Computer Science (FOCS), pages 1411–1441. IEEE, 2025. doi:10.1109/FOCS63196.2025.00074. ↑6, ↑7, ↑10, ↑12, ↑13, ↑18
[BBSS20] Xavier Bonnetain, Rémi Bricout, André Schrottenloher, and Yixin Shen. Improved classical and quantum algorithms for Subset-Sum. In Shiho Moriai and Huaxiong Wang, editors, Proceedings of the 26th International Conference on the Theory and Application of Cryptology and Information Security (ASIACRYPT), volume 12492 of Lecture Notes in Computer Science, pages 633–666. Springer, 2020. doi:10.1007/978-3-030-64834-3_22. ↑1
[BCJ11] Anja Becker, Jean-Sébastien Coron, and Antoine Joux. Improved generic algorithms for hard knapsacks. In Kenneth G. Paterson, editor, Proceedings of the 30th Annual International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT), volume 6632 of Lecture Notes in Computer Science, pages 364–385. Springer, 2011. doi:10.1007/978-3-642-20465-4_21. ↑1
[BFK81] Walter A. Burkhard, Michael L. Fredman, and Daniel J. Kleitman. Inherent complexity trade-offs for range query problems. Theor. Comput. Sci., 16(3):279–290, 1981. doi:10.1016/0304-3975(81)90099-2. ↑6, ↑11
[Die96] Martin Dietzfelbinger. Universal hashing and k-wise independent random variables via integer arithmetic without primes. In Claude Puech and Rüdiger Reischuk, editors, Proceedings of the 13th Annual Symposium on Theoretical Aspects of Computer Science (STACS), volume 1046 of Lecture Notes in Computer Science, pages 567–580. Springer, 1996. doi:10.1007/3-540-60922-9_46. ↑9
[FV82] Michael L. Fredman and Dennis J. Volper. The complexity of partial match retrieval in a dynamic setting. J. Algorithms, 3(1):68–78, 1982. doi:10.1016/0196-6774(82)90009-8. ↑6, ↑11
[HGJ10] Nick Howgrave-Graham and Antoine Joux. New generic algorithms for hard knapsacks. In Henri Gilbert, editor, Proceedings of the 29th Annual International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT), volume 6110 of Lecture Notes in Computer Science, pages 235–256. Springer, 2010. doi:10.1007/978-3-642-13190-5_12. ↑1, ↑2, ↑8
[Hoe63] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. J. Am. Stat. Assoc., 58(301):13–30, 1963. doi:10.1080/01621459.1963.10500830. ↑15
[HS74] Ellis Horowitz and Sartaj Sahni. Computing partitions with applications to the knapsack problem. J. ACM, 21(2):277–292, 1974. doi:10.1145/321812.321823. ↑1, ↑8
[JS13] Stasys Jukna and Igor Sergeev. Complexity of linear boolean operators. Found. Trends Theor. Comput. Sci., 9(1):1–123, 2013. doi:10.1561/0400000063. ↑10, ↑13, ↑18
[MNPW19] Marcin Mucha, Jesper Nederlof, Jakub Pawlewicz, and Karol Wegrzycki. Equal-Subset-Sum faster than the meet-in-the-middle. In Proceedings of the 27th Annual European Symposium on Algorithms (ESA), volume 144 of Leibniz International Proceedings in Informatics (LIPics), pages 73:1–73:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPics.ESA.2019.73. ↑1, ↑2, ↑3, ↑8, ↑9
[NW21] Jesper Nederlof and Karol Wegrzycki. Improving Schroeppel and Shamir's algorithm for Subset Sum via Orthogonal Vectors. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 1670–1683. ACM, 2021. doi:10.1145/3406325.3451024. ↑2, ↑6, ↑12, ↑18
[Ope26] OpenAI. Subset Sum in time , 2026. Preprint dated 4 October 2026. URL: https://github.com/openai/math/blob/main/preprints/Subset-Sum-in-Time-2-power-0-49n-October-4-2026/subset-sum.pdf. ↑1
[RW26] Tim Randolph and Karol Wegrzycki. Beating meet-in-the-middle for subset balancing problems. In Proceedings of the 58th Annual ACM Symposium on Theory of Computing (STOC), pages 1314–1325. ACM, 2026. doi:10.1145/3798129.3800841.↑1, ↑2, ↑3, ↑8, ↑12, ↑18
[Ser22] Igor S. Sergeev. Notes on the complexity of coverings for Kronecker powers of symmetric matrices, 2022. arXiv:2212.01776. ↑13
[SS81] Richard Schroeppel and Adi Shamir. A , algorithm for certain NP-complete problems. SIAM J. Comput., 10(3):456–464, 1981. doi:10.1137/0210033. ↑2
[Ye26] Lixi Ye. Improved depth-2 linear circuits for disjointness via quenched Lyapunov exponents, 2026. Preprint, version 2, 3 September 2026. arXiv:2603.15565v2. ↑18