Constructing incompatibility graph and computing maximal independent set.