hatvis.problems.is_two_colorable#

hatvis.problems.is_two_colorable(H, max_nodes=40)[source]#

Decide Property B (2-colorability without monochromatic hyperedge) by backtracking.

Exponential in the worst case; intended for small hypergraphs. Returns the answer and a valid coloring if one exists.