Consider an undirected graph G = (V,E), where V = {1,...,n} and |E| = m. A weight wi ∈R is assigned to each vertex i ∈ V . An independent set is a set S ⊆ V such that no two vertices in S are joined by an edge in E. We seek an independent set of maximum total weight in G.
void BC_FixVariables(BobNode *node, int ic, int xic) {
int j;
if (xic == 1) {
for (j = 0; j < BobPbSize; j++) {
if (j != ic)
if (getSparseAdjacencyMatrixValue(M_adj, ic, j) == 1.) {
// (ic,j) belongs to E so X[ic] = 1 => X[j] = 0
if(!node->xfixed[j]) {
node->xfixed[j] = 1;
node->sol.X[j] = 0;
}
}
}
}
}