- strategy_independent_set(G, colors)¶
Uses a greedy independent set removal strategy to determine the colors.
This function updates
colorsin-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.
Gis 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.