Papers
Topics
Authors
Recent
Search
2000 character limit reached

Bipartite Exact Matching in P

Published 2 Apr 2026 in cs.DM, cs.CC, and cs.DS | (2604.01571v2)

Abstract: The Exact Matching problem asks whether a bipartite graph with edges colored red and blue admits a perfect matching with exactly t red edges. Introduced by Papadimitriou and Yannakakis in 1982, the problem has resisted deterministic polynomial-time algorithms for over four decades, despite admitting a randomized solution via the Schwartz-Zippel lemma since 1987. We prove the Affine-Slice Nonvanishing Conjecture (ASNC) for all bipartite braces and give a deterministic O(n6) algorithm for Exact Matching on all bipartite graphs. The algorithm follows via the tight-cut decomposition, which reduces the decision problem to brace blocks. The proof proceeds by structural induction on McCuaig's brace decomposition. We establish the McCuaig exceptional families, the replacement determinant algebra, and the narrow-extension cases (KA, J3 to D1). For the superfluous-edge step, we introduce two closure tools: a matching-induced Two-extra Hall theorem that resolves the rank-(m-2) branch via projective-collapse contradiction, and a distinguished-state q-circuit lemma that eliminates the rank-(m-1) branch entirely by showing that any minimal dependent set containing the superfluous state forces rank m-2. The entire proof has been formally verified in the Lean 4 proof assistant.

Authors (1)

Summary

  • The paper introduces a deterministic O(n^6) algorithm that decides the existence of a perfect matching with exactly t red edges.
  • It employs innovative techniques such as Vandermonde-weighted matrices and tight-cut decompositions to encode and analyze matchings.
  • The work resolves a long-standing open problem by unifying algebraic and combinatorial methods, ultimately placing bipartite exact matching in P.

Deterministic Polynomial-Time Algorithm for Bipartite Exact Matching


Introduction and Problem Setting

The Exact Matching (EM) problem in bipartite graphs considers a bipartite graph G=(AB,E)G = (A \cup B, E), an edge coloring ρ:E{0,1}\rho: E \to \{0,1\} (assigning “red” or “blue” to each edge), and an integer target tt. The task is to decide whether GG admits a perfect matching containing exactly tt red edges. Despite the availability of a randomized polynomial-time algorithm via the Schwartz–Zippel lemma since the late 1980s, the existence of a deterministic polynomial-time algorithm for the general case remained open, and the problem played a central role in delineating the boundary between the complexity classes P\mathrm{P} and RP\mathrm{RP}.

The presented work demonstrates, constructively and unconditionally, that bipartite Exact Matching is in P\mathrm{P}. Specifically, it provides a deterministic O(n6)O(n^6) algorithm for general bipartite graphs using novel algebraic and combinatorial machinery, resolving a question open for over four decades (2604.01571).


Algebraic Framework: Vandermonde-Weighted Matrices

The core algorithmic reduction encodes matchings and the exact-red-count constraint via determinants. For GG as above, define the matrix:

ρ:E{0,1}\rho: E \to \{0,1\}0

with rows and columns indexed by ρ:E{0,1}\rho: E \to \{0,1\}1 and ρ:E{0,1}\rho: E \to \{0,1\}2, respectively.

Let ρ:E{0,1}\rho: E \to \{0,1\}3. The coefficient ρ:E{0,1}\rho: E \to \{0,1\}4 generates, by indexing matchings and tracking red edges, the sum:

ρ:E{0,1}\rho: E \to \{0,1\}5

Thus, the existence of a perfect matching with ρ:E{0,1}\rho: E \to \{0,1\}6 red edges is equivalent to ρ:E{0,1}\rho: E \to \{0,1\}7.

This algebraic encoding enables precise combinatorial decision reductions to polynomial divisibility and nonvanishing conditions, allowing the algorithm to replace randomized identity testing with explicit interpolation and blockwise evaluation.


Structural Decomposition: Braces and Tight Cuts

Central to the method is the exploitation of structural decompositions in bipartite matching-covered graphs. The algorithm employs tight-cut decompositions, reducing ρ:E{0,1}\rho: E \to \{0,1\}8 into block components known as braces. Each brace satisfies a strengthened Hall's condition: ρ:E{0,1}\rho: E \to \{0,1\}9 for proper nonempty tt0.

The proof inducts on the structure of braces using McCuaig’s brace decomposition and handles minimal braces, nonminimal braces (via superfluous-edge deletion), and exceptional families (biwheels, prisms, M\"obius ladders) with specialized arguments.

Crucially, for a brace, the exact-matching existence problem becomes deciding for each block (i.e., each brace) whether the associated fiber polynomial tt1 is nonzero for some tt2, with the top-level red-count check recursed via a knapsack-style DP corresponding to the block partition of tt3.


The Main Theorem and the Affine-Slice Nonvanishing Conjecture (ASNC)

The algebraic reduction hinges on a nonvanishing conjecture established and proved in the paper:

Affine-Slice Nonvanishing (ASNC):

For every brace, any nonempty exact-tt4 matching fiber yields a nonzero fiber polynomial tt5.

Formally, given the fiber tt6, we have:

  • If tt7, then tt8 trivially.
  • The nontrivial content is that for nonempty tt9, GG0.

The deterministic polynomial-time algorithm follows immediately: for each brace block,

  1. Evaluate GG1 at GG2 points,
  2. Interpolate to detect nonvanishing,
  3. Aggregate results via DP to answer the full instance.

The total complexity is GG3 arithmetic operations for graphs with GG4 vertices.


Inductive and Algebraic Proof Architecture

Structural Induction

  • Base Cases: Small graphs (GG5), width-2 path and cycle matchings, and McCuaig’s exceptional families are handled by explicit enumeration, jet operator arguments, and reduction to lower-dimensional cases.
  • Superfluous Edge Deletion: For any nonminimal brace, a “superfluous” edge can be deleted without destroying the brace property. The authors provide a precise determinant identity capturing how the matching fiber polynomials change, reducing the problem to divisibility of GG6 by powers of the relevant linear form.
  • Narrow Extension Cases (including KA and GG7): The elimination of repeated divisibility at distinct Vandermonde bases is performed by analyzing generalized Vandermonde matrices and column-replacement determinants.
  • Exceptional Families: Specialized arguments and operator-based “jet” extraction reduce these instances to already-handled lower-order cases.

Algebraic Tools

  • Replacement Determinant Algebra: Determinant-based criteria for boundary minors of the matching polynomial track how local modifications (patches, edge insertions) influence polynomials encoding matching fibers.
  • Generalized Vandermonde Elimination: The authors develop precise elimination theorems to control when a collection of functional constraints can simultaneously vanish, allowing for sharp divisibility and nonvanishing results.
  • Hall-type Theorems and Projective Collapse: The proof uses deep connections between the combinatorics of perfect matchings and the ranks/minors of certain structured matrices to preclude cancellation or pathological vanishing across inductive steps. The “Two-extra Hall” theorem and circuit arguments are introduced to handle all remaining algebraic dependencies.

Machine-Checked Formalization

A substantial Lean 4 formalization supports the arguments, with all key algebraic constructions, combinatorial reductions, and kernel/circuit lemmas machine-verified. Eight graph-to-algebra bridges remain as explicit hypotheses, with the remaining proof fully checked.


Numerical and Complexity Consequences

  • The deterministic GG8 algorithm matches the complexity of classic bipartite matching algorithms up to a low-order polynomial overhead.
  • Numerically, the algorithm is practical for GG9 on modern hardware, with no reliance on randomized procedures or large-field arithmetic.
  • The result resolves the complexity status of bipartite Exact Matching, strictly placing it in tt0, and eliminates its role as a candidate for separating tt1 and tt2.
  • Contradictory Claims Addressed: The historical belief that deterministic approaches would not be feasible for four decades is rebutted.

Implications and Future Directions

Theoretical Impact: The result unifies several disparate threads in algebraic, combinatorial, and algorithmic matching theory. The structural induction, algebraic elimination, and fine-grained analysis of dependency loci provide a template for attacking related matching enumeration and constrained combinatorial optimization problems.

Practical Impact: The approach removes randomness from a core matching subroutine with applications in computational biology, combinatorial optimization, network design, and parallel algorithms.

Further Developments: The tight-cut/blockwise methodology and the analysis of fiber polynomials suggest approaches for extending determinism further into constrained perfect matching-type problems in nonbipartite graphs, weighted settings, and parameterized regimes. The authors note that ASNC for non-brace graphs (for nontrivial convolution sums) remains open, providing a concrete path for continued research.


Conclusion

This work conclusively settles the complexity status of the bipartite Exact Matching problem by providing a deterministic polynomial-time algorithm with a careful integration of brace-structural decomposition and Vandermonde-algebraic analysis. The robust proof pipeline and formalization greatly strengthen the result’s foundation and set a high standard for rigor in deterministic combinatorial optimization. The methods developed are likely to influence a broad range of matching-theoretic and algebraic algorithmic questions.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.