twocoloring
Twocoloring, or two-coloring, is a problem in graph theory that asks whether the vertices of a graph can be colored with two colors so that no adjacent vertices share a color. If such a coloring exists, the graph is called bipartite; the coloring partitions the vertex set into two independent sets.
A graph is 2-colorable if and only if it contains no odd cycle; equivalently, every connected component
Algorithmically, twocolorability can be decided in linear time using breadth-first search (BFS) or depth-first search (DFS).
Applications and related concepts: Two-coloring is foundational in the study of bipartite graphs, with implications for