A Faster Algorithm for Maximum Weight Matching on Unrestricted Bipartite Graphs
Shawxing Kwok
TL;DR
This work addresses maximum weight matching (MWM) on weighted bipartite graphs with real-valued weights and unrestricted sizes, introducing a faster algorithm that achieves $O(\min(X^3+E, XE+X^2\log X))$ with $X=\min(|L|,|R|)$. It builds on a non-line-covering Hungarian framework, proving that virtual vertices are unnecessary when $|E|=|L||R|$, and further extends the method with edge-pruning, avoidance of extra virtual edges, and batched height adjustments to obtain $O(\min(L^3+E,\ LE+L^2\log L))$ worst-case time, plus favorable average-case behavior. Empirically, the approach attains an average running time around $O(E^{1.4}+LR)$ on random graphs, and the publicly available Kwok algorithm demonstrates competitive performance across sparse and dense regimes. The contribution offers both theoretical improvements over prior bounds and practical tools for resource allocation, scheduling, and related industrial optimization tasks where unrestricted bipartite graphs with real-valued weights arise.
Abstract
Given a weighted bipartite graph $G = (L, R, E, w)$, the maximum weight matching (MWM) problem seeks to find a matching $M \subseteq E$ that maximizes the total weight $\sum_{e \in M} w(e)$. This paper presents a novel algorithm with a time complexity of $O(\min(X^3 + E, XE + X^2\log X))$, where $X = \min(|L|, |R|)$. Unlike many existing algorithms, our approach supports real-valued weights without additional constraints. Under this condition, our result improves upon the previous best-known bound of $O(VE + V^2\log V)$, or more strictly $O(XE + XV\log V)$, where $V = L \cup R$. The suggested implementation code is simplified and publicly available at https://github.com/ShawxingKwok/Kwok-algorithm, with the average-case time complexity of $O(E^{1.4} + LR)$ estimated from experimental results on random graphs.
