In graph theory, a maximal independent set (MIS) or maximal stable set is an independent set that is not a subset of any other independent set. In other words, there is no vertex outside the independent set that may join it because it is maximal with respect to the independent set property.
For example, in the graph , a path with three vertices , , and , and two edges and , the sets and are both maximally independent. The set is independent, but is not maximal independent, because it is a subset of the larger independent set . In this same graph, the maximal cliques are the sets and .