A hypergraph H = is called 2-colorable if its vertex set V can be partitioned into two sets, X and Y, such that each hyperedge meets both X and Y. Equivalently, the vertices of H can be 2-colored so that no hyperedge is monochromatic. Every bipartite graph G = is 2-colorable: each edge contains exactly one vertex of X and one vertex of Y, so e.g. X can be colored blue and Y can be colored yellow and no edge is monochromatic. The property fo 2-colorability was first introduced by Felix Bernstein in the context of set families; therefore it is also called Property B.
Exact 2-colorability
A hypergraph is called bipartite if its vertex set V can be partitioned into two sets, X and Y, such that each hyperedge contains exactly oneelement of X. To see that this sense is stonger than 2-colorability, let H be a hypergraph on the vertices with the following hyperedges:This H is 2-colorable, for example by the partition X = and Y =. However, it is not exactly-2-colorable, since every set X with one element has an empty intersection with one hyperedge, and every set X with two or more elements has an intersection of size 2 or more with at least two hyperedges. Every bipartite graph G = is exactly-2-colorable. Hall's marriage theorem has been generalized from bipartite graphs to exactly-2-colorable hypergraphs; see Hall-type theorems for hypergraphs.
''n''-partiteness and rainbow-colorability
Given an integer n, a hypergraph is called n-uniform if all its hyperedges contain exactly n vertices. An n-uniform hypergraph is called n-partite if its vertex set V can be partitioned into nsubsets such that each hyperedge contains exactly one element from each subset. An alternative term is rainbow-colorable. To see that n-partiteness is stronger than exact-2-colorability, let H be a hypergraph on the vertices with the following hyperedges;This H is 3-uniform. It is exactly-2-colorable by the partition X = and Y =. However, it is not 3-partite: in every partition of V into 3 subsets, at least one subset contains two vertices, and thus at least one hyperedge contains two vertices from this subset.
Comparison with other notions of bipartiteness
There are other natural generalizations of bipartite graphs. A hypergraph is called balanced if it is essentially 2-colorable, and remains essentially 2-colorable upon deleting any number of vertices. The properties of bipartiteness and balance do not imply each other. Bipartiteness does not imply balance. For example, let H be the hypergraph with vertices and edges:It is bipartite by the partition X=, Y=. But is not balanced. For example, if vertex 1 is removed, we get the restriction of H to, which has the following hyperedges;It is not 2-colorable, since in any 2-coloring there are at least two vertices with the same color, and thus at least one of the hyperedges is monochromatic. Another way to see that H is not balanced is that it contains the odd-length cycle C =, and no edge of C contains all three vertices 2,3,4 of C. Balance does not imply bipartiteness. Let H be the hypergraph:it is 2-colorable and remains 2-colorable upon removing any number of vertices from it. However, It is not bipartite, since to have exactly one green vertex in each of the first two hyperedges, we must have two green vertices in the last hyperedge.