2.3. igraph_maximal_independent_vertex_sets — Find all maximal independent vertex sets of a graph

int igraph_maximal_independent_vertex_sets(const igraph_t *graph,
					   igraph_vector_ptr_t *res);

A maximal independent vertex set is an independent vertex set which can't be extended any more by adding a new vertex to it.

The algorithm used here is based on the following paper: S. Tsukiyama, M. Ide, H. Ariyoshi and I. Shirawaka. A new algorithm for generating all the maximal independent sets. SIAM J Computing, 6:505--517, 1977.

The implementation was originally written by Kevin O'Neill and modified by K M Briggs in the Very Nauty Graph Library. I simply re-wrote it to use igraph's data structures.

If you are interested in the size of the largest independent vertex set, use igraph_independence_number() instead.

Arguments: 

graph:

The input graph.

res:

Pointer to a pointer vector, the result will be stored here, ie. res will contain pointers to igraph_vector_t objects which contain the indices of vertices involved in an independent vertex set. The pointer vector will be resized if needed but note that the objects in the pointer vector will not be freed.

Returns: 

Error code.

See also: 

igraph_maximal_cliques(), igraph_independence_number()

Time complexity: TODO.