bron_kerbosch#
- iqm.applications.mis.bron_kerbosch(mis_problem, all_solutions=False)[source]#
Bron-Kerbosch algorithm for finding the maximum independent set.
The algorithm finds all maximal cliques in a graph recursively. Cliques in complement graph correspond to independent sets in the problem graph. For details see find_cliques — NetworkX documentation (and the references therein). If
all_solutionsis False (default), return one maximum independent set as a bitstring. Ifall_solutionsis True, return a set of bitstrings corresponding to all maximum independent sets found (not all maximal independent sets).- Parameters:
mis_problem (MISInstance) – A problem instance of maximum independent set to be solved.
all_solutions (bool) – Should the algorithm return all solutions?
- Returns:
A bitstring solution.
- Return type: