networkop/edmonds_blossom library

Edmonds' Blossom algorithm for maximum matching in general graphs

This implementation follows the classical Edmonds' blossom algorithm to find a maximum cardinality matching in general (non-bipartite) graphs. It is implemented for integer-labeled vertices 0..n-1 and is designed to be clear, well-documented, and reasonably efficient for medium-sized graphs.

API:

  • edmondsBlossom(n, adjacencyList) -> returns list match where matchv = partner or -1

Functions

edmondsBlossom(int n, List<List<int>> g) List<int>