finds a two-coloring of graph if is bipartite. It returns a list of the labels 1 and 2 corresponding to the vertices.


  • To use , you first need to load the Combinatorica Package using Needs["Combinatorica`"].
  • The labeling is a valid coloring if and only if the graph is bipartite.
New to Mathematica? Find your learning path »
Have a question? Ask support »