Uniform Word-RAM programs for bipartite matching and König vertex cover #
Uniform Basis.exact flat programs and O((m + r + 1) ^ 5) / O((n + 1) ^ 5) runtime bounds for
maximum bipartite matching with König minimum vertex cover (exists_bipartiteMatching_program) and
perfect matching decision (exists_perfectMatching_program) by reduction to ekProg.
Main definitions #
Cslib.Algorithms.WordRAM.EdmondsKarp.encodeBipartiteMatrix,encodeBipartiteInput,bmMatchAddr,bmCovLAddr,bmCovRAddr: input encoding and output matching/cover addresses.
Main results #
Cslib.Algorithms.WordRAM.EdmondsKarp.exists_bipartiteMatching_program,Cslib.Algorithms.WordRAM.EdmondsKarp.exists_perfectMatching_program: uniform exact-basis bipartite matching and perfect matching programs.
References #
Uniform bipartite matching, König vertex cover, and perfect matching #
Word-RAM input m :: r :: encodeBipartiteMatrix G: left count at address 1, right count at
2, and G (u, v) (0 or 1) at 3 + u * r + v.
Output address of the matching indicator for (u, v) (1 iff (u, v) ∈ M).
Output address of the König left-cover indicator for u (1 iff u ∈ C.left).
Output address of the König right-cover indicator for v (1 iff v ∈ C.right).
Maximum bipartite matching and König vertex cover on the Word-RAM ([Kon31];
[CLRS09], Section 26.3): one uniform flat program over Basis.exact that, on
encodeBipartiteInput G for any G : Fin m × Fin r → Bool, halts within C * (m + r + 1) ^ 5
instructions at every word width fitting ekBound (2 + (m + r)) 1. It returns the maximum
matching cardinality M.card = C.size, stores M at bmMatchAddr, and stores a minimum König
vertex cover C at bmCovLAddr and bmCovRAddr.
Bipartite perfect matching decision on the Word-RAM: one uniform flat program over
Basis.exact that, on encodeBipartiteInput G for any G : Fin n × Fin n → Bool, halts within
C * (n + 1) ^ 5 instructions at every word width fitting ekBound (2 + (n + n)) 1, returning 1
iff Cslib.Circuits.BipartiteMatching.HasPerfectMatching G and 0 otherwise.