1、Introduction

Social networks have become integral to our daily lives, enabling the rapid spread of information, opinions, and behaviors among individuals. From the propagation of ideas in online communities to the transmission of diseases within close-knit social circles, understanding the dynamics of diffusion in social networks is crucial for various fields, including public health, marketing, and social sciences. One base framework for studying epidemic spread is the Susceptible-Infectious(SI) model, which has been widely adopted and studied in epidemiology.

In this study, we will utilize computational simulations to explore the diffusion process in social networks,we simulate the diffusion process in social networks using the SI model

2、SI Model

The SI model is a simplified mathematical framework used to study the spread of infectious diseases within a population. It focuses on two main compartments: susceptible (S) and infectious (I).

The SI model describes the transition process of an individual from S (susceptible) to I (infected) state. Assuming that in a closed group, there is no birth, death and migration, and assuming that individuals are evenly mixed in the group, that is, the probability of being infected is the same, the parameter $p$ can be used to represent the infection rate.

3、R implementation

Different from traditional diffusion research, network diffusion considers the influence of network structure on the diffusion process. In network diffusion, the interconnections and relationships between individuals play a key role and can influence the spread of information, ideas, or diseases.

The basic algorithm for simulating network diffusion using R language is very simple:

3.1、Example of CDF

Take 100 nodes and a propagation probability of 0.4 as an example,the initial structure of the network is as follows:

Untitled

Randomly select a node as the propagation source, as follows: