This program solves maximum independent set problem1 using parallel algorithms (brute force and greedy).
- The Boost Graph Library
- Boost Thread
Given an undirected graph , find the maximum-cardinality subset such that no two vertices in is adjacent.
Maximal independent set is:
For each subset (2^n) check adjacency matrix (n^2).
Complexity: O(n^2 * 2^n)
Amdahl's law:
where
- f - sequential part of algorithm;
- p - number of processors;
- Sp - theoretical speedup of the whole task.
Start from each vertex of graph and make recursive calls for adjacency vertices.
Complexity: O(n^2)
Amdahl's law: