TwoColoring

TwoColoring[g]
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 »