Algorithms icon indicating copy to clipboard operation
Algorithms copied to clipboard

[SSoC'23] Bipartite Graph

Open mohitsingh1011 opened this issue 2 years ago • 2 comments

Following is a simple algorithm to find out whether a given graph is Bipartite or not using Breadth First Search (BFS).

  1. Assign RED color to the source vertex (putting into set U).
  2. Color all the neighbors with BLUE color (putting into set V).
  3. Color all neighbor’s neighbor with RED color (putting into set U).
  4. This way, assign color to all vertices such that it satisfies all the constraints of m way coloring problem where m = 2.
  5. While assigning colors, if we find a neighbor which is colored with same color as current vertex, then the graph cannot be colored with 2 vertices (or graph is not Bipartite)

mohitsingh1011 avatar Jun 12 '23 18:06 mohitsingh1011

@Kumar-laxmi assign this to me under SSoC'23.

mohitsingh1011 avatar Jun 12 '23 18:06 mohitsingh1011

@Kumar-laxmi please assign me this task.

TusharGagal avatar Jun 16 '23 15:06 TusharGagal

Stale issue message

github-actions[bot] avatar May 17 '24 16:05 github-actions[bot]