Manuscript Offprint
arXiv:2609.10516Subexponential Approximation of the Permanent in Deterministic Polynomial Time
Abstract
We give the first deterministic polynomial time algorithm that approximates the permanent of arbitrary nonnegative rational matrices within a subexponential factor. For a matrix of order , the approximation factor is
All previously known deterministic polynomial time guarantees for unrestricted inputs had approximation factors .
Our proof uses convex optimization to tighten an upper bound on the permanent. The bound is based on weighted sums over all matchings in a bipartite graph representing the matrix, and correlations between unmatched vertices control its error. We approximate these sums deterministically using correlation decay and a bound on the effect of vertex deletion.
*Supported by the 2026 Apple Scholars in AI/ML PhD fellowship.
Contents
1 Introduction 1
2 Technical overview 3
2.1 Constructing an upper bound by choosing edge weights 3
2.2 The approximation theorem from two ingredients 4
2.3 Bounding the approximation error using unmatched rows 6
2.4 Counting through correlation decay 8
2.5 Finding the weights by subgradient steps 11
3 Related work 12
4 Preliminaries 13
4.1 Matchings and their probabilities 14
4.2 Convex optimality and subgradient steps 16
5 The permanent approximation algorithm 18
6 Optimizing the matching partition function 21
6.1 Removing the constraints by normalization 22
7 Counting matchings under a fixed budget 23
8 Optimization with normalized weights 26
References 31
A Numerical details 34
A.1 Directed evaluations and rational endpoints 34
A.2 Absorbing the box width's dependence on n 35
B Amplification to a relative approximation 35
C The all-ones example 37
D Reduction to zero-one matrices of degree at most three 38
where is the set of permutations of . A nonzero entry can be viewed as the weight of an edge joining row to column . The permanent is then the total weight of perfect matchings: ways of assigning every row to a distinct column. For zero-one matrices it counts feasible assignments, and for general weights it also normalizes the probability distribution on assignments in which each assignment has probability proportional to the product of its edge weights.
Exact evaluation is #P-complete even for zero-one matrices [Val79b]. In contrast, Jerrum, Sinclair, and Vigoda [JSV04] gave a randomized fully polynomial time approximation scheme: a relative approximation with running time polynomial in the input length and inverse accuracy. A deterministic scheme remains open. Even substantially weaker deterministic guarantees are of interest, since they measure progress toward removing randomness from a central approximate counting problem.
The deterministic problem has seen a sequence of improvements over nearly three decades. Beginning in 1998, Linial, Samorodnitsky, and Wigderson [LSW00] used matrix scaling to obtain an approximation. Subsequent work reduced this factor [Gur05, Sam08, GS14]. Anari and Rezaei [AR25] reached , and recent preprints of Anari [Ana26] and Narang and Perkins [NP26] improve the base below . Table 1 summarizes this progression. Despite these improvements, the best guarantees for unrestricted inputs remained exponential in .
| Year | Work | Approximation factor |
|---|---|---|
| 1998 | Linial–Samorodnitsky–Wigderson [LSW00] | |
| 2005 | Gurvits [Gur05] | , any fixed |
| 2006 | Samorodnitsky [Sam08] | |
| 2014 | Gurvits–Samorodnitsky [GS14] | |
| 2018 | Anari–Rezaei [AR25] | |
| 2026 | Anari [Ana26] and Narang–Perkins [NP26] | , absolute |
| This work | Theorem 1.1 |
Table 1: Progress in deterministic polynomial time approximation of the permanent of arbitrary nonnegative rational matrices. Factors bound for estimates when the permanent is positive. Asymptotic bounds are for sufficiently large . Years indicate first dissemination. The 2014 base refines the bound originally stated by Gurvits and Samorodnitsky [GS14], as noted by Anari–Rezaei [AR25, Section 1.1, footnote 3]. The polynomial degree in the 2005 row may depend on the fixed .
We give the first deterministic polynomial time approximation within a subexponential factor for arbitrary nonnegative rational matrices. In particular, our guarantee is , so it eventually improves on every fixed exponential factor with .
Computational model. Each entry of is given as a nonnegative integer numerator and a positive integer denominator, both written in binary. Let denote the total length of this description. All running times count bit operations on a deterministic Turing machine. Thus polynomial time means polynomial in the description length. For example, an entry requires bits. Rational parameters and output endpoints use the same representation. We write bits for the encoding length of a rational number and poly for a polynomial of absolute degree.
With the computational model in place, we can now state our main result. A bipartite matching test on the nonzero entries of detects in polynomial time whether . In that case we return zero. Henceforth we assume .
Theorem 1.1 (Polynomial time approximation). There is a deterministic algorithm that, given an explicitly encoded of total bit length , returns positive rational numbers such that
The algorithm uses poly(S) bit operations.
The error per row, , tends to zero. In particular, it answers a question of Anari and Rezaei [AR25, Section 1.1]: the infimum of constants for which a polynomial time approximation is possible is 1.
The algorithm gives the following more general tradeoff.
Theorem 1.2 (Approximation versus running time). Let be given explicitly with total bit length . The analyst may choose any rational parameters and . For each such choice, a deterministic algorithm returns positive rational numbers satisfying
Its running time in bit operations is
The polynomial degree and the implicit constant are absolute.
Increasing reduces the first error term in (1), at the cost of a larger running time bound in (2). The parameter controls numerical accuracy: as we explain in Section 5, errors in optimization, estimation, and rounding together contribute at most to the logarithmic interval width. For fixed and , the running time is polynomial in the input length S.
Taking of order and of order gives Theorem 1.1. With an additional sparsity assumption, the same method gives a stronger guarantee: if every row and column
The notation means for an absolute constant C.
has at most nonzero entries, for fixed , the logarithmic width improves to , as stated in Corollary 5.1. Here hides a multiplicative constant that may depend on the fixed degree bound , but not on or the matrix entries.
For any requested accuracy , a relative approximation returns positive rational endpoints with , or equivalently logarithmic width at most . A deterministic fully polynomial time approximation scheme (FPTAS) achieves this in time polynomial jointly in the input encoding length and .
In Appendix B, we use amplification by disjoint copies [LSW00, AR25] to prove that a deterministic polynomial time approximation, for any fixed , would imply a deterministic FPTAS. disjoint copies have permanent . Taking an th root reduces the logarithmic error to , so polynomially many copies in and inverse accuracy give a relative approximation scheme. This amplification does not turn our logarithmic saving into an FPTAS. In Corollary B.3, we use the reduction in Appendix D to show that a deterministic polynomial time approximation even for zero-one matrices with at most three ones per row and column would imply a deterministic fully polynomial time approximation scheme for general nonnegative rational matrices.
2 Technical overview
We will approximate the permanent by a sum over all matchings at new edge weights. The weights must make this sum close to the permanent, after accounting for the change of weights, and allow efficient computation. We first show how these ingredients give the main theorem, then develop the arguments that establish them.
2.1 Constructing an upper bound by choosing edge weights
Our plan is to approximate the sum over perfect matchings by a sum over all matchings. We begin by explaining how changing the edge weights can improve this approximation and how to account for the change in our upper bound on the permanent.
For positive edge weights , let
be the matching partition function, where the empty matching contributes one. Since perfect matchings are included, upper bounds per. Gamarnik and Katz [GK10] used this approach for zero-one matrices. After uniformly increasing the edge weights, they use expansion of the support graph to bound the total weight of imperfect matchings relative to that of perfect matchings. Conditioning on whether a vertex is unmatched or matched to each of its neighbors gives a deletion recursion. As Section 2.4 explains, bounding the sum of edge weights at each vertex makes errors contract through the recursion, allowing efficient approximation. We therefore seek an accurate upper bound under this constraint.
Consider with . Multiplying every entry by favors larger matchings, because a matching with edges gains a factor . Dividing the resulting sum by gives an upper bound on the original permanent, but its approximation factor is
Keeping this factor bounded requires at least of order . The larger edge then has weight of that order, which can increase the time needed to approximate .
We can do better by adjusting the edges separately. Give both edges weight 3. The four matchings now have weights 1,3,3,9, so their sum is 16. The perfect matching originally had weight and now has weight 9. Multiplying the final sum by restores its original contribution and gives the upper bound . The new edge weights remain bounded even when is very small.
For a general matrix, different perfect matchings change by different factors. We work on the edges that occur in a perfect matching. All matchings below use edges in . Write and for the products of their original and new edge weights. Multiplying by the largest ratio gives enough compensation for every perfect matching at once. Thus
There are two sources of overestimation. We include imperfect matchings, and the largest ratio may compensate some perfect matchings more than necessary. Our task is to choose weights that control the combined loss.
Tracking the change in the permanent under reweighting is also central to the matrix-scaling algorithm of Linial, Samorodnitsky, and Wigderson [LSW00]. Row and column scaling changes every perfect matching by the same factor. Independent edge changes can give different ratios , so (3) uses the largest ratio.
Taking logarithms turns this choice into convex optimization. Let and define the logarithm of the upper bound by
The maximum over perfect matchings is the assignment term. It equals the logarithm of the compensation factor in (3). Both terms are convex (Fact 4.10). Minimizing therefore searches for the best upper bound of the form (3).
2.2 The approximation theorem from two ingredients
We have constructed the convex objective , whose exponential upper bounds the permanent. We now identify the guarantees needed to make this bound accurate and efficient to compute, and show how they give the main theorem.
We impose a budget on the sum of auxiliary edge weights at each vertex: for every . Increasing the budget can improve the upper bound but increases the running time.
Write , so increasing by multiplies the budget by . We use to quantify the improvement as increases. Define
The analytic ingredient, Lemma 6.1, is
Thus minimizing over gives an approximation factor . For , the all-ones example in Appendix C attains this order of logarithmic error.
We use the distribution in which each matching has probability proportional to the product of its edge weights. For weights meeting the budget , the algorithmic ingredient, Theorem 7.1, computes to additive error and the probabilities that individual edges are used to relative error , for , in time
The polynomial factor has a fixed exponent, independent of , , and the number of neighbors at a vertex.
The analytic and algorithmic ingredients thus pull in opposite directions: increasing the budget improves the approximation factor but increases the running time. Ideally, we would take for a fixed , so that the analytic bound gives a factor . A polynomial time algorithm with this guarantee would yield a fully polynomial time approximation scheme by the amplification argument in Appendix B. However, appears in the exponent of (7), so the running time bound does not guarantee polynomial time for this choice.
By (6), minimizing over gives the desired approximation factor. Proposition 8.1 finds weights with and objective value within any requested additive error of . For objective error , the number of applications of Theorem 7.1 is polynomial in the input length and . The required tolerances preserve the parameter dependence in the running time below. Section 2.5 explains the search, and Section 5 accounts for its running time.
Once the weights are chosen, we evaluate the upper bound in (3). We use Theorem 7.1 to approximate . For the compensation factor , we approximate each edge cost to the required accuracy and compute a perfect matching of maximum total cost in polynomial time.
We choose both the optimization error and the logarithmic evaluation error as , matching the analytic error. Exponentiating the computed upper bound on , with upward rounding, gives . The gap at the constrained optimum, the loss from approximate minimization, and the evaluation error add on the logarithmic scale, so
Dividing by the guaranteed approximation factor gives the lower endpoint .
Finding the weights and evaluating their upper bound has total running time
Taking of order makes the exponent , so the running time is polynomial. At this choice, the logarithmic approximation error is , which gives Theorem 1.1. Section 5 gives the rational endpoint construction and the constants in Theorem 1.2.
2.3 Bounding the approximation error using unmatched rows
We have seen how (6) and Theorem 7.1 would give the main theorem. We now show that for budget . We will bound this gap using the expected number of unmatched rows at an optimizer.
Choose weights whose logarithms minimize over . For a matching drawn with probability , let be the expected number of unmatched rows. The estimate we need is . To see why it suffices, suppose we also know
Thus bounds the decrease in per unit increase in .
The limiting optimum is . Scaling the input by gives , which tends to because the leading coefficient of is . For fixed , these weights are feasible for every sufficiently large budget . If both estimates hold for every , we can bound the total decrease from to this limit. Applying (8) on successive small intervals and adding the resulting bounds gives
How the optimum changes with the budget. The integral reduces the approximation bound to two estimates about the optimal weights. We first prove (8): raising the budget from to can lower the optimum by at most , even after reoptimizing the weights. We start by scaling all weights by the same factor, then use convexity to account for changes in their ratios. Let specify proposed weights . Dividing by their largest sum at a vertex and multiplying by gives
The resulting weights have largest sum at a vertex. The vector is unrestricted for every . We evaluate our logarithmic upper bound at these weights by setting
For fixed , increasing by multiplies every weight by . The weight of a matching is multiplied by , while the compensation factor in (3) is divided by , because every perfect matching has edges. Put and give probability . Dividing the new upper bound by the old one gives
For , contributions from perfect matchings stay unchanged, while contributions from matchings missing more edges decrease faster.
This also explains why normalization preserves the optimum. If , the proposed weights already satisfy the budget. Normalization scales them by , which cannot increase the upper bound. Since every normalized vector is feasible,
Let and put . Hold fixed in the formula for . Its expectation equals one at . Differentiating the finite sum multiplies each term by , so the rule gives
To prove (8), we must also allow the ratios between edge weights to change at the larger budget. Lemma 6.4 shows that is jointly convex in and . The subgradient calculation in Section 6 shows that, at a minimum in , a supporting affine function has zero slope in the -coordinates and slope in . Joint convexity therefore gives, for every alternative choice ,
Minimizing this inequality over , and using that a larger budget cannot increase the optimum, proves (8).
Why few rows remain unmatched. We have proved (8), which bounds the decrease in as the budget grows. It remains to show that the optimal weights leave at most rows unmatched on average, where . A large budget alone does not force matchings to be large: feasible weights could still be tiny on most edges. We need to use the fact that the weights minimize our upper bound.
Fix optimal weights under budget , and draw with probability . Write . Each matching leaves exactly rows unmatched. This count is the sum of one indicator for each row, equal to one when that row is unmatched and zero otherwise. By linearity of expectation,
Each indicator has expectation equal to the probability that its row is unmatched. Counting unmatched columns in the same way gives . Since a matching uses at most one edge in each row, . To bring this row sum up to one, we need to add . Column similarly needs an additional .
We introduce a matrix to relate these missing probabilities to the edge weights. Its entry is an amount added to , so that every row and column of sums to one. Because minimizes under budget , such a nonnegative exists on the existing edges and satisfies
(9)
The proof of Lemma 6.3 defines in (29) and proves these row and column sums and the bound on each entry. Summing the first equality gives . Thus bounding the total of these additions will bound the expected number of unmatched rows. The last inequality connects each addition to its edge weight, allowing us to use the correlation bound below.
We next relate the weight of an edge ij to the probability that both endpoints remain unmatched. If a matching leaves and unmatched, adding gives a matching that uses this edge. Conversely, removing from any matching that uses it leaves both endpoints unmatched. These operations are inverse to each other. Since matching weights are products of edge weights, . Summing over the corresponding matchings gives
Dividing both sides by , the total weight of all matchings, turns the sums into probabilities:
The two unmatched events are positively correlated, by Heilmann and Lieb [HL72] (Fact 4.5), so their joint probability is at least . Combining this correlation bound with (9) gives
Thus, the weights required to accommodate the unmatched probabilities also force edges to be used. Summing and applying weighted Cauchy–Schwarz (Fact 4.1) gives
Here . The row terms in the denominator sum to
Equation (11) and its column analogue give the denominator . Since , (10) implies
2.4 Counting through correlation decay
Minimizing over gives an upper bound within a factor of the permanent. We now estimate and edge probabilities whenever the edge weights at each vertex sum to at most the budget . The goal is the running time in (7), with the number of neighbors at a vertex kept out of the exponent. We follow the recursive method of Bayati et al. [BGK 07], and adapt the contraction analysis of Sinclair et al. [SS Y17] to unequal edge weights.
On a graph with at most vertices and weights , draw with probability and write . A subscript uses the matching distribution after deleting , with the remaining weights unchanged. We use the deletion argument of Bayati et al. [BGK07, Propositions 2.2 and 3.1]. The same decomposition allows unequal edge weights, as in Fact 4.3.
Matchings leaving unmatched are exactly the matchings of , with unchanged weights. A matching containing consists of that edge and a matching of , with an extra factor in its weight. Dividing the total weight in each case by gives
Deleting vertices one at a time makes these ratios cancel. Since the empty graph has partition function one, is the reciprocal of the product of the resulting unmatched probabilities. The second identity recovers each edge probability from two unmatched probabilities.
To compute , separate all matchings according to whether is unmatched or matched to a neighbor . These cases give
Dividing by and using the first identity above gives
Repeated substitution in (12) produces a tree whose nodes are paths starting at with no repeated vertices. A child extends its parent's path by one edge to a vertex not yet visited. This is the self-avoiding walk tree used in Godsil's identity [God81]. Sinclair et al. [SSSY17, Theorem 2.1] state the equality of unmatched probabilities for a common edge weight. Here each tree edge inherits the weight of the graph edge that extends the path. The full tree gives at its root, since it follows the same recursion (12).
We stop at depth , substitute 1 for unresolved probabilities, and evaluate upward. The value 1 treats each unresolved vertex as certainly unmatched, so it gives an upper bound on its unmatched probability. In (12), increasing an input enlarges the denominator and decreases the output. Each level therefore reverses the direction of the error: the root estimate is an upper bound on when is even and a lower bound when is odd.
We next bound the size of this error. Vertex deletion preserves , so all unmatched-vertex probabilities in the recursion lie in . Fact 4.7 measures error by the difference between transformed values . Each recursion step shrinks the largest input error by . This shrinking influence of distant inputs is correlation decay [BGK 07, SS Y17].
To choose the depth, we compare the remaining error with the requested accuracy . On the allowed interval, ranges from 0 to , so the error in at each leaf is at most . Write for the value computed at the root. After levels, repeated contraction gives
for an absolute constant . Here we used and . To make the last expression at most , it is enough that . We can therefore choose
for a sufficiently large absolute constant .
The derivative bound in Fact 4.7 shows that this also gives . Exponentiating, the ratio lies between and , so the relative error is at most for . This holds for any choice of leaf values in the allowed interval.
The obstacle is branching. A vertex can have neighbors, so expanding every edge can cost . Choose a threshold and expand recursively only edges of weight greater than . There are at most such edges at a vertex. Smaller edges must still contribute to the denominator. For a star with edges of weight , for example, the weights of all matchings sum to 2, even though each edge is small.
For smaller edges, we reuse computations on the input graph , which may already have some vertices deleted. For each depth, store an approximate unmatched probability for every vertex of . On a large edge, recurse with the current vertex deleted. On a small edge, use the stored answer for its neighbor in at one smaller depth. For example, following a large edge deletes . A small edge then asks for , for which we reuse an approximation to . Initialize depth zero answers at one and compute the arrays in increasing depth. Both edge types decrease the remaining depth by one, so stored answers are available. Only large edges generate additional recursive branches.
There are two errors to control. Replacing each computed answer by the probability it approximates gives an update using the current smaller graph on large edges and on small edges. Contraction in bounds this change, including the errors in stored answers. The remaining error comes from forgetting deletions on small edges and is controlled by
To prove this bound, we construct a joint distribution of two matchings, one in and one in , with each having its graph's matching distribution. Such a joint distribution is called a coupling. The random matchings are used only in the proof. The algorithm uses (13) to bound the error of its deterministic recursion and never samples these matchings.
The construction in Lemma 4.4 specializes the recursive method of Chen and Gu [CG24, Algorithm 1]. The matching in leaves unmatched with probability and uses the edge with probability for each neighbor . If is unmatched, use the same matching from in both graphs. If is matched to , recursively couple matchings in and , then add to the latter. Each matched case extends the disagreement by one edge, giving at most one alternating path from . Only the other endpoint can change unmatched status outside . Each probability difference is at most the chance of a disagreement there. Summing these bounds gives the expected number of disagreements, at most regardless of the number of neighbors. For bipartite graphs, the preliminaries derive positive correlation of unmatched events on opposite sides from this coupling. The deletion bound holds on general graphs, so Theorem 7.1 applies to them as well.
Applying (13) at each of successive deletions and adding gives total change at most on surviving vertices. The denominator error is therefore at most . A denominator has transformed output , whose derivative is at most 2. Thus the error is also in . At level , at most vertices have been deleted, and propagation to the root contributes . An induction therefore bounds the root error by
The first term comes from stopping the recursion. For the second, . Taking of order makes this error . The branching is then polynomial in and , giving (7) at the chosen depth. Section 7 gives the induction and bit complexity.
The recursion and contraction are standard. Deletion stability permits the shared computations on small edges and removes the degree from the exponent.
2.5 Finding the weights by subgradient steps
We have proved (6) and explained how to obtain the estimates in Theorem 7.1. It remains to find weights with and objective value at most above , for . We minimize the normalized objective using the estimated edge probabilities to compute subgradient steps. We follow the projected subgradient method and averaging analysis in Bubeck [Bub15, Section 3.1], adapting the directions and rounding to these estimates.
To bound the number of subgradient steps, we need a bounded box containing a nearly optimal point. Start from optimal feasible weights and set
where is a sufficiently small constant multiple of . Since , the vector lies in for and . Normalizing gives weights , where . Raising the small weights increases by at most and cannot increase the assignment term. Restoring the budget adds at most to the objective. Lemma 8.2 proves that the total increase is at most . Thus the box contains a point whose normalized objective value is at most .
A subgradient of a convex function at gives an affine lower bound: for every . At , Lemma 6.4 gives a subgradient of :
Here is the incidence vector of a perfect matching maximizing , gives the probabilities that individual edges belong to the matching at the normalized weights, and . Choose a vertex at which the edge weights sum to . The vector assigns probability to each of its incident edges and zero elsewhere. The term comes from differentiating in the logarithmic weights, which gives the edge probabilities. Both and have nonnegative entries summing to , so the subgradient norm is at most .
Starting at , let be this subgradient at and take steps
where clipping truncates each coordinate to the interval.
Fact 4.11, with radius at most and subgradient norm at most , specifies a step size . After steps, the average iterate has objective value within of the optimum. We return its normalized weights and evaluate the permanent upper bound once at the end.
With rational arithmetic, we obtain approximate directions from assignment solutions and estimated edge probabilities. We round the directions toward zero on a common rational grid, then compute the clipped steps exactly. This keeps the iterates' encoding lengths polynomial. Corollary 4.13 accounts for the errors in the directions. Since , relative accuracy gives total error in these edge probabilities at most . Across a box of width , the resulting error in the inner product in the subgradient inequality is . Thus relative error of order keeps the objective error within . Section 8 gives the numerical choices and bit complexity.
3 Related work
The permanent and convex approximation. Several deterministic approaches to permanent approximation use convex optimization. For the Bethe permanent, Schrijver's inequality [Sch98] and Gurvits's variational formulation [Gur11] give a lower bound on the permanent. Vontobel [Von13] established its concave optimization formulation and graph-cover interpretation. Anari and Rezaei [AR25] proved that the Bethe permanent approximates the permanent within a factor of .
Recent improvements to the Bethe bound. Recent preprints of Anari [Ana26] and, independently, Narang and Perkins [NP26] obtain deterministic polynomial-time approximations for unrestricted nonnegative matrices, for an absolute . Both exploit nearly isolated weighted blocks when the upper bound on the ratio of the permanent to the Bethe permanent is nearly tight. Anari combines a stability analysis with a lower bound on the permanent obtained by pairing rows and using stable polynomials. Narang and Perkins identify and peel weighted blocks, then compare the permanents and Bethe objective values of the original and an auxiliary matrix. Our approach optimizes an upper bound formed from the partition function over matchings of every size and compensation for the change of weights. Our approximation guarantee improves as the allowed sum of edge weights at each vertex increases.
Stronger guarantees under additional assumptions. The recent preprint of Dong and Jain [DJ26] proves the sharp approximation factor for the Bethe permanent when the bipartite support graph has girth at least an even integer . This already gives a subexponential factor when the girth tends to infinity. Yi's recent preprint [Yi26] gives a deterministic fully polynomial-time relative approximation scheme when every row and column has at least nonzero entries and all nonzero weights lie in , for fixed . This includes positive matrices whose weights lie in a fixed positive interval. The proof uses entropy scaling and Gaussian truncation, with running-time exponents depending on the fixed parameters.
Other recent directions include elimination-based upper bounds for structured matrices [LP25], asymptotics obtained from graph covers for positive block-constant matrices [WV26], and approximation on biased random complex matrices [KL26].
Matching algorithms and the ingredients we use. Gamarnik and Katz [GK10] approximate the permanent of zero-one matrices whose bipartite graphs have bounded degree and fixed positive expansion. They give every edge the same large weight and count matchings of all sizes. Larger matchings receive more weight, and expansion supplies short paths along which imperfect matchings can be enlarged. This bounds the total weight of imperfect matchings relative to that of perfect matchings, giving a polynomial time approximation for each fixed . We choose weights separately by convex optimization and bound the approximation error using the expected number of unmatched rows at the optimal weights, without assuming expansion.
To approximate the weighted sum of matchings, we use the recursion of Bayati et al. [BGK⁺07]. It computes the probability that a vertex is unmatched using probabilities in graphs with vertices deleted. Correlation decay bounds the effect of errors in distant recursive calls, allowing the recursion to stop early. Their algorithm gives a deterministic fully polynomial time approximation scheme when the maximum degree and the common edge weight are fixed. Sinclair et al. [SSŞY17] improved the analysis of how errors shrink through the recursion. We use their change of variables to measure error, with a calculation for unequal positive edge weights.
To handle vertices with many neighbors, we also need to bound how much deleting a vertex changes the probabilities that other vertices are unmatched. We sample a matching in and a matching in together so that their differences follow a single path. Comparisons along such paths already appear in van den Berg [van99]. Our construction specializes the recursive coupling of Chen and Gu [CG24, Algorithm 1]. Yoshida and Zhang [YZ26, Section 4.2.2] also bound changes in which vertices are matched, for a common edge weight. Counting vertices matched in only one of our two matchings bounds the sum of absolute changes in unmatched probabilities. On bipartite graphs, the same construction gives the classical correlation inequalities of Heilmann and Lieb [HL72]. We use the bound on probability changes to control the error from reusing computations on edges of small weight, keeping the number of neighbors out of the exponent of the running time. The resulting algorithm, stated in Theorem 7.1, applies to general graphs.
At a minimizer of the normalized objective, we use these correlations to bound the expected number of unmatched rows. Danskin's theorem [Ber09, Proposition A.3.2(b)] gives optimality conditions that we use to bound how changes with . The algorithm uses projected subgradient averaging [Bub15, Theorem 3.2], with a short adaptation for approximate edge probabilities and rounded directions. We state both results in the preliminaries. Our analytic contribution is the bound on in (6). The proof combines convexity of the normalized objective, its optimality conditions, and correlations between unmatched vertices. Our algorithmic contribution is to use the deletion bound to reuse computations on small edges while keeping the dependence on graph size polynomial.
4 Preliminaries
We collect the matching identities and convex optimization facts used in the main proof.
Notation. Logarithms are natural unless indicated otherwise. The notation hides an absolute multiplicative constant, and means both and . A subscript permits dependence on that parameter. We write bits for the binary encoding length of a rational number, and . Exponentials of edge vectors are coordinatewise and have zero entries outside the specified support. Every unspecified polynomial has absolute degree.
Fact 4.1 (Weighted Cauchy–Schwarz). For nonnegative weights and positive numbers ,
provided at least one is positive.
Proof. Apply Cauchy–Schwarz to the vectors with entries and .
4.1 Matchings and their probabilities
Let be a finite simple graph, with no loops or parallel edges. Write for the graph after deleting vertices . For positive edge weights , recall , including the empty matching, and let . For , write and . The latter is also called a monomer probability. We omit or when fixed, and a subscript denotes weights . Expectations use the same convention.
For the permanent problem, the graph is bipartite with parts of size , and is the support after removing edges in no perfect matching. Put . Let be the nonnegative matrices with row and column sums one and zeros outside .
Fact 4.2 (Perfect matchings and assignment [Sch17]). The polytope is the convex hull of the incidence matrices of perfect matchings in . For edge costs ,
For rational costs, a maximizing perfect matching can be computed in polynomial time.
This fact allows the assignment term of to be evaluated efficiently and describes the convex combinations that occur in its optimality conditions.
Fact 4.3 (Deletion recursion). For positive edge weights,
If orders the vertices and , then .
The weighted version follows by partitioning matchings according to whether u is unmatched or matched along an incident edge, and the last identity telescopes. These formulas recover the partition function and edge probabilities from unmatched probabilities.
We next give a coupling that explains how deletion changes unmatched probabilities. The construction specializes the recursive coupling method of Chen and Gu [CG24, Algorithm 1] to ordinary matchings with positive edge weights. We count the vertices along its alternating path that are matched in only one matching. Yoshida and Zhang [YZ26, Section 4.2.2] also control changes in matched vertex sets, for a common edge weight.
Lemma 4.4 (Coupling under deletion). For every vertex , there is a coupling such that when leaves unmatched. Otherwise, is a single simple alternating path starting at . Exactly one vertex other than then has different unmatched status in the two matchings.
Proof. Induct on the number of vertices and write . Choose the status of according to its Gibbs probabilities, with probability for unmatched and for matched to a neighbor . In the unmatched case, draw and set . In the other case, apply the inductive coupling to obtain and , and set . These are the conditional laws of given the status of , so . Every branch gives the same law .
In the matched case, the inductive symmetric difference is empty or is a simple alternating path starting at with an edge of . Adding extends it to such a path from with an edge of . The path remains simple because is absent from . Its internal vertices are matched in both matchings, and only its endpoints change unmatched status.
The correlation signs below follow from the Heilmann–Lieb path identity [HL72, Theorem 6.3, p. 213], restated by Spier [Spi23, Lemma 8]. We prove them using the coupling above.
Fact 4.5 (Bipartite monomer correlations). Suppose is bipartite. For , let indicate that is unmatched in . For distinct vertices , on opposite sides and on the same side. In particular, for every edge ,
Proof. Use Lemma 4.4. If its path ends on the opposite side from , it has odd length and ends with an edge of . That endpoint is therefore unmatched in and matched in . An endpoint on the same side has the reverse change. Thus has the claimed sign. Conditioning on being unmatched gives the matching distribution on , so
For the edge identity, inserting gives a bijection between matchings leaving both endpoints unmatched and matchings containing , multiplying their weight by . The correlation inequality gives the lower bound.
The coupling also bounds the total change in unmatched probabilities on general graphs. This bound lets the algorithm in Theorem 7.1 reuse computed probabilities.
Lemma 4.6 (Deletion stability). For every vertex of a finite simple graph with positive edge weights,
with equality when is bipartite. For every deleted vertex set ,
Proof. In the coupling, there is one disagreement outside exactly when matches . Hence
On a bipartite graph, the sign of each change is fixed by the side of the vertex, so equality holds. To delete a set , remove its vertices one at a time and sum the changes only over vertices outside . Each deletion contributes at most 1 by (15). The triangle inequality then gives (16).
The matching recursion contracts in the coordinate below, which is a constant multiple of the matching message of Sinclair et al. [SSŞY17, Section 5]. We give the short calculation for unequal edge weights, using the weighted deletion recursion in Fact 4.3.
Fact 4.7 (Contraction of the matching recursion). Let , and
For nonnegative weights with , put . For ,
Moreover,
Proof. Writing , differentiation and weighted Cauchy–Schwarz give
The scalar expression is maximized when . The box is convex, so the derivative bound proves the claimed contraction. Direct calculation gives (17).
4.2 Convex optimality and subgradient steps
For a convex function , a vector is a subgradient at if
Thus gives the slope of an affine lower bound that agrees with at . Write for the set of subgradients. A point minimizes if and only if . At a differentiable point, the gradient is the only subgradient.
We use the following elementary calculus rule to differentiate partition functions and to prove convexity after normalizing the edge weights. Its convexity assertion is the log-sum-exp composition rule of Boyd and Vandenberghe [BV04, Example 3.14].
Fact 4.8 (Log-sum-exp calculus). For convex functions , the function is convex. If the are differentiable, then
Proof. For , convexity of the and Hölder's inequality give
Taking logarithms proves convexity. Differentiating the finite sum gives the gradient formula. □
For matchings, the functions in the exponent are , where is the incidence vector of , and the probabilities in the fact are . Hence . Increasing every coordinate of at unit speed changes at rate .
The normalized objective is a maximum of finitely many smooth convex functions. The following finite form of Danskin's theorem describes its subgradients, including at points where several functions attain the maximum.
Fact 4.9 (Danskin's theorem [Ber09, Proposition A.3.2(b)]). Let be convex and differentiable, and put . Then
In particular, a point minimizes f if and only if zero belongs to this convex hull.
These two facts give the convexity and sensitivity of the objective defined in (4).
Fact 4.10 (Convexity and sensitivity of the permanent upper bound). The function is convex. If is the incidence matrix of a perfect matching maximizing over , then is a subgradient of at . In particular,
Proof. Fact 4.8 gives the convexity and gradient of . Fact 4.9 gives the subgradient of the convex assignment term. The edge probabilities sum to at most , and an assignment has edges. Thus the subgradient has norm at most .
To compute the weights, we use projected subgradient steps and average the queried points. We first state the averaging theorem for exact subgradients and projections, then account for numerical errors.
Fact 4.11 (Projected subgradient averaging [Bub15, Theorem 3.2]). Let be nonempty, compact, and convex, and let be convex. Suppose , for every , and every subgradient of at a point of has Euclidean norm at most , where . For an integer , set and iterate
where is Euclidean projection. Then
The adaptation uses the projection inequality from the same analysis. For a box, projection clips each coordinate to its allowed interval.
Fact 4.12 (Projection inequality [Bub15, Lemma 3.1]). Let be nonempty, compact, and convex. For every and ,
An error in each supporting inequality contributes the same error to the averaging bound. The next corollary is the version used by the rational algorithm.
Corollary 4.13 (Averaging with approximate directions). Let be nonempty, compact, and convex, and let be convex. Fix , an integer , , and . Suppose and directions satisfy, for every ,
and
Then, with ,
Proof. Fact 4.12 and the approximate supporting inequality give
Sum over , divide by , and apply convexity at .
5 The permanent approximation algorithm
We restate the main results and first deduce the polynomial time theorem from the parameterized tradeoff. We then prove the tradeoff from its analytic and algorithmic ingredients. Recall that matrix entries and rational parameters are represented by binary numerators and denominators.
Theorem 1.1 (Polynomial time approximation). There is a deterministic algorithm that, given an explicitly encoded of total bit length , returns positive rational numbers such that
The algorithm uses poly(S) bit operations.
The notation means for an absolute constant .
Theorem 1.2 (Approximation versus running time). Let be given explicitly with total bit length . The analyst may choose any rational parameters and . For each such choice, a deterministic algorithm returns positive rational numbers satisfying
Its running time in bit operations is
The polynomial degree and the implicit constant are absolute.
Here bounds the sum of auxiliary edge weights at each vertex, and sets numerical accuracy. For the proofs below, we may assume that is sufficiently large.
Proof of Theorem 1.1 assuming Theorem 1.2. Apply Theorem 1.2 with and . Its interval has logarithmic width , and the exponential factor in its running-time bound is . Choose
These integers are computable from bit lengths, and . The running time is therefore polynomial, and , as claimed.
For the tradeoff, we use the bound on the optimized objective in Lemma 6.1, the algorithm in Theorem 7.1, and the minimization algorithm in Proposition 8.1. We first deduce the tradeoff from these ingredients. The next three sections bound , develop the counting algorithm, and show how to choose the weights. Recall that
where sums the weights of all matchings in , and the maximum ranges over perfect matchings in . The value is the minimum of over .
Proof of Theorem 1.2 from the three ingredients. Remove edges belonging to no perfect matching.
Approximating . It is enough to compute, within the claimed running time, a rational with
To obtain endpoints from , first compute a rational error bound with
Then . Round downward to a positive rational and upward to a rational , allowing logarithmic error at most at each endpoint:
Thus and , as required in (1). The directed evaluations in Appendix A compute these endpoints with polynomial encoding length. It remains to construct .
Reducing the computation of to approximate minimization of . Compute rational with on . For analysis, let on this support and zero elsewhere. The optimization algorithm takes the rational vector as input. Every perfect matching has edges, giving
Set and apply Proposition 8.1 with objective tolerance . It supplies positive rational weights satisfying
By Lemma 6.1,
Choosing therefore bounds the analytic error by the term in (1).
Constructing from the weights. Evaluate using Theorem 7.1 and the assignment term using rational lower bounds for . Together these give a rational upper estimate with
The assignment uses edges, so logarithmic accuracy per weight and additive accuracy for suffice. The input approximation in (21), the optimization, and this evaluation each contribute at most . Combining these errors with the bound from Lemma 6.1 gives
This proves (20) and finishes the endpoint construction.
Running time. The number of applications of Theorem 7.1 is polynomial in the input and parameter encoding lengths and . In each application, for every vertex . We optimize over , where . Use relative tolerance . Theorem 7.1 then gives the exponential factor
The extra contributes only an absolute polynomial factor in , by (38). The number of optimization steps and all remaining work are polynomial in the input length, , and , with absolute degree. The encoding bounds in Proposition 8.1 therefore prove (2).
Corollary 5.1 (Fixed maximum degree). For every fixed , there is a deterministic polynomial time algorithm for nonnegative rational matrices with at most nonzero entries per row and column that returns an interval containing the permanent, with positive rational endpoints and logarithmic width .
Proof. Use the fixed-degree version of Theorem 7.1. At and , the exponential factor becomes . Taking , with as above, makes this polynomial and gives the stated interval width.
6 Optimizing the matching partition function
Fix a matrix , and let be its edges that occur in a perfect matching. For each real , the feasible logarithmic weights form the set
Recall that
Lemma 6.1 (Error of the optimized upper bound). For every ,
The expected number of unmatched rows at an optimizer bounds how fast decreases as increases. We first derive Lemma 6.1 from Lemma 6.2 and Lemma 6.3, then prove these two lemmas.
Lemma 6.2 (Attainment). For every real , the minimum defining is finite and attained.
Lemma 6.3 (Deficiency and change in the optimum). Let minimize over , and let be the expected number of unmatched rows for . Then
For every ,
Proof of Lemma 6.1. Each perfect matching has weight in at most times its weight in . Summing and including imperfect matchings gives .
For the upper bound, apply (24) on each interval of a partition of and use (23) at its left endpoint. Letting the mesh tend to zero gives
We next show that as . Let be the largest row or column sum of and put . Then and
The polynomial has degree in and leading coefficient per. Together with the lower bound, this proves . Let in (25) to conclude.
Proof of Lemma 6.2. For each edge of the support, choose a perfect matching containing it. Averaging their incidence matrices gives positive on . Every coordinate of is at most , while
because . On a feasible sublevel set this also bounds every coordinate below, since the other coordinates have a common upper bound. Thus is compact for every . Taking all coordinates sufficiently negative gives a feasible point, so continuity proves attainment.
6.1 Removing the constraints by normalization
Normalization lets us vary while keeping the optimization variables unrestricted. Write
The maximum total edge weight at a vertex is . Define
The next lemma shows that this rescaling preserves convexity. It also identifies the subgradients used in the proof of Lemma 6.3 and in Section 8.
Lemma 6.4 (Convexity after normalization). The function is jointly convex in , is invariant under , and satisfies
At , let be the edge probabilities for weights and put . For a vertex attaining , let be the probability vector with entries on edges incident to and zero elsewhere. If is the incidence matrix of a perfect matching maximizing over , then
These vectors generate the subdifferential by convex combinations. Every subgradient in has norm at most .
Proof of Lemma 6.3. Put and . At , the function has derivative . Thus at some vertex . The vector also minimizes , with the same weights and deficiency.
At a minimum, zero is a convex combination of the x-components in (28). Consequently there are a convex combination of maximizing assignments and a probability distribution on vertices attaining such that
The same combination of joint subgradients is , so for every . Minimizing over proves the upper bound in (24). The lower bound follows from nesting of the feasible domains.
It remains to bound . Write , and let be the row and column sums of . Since is doubly stochastic, these are the unmatched probabilities, and . Equation (29) gives
Here and denote row and column vertices. At a vertex with , the edge weights sum to , so summing its contribution to its own row or column yields and . Therefore
The edge bound in Fact 4.5 now gives
All monomer probabilities are positive at finite weights. Fact 4.1, with weights and numbers , gives
After dividing each row of by its sum, the entries sum to . The same holds for columns. Since , this proves .
Proof of Lemma 6.4. Every assignment has edges. Expanding (27) therefore gives
The coefficients are nonnegative, so every exponent is jointly convex. Fact 4.8 therefore proves joint convexity. Translation invariance follows from normalization. Every normalized vector is feasible. Conversely, normalizing a feasible vector scales its weights up, which cannot increase . This proves equality of the minima, with attainment from Lemma 6.2.
To describe all subgradients, replace in (30) by and fix an assignment . The maximum of these smooth convex functions over is . The empty matching makes the partition expression strictly increasing in , so active pairs are exactly the maximizing vertices and assignments. Applying Fact 4.8 to an active function gives its gradient . Danskin's theorem (Fact 4.9) proves (28) and the convex-hull description. Finally, and each have nonnegative entries summing to , so their difference has norm at most . Convex combinations preserve this bound.
7 Counting matchings under a fixed budget
We need edge probabilities to optimize the weights and to evaluate the resulting upper bound. In the running time bound below, vertex degrees do not enter the exponential factor. We use the recursive method of Bayati et al. [BGK07] and the contraction coordinate of Sinclair et al. [SSŠY17]. The additional step is to reuse values on small edges, with the error controlled by Lemma 4.6.
Theorem 7.1. Let G be a finite simple graph with at most 2n vertices and positive rational edge weights of total encoding length . Suppose the edge weights at each vertex sum to at most a rational . For rational , a deterministic algorithm returns, for every edge , an interval containing of width at most . It also returns an interval containing of width at most . All endpoints are rational. Its running time is
with absolute constants and an absolute polynomial degree. If the maximum support degree is a fixed , the squared logarithm can be replaced by a single logarithm, with constants depending on .
The key step is to approximate vertex monomer probabilities. Write , and set , , and . The deletion recursion in Fact 4.3 puts all unmatched-vertex probabilities on induced subgraphs in .
Lemma 7.2. Under the hypotheses of Theorem 7.1, for rational one can compute with
in time
For fixed support degree , the same assertion holds with a single logarithm and constants depending on .
Proof of Theorem 7.1. Order the vertices as , and put . Apply Lemma 7.2 to the induced graphs in the identities
The number of applications is polynomial, and still holds at every remaining vertex. Take to be a sufficiently small fixed positive rational multiple of . The logarithmic error guarantee gives
The interval for an edge probability has endpoint ratio at most , so the interval width is , and hence at most . There are at most terms in the partition identity. After taking logarithms, the intervals in (31) contribute total width . Round each logarithmic interval outward to rational endpoints, adding at most to its width. The resulting total width is by the choice of . Rational lower and upper bounds for logarithms of positive rationals can be computed using range reduction and convergent power series in polynomial time in the input length and number of requested precision bits.
The running time follows from Lemma 7.2.
Each application of Lemma 7.2 uses a fixed graph , possibly an induced subgraph of the original graph. Both edge types reduce the remaining depth by one. Edges above a threshold create recursive calls, and the other edges read stored answers for with no vertices deleted. The threshold bounds the number of recursive children.
The proof combines contraction (Fact 4.7) with the bound on total change from Lemma 4.6. Use the coordinates and constants from the contraction fact:
Proof of Lemma 7.2. Choose
Let round downward to the grid of spacing in . Both endpoints of belong to this grid. Since on , rounding adds at most to the error in .
For a deleted vertex set and , define . For , define
The unrounded values lie in , so rounding leaves all values in . Compute the arrays , for every vertex , in increasing order of . Expand the first sum recursively and read the second from earlier arrays. After steps along a branch starting at level , the second sum reads the stored array with index . Return .
To bound the error at depth after deletions, put
The three terms account for stopping the recursion, reusing probabilities after deletions, and rounding. We prove simultaneously for every and that
At , the diameter bound in (17) gives error at most . Suppose the claim holds at depth , and write .
First compare the unrounded update in (33) with the update that uses probabilities on edges of weight above and on the other edges. By induction, the former input errors are at most and the latter are at most . The function is nondecreasing, so Fact 4.7 bounds the resulting error by .
Next compare this update with the deletion recursion for . Only the inputs on edges of weight at most change. Their total effect on the denominator is at most
by (16). For a denominator , the transformed output is , whose derivative in t is at most 2. The change of inputs on edges of weight at most therefore contributes at most to the error in . Finally, rounding adds at most . Since , the total error is at most
which proves (34).
Taking and gives
Our choices in (32) bound these three terms by , , and , respectively. For the first term, use and . Their sum is less than , and (17) gives the required logarithmic accuracy.
For the running time, put . Each recursive call has at most children. Computing the stored value therefore uses at most recursive nodes. Over all vertices and levels up to , the total is at most
Scanning the remaining incident edges accesses stored values and takes polynomial time in the graph size per node.
Every recursive output is rounded, so every child value can be represented with denominator . A single update adds rational multiples of the input weights, takes one reciprocal, and rounds to the grid. The intermediate numerators and denominators in that update have lengths polynomial in . Thus each update has polynomial bit cost. The integers and rational threshold also have the required encoding lengths and are computable by integer arithmetic. This proves the stated running time.
For fixed maximum support degree , recurse on every edge incident to the current vertex in , with child deletion set , decreasing and rounding at every step. Fact 4.7 then gives error at most
The number of recursive children is at most , so depth gives the asserted bound with a single logarithm. Each recursive update again has polynomial bit cost.
8 Optimization with normalized weights
We find weights whose objective is close to the optimum. At each iterate, we normalize the edge weights and use edge probabilities to choose a direction. We then average the iterates. The iteration follows projected subgradient averaging [Bub15, Section 3.1]. Corollary 4.13 accounts for the errors in these directions.
Fix a nonempty support in which every edge occurs in a perfect matching. Let be the number of vertices on each side, and put . The input is a rational vector representing logarithms of matrix entries. Define on and zero elsewhere. Recall the normalization from (26) and (27):
After normalization, the largest sum of edge weights at a vertex is . By Lemma 6.4, is convex in , is unchanged by a common translation of its coordinates, and has minimum .
Proposition 8.1. Given , rational , and rational , one can compute positive rational weights such that
Put
The algorithm solves assignment problems and applies Theorem 7.1 as many times. Each application uses and relative tolerance . The assignment problems and all remaining work take time polynomial in the input and parameter encoding lengths and . The returned weights, iterates, and inputs to Theorem 7.1 have encoding lengths polynomial in the input and parameter encoding lengths.
It suffices to optimize over a bounded box containing a point whose objective value is close to the minimum. We state this property and the approximate subgradient guarantee, then deduce the algorithm. Throughout this section, write and .
Lemma 8.2 (A nearly optimal point in Q). There exists such that
Lemma 8.3 (Rational approximate subgradients). For a rational , a procedure returns a rational vector with such that every satisfies
The procedure solves one assignment problem and applies Theorem 7.1 once, with and tolerance . The assignment and remaining work take time polynomial in the input and parameter encoding lengths and the encoding length of x. Its output and the weights used in Theorem 7.1 have encoding lengths polynomial in the input and parameter encoding lengths.
Proof of Proposition 8.1. Start with . Choose as the largest inverse power of two satisfying , and set
At each of the iterations, obtain from Lemma 8.3 and round each coordinate toward zero to a multiple of , obtaining . This preserves the norm bound and changes the direction by at most
Take the clipped step without further rounding:
Since is a box with integer endpoints, this projection uses only rational comparisons and leaves every iterate in . Compute the average
To return rational weights, approximate its exponentials by positive rational numbers with , and set
Thus for every vertex .
We apply the averaging guarantee in Corollary 4.13. Choose as in Lemma 8.2. Rounding changes the inner product with by at most , because . For , (37) therefore gives the supporting inequality with and . Since , it gives
The subgradient bound in Lemma 6.4 makes 2n-Lipschitz in the sup norm. Since the returned weights satisfy , we conclude that
To bound encoding lengths, write in lowest terms and , where . Every step changes each coordinate by a multiple of , and clipping to the integer endpoints preserves this denominator. The iterates lie in , so their encoding lengths are polynomial in the input and parameter encoding lengths. The average has denominator and satisfies the same bound. There are calls to the direction procedure. Its encoding bounds and the final rational normalization prove the remaining claims.
Proof of Lemma 8.2. Let be optimal weights under budget . The proof of Lemma 6.3 shows that the weights at some vertex sum to . Raise every weight below to , and define
Every original weight is at most , and , so . Thus . At most edges meet each vertex, giving .
It remains to bound the change in the objective. For an edge , edge insertion gives
Raising the weights therefore increases by at most . It cannot increase the assignment term, since every cost can only decrease. Normalization maps to the weights
. This scales v down, which decreases and adds to the cost of each perfect matching. Consequently,
Proof of Lemma 8.3. Compute positive rational numbers satisfying . Set
choose a vertex attaining the maximum, and put on its incident edges and zero elsewhere. Thus and . Apply Theorem 7.1 to the rational weights with tolerance . Let be the edge probabilities under and the lower endpoints of the returned intervals. Their relative width guarantee gives
Compute a maximum weight assignment for the rational costs , and return
Both and have nonnegative entries summing to . Hence .
The assignment was computed at . The estimates , and hence , use the rounded weights . To combine the two, write the normalized objective as an assignment maximum plus the convex function :
Here the sum is over all matchings. The function is 1-Lipschitz in the sup norm. A perturbation of size therefore changes each exponent in the sum by at most , proving that is -Lipschitz in this norm.
For analysis, put and . The subgradient formula (28) gives . This vector has nonnegative entries summing to . Since , the Lipschitz bound for and transfer its supporting inequality from to , with error at most :
The maximizing assignment gives the supporting inequality for the second term at x. Moreover,
Adding the two supporting inequalities and using proves (37).
Since throughout the box, a fixed grid whose spacing is an inverse power of two gives the required approximations with bits per coordinate. The directed evaluations in Lemma A.1 compute them in polynomial time. The algorithm in Theorem 7.1 returns intervals containing the edge probabilities with polynomial encoding length. The normalization and the formula for preserve this bound for the returned direction. This proves the remaining claims.
Acknowledgements
The authors would like to thank Farzam Ebrahimnejad and Shayan Oveis Gharan for helpful advice.
References
[Ana26] Nima Anari. Beyond the Bethe approximation of the permanent. arXiv preprint arXiv:2608.28031, 2026. 1, 12
[AR25] Nima Anari and Alireza Rezaei. A tight analysis of Bethe approximation for permanent. SIAM Journal on Computing, 54(4):FOCS19–81–FOCS19–101, 2025. 1, 2, 3, 12, 35
[Ber09] Dimitri P. Bertsekas. Convex Optimization Theory. Athena Scientific, 2009. 13, 17
[BGK 07] Mohsen Bayati, David Gamarnik, Dmitriy Katz, Chandra Nair, and Prasad Tetali. Simple deterministic approximation algorithms for counting matchings. In Proceedings of the 39th ACM Symposium on Theory of Computing (STOC), pages 122–127, 2007. 8, 9, 13, 23
[Bub15] Sébastien Bubeck. Convex optimization: Algorithms and complexity. Foundations and Trends in Machine Learning, 8(3–4):231–357, 2015. 11, 13, 17, 18, 26
[BV04] Stephen Boyd and Lieven Vandenberghe. Convex Optimization. Cambridge University Press, 2004. 16
[CG24] Zongchen Chen and Yuzhou Gu. Fast sampling of b-matchings and b-edge covers. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 4972–4987, 2024. 10, 13, 14
[DJ26] Dingding Dong and Vishesh Jain. Optimal girth-dependent bounds for the Bethe approximation of the permanent. arXiv preprint arXiv:2609.02017, 2026. 12
[GK10] David Gamarnik and Dmitriy Katz. A deterministic approximation algorithm for computing the permanent of a 0,1 matrix. Journal of Computer and System Sciences, 76(8):879–883, 2010. 3, 13
[God81] C. D. Godsil. Matchings and walks in graphs. Journal of Graph Theory, 5(3):285–297, 1981. 9
[GS14] Leonid Gurvits and Alex Samorodnitsky. Bounds on the permanent and some applications. In Proceedings of the 55th IEEE Symposium on Foundations of Computer Science (FOCS), pages 90–99, 2014. 1
[Gur05] Leonid Gurvits. A proof of hyperbolic van der Waerden conjecture: the right generalization is the ultimate simplification. arXiv preprint arXiv:math/0504397, 2005. ECCC TR05-103. 1
[Gur11] Leonid Gurvits. Unleashing the power of Schrijver's permanental inequality with the help of the Bethe approximation. arXiv preprint arXiv:1106.2844, 2011. 12
[HL72] Ole J. Heilmann and Elliott H. Lieb. Theory of monomer-dimer systems. Communications in Mathematical Physics, 25(3):190–232, 1972. 8, 13, 15
[JSV04] Mark Jerrum, Alistair Sinclair, and Eric Vigoda. A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. Journal of the ACM, 51(4):671–697, 2004. 1
[KL26] Frederic Koehler and Pui Kuen Leung. Approximating the permanent of a random matrix with polynomially small mean: Zeros and universality. arXiv preprint arXiv:2604.01367, 2026. 12
[LP25] Aditi Laddha and Madhusudhan Reddy Pittu. An algorithmic upper bound for permanents via a permanental Schur inequality. arXiv preprint arXiv:2509.08121, 2025. 12
[LSW00] Nathan Linial, Alex Samorodnitsky, and Avi Wigderson. A deterministic strongly polynomial algorithm for matrix scaling and approximate permanents. Combinatorica, 20(4):545–568, 2000. Preliminary version in STOC 1998. 1, 3, 4, 35
[NP26] Ijay Narang and Will Perkins. Structural corrections to the Bethe approximation of the permanent. arXiv preprint arXiv:2608.31061, 2026. 1, 12
[Sam08] Alex Samorodnitsky. An upper bound for permanents of nonnegative matrices. Journal of Combinatorial Theory, Series A, 115(2):279–292, 2008. Preprint circulated in 2006. 1
[Sch98] Alexander Schrijver. Counting 1-factors in regular bipartite graphs. Journal of Combinatorial Theory, Series B, 72(1):122–135, 1998. 12
[Sch17] Alexander Schrijver. A course in combinatorial optimization, 2017. Lecture notes, March 23. 14
[Spi23] Thomas Jung Spier. A refined Gallai–Edmonds structure theorem for weighted matching polynomials. Discrete Mathematics, 346(3):113244, 2023. Accessible version: arXiv:2006.15215v2. 15
[SSŠY17] Alistair Sinclair, Piyush Srivastava, Daniel Štefanković, and Yitong Yin. Spatial mixing and the connective constant: Optimal bounds. Probability Theory and Related Fields, 168(1–2):153–197, 2017. 8, 9, 13, 16, 23
[Val79a] Leslie G. Valiant. Completeness classes in algebra. In Proceedings of the Eleventh Annual ACM Symposium on Theory of Computing (STOC), pages 249–261, 1979. 38
[Val79b] Leslie G. Valiant. The complexity of computing the permanent. Theoretical Computer Science, 8(2):189–201, 1979. 1
[van99] J. van den Berg. On the absence of phase transition in the monomer-dimer model. In Maury Bramson and Rick Durrett, editors, Perplexing Problems in Probability: Festschrift in Honor of Harry Kesten, pages 185–195. Birkhäuser, 1999. 13
[Von13] Pascal O. Vontobel. The Bethe permanent of a nonnegative matrix. IEEE Transactions on Information Theory, 59(3):1866–1901, 2013. 12
[WV26] Binghong Wu and Pascal O. Vontobel. Double-cover-based analysis of the Bethe permanent of block-structured positive matrices. arXiv preprint arXiv:2601.17508v3, 2026. Extended version with appendices of the ISIT paper. 12
[Yi26] Zihong Yi. Diffuse Gaussian truncation for deterministic approximate counting. arXiv preprint arXiv:2609.04079, 2026. 12
[YZ26] Yuichi Yoshida and Zihan Zhang. Low-sensitivity matching via sampling from Gibbs distributions. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 120–149, 2026. 13, 14
A Numerical details
In this appendix, we justify the numerical accuracy and running-time bounds used in the main algorithm.
A.1 Directed evaluations and rational endpoints
Lemma A.1. Let be an integer. For rational arguments in their real domains, logarithms, exponentials, and square roots can be bounded above and below by rational numbers differing by at most . With directed rounding, these bounds can be computed in polynomial time in the input length, , and output length.
First we apply Lemma A.1 to the endpoints and objective evaluation in Section 5. Since the support has a perfect matching,
For positive binary rational inputs, . The upper estimate in Section 5 differs from by , because and . The error bound is also of magnitude .
To obtain logarithmic accuracy, suppose for an integer , and . An interval containing , of width at most , has positive endpoints whose logarithms differ by at most , because its lower endpoint is at least and . Thus absolute precision bits suffice. For and , one can take , which is polynomial in the input and parameter encoding lengths. Taking and using the upper endpoint for and the lower endpoint for yields positive rational with
The number of precision bits and the encoding lengths of these rational outputs are polynomial in the input and parameter encoding lengths.
To evaluate , use an upper endpoint for and lower endpoints of intervals containing in the assignment costs . Intervals of width change the cost of each perfect matching by . Theorem 7.1 supplies an interval of width containing . Choosing sufficiently small absolute constants in these tolerances gives an upper estimate with additive error at most , as used in Section 5.
Proof of Lemma A.1. For logarithms, separate an integer power of two and use the convergent series for , bounding the tail geometrically. For an exponential , use if . Otherwise range reduction, the Taylor series with its remainder bound, and repeated squaring give the required bounds. For positive , the integer part of has bits, and for its length is also . Computing to bits therefore has polynomial cost in the input length, , and output length. Square roots follow by bisection. Directed rounding keeps the true value between the computed endpoints, proving the lemma.
A.2 Absorbing the box width's dependence on
Proposition 8.1 uses , where and in the main algorithm. The following inequality absorbs the additional dependence on from into a polynomial factor of absolute degree.
Lemma A.2. For and ,
In the running-time expression of Section 5, take , , and . The term gives an absolute polynomial factor in after exponentiation, and is absorbed into . This proves (2), with an absolute polynomial degree.
Proof of Lemma A.2. and for . Apply .
B Amplification to a relative approximation
The logarithmic saving in Theorem 1.1 leaves a substantial gap to a relative approximation. A fixed power saving would already close that gap by the standard amplification observation attributed to Barvinok in Linial, Samorodnitsky, and Wigderson [LSW00, Section 1.1]. We follow the disjoint-copy argument in Anari and Rezaei [AR25, Section 1.1], including rational endpoints, then derive its consequence for matrices of degree at most three.
A deterministic fully polynomial time approximation scheme (FPTAS) returns rational endpoints with , in time polynomial jointly in the input encoding length and .
Theorem B.1 (Amplification of a fixed power saving [LSW00, AR25]). Suppose that, for fixed constants and , a deterministic algorithm running in polynomial time returns positive rational numbers satisfying
for every nonnegative rational matrix of order . Then the permanent has a deterministic FPTAS.
It suffices to make the logarithmic interval width small after taking the root corresponding to the number of copies. The following lemma separates that calculation from the rational arithmetic.
Lemma B.2 (Recovering an interval from disjoint copies). Let be an integer, and suppose positive rational numbers satisfy . For rational , one can compute rational endpoints satisfying
The running time is polynomial in and the encoding lengths of .
Proof of Theorem B.1. Let . Increase to an integer, put , and set
Form the block diagonal matrix consisting of copies of . Its order is , and its permanent is per. Apply the assumed algorithm. Since , taking th roots of its endpoints gives an interval of logarithmic width at most
Apply Lemma B.2 with . The resulting rational endpoints have ratio at most
where the last inequality uses on . The number of copies, the explicit matrix size, the assumed algorithm's output length, and the root computations are polynomial in the original input length and . The exponents can depend on the fixed . Larger is handled by using .
Proof of Lemma B.2. It is enough to bound each endpoint's th root between positive rational numbers whose ratio is at most , then use the outer bounds. For a positive rational of encoding length at most , both and lie between and . Bisect this interval, deciding which side contains the root by comparing the midpoint's th power with . Stop when the interval has width at most . Its lower endpoint is at least , so its ratio is at most .
There are bisection steps. Each comparison can be performed by taking integer powers of the numerators and denominators and cross-multiplying. The resulting integers have bit lengths polynomial in . The two outer endpoints therefore have the asserted ratio and can be computed in the stated time.
The argument with disjoint copies uses only closure under disjoint unions and multiplicativity of the quantity being approximated. In particular, it can be applied after a reduction to a restricted class of matrices.
Corollary B.3 (Zero-one matrices of degree at most three). The hypothesis of Theorem B.1 need only hold for zero-one matrices with at most three nonzero entries in each row and column.
Proof. Lemma D.1 constructs, in polynomial time, a zero-one matrix in this class and a positive rational such that . Apply the proof of Theorem B.1 to copies of , which stay in the same class, and divide the final endpoints by . The order of and the encoding length of are polynomial in the input length of , so the amplified algorithm and the final divisions take polynomial time in that length and .
Why the present bound does not give an FPTAS. An approximation guarantee applied to copies gives a logarithmic width bound of after taking roots. For and , this bound is at least
Thus polynomially many copies do not turn a logarithmic saving into a relative guarantee, even at a fixed target accuracy. Likewise, substituting and into Theorem 1.2 gives the needed error scale but a time bound
The approximation theorem therefore does not meet the hypothesis of Theorem B.1.
C The all-ones example
The error bound in Lemma 6.1 has the right order for the optimized objective . This already holds for the all-ones matrix, whose permanent is .
Proposition C.1 (Error for the all-ones matrix). Let be the all-ones matrix and . The uniform logarithmic weights attain . If , then
Proof. Average any feasible logarithmic weight vector over all row and column permutations. Convexity and symmetry of and show that the averaged vector is feasible, has constant coordinates, and has no larger objective value. At uniform edge weight , write . The compensation for changing the weights is , so
Each term is nonincreasing in . Thus the largest permitted uniform weight, , attains the minimum.
Write . A matching with unmatched rows is specified by its unmatched rows and columns and a bijection between the remaining vertices. There are such matchings. Hence
Take . The hypothesis gives . Using just the term with , together with and , gives
Taking logarithms proves the lower bound.
Together with Lemma 6.1, this gives logarithmic error for . The limitation concerns the optimized objective , even though the permanent of this particular matrix is explicit.
D Reduction to zero-one matrices of degree at most three
We give the reduction for perfect matchings used in Corollary B.3. It uses the classical degree reduction in Valiant's proof of Proposition 8 [Val79a] and the arithmetic path construction from the proof of Theorem 1. We give explicit bipartite constructions to track the maximum degree and the dependence on binary encoding length.
Lemma D.1. Given , one can construct in polynomial time a zero-one matrix with at most three ones per row and column, and a positive rational , such that .
Clearing denominators reduces the task to positive integer edge weights. We first replace these weights by an unweighted graph, then reduce the vertex degrees. This order lets the weight construction use vertices of unrestricted degree.
Lemma D.2 (Encoding integer weights). A bipartite graph with equally sized parts and positive integer edge weights can be replaced in polynomial time by an unweighted bipartite graph having the same permanent. The numbers of vertices and edges are bounded by a constant times the original number of vertices plus the total binary length of the edge weights.
Lemma D.3 (Reducing vertex degrees). A weighted bipartite graph with vertices in each part, edges, and no isolated vertices can be replaced in polynomial time by a weighted bipartite graph of maximum degree three with vertices in each part. The perfect matchings of the two graphs are in a weight-preserving bijection. The new edge weights are the original weights and ones.
Proof of Lemma D.1. Multiply each row by the product of the denominators of its positive entries. This yields an integer matrix and a positive integer with . The bit length of each multiplier is at most the sum of the bit lengths of the row's denominators, so this step has polynomial cost.
Apply Lemma D.2 to the weighted graph of . The resulting unweighted graph has polynomially many vertices and edges and the same permanent. Since it has a perfect matching, it has no isolated vertices. Apply Lemma D.3 to this graph. All weights remain one, and the permanent is unchanged. The resulting matrix has polynomial size, at most three ones per row and column, and .
Proof of Lemma D.2. For each weight , we will construct an acyclic directed graph with source , sink , and exactly directed paths, using vertices and edges. We first show why such a graph is sufficient.
To replace a weighted bipartite edge , form a left-right pair for each directed vertex and add its diagonal edge . For every arc , add . Delete and attach the gadget by and , giving all new edges weight one.
If neither attachment edge is selected, the only internal perfect matching consists of all diagonal edges: a nontrivial alternative would give a directed cycle in the original directed graph. If both attachment edges are selected, the selected nondiagonal internal edges correspond to one directed path in that graph. The remaining gadget vertices are matched diagonally. There are exactly such completions. Selecting exactly one attachment leaves different numbers of internal left and right vertices and is impossible. Thus the gadget has multiplicity one when the original edge is absent and when it is present.
Leave edges of weight one as they are. Each replacement adds equally many left and right vertices, and its size is proportional to the number of vertices and arcs in the directed graph. It remains to construct the directed graphs.
Start with a single arc from to a current terminal, giving one directed path. Read the binary digits of after its leading one. For each digit , add arcs from the current terminal to two fresh vertices and from both of them to a fresh terminal. Every existing path now has two extensions. If , also add a direct arc from to the new terminal, contributing one more path. Thus a path count becomes , and the final terminal has exactly paths from . Each step adds three vertices and at most five arcs, so both counts are . All arcs lead to newly created vertices, so the graph is acyclic and has no parallel arcs. This proves the stated size bound for the unweighted graph.
Proof of Lemma D.3. The replacement for an original vertex must use exactly one of that vertex's incident edges in a perfect matching. Replace a left vertex of degree by the path
and attach its th original edge to . Give all path edges weight one and each external edge its original weight. The private right vertices force exactly one external edge in every perfect matching. Once the external edge is chosen, there is exactly one way to match the remaining vertices of the path. For every original right vertex, apply the same construction with left and right interchanged. All degrees are now at most three, and the perfect matchings are in a weight-preserving bijection. Summing the sizes of the paths gives vertices on each side.
Statement on AI use. The main ideas and proof strategies were developed with assistance from OpenAI Codex using the 5.6 Sol and 6.0 Astra models. The authors studied, refined, simplified, and verified the resulting material and take responsibility for every claim, proof, and citation.