maths.free › Combinatorics & Graph Theory › 14. Combinatorial Applications of Network Flows › Matchings in Bipartite Graphs
Matchings in Bipartite Graphs
Recall that a bipartite graph \GVE is one in which the vertices can be properly colored using only two colors.
Matchings in Bipartite Graphs
Recall that a bipartite graph \(\GVE\) is one in which the vertices can be properly colored using only two colors. It is clear that such a coloring then partitions \(V\) into two independent sets \(V_1\) and \(V_2\), and so all the edges are between \(V_1\) and \(V_2\). Bipartite graphs have many useful applications, particularly when we have two distinct types of objects and a relationship that makes sense only between objects of distinct types. For example, suppose that you have a set of workers and a set of jobs for the workers to do. We can consider the workers as the set \(V_1\) and the jobs as \(V_2\) and add an edge from worker \(w\in V_1\) to job \(j\in V_2\) if and only if \(w\) is qualified to do \(j\).
For example, the graph in is a bipartite graph in which we've drawn \(V_1\) on the bottom and \(V_2\) on the top.
If \(\GVE\) is a graph, a set \(M\subseteq E\) is a matching in \(\bfG\) if no two edges of \(M\) share an endpoint. If \(v\) is a vertex that is the endpoint of an edge in \(M\), we say that \(M\) saturates \(v\) or \(v\) is saturated by \(M\). When \(\bfG\) is bipartite with \(V=V_1\cup V_2\), a matching is then a way to pair vertices in \(V_1\) with vertices in \(V_2\) so that no vertex is paired with more than one other vertex. We're usually interested in finding a maximum matching, which is a matching that contains the largest number of edges possible, and in bipartite graphs we usually fix the sets \(V_1\) and \(V_2\) and seek a maximum matching from \(V_1\) to \(V_2\). In our workers and jobs example, the matching problem thus becomes trying to find an assignment of workers to jobs such that
- each worker is assigned to a job for which he is qualified (meaning there's an edge),
- each worker is assigned to at most one job, and
- each job is assigned at most one worker.
As an example, in , the thick edges form a matching from \(V_1\) to \(V_2\). Suppose that you're the manager of these workers (on the bottom) and must assign them to the jobs (on the top). Are you really making the best use of your resources by only putting four of six workers to work? There are no trivial ways to improve the number of busy workers, as the two without responsibilities right now cannot do any of the jobs that are unassigned. Perhaps there's a more efficient assignment that can be made by redoing some of the assignments, however. If there is, how should you go about finding it? If there is not, how would you justify to your boss that there's no better assignment of workers to jobs?
In , we show thick edges to show the edges with flow \(1\) in the flow corresponding to our guess at a matching from .
Condensed — the full section is in Keller & Trotter, Applied Combinatorics.
Symbols used here
x belongs to A; every element of A is in B.
In either; in both; in A but not B.
n × (n−1) × … × 1; the number of orderings of n things. 0! = 1.
Number of k-element subsets of n things: n!/(k!(n−k)!).
Add a_k for k = 1 up to n.
Multiply a_k for k = 1 up to n.
The set with no elements; the number of elements of A.
Questions people ask
Permutation or combination?
Ask whether order matters. A lock code is a permutation (order matters); a hand of cards is a combination (it does not).
What is a graph in this sense?
Dots (vertices) joined by lines (edges) — not a plot. Road maps, social networks and molecules are graphs; questions like "is there a route" and "how few colours" are graph theory.
ඔයාගේම උත්සහ කරන්න
Parts of this page are adapted from Keller & Trotter, Applied Combinatorics (CC BY-SA 4.0). Condensed and re-explained here; errors are ours.
තවත් Combinatorics & Graph Theory
The counting principlesPigeonhole principle and inclusion–exclusionBinomial coefficients and Pascal's triangleRecurrences and generating functionsGraphs: vertices, edges, degreesPaths, cycles, trees, Euler and HamiltonColouring and planar graphs