|
SOLUTIONS
|
COMBINATORICA PACKAGE SYMBOL
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.
DetailsDetails
- 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.
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
