We need an algorithm to generate all independent sets of an undirected graph.
For example:
We tried to use 'Bron-Kerbosch' algorithm, but do not understand how to interpret the result.
Input:
A = [1 2; 1 5; 2 3; 2 5; 3 4; 4 5; 4 6]
Desired Output:
B = [1 3 6; 1 4; 2 4; 2 6; 3 5 6]
How to interpret the result?
Thank you!
Just realised how to solve it....
Input:
A = [1 2; 2 3; 3 4; 4 5; 4 6]
Convert to adjacency matrix:
BK_MaxIS Output:
Where row i of column j is 1, the vertex i participates in the maximal independent set indexed by column j.
That means:
B = [1 3 6; 1 4; 2 4; 2 6; 3 5 6]