Research Article

The Spreading of Information in Online Social Networks through Cellular Automata

Algorithm 1

The information spreading model pseudocode.
Define:
State← current state of a node
τ time step
Duration← the period in current state
Procedure:
for each t τ do
Traverse the network and fill in State of each node
for each node in small-world networks do
if State = unaware then
if Propagation factor then
State← interested
else
State ← concerned
end if
else if State = concerned then
if Memory superposition factor then
State ← interested
else
Duration←Duration + 1
end if
else if State = interested then
if Information attenuation factor then
State←abandoned
else
Duration←Duration + 1
end if
end if
end for
end for