Finds the maximum cardinality matching in graphs and bipartite graphs.
MaxCardinalityMatching(
arcSources,
arcTargets,
numNodes,
algorithm = "MaxMatching"
)
A named list containing two entries: 1) "value": the matching value, 2) "edges": the edges of the final graph, in a List of (node, node) pairs
Vector corresponding to the source nodes of a graph's edges
Vector corresponding to the destination nodes of a graph's edges
The number of nodes in the graph
Choices of algorithm include "MaxMatching" and "MaxFractionalMatching". "MaxMatching" is the default.
For details on LEMON's implementation, including differences between the algorithms, see https://lemon.cs.elte.hu/pub/doc/1.3.1/a00615.html.