Skip to main content
. 2018 Feb 10;18(2):545. doi: 10.3390/s18020545
Algorithm 1: The double-layer Tabu search maximal clique (DTSMC).
Input: Gi+, Degree (Gi+) and N(Gi+)
Output: Calli
1 Initialization: randomly select the min degree vertex Current from Gi+, Tabu_first_set = ø, Tabu_second_set = ø, Calli = ø, Ci = ø, p_next = ε, P_left = Gi+
2 for j = 1; j ≤ |P_left|; j++ do // Find maximal clique of subgraph
3 Candi_set = N(pji);
4 while |Candi_set| ≠ ø // Find the maximum clique at the current node
5   Randomly select a vertex p_next from Candi_set;
6   if p_nextk|Cj|N(ckj) // Evaluate common neighbor nodes
7    CjCj ∪ {p_next };
8    Tabu_second_setTabu_second_set ∪ {p_next};
   // Update second-level Tabu list
9    Candi_setk|Cj|N(ckj)Cj; //
10   end if
11 end while
12 for k = 1, K = |Cj|
13   if degree(ckj) = |Cj| − 1 // Compute the node degree
14    P_leftP_left/ckj; // Update second-level candidate solution list
15    Tabu_firt_set = Gi+P_left; // Update first-level Tabu list
16   end if
17 end for
18 Calli = Calli + Cj;
19 end for
20 Return Calli //Return all maximal clique