Macaulay2 » Documentation
Packages » Graphs :: bipartiteColoring
next | previous | forward | backward | up | index | toc

bipartiteColoring -- Returns a coloring of a bipartite graph

Synopsis

Description

A graph is bipartite if it has a chromatic number less than or equal to 2. This method colors the graph two colors. In other words, it partitions the graph into two sets such that there is no edge connecting any vertex within each set.

i1 : G = graph({{0,1},{1,2},{2,4},{3,4},{4,5}},EntryMode=>"edges");
i2 : bipartiteColoring G

o2 = {{0, 2, 3, 5}, {1, 4}}

o2 : List

See also

Ways to use bipartiteColoring :

For the programmer

The object bipartiteColoring is a method function.