What is Bipartite Graph? (original) (raw)

Last Updated : 7 Feb, 2026

A bipartite graph can be colored with two colors such that no two adjacent vertices share the same color. This means we can divide the graph's vertices into two distinct sets where:

**An alternate definition: Formally, a graph G = (V, E) is bipartite if and only if its vertex set V can be partitioned into two non-empty subsets X and Y, such that every edge in E has one endpoint in X and the other endpoint in Y. This partition of vertices is also known as bi-partition.

Characteristics of Bipartite Graph

The characteristics of a bipartite graph are as follows:

Example of Bipartite Graph

a2

**Note: In the above image nodes of the same color belong to the same set.

How to identify Bipartite Graph?

To identify whether a given graph is bipartite, you can use the following algorithm:

  1. Choose any vertex in the graph and assign it to one of the two sets, say X.
  2. Assign all of its neighbors to the other set, say Y.
  3. For each vertex in set Y, assign all their unassigned neighbors to set **X, and for each vertex in set **X, assign all their unassigned neighbors to set **Y.
  4. Check if any two adjacent vertices are in the same set. If yes, then the graph is **not bipartite. Otherwise, it is **bipartite.

To learn more about "How to identify", refer to **this article.

Application of Bipartite Graph

Bipartite graphs have several important applications, including:

**Related Articles: