Algorithm 1
|
-
1:
-
2:
whiledo
-
3:
if
then ▹ Case 1.a: if a node exists with threshold 0, it is self-influenced
-
4:
; ▹ Remove u from the hypergraph
-
5:
; ▹ Reduce the thresholds of the edges containing u
-
6:
; ▹ Reduce the size of the edges containing u
-
7:
else
-
8:
if
then ▹ Case 1.b: if an edge exists with threshold 0, it is self-influenced
-
9:
; ▹ Remove e from the hypergraph
-
10:
; ▹ Reduce the thresholds of the nodes belonging to e
-
11:
; ▹ Reduce the degree of the nodes belonging to e
-
12:
else
-
13:
if
then ▹ Case 2: v cannot be influenced by its neighbors
-
14:
; ▹ Add u to the seed set S
-
15:
; ▹ Remove u from the hypergraph
-
16:
; ▹ Reduce the thresholds of the edges containing u
-
17:
; ▹ Reduce the size of the edges containing u
-
18:
else ▹ Remove a node v or an edge e
-
19:
▹ is the current degree of the node v
-
20:
▹ is the current size of the edge
-
21:
if
then ▹ Case 3.a: Remove u
-
22:
; ▹ Remove u from the hypergraph
-
23:
; ▹ Reduce the size of the edges containing u
-
24:
else ▹ Case 3.b: Remove e
-
25:
; ▹ Remove e from the hypergraph
-
26:
; ▹ Reduce the degree of the nodes belonging to e
-
27:
return S
|