Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SSoC'23] Bipartite Graph #1263

Closed
mohitsingh1011 opened this issue Jun 12, 2023 · 3 comments
Closed

[SSoC'23] Bipartite Graph #1263

mohitsingh1011 opened this issue Jun 12, 2023 · 3 comments

Comments

@mohitsingh1011
Copy link

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
Copy link
Author

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

@mohitsingh1011 mohitsingh1011 changed the title Bipartite Graph [SSoC'23] Bipartite Graph Jun 12, 2023
@TusharGagal
Copy link

@Kumar-laxmi please assign me this task.

Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants