Research Article

Containing Epidemic Spreading on Networks with Neighbor Resource Supporting

Algorithm 2

Epidemic spreading dynamics.
(1)Input: Network and dynamical parameters , , , , , , , ;
(2)Output: Epidemic spreading size ;
(3)Randomly selecting seeds, and put them into queue ;
(4);
(5)Initialize for every node ;
(6)while is not empty do
(7) Initialize to be empty;
(8);
(9)for to do
(10)  Node of selects one neighbor to contact according to equation (1);
(11)  Node transmits the infection to node with probability if is in the susceptible state;
(12)  if Node receives the infection from then
(13)  end if
(14)  ifthen
(15)   Node becomes infected, and put it into queue ;
(16)  end if
(17)end for
(18)for to do
(19)  Recovering node according to equation (3);
(20)  if Node recovers then
(21)   Delete node from queue ;
(22)  end if
(23)end for
(24)for to do
(25)  Adding node to queue ;
(26)  Deleting node from queue ;
(27)end for
(28)
(29)end while