Maximum Matchings in Bipartite Graphs
Learn how to find a maximum matching in a bipartite graph.
Maximum matchings can be found algorithmically in any graph in
In fact, it can be a little astonishing to learn that the Ford-Fulkerson algorithm can also be used for finding a maximum matching in a bipartite graph!
The central idea is to use the Ford-Fulkerson algorithm
The basic idea is to first systematically convert a bipartite graph into a flow network and then find a maximum flow in the network using the Ford-Fulkerson algorithm. The network is constructed in such a way that the flow through the edges can be used for finding a maximum matching in the original graph.
Conversion to a flow network
Suppose is a bipartite graph with partite sets and . can be converted into a flow network by making the following modifications to it:
- Assign directions to all edges in such that the tail vertices are in and the head vertices are in .
- Add a source vertex and a sink vertex to .
- Add an edge from the source to each vertex in . Also, add an edge from each vertex in to the sink .
- Set the capacity of each edge as