194 Analyzing and Securing Social Networks
be extended to a standard distributed architecture. For DC, we simply distribute the adjacency list
for each node to a separate processor. For information gain-based partitioning (IGBP), when cal-
culating the information gain for each attribute, we distribute the processing of each attribute to a
separate processor.
Algorithm 17.1: CC_Multicore()
1: for
v
i
∈
do
2:
ijij
vvv
{(,)
|
{rst-degree neighbors of v
i
}
3: r
i
= FindPossibleTriples(
,
)
4: end for
5: for (v
i
, v
j
, v
k
) ∈ r
i
do {H is a Hashmap}
6: IncrementCount(Hash(v
i
, v
j
, v
k
), H)
7: end for
8: for v
i
∈ {initialize counters}
9: c
i
= 0
10: end for
11: for (k, v) ∈ H do
12: if v = 3 then
13: for v
i
∈ k do
14: c
i
++
15: end for
16: end if
17: ...