Graph Theory - Matchings



Matchings in Graph Theory

A matching in a graph is a subset of edges such that no two edges share a common vertex. A matching that includes every vertex of the graph is called a perfect matching, whereas a matching that cannot be extended by adding more edges is called a maximal matching.

Matchings are used in various applications, including network design, scheduling, and optimization problems. The most well-known types include maximum matching, perfect matching, and bipartite matching.

Properties of Matchings

Following are the properties of matchings in graphs −

  • Independent Edges: No two edges in a matching share a common vertex.
  • Maximization: The size of a matching can be maximized while maintaining independence of edges.
  • Applications: Used in job assignments, network flow, and combinatorial optimization.

Maximum Matching

A maximum matching in a graph is a matching that contains the largest possible number of edges. There may be multiple maximum matchings in a graph.

Given an undirected graph G = (V, E), a maximum matching M is a matching such that no other matching in the graph contains more edges than M.

Example

Take a look at the following graph −

Maximum Matching
  • Graph: G = (V, E), where V = {A, B, C, D, E, F} and E = {(A, B), (B, C), (C, D), (D, E), (E, F)}.
  • Maximum Matching: M = {(A, B), (C, D), (E, F)}.

Perfect Matching

A perfect matching is a matching in which every vertex of the graph is matched to exactly one other vertex. This means that the graph must have an even number of vertices for a perfect matching to exist.

If a perfect matching exists, it is also a maximum matching, but not all maximum matchings are perfect matchings.

Example

In the following graph, a perfect matching is shown −

Perfect Matching
  • Graph: G = (V, E), where V = {A, B, C, D, E, F} and E = {(A, B), (C, D), (E, F)}.
  • Perfect Matching: M = {(A, B), (C, D), (E, F)} (since every vertex is matched).

Maximal Matching

A maximal matching is a matching that cannot be extended by adding more edges. It does not have to be a maximum matching but is locally optimal.

Every maximum matching is a maximal matching, but not every maximal matching is a maximum matching.

Example

In the above graph, the following set forms a maximal matching −

{(A, B), (C, D)}

Bipartite Matching

A bipartite matching is a matching in a bipartite graph, where vertices are divided into two disjoint sets, and edges only connect vertices from different sets.

The goal is to find a maximum matching between the two sets.

Example

Take a look at the following bipartite graph −

Bipartite Matching
  • Graph: G = (V1 V2, E), where V1 = {A, C, E} and V2 = {B, D, F}.
  • Bipartite Matching: M = {(A, B), (C, D), (E, F)}.

Hall's Marriage Theorem

Hall's Marriage Theorem provides a necessary and sufficient condition for the existence of a perfect matching in a bipartite graph. It states that a perfect matching exists if and only if for every subset S of one partition, the number of neighbors in the other partition is at least |S|.

This theorem is commonly used in solving assignment and matching problems.

Augmenting Path

An augmenting path is a path that starts and ends at unmatched vertices and alternates between edges that are in and not in the current matching.

Finding an augmenting path allows for increasing the size of a matching by flipping the status of edges along the path.

Knig's Theorem

Knig's Theorem states that in a bipartite graph, the size of the maximum matching is equal to the size of the minimum vertex cover.

This theorem is useful in proving properties of matchings and optimizing problems in graph theory.

Applications of Matchings

Matchings are commonly used in various real-world applications, such as −

  • Job Assignment: Matching employees to tasks based on skills.
  • Stable Marriage Problem: Finding optimal pairings in two groups.
  • Network Flow: Used in network design and scheduling.
Advertisements