b = isBipartite G
The function isBipartite determines if a given graph is bipartite. A graph is said to be bipartite if the vertices can be partitioned into two sets W and Y such that every edge has one vertex in W and the other in Y. Since a graph is bipartite if and only if its chromatic number is 2, we can check if a graph is bipartite by computing its chromatic number.
|
|
|
|
|
The object isBipartite is a method function.