Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_voter_model_example.cc File Reference

Phase-6 illustration: voter model on a small hand-built graph. More...

#include <array>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <random>
#include <sstream>
#include <string>
#include <vector>
#include <tpl_ca_graph_automaton.H>
Include dependency graph for ca_voter_model_example.cc:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Phase-6 illustration: voter model on a small hand-built graph.

Builds a connected 12-node graph (a 3-cycle of triangles meeting at a central hub) and runs the deterministic-seed voter model on it. Prints node states at every step plus a tiny TikZ rendering of the final state suitable for inclusion in a paper.

The voter model on any finite connected graph is a martingale and almost surely reaches consensus; with a fixed seed it does so in a few thousand steps for 12 nodes.

Definition in file ca_voter_model_example.cc.

Function Documentation

◆ main()