Matching (Graph Theory) Practice Questions

Last Updated : 10 Jul, 2026

A matching in graph theory is a set of edges in which no two edges share a common vertex. In other words, each vertex can be matched with at most one other vertex. Matching is commonly used in job assignments, scheduling, and network design.

Example: Suppose there are 3 students (A, B, C) and 3 projects (P1, P2, P3). Assigning A–P1, B–P2, and C–P3 forms a matching because no student or project is assigned more than once.

Question 1: Consider the bipartite graph U = {u1, u2, u3}, V = {v1, v2, v3} with matching M = {(u1, v1), (u2, v2), (u3, v3)}. Determine whether the matching is perfect.

Every vertex in both partitions is matched exactly once.

Hence, (M) is a perfect matching.

Question 2: For the graph matching M = {(A, B), (C, D), (E, F)}, find the cardinality of the matching.

The matching contains 3 edges.

Therefore, |M|=3

So, the cardinality of the matching is 3.

Question 3: Consider the graph with edges: E = {(A, B),(A, C),(B, D),(C, D)}. Find a maximum matching.

One possible matching is: M = {(A, C), (B, D)}

The matching contains 2 edges, and no larger matching is possible.

Hence, the maximum matching is: {(A, C), (B, D)} with size 2

Practice Problems

Problem 1: Given a graph, determine if a perfect matching exists.

Problem 2: Find all maximum matchings in a given bipartite graph.

Problem 3: Given a graph, find a maximum matching using augmenting paths.

Problem 4: In a bipartite graph, determine the minimum path cover.

Problem 5: Find a maximum weighted matching in a general graph.

Comment

Explore