You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
A matching in a bipartite graph is a set of edges with no shared vertices — each vertex is matched to at most one partner. The maximum matching problem and the allocation problem (assigning tasks to people at minimum cost) are key applications of discrete mathematics.
A bipartite graph has two sets of vertices (e.g., workers and jobs) with edges only between the sets. A matching pairs vertices from one set with vertices from the other so that no vertex appears in more than one pair.
| Term | Definition |
|---|---|
| Matching | A set of edges with no shared vertices |
| Maximum matching | A matching with the most edges possible |
| Complete matching | A matching that matches every vertex in the smaller set |
| Perfect matching | A matching that matches every vertex in both sets |
To improve a matching M:
Workers: {P, Q, R, S}. Jobs: {1, 2, 3, 4}.
Possible assignments (edges):
Initial matching: P–1, Q–3, R–2.
S is unmatched. Find an alternating path from S:
S → 3 (not in M) → Q (matched with 3) → 1 (in M) → P (matched with 1) → 2 (not in M, unmatched in jobs? No, R is matched to 2).
Try: S → 3 → Q → 1 → P → 2 → R → 4 (unmatched!).
Alternating path: S–3, Q–3 (swap), Q–1, P–1 (swap), P–2, R–2 (swap), R–4.
New matching: S–3, Q–1, P–2, R–4. All workers matched — complete matching found.
Exam Tip: Clearly write out the alternating path, showing which edges are in the current matching and which are not. Then describe the swap. The path must start and end at unmatched vertices.
A complete matching from the first set to the second set exists if and only if for every subset S of the first set, the number of neighbours of S in the second set is at least ∣S∣:
∣N(S)∣≥∣S∣for all S⊆first set
This is called Hall's condition.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.