How this calculation works
Test whether a finite hypergraph admits two colors with no monochromatic hyperedge, and return a coloring witness when it does. A hyperedge can contain more than two vertices, so ordinary graph bipartiteness is not the same problem. The calculator exhausts the supported small-instance assignments and labels incomplete capped searches as errors rather than negative proofs.
A valid 2-coloring gives every hyperedge at least one vertex of each color.A worked example
The seven displayed triples form the Fano-plane hypergraph. Every binary assignment makes at least one triple monochromatic, so it is not 2-colorable. A single triple by itself is 2-colorable, illustrating why ordinary edge parity rules do not decide general hypergraphs.
Good to know
1–20 vertices and ≤100 nonempty hyperedges, distinct valid labels within each row. Exhausts binary assignments when no witness exists. Singleton edges are infeasible. This is property B, not arbitrary-k hypergraph chromatic number.
Reference: Method reference: Two colorable hypergraph calculator with a coloring witness (opens in a new tab) ↗
Hyperedges impose a collective condition
Each hyperedge must contain at least one vertex of each color. It does not require every pair inside that hyperedge to have different colors, which would be impossible for three vertices with two colors.
Replacing a hyperedge by a clique therefore changes the question. A two-vertex hyperedge behaves like an ordinary graph edge, while a larger hyperedge merely forbids the two constant color patterns across its members.
Edges can contain more than two vertices; ordinary bipartite graph coloring does not represent general property-B constraints. The Directed Steiner tree calculator from a root and terminal vertices offers a complementary calculation under its own stated assumptions.
Immediate infeasibility and empty constraints
A singleton hyperedge cannot contain both colors and makes the instance impossible. Empty hyperedges are likewise not meaningful successful constraints for this interface.
Repeated vertices inside one hyperedge do not supply additional members and are rejected or normalized according to the input rules. Vertices in no hyperedge can receive either color without affecting feasibility. Keep the ground-set size separate from the largest label appearing in a particular hyperedge.
Worked example and mathematical rule
The seven displayed triples form the Fano-plane hypergraph. Every binary assignment makes at least one triple monochromatic, so it is not 2-colorable. A single triple by itself is 2-colorable, illustrating why ordinary edge parity rules do not decide general hypergraphs.
A valid 2-coloring gives every hyperedge at least one vertex of each color.
Exhaustive search and complement symmetry
The implementation inspects binary color assignments within its bounded vertex scope. Complementing every color preserves validity because the condition treats both colors symmetrically.
A returned assignment can therefore always be reversed to obtain another witness. The output concerns existence, not a count of all two-colorings. Although simple special cases reduce to graph bipartiteness, general hypergraph two-colorability is computationally harder and should not be advertised as a linear-time graph coloring routine.
A witness is easy to verify
For every hyperedge, gather its vertices’ assigned colors and confirm that both zero and one occur. This check is much smaller than searching all assignments.
A completed negative result establishes that no binary assignment satisfies every entered hyperedge. It does not identify the smallest obstruction. Deleting a hyperedge can create a solution, while adding a hyperedge can destroy one; neither operation can have the opposite effect on feasibility.
Property B and combinatorial examples
The property is often called Property B. Small projective-plane examples illustrate why edges with several vertices can still force a global contradiction.
Pairwise intersections between hyperedges do not by themselves decide colorability. The pattern of overlapping constraints is what matters. Use numeric labels consistently across rows: accidentally creating separate copies of a shared vertex can turn an impossible hypergraph into an apparently easy instance.
Translating a real constraint system
A hyperedge might represent a group that must contain both types of assignment, such as a committee requiring two categories. The mathematical model does not enforce balanced class sizes, quotas, preferences or costs.
If those are required, a satisfying witness may still be unsuitable for the application. Report the no-monochromatic-edge rule explicitly. The search result is a statement about the entered finite set system, not about all similarly sized hypergraphs or all possible ways to group the underlying objects.
A few questions, answered
Is this ordinary bipartite graph testing?
Only when every hyperedge has exactly two vertices.
What happens with a singleton hyperedge?
The instance is impossible because one vertex cannot show both colors.
Must each hyperedge be evenly split?
No. It only needs at least one vertex of each color.
Does the output count all colorings?
No. It reports existence and one witness within the supported search scope.