Skip to content

Repository files navigation

Voter Model on Heavy-Tailed Undirected Networks

This repository contains Python simulations of opinion dynamics and consensus formation on complex undirected networks with heavy-tailed degree distributions.
The project explores how network topology (in particular, heavy-tailed in- and out-degree distributions) affects consensus time and opinion evolution.

The code is intended for academic / educational use, especially for students or researchers interested in:

  • Complex networks
  • Voter models and consensus dynamics
  • Configuration models
  • Heavy-tailed (Pareto-like) degree distributions

Project Structure

The repository currently includes the following scripts:

  • Undirected Wright-Fisher diffusion.py
    Studies the diffusion approximation of opinion dynamics on directed networks. The script investigates the evolution of opinion density and its relationship with theoretical predictions derived from Wright–Fisher–type diffusion limits in the presence of degree heterogeneity.

  • Undirected Consensus.py
    Simulates the voter model on undirected random graphs and configuration model networks. The script studies consensus times as a function of system size and compares numerical results with theoretical scaling laws.

  • Undirected Independent edges.py
    Investigates the time evolution of discordant (independent) edges in the undirected voter model. The script tracks the fraction of disagreeing edges and compares empirical trajectories with theoretical predictions based on opinion density.

  • Undirected not connected regime.py
    Explores voter model dynamics on undirected random graphs in the sparse, non-connected regime. The script examines how lack of global connectivity affects consensus times and scaling behavior.


References

All the projects in this repository are based and were used to develope cutting-edge research in the field of applied mathematics, physics, complex systems and information theory. The main references are

Voter model on heterogeneous directed networks by Luca Avena, Federico Capannoli, Diego Garlaschelli and Rajat Subhra Hazra.

Meeting, coalescence and consensus time on random directed graphs by Luca Avena, Federico Capannoli, Rajat Subhra Hazra and Matteo Quattropani.

Evolution of discordant edges in the voter model on random sparse digraphs by Federico Capannoli.


Model Overview

The simulations are based on variants of the voter model, where:

  • Each node represents an agent with a binary opinion.
  • The network is undirected, meaning influence is symmetric.
  • Degrees are drawn from heavy-tailed (Pareto) distributions, allowing for hubs and strong heterogeneity.
  • Opinion updates follow stochastic rules based on neighbors’ states.

Requirements

The code is written in Python 3 and uses standard scientific libraries:

  • numpy
  • scipy
  • networkx
  • matplotlib

You can install the dependencies with:

pip install numpy scipy networkx matplotlib

About

Simulation of voter model and consensus dynamics on random undirected networks with heavy-tailed degree distributions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages