find maximum matching for bipartite graph
undirected bipartite graph
(optional) one or more options as specified below
output=list or one of edges, size, or weight.
A list of one or more of the symbols edges, size, and weight, or one of the symbols edges, size, or weight. This determines what is returned by BipartiteMatching. The output is an expression sequence with the corresponding values.
BipartiteMatching(G) returns a maximum matching for a bipartite graph G.
If W is unweighted, the default output is an expression sequence whose first element is the size of a maximum matching and whose second element is the matching itself.
If W is weighted, the default output is an expression sequence whose first element is the weight of a maximum matching of minimum weight and whose second element is the matching itself.
Perform a simple bipartite matching on an unweighted bipartite graph.
G ≔ Graph⁡1,2,2,3,3,4,3,8,4,5,5,6,6,7
G≔Graph 1: an undirected graph with 8 vertices and 7 edge(s)
B ≔ BipartiteMatching⁡G
Draw the matching in red
Compute a minimum-weight maximum matching on a weighted bipartite graph.
M ≔ Matrix⁡4,4,8,5,2,18,20,24,11,19,25,14,18,15,8,10,14,12
WM ≔ Matrix⁡4,M|M%T,Matrix⁡4
G ≔ Graph⁡WM
G≔Graph 2: an undirected weighted graph with 8 vertices and 16 edge(s)
The GraphTheory[BipartiteMatching] command was updated in Maple 2021.
The G parameter was updated in Maple 2021.
The output option was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document