grinpy.invariants.chromatic.chromatic_number

grinpy.invariants.chromatic.chromatic_number(G)

Returns the chromatic number of G.

The chromatic number of a graph G is the size of a mininum coloring of the nodes in G such that no two adjacent nodes have the same color.

The method for computing the chromatic number is an implementation of the algorithm discovered by Ram and Rama.

Parameters:G (NetworkX graph) – An undirected graph.
Returns:The chromatic number of G.
Return type:int

References

A.M. Ram, R. Rama, An alternate method to find the chromatic number of a finite, connected graph, arXiv preprint arXiv:1309.3642, (2013)