5 questions to test your understanding
You run BFS-based 2-coloring on a graph and find that two adjacent vertices both receive color 'red.' What can you conclude?
A graph has n vertices and n−1 edges and is connected. Is it necessarily bipartite?
A graph with no triangles (3-cycles) is very likely to be bipartite.
Bipartite graph detection using BFS runs in O(V²) time because it should check most pairs of vertices.
Explain why an odd-length cycle prevents a graph from being 2-colorable, and why an even-length cycle does not.