logoalt Hacker News

aleph_minus_onetoday at 4:23 PM1 replyview on HN

> Forests, trees, and bipartite graphs are 2-colorable.

More precise: a graph is bipartite if and only if it is 2-colorable (this can actually be used as a definition).

Since forests are bipartite, and trees are forests, the other two statements follow.


Replies

emil-lptoday at 5:34 PM

Precisely! The reason I mentioned trees and forests are because they are probably more familiar.

The Bipartite graph class is also a bit silly in this case, since it's by definition the 2-colorable graphs: bipartite, or 2-partite are the graphs that can be partitioned into 2 (color)classes such that no edge is internally in a class.

More generally, the k-colorable graphs are exactly the k-partite graphs.

show 1 reply