strategy_independent_set(G, colors)[source]#

Uses a greedy independent set removal strategy to determine the colors.

This function updates colors in-place and return None, unlike the other strategy functions in this module.

This algorithm repeatedly finds and removes a maximal independent set, assigning each node in the set an unused color.

G is a NetworkX graph.

This strategy is related to strategy_smallest_last(): in that strategy, an independent set of size one is chosen at each step instead of a maximal independent set.