Consensus and Voting on Large Graphs: An Application of Graph Limit Theory

Building on recent work by Medvedev (2014) we establish new connections between a basic consensus model, called the voting model, and the theory of graph limits. We show that in the voting model if consensus is attained in the continuum limit then solutions to the finite model will eventually be close to a constant function, and a class of graph limits which guarantee consensus is identified. It is also proven that the dynamics in the continuum limit can be decomposed as a direct sum of dynamics on the connected components, using Janson's definition of connectivity for graph limits. This implies that without loss of generality it may be assumed that the continuum voting model occurs on a connected graph limit.


Introduction
Given a group of agents voting on whether or not to implement a policy, when and how can the group come to an agreement?This is a consensus problem.Models and algorithms which solve consensus problems are important in the theory of control systems [16,Section 16.2] and economics [9].In this paper we focus on a particular model of the consensus problem called the voting model.This model fits into the framework considered by Medvedev [17], who applied graph limit theory to sequences of dynamical systems.
Our key result shows that if the solution to the continuum limit of the voting model reaches consensus then solutions to the finite model on sufficiently large graphs will eventually be close to a constant function.Furthermore, building on our concept of twin-kernels a class of graph limits which guarantee consensus is identified.We also prove that the dynamics in the continuum limit can be decomposed as a direct sum of the dynamics on connected components.This means that without loss of generality we may assume that the dynamics of the continuum model occur on a connected graph limit.These results provide motivation for the continued study of graph limit theory in the consensus protocol literature.
The structure of the remainder of this paper is as follows.In Section 2 we will give a brief introduction to the voting model in the finite setting and Section 3 will review some basic results from the graph limit theory literature.Section 4 extends the model to the continuum setting and Section 5 studies consensus in the continuum model and its relationship with the finite model.Section 6 focuses on a special case of the continuum voting model and classifies a class of graph limits which guarantee consensus.The paper concludes with Section 7 which extends the analysis to the context of random graphs.
Some of the results presented in this paper such as Lemma 5.10 extend to the more general class of nonlinear heat equation initial value problems considered by Medvedev in [17].Other results such as Theorem 5.2, Proposition 5.9 and Theorem 7.5 rely on a conservation condition (Lemma 5.1) which holds when an additional condition on the heat equation is satisfied.The remaining results such as those in Section 6 rely on specific aspects of the voting model we consider.However, in any case the methods used throughout this paper may prove useful for researchers interested in initial value problems on large graphs and results about consensus.

Limitations and scope
The main contribution of this paper is the application of graph limits to approximately solve a consensus problem (Theorem 5.2) and the methods developed within.The practical application, however, is limited by the difficulty involved in finding solutions to the continuum model which attain consensus for interesting graph sequences.
Section 6 absolves this difficulty for a class of graph sequences by showing that consensus is always attained in such cases.Applying our key result then shows that consensus can be approximately guaranteed for large graphs within such sequences.However, a stronger result can be attained since the Laplacian matrix of a connected graph with nonnegative weights will always attain consensus [25,Theorem 1].This has meant that our examples illustrating results developed in Section 6 may be solved by other methods.It is important to note that despite this drawback our results are not trivialised -the key result applies to any graph sequence which attains consensus in the limit, only the class identified in Section 6 is affected.

Finite voting model
Various voting models have been formulated in the consensus protocol literature [1,6].We consider an elementary form which is also studied in [20] and [24].However, the focus of this paper differs from the existing literature by considering the voter model on sequences of growing graphs; that is, sequences of graphs with vertex sets whose size increases unboundedly.Particular emphasis is placed on approximating the long term behaviour of the voter model on large graphs.Section 4 will extend the voting model to the continuum setting which will assist in determining the long term behaviour of the model on sufficiently large graphs.
We first begin with some basic definitions from graph theory: A graph is an ordered pair of sets, say G = (V, E), with V denoting the vertex set and E denoting the edge set of the graph.The elements of E are two element subsets of V .This definition implies that the graph is simple; that is, the edge set contains no loops or multiple edges.For more information on graphs we refer the reader to [5].
An edge-weighted graph is a graph H = (V, E) together with a sequence {β ij } i,j∈V of real edge weights, such that β ij = β ji for all i, j ∈ V and if β ij = 0 then {i, j} is an edge of H.A simple graph is a special case of an edge-weighted graph where edge weights are 0-1 valued with β ii = 0 for all i ∈ V .Without loss of generality we will only consider edge weights which are contained in the interval [−1 , 1].
Given an edge-weighted graph G n on vertex set [n] := {1, 2, . . ., n} with edge weights β , our voting model arises from the following process.Begin with a set of voters [n], each with initial opinions denoted by u The influence of voter i on voter j (i, j ∈ [n]) is represented by the edge weight At each infinitesimal time step, every voter i ∈ [n] updates their opinion based on the average of every other voter j ∈ [n] -scaled according to For a given j ∈ ij > 0 then holding all else equal (1) implies that voter i adopts an opinion closer to voter j's opinion in the next time step.Whilst, if β (n) ij < 0 then holding all else equal voter i's opinion will diverge from voter j's opinion in the next time step.
In Section 7 we will extend our analysis to consider the voting model on sequences of random simple graphs.This allows our results to be applied to the voter model on many well-studied random graph processes such as the Watts-Stogatz small world graph.
It should be noted that the voting model process in this paper represents more general systems than simply voters with opinions.In particular, the aforementioned process has been used in autonomous vehicle control systems [26], to model the spread of alcohol abuse [8] and neuronal-network activity [22].
We will exclusively consider time to be continuous with t ∈ R ≥0 .Thus the voting process described above can be expressed as an initial value problem (IVP).Vectors and vector-valued functions will be written in bold font whilst components will not.
For any positive integer n, let g (n) ∈ R n and let H n be an edge-weighted graph with vertex set [n] and edge weights {β ij } i,j∈ [n] .Then the evolution of voters' opinions is described by the solution u We now define consensus, which will be the key focus of this paper from Section 5 onwards.
Definition 2.1.For any positive integer n, let g (n) ∈ R n and let H n be an edgeweighted graph on vertex set then we say consensus is attained by u (n) .
Example 2.2.For any positive integer n, let H n be an edge-weighted graph on the vertex set [n] such that the edge weights are all equal to 1. Then H n will attain consensus for every initial condition vector g (n) ∈ R n .Whilst, if the edge weights are all equal to −1 then u (n) reaches consensus if and only if g (n) is a constant vector.
The IVP (2) can be expressed as a linear system of differential equations.Let for each i, j ∈ [n] and let By considering the matrix ) we can equivalently write (2) as Note that the matrix D (n) is simply the Laplacian matrix of the graph H n scaled by − 1 n .The IVP (4) has a unique solution so questions of interest such as whether the agents reach a consensus and the time taken to arrive at this consensus are completely determined via the eigenvalues of the (real, symmetric) matrix D (n) .In particular, if the eigenvectors associated with the zero eigenvalue are contained within the subspace spanned by (1, 1, . . ., 1) ∈ R n and all other eigenvectors of D (n) have negative eigenvalues then consensus will be reached.If all of the eigenvalues are non-positive then further analysis is required to determine whether or not consensus will be reached.The problem with this approach is that graphs with billions of vertices are becoming increasingly common in both practice and research.However, existing computational methods for calculating eigenvalues and eigenvectors of matrices do not scale well [13].
The approach we propose considers sequences of the voter model on graphs which grow unboundedly.When time is continuous, this is equivalent to a sequence of IVPs such as (4) for n ∈ N. By studying the sequence of growing graphs we can under certain conditions construct a limiting object (known as the graph limit) which approximately solves the consensus problem on sufficiently large graphs.
To motivate our approach we introduce an example of the consensus problem which will be approximately solved using the results developed within this paper; that is, without the need to calculate eigenvalues of any matrix.In Section 5 we will refer back to this example to illustrates our key result.
Example 2.3.Consider a sequence of edge-weighted graphs G n given by the following process: define the function W : Then for each n ∈ N let G n be an edge-weighted graph on the vertex set [n] such that the edge-weight between vertices (i, j) This process of constructing a graph sequence from a function such as W will be revisited in Example 3.4.-1 Now consider a sequence of voter models on the graphs {G n } ∞ n=1 with some sequence of initial condition vectors g (n) ∈ R n .Then the unique solution is determined by (5) and consensus is determined by the eigenvalues of the matrix D (n) .The matrices D (n) for n = 5 and 6 are computed below.
Computing the eigenvalues for the matrix D (n) and hence solving the consensus probelem will become infeasible as n grows sufficiently large.This paper we will develop a method to approximately solve the consensus problem on large graphs, which applies to the graph sequence considered in the above example.

Graph limit theory
The theory of graph limits was introduced by Lovász and Szegedy in 2006 [15] and then further developed in a series of papers by Borgs et al. [2,3].A key goal of Lovász and Szegedy was to understand large graph structures by characterising convergence for sequences of graphs which grow unboundedly, thereby constructing a natural 'limit object'.
In Section 3.1 we present some basic definitions and results from the theory of graph limits, and describe a canonical example of a convergent graph sequence.In Section 3.2 we review the appropriate notion of connectivity for graph limits.For an overview of the theory and its applications we refer the interested reader to the excellent monograph by Lovász [14].

Preliminaries
The theory of graph limits is based on the graph-theoretic notion of a homomorphism density.This notion is then used to define convergence of graph sequences.Alternatively, we will focus on an equivalent definition formulated using a metric which we review in this section.
Throughout this paper we will use the term measurable, this will always refer to the Lebesgue measure with Borel σ-algebra.It is also important to note that a number of the definitions and results reviewed in this section have been stated without an additional necessary requirement of uniformly bounded edge weights since this is automatically satisfied by our assumption that edge weights are contained in [−1 , 1].Lastly, since this paper is only concerned with edge-weighted graphs rather than both vertex and edge weighted graphs, we will restrict some definitions to this special case without explicit warning.In what follows the phrase 'weighted graph' will always refer to an edge-weighted graph.
Let H be a weighted graph, the pixel kernel of H is a measurable function from [0, 1] 2 to [−1, 1] which represents the graph H and is denoted by W H .The construction is as follows: let H = (V, E) be a weighted graph with edge weights {β ij } i, j∈V .Partition [0, 1] into |V | measurable subsets of equal measure, say {I i } i∈V .Then define the pixel kernel of H: This construction is not unique, however given a graph, the set of pixel kernels arising via ( 6) forms an equivalence class under the weakly isomorphic relation (which we do not define here).We now define kernels which are the limit objects of graph sequences.
In the special case that W : [0, 1] 2 → [0, 1] we call W a graphon.We denote the set of all kernels and graphons by W 1 and W 0 , respectively.
Informally a kernel (or graphon) can be thought of as a generalisation of the adjacency matrix of a weighted graph which has a continuum number of vertices.Definition 3.2.A kernel which is also a step function is called a step-kernel.
Note that for every weighted graph H the pixel kernel of H (6) is a step kernel.In the theory of graph limits convergence of graph sequences can be defined via the cut-distance metric, δ (• , •).However, for the purposes of this paper a stronger form of convergence -convergence in L 2 -norm suffices (refer to [14, Equation 8.14] and [2, Theorem 2.5]).Definition 3.3.Let {H n } n∈N be a sequence of weighted graphs and let W ∈ W 1 be a kernel.We say that the graph sequence {H n } n∈N converges to the kernel W if the sequence of pixel kernels {W Hn } n∈N converges to W in L 2 -norm.
We now present a canonical example of a graph sequence which converges to a given kernel.This construction was utilised by [17] and will be referred to throughout this paper.
For completeness we can redefine I n 1 = 0, 1 n , however, it makes no difference for the results that follow.We now construct the sequence of weighted graphs H n on vertex set [n] with edge weights Medvedev [17] proved that W Hn converges to W in L 2 -norm and hence the graph sequence {H n } n∈N converges to the kernel W .

Connectivity in graph limit
We will make use of the notion of connectivity for graph limits, introduced by Janson [11], which we review here.In fact it will be shown in Theorem 5.11 that connectivity of the graph limit, or kernel, is a necessary condition for consensus when considering arbitrary initial condition functions in the continuum voter model (to be defined in Section 4).
Janson proved that every kernel can be decomposed as a direct sum of connected kernels.To describe this decomposition we need some definitions.Given an interval J = [M, N ] ⊆ [0, 1], we define the nonnegative linear function from J to [0, 1] as follows: Definition 3.6.Let {W i } i∈I ⊆ W 1 be a countable family of kernels and let {a i } i∈I be a countable family of real postive numbers such that j∈I a i = 1.Then the direct sum of {W i } i∈I with weights {a i } i∈I is the kernel denoted by We interpret (8) by partitioning [0, 1] into intervals J i of Lebesgue measure a i for i ∈ I and denoting the nonnegative linear function from J i to [0, 1] by φ i (see ( 7)).Then Then there exist a countable family of connected kernels, {W i } i∈I ⊆ W 1 , and a corresponding family of positive real numbers {a i } i∈I with The connected kernels {W i } i∈I will be referred to as the connected components of W .

Voting on large graphs and graph limits
Extending the voting model to kernels is motivated by a number of observations.Firstly, it is a more general setting to study the voting model which includes the finite voting model considered in Section 2 as a special case.Secondly, many modernday networks such as the internet are for all practical purposes infinitely large.Thus it may be more appropriate to consider the voting model in the setting of graph limits.Thirdly, the behaviour of solutions to the finite voting model are completely determined via eigenvalues and eigenvectors (recall ( 5)).However, for sufficiently large graphs it is computationally infeasible to compute these values and vectors.Approximating a large graph by a kernel provides an alternative method for approximately solving the dynamics of the IVP (2) on large graphs.We begin by presenting the voting model on a kernel.Let W ∈ W 1 and g ∈ L ∞ ([0, 1]).
Then the continuum limit of ( 2) can be expressed by Here, and throughout this paper, the integral sign refers to Lebesgue integration.Replacing IVPs such as (2) with the continuum limit has attracted interest in a number of papers [8,23,27].However as pointed out by Medvedev [17], "a rigorous justification for taking the continuum limit in (such models) was lacking".In light of this, Medvedev [17] showed that the theory of graph limits could be used to prove that the continuum limit of such dynamical systems can approximate the dynamics on large finite graphs, under certain conditions.
In Section 5 we will show how the continuum IVP (10) can be used to approximate the consensus problem of the finite voter model on large graphs.In particular, we will revisit Example 2.3 to illustrate our results.
First we present an existence and uniqueness result which shows that the continuum limit IVP (10) is well-posed; allowing the voting model to be extended to the continuum setting.The result considers the space of continuously differentiable vector-valued functions from where ess sup denotes the essential supremum.The theorem follows as a special case of [17,Theorem 3.2].
For the remainder of this paper when we refer to 'the' solution of the IVP (10) this will always mean the unique solution in C 1 (R, L ∞ ([0, 1])) described above.We now introduce a continuum analog of Definition 2.1.
If A = [0, 1] then we say consensus is attained.
Example 4.3.The constant 1-valued graphon attains consensus for every g ∈ L ∞ ([0, 1]), while, the constant −1-valued kernel reaches consensus if and only if g is a constant valued function.
By applying Medvedev's convergence result [17, Theorem 5.2] we justify the use of the continuum limit (10).We show that under certain conditions the continuum limit approximates the solutions to the voting model on sufficiently large graphs.First consider an IVP in the form of (10) with kernel W and initial condition function g ∈ L ∞ ([0, 1]).We define a sequence of IVPs with the n-th IVP corresponding to the voting model on the graph H n (as defined in Example 3.4) and initial condition g n defined below: where This can naturally be interpreted as a vector in R n , say g (n) for each n.Where the i-th component of the vector g n is the value of the function g n on I n i .Thus, the n-th approximate IVP is This is equivalent to the continuum IVP with step kernel W n = W Hn (see ( 6)) and step function g n (described in (13)) in the sense that u n (x, t) = u n i (t) for all x ∈ I n i .In a similar manner to (11), we define the C([0, T ]; L 2 ([0, 1]))-norm as follows: We now present a key result, which follows as an application of [17, Theorem 5.2].
Theorem 4.4.Let W ∈ W 1 and let g ∈ L ∞ ([0, 1]).If {u n } n∈N is a sequence of solutions to IVPs of the form (10) with initial conditions functions {g n } n∈N ⊆ L ∞ ([0, 1]) and kernels {W n } n∈N ⊆ W 1 and u is a solution to the IVP (10) with initial condition g and kernel W , then for any where C 1 , C 2 are positive constants independent of n.Furthermore, if each W n and g n is given by the construction in Example 3.4 and ( 13) then for any 0 < T < ∞ For the voting model, Theorem 4.4 shows that solutions to the IVP ( 14) can be approximated by the graph limit IVP (10).However, in general replacing IVPs on sequences of convergent graphs with the IVP on their graph limit does not guarantee convergence [21].

Reaching consensus
In Section 4 using the results of [17] we were able to show that the continuum voting model could be used to approximate the finite voting model for large graphs.However, this approximation is attained in the C([0, T ], L 2 ([0, 1]))-norm, and consensus of the continuum model does not imply consensus of the finite model, even for large graphs.This leaves open the question of whether graph limit theory can be used to infer consensus in the finite voting model.
We now prove our main result which answers the above question in the affirmative.We show that if the solution to the continuum model (10) reaches consensus then solutions to the finite model (15) will be close to a constant function, for sufficiently large n and sufficiently large t.This provides motivation for the continued study of the continuum model and, in particular, the search for sufficient conditions which guarantee consensus -this is pursued in Section 6.
First we present a lemma which will be used the proof of our main result Theorem 5.2.
Lemma 5.1.Let W ∈ W 1 be a kernel and let g ∈ L ∞ ([0, 1]).If u is the solution of the IVP (10) then Proof.This proof follows similarly to that of [19,Lemma 3.5].
Theorem 5.2.Let u be a solution to the IVP (10), with kernel W ∈ W 1 and initial condition function g ∈ L ∞ ([0, 1]), and let u n be the solution to the approximate IVP (15) for each positive integer n.Suppose that u reaches consensus on [0, 1] and let D be any positive real number.Then for every ε > 0 and for every c > 0, there exists T = T (ε) and a subset S t ⊆ [0, 1] 2 with λ(S t ) < c 2 such that for all sufficiently large n, Proof.For any positive integer n, applying the triangle inequality three times gives the following upper bound on the consensus equation namely, (12) with A = [0, 1], of u n , for any fixed t ∈ R ≥0 : ess sup Since u reaches consensus, for any ε > 0 there exists T > 0 such that ess sup Let X be a random variable uniformly distributed in [0, 1], denoted as X ∼ U [0, 1], and define the continuous-time processes {u(X, t)} t≥0 and {u n (X, t)} t≥0 .By Lemma 5.1, we have E[u(X, t) − u n (X, t)] = g − g n = 0. Then Chebyshev's inequality [28,Section 7.3] gives, for all t > 0, Now for any D > 0, we have ))-norm (Theorem 4.4), and from (21) we have sup for large n.Thus, for any ε > 0 and any c > 0 there exists an N such that for all n > N , Combining ( 21) and ( 23), we see that for each t ∈ [0, T + D], the set has Lebesgue measure at most c 2 /2.It follows that has Lebesgue measure strictly less than c 2 .Applying ( 19) and ( 20) we attain the required result: for every ε > 0 and for every c > 0 there exists a positive integer N such that for every t ∈ [T, To illustrate the above result we return to a generalised version of the consensus problem introduced in Example 2.3.
Example 5.3.For each 0 < r < 1  2 define the kernel and let G r ∈ L ∞ ([0, 1]) be the family of functions such that Note that when r = 1 3 we attain the function W introduced in Example 2.3 and illustrated in Figure 1.
For any positive integer n and when r = 1 3 the consensus problem from Example 2.3 can be attained via the approximating process defined in ( 14) and (15).Thus, for any initial condition function g ∈ L ∞ ([0, 1]) we can apply Theorem 5.2 to approximately solve the consensus problem by considering the continuum IVP (10) with kernel (24).
The unique solution of the continuum IVP (10) with kernel W r and initial con- This solution can be easily verified to satisfy (10).The piecewise solution reflects the structure of the kernel W r defined in (24) with x ∈ [0, r) decaying at a slower rate than x ∈ [r, 1].This is due to the negative value of W r (x, y) for x, y < r which, informally speaking, produces a push away from consensus.However, as can be observed when 0 < r < 1  2 , the solution u(x, t) converges to zero for all x ∈ [0, 1] as t → ∞ and hence consensus is attained.
Thus, we conclude that consensus is attained in the continuum model and so by Theorem 5.2 we can get arbitrarily close to consensus in the discrete model for sufficiently large graphs.
The above example illustrates an application of Theorem 5.2.However, finding kernels which attain consensus such as (24) so that Theorem 5.2 can be applied is a non-trivial task.The remainder of this section and Section 6 focuses on understanding solutions to the continuum voter model and characterising necessary and sufficient conditions for consensus.
We now establish an almost everywhere pointwise limit for solutions to the continuum model.Recall that vector-valued functions are written in bold font.Definition 5.4.Let u be a solution to the IVP (10).We say that u is a bounded solution if In the continuum model, if W ∈ W 0 is a graphon then the solution u is automatically bounded.
Hence u is a bounded solution.
We now show that any bounded solution to the continuum model ( 10) is a continuous-time martingale.It is important to note that Lemma 5.5 only applies to the IVP (10) when W ∈ W 0 W 1 is a graphon -a nonnegative valued kernel.Whilst, Proposition 5.7 (to be presented) applies to the IVP (10) for any W ∈ W 1 and g ∈ L ∞ ([0, 1]) which admits a bounded solution.
The following definition involves the conditional expectation operator which is covered in detail by [28,Chapter 9].For the purposes of this paper we need only briefly explain the notation; let X be a random variable, we denote the conditional expectation of X given another random variable Y by the random variable If Y (ω) = y j for some ω in the probability space of Y then we interpret (25) as See Recall X ∼ U [0, 1] denotes a random variable X uniformly distributed in the interval [0, 1].Proposition 5.7.Let u be a solution to the IVP (10) with kernel W ∈ W 1 and initial condition function g ∈ L ∞ ([0, 1]).If u is a bounded solution and X ∼ U [0, 1] then the continuous-time process {Z t } t≥0 defined by Z t = u(X, t) is a bounded continuous-time martingale.Further, {Z t } t≥0 converges almost surely as t → ∞.
Proof.First note that by assumption the solution u is bounded and so Z t is bounded.That is, Secondly, we have for all x ∈ [0, 1] and for all t ∈ R ≥0 , u(x, t) = u(x, s) + t s 1 0 W (x, y) u(y, r) − u(x, r) dy dr for any 0 ≤ s ≤ t.Since the integrands of the last two terms are absolutely integrable and bounded above by some positive constant, via Fubini's theorem [7,Thereom 2.37] we have Noting that W is symmetric we have that the above expression equals zero.Hence the necessary condition ( 27) holds and we have a continuous-time martingale.The final claim in the corollary follows immediately from the Martingale Convergence Theorem [28,Theorem 11.5].

Thus, taking the conditional expectation gives
Remark 5.8.The final statement in the proposition above can equivalently be stated in deterministic terms: for all bounded solutions u to the IVP (10) the limit lim t→∞ u(x, t) exists for almost every x ∈ [0, 1], and the function lim t→∞ u(t) is integrable.
We now define the following function: lim t→∞ u(x, t) if the limit exists, 0 otherwise.
It should be noted that the existence of lim t→∞ u(x, t) almost everywhere is not enough to ensure that consensus is attained.A trivial example is the constant 0-valued graphon, which will have u(t) = u * = g for any initial condition function g ∈ L ∞ ([0, 1]).This degeneracy is due to the fact that the constant 0-valued graphon is not connected (as per Definition 3.5).Theorem 5.11 will show that for a general initial condition function g, a necessary condition for consensus is that the kernel be connected.
First we characterise the limiting value, u * , if consensus is reached.this suffices to show that u is a bounded solution.Now to prove the statement in the proposition, we take the limit as t approaches infinity of ( 28) and applying the Dominated Convergence Theorem [7,Theorem 2.24] gives As mentioned above, a necessary condition for is that the kernel be connected (cf.Definition 3.5).The proof of this follows from Proposition 5.9 and the fact that the solution to the continuum voter model on a kernel can be decomposed into solutions on its connected components.The lemma below proves this claim, however, first we introduce some additional notation.
Lemma 5.10.Let W ∈ W 1 and g ∈ L ∞ ([0, 1]).If u solves the IVP (10) then there exists a countable family of positive real numbers {a i } i∈I and a unique family of functions in where u i are solutions to the IVP (10) on a connected kernel.We interpret this direct sum in a similar way to Definition 3.6: partition [0, 1] into intervals J i of length a i for i ∈ I. Then letting φ i denote the nonnegative linear function from J i to [0, 1] (see ( 7)) we have Proof.First, decompose the kernel W ∈ W 1 into a direct sum of connected kernels as in Lemma 3.7; that is, for a family of connected kernels {W i } i∈I ⊆ W 1 and corresponding family of positive real numbers {a i } i∈I with i∈I a i = 1.Let {J i } i∈I denote the partition of [0, 1] into intervals of length a i and let φ i denote the nonnegative linear function from J i to [0, 1] (see 7).
Define the normalised degree function of W ∈ W 1 as Then via an integrating factor it can be shown that the solution to the continuum model (10) solves For an arbitrary element x ∈ J i (see Definition 3.6), d W (x) can be simplified as follows: where we define For x ∈ J i , the solution (30) then becomes (φi(x))(s−t) W i (φ i (x), φ i (y)) u(y, s) dy ds where, again, we substitute y with φ −1 i (z).Thus for all x ∈ J i , But the function which solves (31) is the unique solution to the IVP (10) in )) with connected kernel W i and initial condition function g φ −1 i .Thus, by defining u i as the solution to the IVP (10) with connected kernel W i and initial condition function g φ −1 i , we have and so u(x, t) = u i (φ i (x), t) for all x ∈ J i .
Compactly, we can express this result as We now present a necessary condition for consensus in the continuum model.
Theorem 5.11.Let W be a kernel with connected components {W i } i∈I and associated sets {J i } i∈I and let g ∈ L ∞ ([0, 1]).A necessary condition for the IVP (10) to reach consensus is that where λ(J i ) denotes the Lebesgue measure of the set J i .This necessary condition is immediately satisfied if W is connected.
Proof.Let u(t) be the solution to the IVP (10) with kernel W and initial condition function g.Furthermore, suppose that u(t) reaches consensus.It follows from Lemma 5.10 that and so Now for an arbitrary i ∈ I, u i (t) is simply the solution to the continuum voter model (10) with connected kernel W i and initial condition function g φ −1 i (see within the proof of Lemma 5.10).
Thus, Proposition 5.9 shows that Hence, to avoid a contradiction the necessary condition (32) must be satisfied.

Guaranteeing consensus
In Section 5 it was shown that the continuum voting model ( 10) can be used to approximately solve the consensus problem for the finite voting model (2) on large graphs (see Theorem 5.2).However, the applicability of Theorem 5.2 crucially depends on understanding which graph limits, or kernels, attain consensus in the continuum model (10).This section introduces two new notions called twin-sets and twin-kernels which will allow a broad class of graphons to be identified which the guarantee consensus (see Theorem 6.8).
We now introduce the notion of a twin-set, a maximal twin-set and a twin-kernel.Two sets A and B will be called equal if where λ denotes the Lebesgue measure and ∆ denotes the symmetric difference.
For notational convenience we will denote set equality simply as A = B. We say a twin-set is maximal if for any twin-set B such that where set equality is understood as in (33), then we say that W is a twin-kernel.If in addition W is a graphon we say that W is a twin-graphon.
To illustrate the notions introduced above the following example is provided.
Example 6.2.Every step kernel is a twin-kernel.To see this simply partition [0, 1] into sets {A i } n i=1 and define a i (x, x ) = 1 for all x, x ∈ A i for each i = 1, 2, . . ., n. Further, since every weighted graph can be represented as a step kernel it follows that every weighted graph is also a twin-kernel.
More generally, every kernel W of the form is a twin-kernel.To see this we define the sets A 1 = {x ∈ [0, 1] : f (x) = 0} and A 2 = [0, 1]/A 1 then a 1 (x, x ) = 0 for all x, x ∈ A 1 ; and, This also implies that a twin-kernel need not be connected.An example of a kernel which is not a twin-kernel is the following which does not have any twin-sets and so is not a twin-kernel.
From a combinatorial perspective, twin-sets can be thought of as a generalisation of 'blow-up' graphs defined below.Definition 6.3.(Adapted from [14, Section 3.3]) Let r be a positive integer, the r-blow-up graph G(r) of a weighted graph G is obtained by replacing each vertex of G by r copies such that the edge weight between two vertices is equal to the edge weight between the original vertices.
Twin-kernels generalise the above definition for finite graphs in two ways.Firstly, by allowing different vertices in the graph G to be replaced by a number r v of copies which depends on the vertex v ∈ V (G).Secondly, by allowing the edge weight between copies of a given vertex to vary in consistent way as defined by the function a(x, x ) (34).
Both of these generalisation are illustrated below.The graph on the right has two copies of vertex v 1 whilst vertices v 2 and v 3 are not replicated.The edge weights of v 1 between a given vertex, say v −i , is always three times the edge weight between v 1 and v −i .Vertices within twin-sets have additional structure for example the total degree of v 1 is three times that of v 1 .
We now preset two additional properties of twin-sets.
Proposition 6.4.Let W be a kernel with maximal twin-sets A and B such that Proof.Let A and B be maximal twin-sets and define the associated function a(• , •) in (34) by a A (• , •) and a B (• , •), respectively.For the purpose of a contradiction suppose that A ∩ B = ∅.Then we see that A ∪ B is also a twin-set by first choosing an arbitrary z ∈ A ∩ B and defining But this means that we have a twin-set A ∪ B which contains the maximal twin-sets A and B. This contradicts the maximality of A and B and so it must be the case that A ∩ B = ∅.
Recall the normalised degree function, d W (29). Proposition 6.5.Let W be a kernel with twin-set A then In the latter case for any pair x, x ∈ A we have Proof.First note that for any pair x, x ∈ A we have Suppose that 0 ∈ {a(x, x ) : x, x ∈ A}; that is, there exists a pair x, x ∈ A such that a(x, x ) = 0. From (34) it then follows that and so d W (x) = 0. Now consider an arbitrary z ∈ A, from (36) we see that Since z ∈ A was chosen arbitrarily (38) extends to all z ∈ A and proves the claim (37).Now suppose that 0 / ∈ {a(x, x ) : x, x ∈ A} then for a particular x ∈ A either x, x ∈ A} -completing the proof of (35).The final claim follows by rearranging (36) when d W (x) = 0 for all x ∈ A.
We will now exploit the additional structure provided by twin-sets to provide an insight into the consensus problem.Lemma 6.6.Let W ∈ W 1 with a twin-set A and let g ∈ L ∞ ([0, 1]).If u is a bounded solution to the IVP (10) and d W (x) = 0 for all x ∈ A then where C is some constant.That is, u reaches consensus on A.
Proof.By assumption the solution u is bounded.This ensures lim t→∞ u(x, t) exists for almost every x ∈ [0, 1] by Proposition 5.7.Now fix an x ∈ A such that u * (x) = lim That is, the limit on the left hand side exists.So for this fixed x ∈ A there exists a finite constant L such that lim where u t (x, τ ) denotes partial derivative of u(x, t) with respect to t evaluated at (x, τ ); that is This implies that lim τ →∞ u t (x, τ ) = 0, since L'Hôpital's rule gives ∂t is defined by the IVP (10) and so for fixed x the solutions u(x, t) are differentiable with respect to t.Now rearranging (40), gives the following 'stabilising condition' for this fixed Thus the right hand side of (42) is invariant for all elements in the same twin set, since the a(x, x ) term in the numerator and denominator cancels.Hence, That is, u * is almost everywhere constant on A. This proves (39).
By restricting the above lemma to the set of graphons W 0 we attain a more elegant result.Lemma 6.7.Let W ∈ W 0 with a twin-set A and let g ∈ L ∞ ([0, 1]).If u is a solution to the IVP (10) then we have for almost every x ∈ A; or, (43) where C is some constant.In the latter case, u reaches consensus on A (recall Definition 4.2).
Proof.Let u be the solution the IVP (10) with graphon W and initial condition g.First note that Proposition 6.5 states that either d W (x) = 0 for all x ∈ A, or d W (x) = 0 for all x ∈ A. In the first case, since W ∈ W 0 , this implies that for all x ∈ A we have W (x, y) = 0 for almost every y ∈ [0, 1].Thus, the solution of the IVP is u(x, t) = g(x) for all x ∈ A. In the second case, we can apply Lemma 6.6 since u is automatically a bounded solution (see Lemma 5.5).This completes the proof.
In fact the above lemma extends to twin-graphons via the following theorem.
Theorem 6.8.Let W ∈ W 0 be a twin-graphon with n connected components and associated sets denoted by {A i } n i=1 (see Definition 3.6 and Lemma 3.7), and let g ∈ L ∞ ([0, 1]).If u solves the IVP (10) then almost everywhere, where λ(J i ) denotes the Lebesgue measure of the set Proof.First note that the solutions to the continuum voter model on W ∈ W 0 can be decomposed into solutions on connected graphons (see Lemma 5.10).Thus, we will prove the result for the solution u to the IVP (10) with connected graphon, say W , and then extend the result to complete the theorem.Recall that W ∈ W 0 and so by Lemma 5.5, u is a bounded solution.This guarantees the existence of lim t→∞ u(t) almost everywhere (see Proposition 5.7).Also W is a twin-graphon and so there exists a finite family of maximal twin-sets { A i } n i=1 , which are disjoint (see Proposition 6.4).Thus, [0, 1] = ∪n i=1 A i where set equality is understood as in (33).Now since W ∈ W 0 is connected, d W (x) = 0 for almost every x ∈ [0, 1].Thus, Lemma 6.6 states that u * is almost everywhere constant on the twin-sets and so we have for some positive integer n and for some constant c i , where 1 A denotes the indicator function with respect to the set A. We can assume that c i = c j for i = j, by taking set unions if this is not the case.
Suppose for the purpose of a contradiction that u * is not almost everywhere constant.Then there exists i ∈ {1, 2, . . ., n} such that c i > c j for all j = i.Since W is connected, there must exists a set S ⊆ A i of positive measure such that which is a contradiction.Thus it must be the case that u * is constant almost everywhere.If u * is almost everywhere constant then u reaches consensus on [0, 1].Applying Proposition 5.9 then gives the required result.
The nonnegativity of the kernel (i.e.W ∈ W 0 ) in Theorem 6.8 is essential.The following example shows that a connected, twin-kernel which takes negative values can have a non-constant limit: that is, consensus is never attained.Example 6.9.Consider the weighted graph G illustrated below The kernel representing the graph W G (see (6)) is a connected twin-kernel.However, it takes negative values and so Theorem 6.
will force u(t) = g = u * for all t ∈ R ≥0 .However, g need not be constant, and hence u(t) need not reach consensus.For example, the function will satisfy (46).

Extension: finite voting model with random weights
So far in this paper we have only considered the voter model on a deterministic graph.In this section we extend our analysis to include random simple graphs.In particular, we are able to formulate a probabilistic version of Theorem 5.2 which shows that the continuum voter model (10) can be used to approximately solve the finite voter model (2) when the underlying graph is random.This extension allows our results to be applied to many well-known random graph processes such as the Watts-Strogatz small world graph.First we define W -random graphs which will be used to generate the random graph model for the voter model (2).Definition 7.1.Let n be a positive integer and let W ∈ W 0 be a graphon.A graph G n = (V n , E n ) is called a W -random graph if V n = [n] and for every (i, j) ∈ [n] 2 such that i = j we have the final two equalities follow from Lemma 5.1 and the assumption that g = 0.
Thus rearranging and using an integrating factor of e p t we see that the solution must satisfy ∂e p t u(x, t) ∂t = 1 0 (1 − 2p) W (x, y) e p t u(y, t) − e p t u(x, t) dy.
Let v(x, t) be the unique solution to the IVP on graphon (1−2p)W (x, y) with initial condition g, then it follows by the uniqueness property (Theorem 4.1) that u(x, t) = e −p t v(x, t).
It is clear that if v(x, t) attains consensus then this is sufficient to show that u(x, t) also attains consensus.We conclude that if W is a connected twin-graphon and (51) holds then v and hence u both reach consensus in the small worlds voter model.Applying Theorem 7.5 then implies that the finite voter model will asymptotically almost surely be close to attaining consensus.

Figure 1 :
Figure 1: A plot of the function W .

Figure 1
Figure 1 contains a plot of the function W and the graphs G 5 and G 6 are illustrated below.Note that for visual clarity we have omitted the labels for all edge-weights which have value +1.

Definition 6 . 1 .
Let A ⊆ [0, 1] with nonzero measure and let W be a kernel.We say that A is a twin-set of W if there exists a function a :A × A → R such that W (x, y) = a(x, x ) W (x , y)for all x, x ∈ A and almost every y ∈ [0, 1].(34)