Home▸Articles▸Networks & Graph Theory

Epidemic Spread on a Random Network (2D): Modeling Disease Transmission in Complex Systems

Understanding how diseases spread through populations is crucial for developing effective public health strategies.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

The SIR Model

The SIR model is a fundamental framework for understanding the spread of infectious diseases. It divides the population into three compartments: Susceptible (S), Infected (I), and Recovered (R). Individuals can move between these states, with susceptible individuals becoming infected upon contact with an infected individual, and infected individuals recovering after a certain period.

The model is governed by differential equations that describe the rate of change in each compartment over time. The key parameters are the infection rate β and the recovery rate γ.

Random Network Structures

In this simulation, an Erdős–Rényi random network is used to model social or biological interactions between individuals. Each node represents a person, and edges represent potential contacts that can lead to disease transmission.

The connection probability determines the density of the network, influencing how quickly diseases can spread through the population.

live demo · related simulation● LIVE

Epidemic Dynamics

As the simulation runs, you observe changes in the number of susceptible, infected, and recovered individuals over time. These dynamics are influenced by the infection probability β, recovery duration γ, and initial conditions such as the number of initially infected nodes.

Understanding these dynamics helps predict how different interventions might affect disease spread.

Real-World Applications

The SIR model on random networks has been applied to study various real-world scenarios, from influenza outbreaks in schools to the spread of computer viruses. It provides insights into how network structure and individual behavior impact disease propagation.

By adjusting parameters like infection probability and recovery duration, you can simulate different public health interventions and assess their effectiveness.

Frequently asked questions

What is an Erdős–Rényi random network?

An Erdős–Rényi random network is a type of probabilistic graph where each pair of nodes has a fixed probability of being connected by an edge, making it useful for modeling large-scale interactions in complex systems.

How does the initial number of infected seeds affect the epidemic spread?

The initial number of infected seeds significantly influences how quickly and widely the disease spreads. A higher number of initial infections can lead to a faster and more extensive outbreak, while fewer initial cases result in slower spread.

Why is the recovery rate important in the SIR model?

The recovery rate γ determines how quickly infected individuals return to the susceptible state or are removed from the population. A higher recovery rate can lead to a faster decline in the number of infected individuals, potentially preventing an outbreak.

Can this simulation be used for other types of network structures?

Yes, while this specific simulation uses random networks, similar principles apply to other network structures like scale-free or small-world networks. The SIR model can be adapted to study disease spread in various network topologies.

Try it live

Everything above runs in your browser — open Epidemic Spread on a Random Network (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Epidemic Spread on a Random Network (2D) simulation

What did you find?

Add reproduction steps (optional)