Skip to main content
. 2024 Jul 8;26(7):580. doi: 10.3390/e26070580
Algorithm 1 Critical Candidate Node-based Attack

Input: a network G0 with N nodes.

Output: index t of the node to be attacked.

  1: taboo_listArray(0)

  2: FCDArray(N)

  3: SCDArray(N)

  4: out_degreesArray(N)

  5: for i=1 to N do

  6:     if get_indegree(Vi)==0 then

  7:         taboo_list.insert(i)

  8:     end if

  9: end for

10: for j=1 to N do

11:     if j in taboo_list then

12:         FCD[j]0

13:         SCD[j]0

14:     else

15:         FCD[j]calculate_FCD(Vj)

16:         SCD[j]calculate_SCD(Vj)

17:     end if

18:     out_degrees[j]get_outdegree(Vj)

19: end for

20: if max(FCD)!=0 then

21:     targmax(FCD)

22: else if max(SCD)!=0 then

23:     targmax(SCD)

24: else

25:     targmax(out_degrees)

26: end if

27: return t