Discordant voting protocols for cyclically linked agents

Voting protocols, such as the push and the pull protocol, model the behavior of people during an election. These processes have been studied in distributed computing in peer-to-peer networks, and to describe how viruses or rumors spread in a community. We determine the asymptotic behavior of the runtime of discordant linear protocols on the cycle graph and the probability for each consensus to win. Mathematics Subject Classifications: 91A22, 60J10, 60G50


Introduction
Models of voting in finite graphs have been studied intensively for decades, see e.g., [6,16,12,1,15,7]. Throughout this paper, a discrete-time voting protocol is defined by specifying a graph and a set of nondeterministic rules. Then the process is divided into rounds. In each round, the participants, i.e., vertices of the graph, can affect the vote of their neighbors according to the given rules.
We note that many alternative definitions were investigated in the literature. Continuous time voting processes were studied in [6,8]. Somewhat surprisingly, the thorough mathematical investigation of the continuous version preceded that of the discrete analogue of the protocols [16,8]. In [10] the graph evolves together with the opinions of the vertices. This models the behavior of people who in each round try to convince one another and succeed with a given probability. Whenever they fail, they cease to communicate with each other, that is, we delete the edge linking them from the graph. In such a model there are many potential final results, as the graph can disconnect, and in fact, we may end up with many connected components. For more details, see [7,2]. The application of these randomized protocols in studying how rumor spreads in a society goes back to decades, and it is still an active area [9,12,1]. The same can be said about peer-to-peer networks, see e.g., [19,15,14]. In this application, opinion is replaced by a piece of information that each computer has at a given time, and they share the data in a randomized way. Connections of voting processes and coalescing random walks were investigated in [8,17], and for other recent applications see [18,4].
However, we consider discrete time voting models where the graph is fixed, and the vote is a binary decision. The two options to choose from are 0 and 1, but we usually refer to vertices with opinion 0 as blue vertices, and red vertices are the ones with opinion 1. Such a protocol can be synchronous (see [5] for examples), i.e., it is allowed that several vertices of the graph change their opinion in one round; otherwise it is asynchronous. The so-called linear voting model was introduced in [5] as a common generalization of many well-studied voting protocols. Three of the most common special cases of asynchronous linear voting are the • Oblivious protocol: in each round an edge uv is chosen uniformly at random, and then either u adopts the opinion of v or the other way around, with equal probability.
• Push protocol: in each round a vertex u is chosen uniformly at random, and that vertex forces a randomly chosen neighbor to adopt the opinion of u.
• Pull protocol: in each round a vertex u is chosen uniformly at random, and that vertex is forced by a randomly chosen neighbor v to adopt the opinion of v.
From a practical viewpoint, all linear voting models have a common weakness: it is typical that nothing changes in many steps of the process, as it is possible that every participant keeps his own opinion for the next round. E.g., consider push, pull or oblivious voting on the complete graph K n ; in this particular case, the three protocols coincide. If one opinion is significantly more popular than the other, then with very high probability, both chosen vertices have the more popular opinion. So usually many idle rounds go by before the opinion of some vertex is altered. This example demonstrates the advantage of discordant (oblivious, push, pull) voting protocols, defined in [3]. An edge uv is discordant if u and v have different opinion, and a vertex is discordant if it is in a discordant edge. To define discordant oblivious, push and pull voting, the above three definitions are modified so that whenever a random choice is made, we only allow discordant edges or vertices to be picked (always uniformly at random). Note that in our restricted framework when there are only two opinions, the definition of discordant pull voting simplifies to picking a discordant vertex in each round randomly and switching its opinion. The goal of every voting scheme that we study now is to reach a consensus, that is, a state where all participants have the same opinion. The topic of the present paper is the expected time to reach consensus with the discordant push, pull and oblivious processes on the n-cycle. It was proven in [3] that all three processes have a quadratic runtime at worst. In particular, push voting is expected to terminate in at most 33n 2 steps regardless of the initial state, and from some initial state it is indeed expected to take at least n 2 /4 + O(n) time to reach a unanimous vote [3,Section 4]. We improve the bounds and obtain that the precise asymptotical behavior of the worst expected runtime of all three discordant protocols on the n-cycle is n 2 /4 + O(n 3/2 ), and an effective constant can be given in the error term for each of these protocols. Furthermore, we show that if β and denote the number of blue and red vertices in the initial state, respectively, then β is in general a good estimate to the expected runtime of these protocols, provided that the initial state be tame. More precisely, in a non-consensus state, there is the same number r of blue and red runs, i.e., maximal sets of consecutive vertices of the same color. Then the difference of the expected runtime of each of the three protocols from β is at most O(rn), with an effective constant in the error term.
The other vital problem in case of a random protocol is to compute the probability of each possible outcome to win. We show that in case of the cycle graph the probability of each opinion to win with the discordant push, pull or oblivious protocol is asymptotically proportionate to the number of vertices with that opinion in the initial state, provided that the initial state be tame. More precisely, the blue vertices have winning probability β/n + O(r/n), with an effective constant in the error term. By using some probability theory, it can be shown that there must be a state for arbitrarily large n such that the estimation β/n has error 0.005 or more. However, computer simulations suggest that in highly symmetrical initial states (such as the one with alternating runs of lengths one and two), the estimation β/n is quite accurate, a phenomenon we cannot explain yet.
Although some parts of the proof of the positive results require elaborate combinatorial and probabilistic arguments, the core is an elementary linear algebraic lemma (Lemma 1). This paper is a demonstration of how the iterative application of that elementary lemma can yield asymptotically sharp results to basic questions about evolutionary processes, where the transition matrix is typically large but sparse and easy to describe.

General tools
Throughout this section, P is an absorbing Markov chain with transient states Tran. We denote by P en the set of potential penultimate states in Tran, that is, the states t ∈ Tran such that the probability of moving from t to an absorbing state in one step is positive.
As usual, we denote by Q the upper left minor of the canonical form of P = Q R 0 I , see [13]. So Q is the transition matrix restricted to the transient states, and R is the matrix of transition probabilities between transient and absorbing states. in R Tran . We denote by 1 the column vector of length | Tran | all of whose entries equal to 1. The entry corresponding to the coordinate t in the vector u is denoted by u[t]. It is well-known that if we sum up the entries u[t] while randomly walking on the coordinates starting from t 0 ∈ Tran, then the expected value of this sum before the walk is absorbed is (N u)[t 0 ]. In particular, the expected times to absorption from each transient state as initial state are the coordinates of the vector N 1; see [13] for further details.
The following lemma is the basic observation of the elementary method we use to improve the upper estimations for the expected time to absorption presented in [3]. We can think about x[t] as a "guesstimate" of the expected value of the sum of the entries of u during a random walk with initial state t before reaching an absorbing state. In particular, if u = 1, then x is the guesstimate vector for the time to absorption starting from each transient state.
Proof. By rearranging the equation we obtain u = ( As we mentioned earlier, the vectors N u and N ε are the expected value vectors of the sum of the entries of u and ε during a random walk (on the coordinates) starting from each transient state. The above elementary lemma is particularly useful when the transition matrix is large but sparse, and the fundamental matrix cannot be computed or represented in a transparent way. This is often the case with evolutionary processes. Note that Qx is easy to compute if the matrix is sparse. Furthermore, because of the probabilistic interpretation of N ε and the possibility of applying Lemma 1 iteratively, it is possible to estimate this vector without computing N , as we see later. By successive application of this method, the error can shrink to such a small vector that it is very easy to estimate it, providing us with an efficient estimation of the expected value vector. We spell out an immediate application.
Then the expected sum of the entries of u during a random walk from any initial state is at most M .

Proof. Apply Lemma 1 with the guesstimate vector
This observation is very advantageous when we are able to cut a process to several phases, and we want to estimate the expected sum of an expression between two phase transitions. In our case, the phases are those parts of the process where the number of runs, i.e., maximal sets of consecutive vertices with the same opinion in the cycle, is the electronic journal of combinatorics 27(1) (2020), #P1.58 constant. We denote by r the number of blue runs; it is the same as the number of red runs in all states except for the two consensus states, where we set r = 0 by definition. Note that r never increases during the process, and it decreases if and only if the opinion of a singleton vertex is switched, in which case r decreases by one. The process halts when r = 0.

Further terminology
We now turn to the problems under consideration, defined in the introduction. Note that the proof is presented for discordant push voting on the n-cycle: the case of pull voting can be done in a similar fashion, and the case of oblivious voting is trivial. Clearly, the voting process is an absorbing Markov chain with 2 n states, whose absorbing states are exactly those two where all the vertices agree.
As in the introduction, the number of blue and red vertices are denoted by β and , respectively. A vertex is a singleton if its color differs from both its neighbors' color. The number of singleton blue and singleton red vertices are s β and s , respectively. The number of non-singleton blue vertices with (exactly) one red neighbor is m β ; the number m is defined analogously for red vertices. A maximal set of consecutive singleton vertices is called an arc, and the number of arcs is denoted by .

Expected time to absorption on the cycle
It turns out to be advantageous in the calculation to cut the process into two parts. The first part of the process consists of the steps before we first reach a state with r 4 √ 5 √ n.
3.1 The first part: down to 4 √ 5 √ n blue runs In this subsection, we show an estimation of the expected length of the first part. The following bound can be extracted from [3,Section 4]. In that paper, a quadratic upper estimation was given to the runtime of the discordant push protocol using some results about stopped martingales. They obtained that it takes at most 33n 2 steps to reach consensus from any initial state, that is, to reach a state with r = 0. However, by carefully modifying the calculation in [3], a more general result can be shown.
Proposition 3. The expected time to reach a state with r runs is at most 40n 2 /r from any initial state. In particular, putting r = 4 √ 5 √ n, the first part is expected to terminate in at most 2 √ 5n 3/2 steps.
Proof. In [3, Lemma 8] and the argument before that, it was shown that the expected time to reach a state with r = r 1 blue runs from one with r = r 0 blue runs is at most T * , where T * is the optimal solution of the following linear program: the electronic journal of combinatorics 27(1) (2020), #P1.58 such that r j=r 1 x j √ 2rn for all r 1 r r 0 and x r 0 for all r 1 r r 0 .
Moreover, it can be shown that such a linear program attains its optimal solution at x r 1 = √ 2r 1 n and x r = √ 2rn − 2(r − 1)n for all r 1 + 1 j r 0 . Hence, by using the standard estimations √ 2rn − 2(r − 1)n 2n r and 1 3.2 The second part: from 4 √ 5 √ n runs to consensus We prove a technical lemma that provides the estimation of the error in the computation of the expected runtime and the winning probabilities.
Lemma 4. The expected value of the sum of | s β +m β −s −m s β +m β +s +m | during a random walk until the number of runs decreases is at most 1/2. In particular, the expected sum of the above expression during the second part of the voting process is at most 2 √ 5 √ n.
Proof. We use Lemma 2. In order to do that, the Markov chain is restricted to those states that have r blue runs, and extended by an absorbing state where we move exactly when in the original Markov chain the number of runs decreases. The penultimate states of this chain are exactly those states with r blue runs in our problem where there is a singleton vertex. Of course, the number p[t] (the probability of immediate absorption from t) is the probability that we lose runs, which is the probability that in the original Markov chain a singleton is pushed. Our next goal is to calculate the probability of this event. We call the states with alternating red and blue vertices special states. Such states exist iff n is even, and then there are two of them. Now assume that the state is not special. Let a 1 , . . . , a h be an arc, surrounded by the non-singleton vertices b (a neighbor of a 1 ) and c (a neighbor of a h ). As we are not in the special states, the arc is not the full set of vertices, and b and c are indeed not singletons. We show that the probability that a singleton be pushed in this arc is • if that vertex is a 1 or a h , then the singleton neighbor is chosen.
Hence, the desired probability is h+2 d − 2 d · 1 2 = h+1 d . Adding the expression h+1 d for all arcs, we obtain that the probability that a singleton vertex be pushed in the state t is p[t] = s β +s + s β +s +m β +m , if t is not a special state. Let the vector u have entries | s β +m β −s −m s β +s +m β +m | for each transient state. Note that this is 0 for non-penultimate transient states, since red and blue runs alternate, so s β = s = 0 and m β = m . It is also 0 for the two special states.
By Lemma 2 it suffices to show that 1 2 is an upper bound for this expression. Observe that the expression does not decrease if we replace a red singleton by a pair of adjacent red vertices and likewise for a blue singleton. That is, we replace the two vertices by inserting two edges at the same positions in the cycle, obtaining a new cycle of length n + 2, and coloring the endpoints of the edge replacing the red and the blue vertex red and blue, respectively. Indeed, the numerator is not modified by this operation, and the denominator cannot increase, as s β + s decreases by 2, and increases by at most 2. After a finite number of applications of this operation, we reach a state where all singleton vertices have the same color, say blue. In particular, there are no consecutive singleton vertices in the cycle. Thus s β = , s = 0 and m = m β + 2s β , so the expression simplifies to | −s β 2s β | = 1 2 . If all singletons disappear after a finite number of applications of the above operation, then the numerator of the expression is 0, thus it has been 0 when we started eliminating singletons, as well.

Estimations of the expected runtime on the n-cycle
As we suggested earlier, it seems impossible to compute the fundamental matrix of our Markov chain. However, the upper-left minor Q of the transition matrix is sparse, so Lemmas 1 and 2 can be applied effectively. The way we phrased the result in the introduction provides the right heuristics for the guesstimate vector. The expected runtime of the oblivious protocol is clearly β : it is simply the runtime of a drunkard walk with parameter n = β + and initial state β (see [3] for more details). Computer simulations (in SAGE) suggested that the runtime of the three discordant protocols should be close to each other. The intuitive reason is that the transition matrix of the three protocols on the cycle graph coincide in almost all entries. Of course, such an observation can lead to very badly wrong conjectures in general, as the computation of the fundamental matrix involves the calculation of an inverse matrix, which is very sensitive to even small alterations of a few entries of the matrix. Hence, in order to turn this intuition into a precise proof, we use Lemma 1 with guesstimate vector x whose entries are β for each transient state.
Theorem 5. Given any initial state on an n-cycle with r blue runs, β blue and red vertices. Let T be the expected number of steps for the discordant push voting to reach the electronic journal of combinatorics 27(1) (2020), #P1.58 consensus. Then |T −β | rn/2, and T n 2 /4+4 √ 5n 3/2 . The worst expected runtime is asymptotically n 2 /4, obtained when there is only one blue and one red run and β = n/2 .
Proof. Let x be the column vector of length 2 n − 2 with coordinates β for each transient state. Then the probability of the number of blue vertices to increase by 1, i.e., a blue vertex is pushing, is s β +m β s β +m β +s +m , since there are s β + m β discordant blue vertices among the s β + m β + s + m vertices. Similarly, the probability of the number of red vertices to increase by 1 is s +m s β +m β +s +m . In the former case, we arrive at a state where the value of x is (β + 1)( − 1), and in the latter case it is (β − 1)( + 1). If we multiply the value of the vector x with the corresponding transition probabilities, and add them up, i.e., we calculate Qx (cf. Lemma 1), we obtain: for all non-penultimate transient states. Using the notation of Lemma 1 with u = 1, the entry of the error vector ε = Qx − x + 1 at the given state is s β +m β +s +m , whose absolute value is at most n| s β +m β +s +m | estimates the absolute value of the error ε at all transient states from above, and the expected sum N ε of this expression during a random walk is at most rn/2 according to Lemma 4. Hence, by Lemma 1, we have |N 1 − x| = |N ε| rn/2, where N 1 is T at the initial state and x is the guesstimate vector whose entry is β at the initial state. Thus |T − β | rn/2.
In order to prove the second estimation that is independent of the number of runs, we divide the process into two parts as before. By Proposition 3, the first part is expected to end in T 1 2 √ 5n 3/2 steps. At the initial state of the second part, let r be the number of blue runs and let β and be the number of red and blue vertices, respectively. If T 2 denotes the expected runtime of the second part of the process, then |T 2 − β | r n/2 2 √ 5n 3/2 by the first assertion of this theorem, as r 4 √ 5 √ n. As β n 2 /4, we have If there is one blue run and one red run and β = n/2 , then |T − β | n by the first assertion of the theorem, and clearly |β − n 2 /4| 1. Thus T = n 2 /4 + O(n) for this initial state, showing the final assertion in the theorem. Remark 6. In a similar fashion, it can be shown that the expected time for the discordant pull voting to reach consensus on the cycle is also βρ + O(rn), and at most n 2 /4 + O(n 3/2 ) from any initial state (and it is clearly exactly βρ for the discordant oblivious protocol). This also makes the worst runtime asymptotically n 2 /4 by using the same argument for these protocols. The lower estimate n 2 /4 + O(n) for the expected runtime from the initial state with two runs of (almost) equal size (for the discordant push, pull and oblivious protocols) was mentioned in [3]. It is clear that switching the cycle to a path makes very little difference in the calculation, and estimations of the same order of magnitude are obtained in case of the discordant push, pull and oblivious protocols on paths, too.

Winning probabilities on the cycle
It is enough to estimate the winning probability p of the color blue, the other color then wins with probability 1 − p. Again, we know from standard theory [13,Theorem 3.3.7] that the matrix N R consists of the probabilities of reaching from transient state i the absorbing state j in the process. So we are only interested in the first column of this (2 n − 2) × 2 matrix. Lemma 1 can be applied, as the problem is to estimate the vector N u where u is the first column of R. Once again, we state the precise results for the discordant push protocol, but estimations of the same order of magnitude apply to the discordant pull and discordant oblivious protocols, as well.
Theorem 7. Given any initial state on an n-cycle with r blue runs, β blue and red vertices. Let p be the probability that the blue consensus is reached with the discordant push protocol. Then |p − β/n| r/2n.
Proof. Let x be the column vector of length 2 n − 2 with coordinates β n for each transient state. If we multiply the value of the vector x with the corresponding transition probabilities (cf. the proof of Theorem 5), and add them up, i.e., we calculate Qx, we obtain: for all non-penultimate transient states. We use the notation of Lemma 1 with u being the all 0 vector, except for the entries corresponding to the states with exactly one red vertex which are all 2 3 . In particular, for non-penultimate states the error, i.e., the corresponding entry of ε = Qx − x + u is 1 n · s β +m β −s −m s β +m β +s +m . For penultimate states with exactly one red vertex, the entry of the vector Qx is s +m s β +m β +s +m · β−1 n = n−2 3n . Thus the error is n−2 3n − n−1 n + 2 3 = 1 3n which is precisely 1 n · s β +m β −s −m s β +m β +s +m . Finally, for penultimate states with exactly one blue vertex, the entry of the vector Qx is s β +m β s β +m β +s +m · β+1 n = 2 3n . Thus the error is 2 3n − 1 n + 0 = − 1 3n = 1 n · s β +m β −s −m s β +m β +s +m . Hence, the vector with entries 1 n · s β +m β −s −m s β +m β +s +m is exactly the error vector ε. As the number of runs decreases r times before a consensus is reached, the assertion follows by Lemma 1 and Lemma 4 as in the proof of Theorem 5.
the electronic journal of combinatorics 27(1) (2020), #P1.58 According to [5,Theorem 8] the linear push, pull and oblivious protocols on cycle graphs have the property of proportionate agreement: the probability that blue wins is β/n, see also [8]. Hence, Theorem 7 shows that if r = o(n), then the probability to reach the blue consensus with the linear push voting and the discordant push voting protocols have the same asymptotics as n → ∞. The final result of this paper (Theorem 10) shows that the condition r = o(n) cannot be omitted from this assertion. To prove a gap between the probabilities arising from the linear and discordant push protocols, we recall a Chernoff-Hoeffding type theorem from [11]. The function D stands for the Kullback-Leibler distance, namely D(q p) = q ln q p + (1 − q) ln 1−q 1−p for all q, p ∈]0, 1[, and exp(x) is the exponential function e x . Theorem 8. Let N ∈ N and let X 1 , . . . , X N be random variables with range in {0, 1}. Assume that there is a δ ∈]0, 1[ such that for all 1 k N and k-element subset S ⊆ for all γ ∈]δ, 1[. If 3 | n then there is an assignment of colors red and blue to the vertices of the n-cycle such that every blue run is a singleton and every red run is a pair of vertices. If 3 n, then by allowing one of the red runs to consist of three or four vertices, we can construct a state with n/3 discordant blue and 2 n/3 discordant red vertices.
Lemma 9. Let n, m, i ∈ Z such that n 3, m = n/3 and i < m/2. Assume that the discordant push protocol starts from an initial state on the n-cycle with m runs of each color, such that all the blue runs are singletons and all the red runs have length at least two. Then after i steps the ratio of discordant blue vertices and discordant vertices is at most 1 3 + i 3m . Proof. In any given state, let d b and d r denote the number of discordant blue and discordant red vertices, and let In any asynchronous protocol on a cycle graph (i.e., when in one step only one vertex alters its opinion), the following analysis applies. From now on, we are looking for the minimum of the expression d r /d b after i steps as described in Case 1 and Case 2. That is, we assume that at any point in time any manipulation of the values d r and d b is allowed as long as it is consistent with Case 1 or Case 2, whether or not it is combinatorially feasible. We claim that the minimum is attained when in all steps we apply Case 1 such that c is the color blue and the increment of d b and d r are +1 and −1, respectively. We are going to refer to this particular choice of parameters in a step as the favored option.
If Case 1 is applied in a step, then to attain the minimum of d r /d b , we must choose the favored option: otherwise, switching to the favored option in that step would yield values d r and d b after i steps such that d r d r and d b d b , and at least one of the inequalities would be strict.
Similarly, if Case 2 is applied in a step with c as the color blue, then the increment of d r has to be −1 and that of d b has to be 0 to attain the minimum of d r /d b . We compare the outcome of this process to the one where in that step we apply the favored option, yielding d r = d r and d b = d b + 1. Then the original outcome d r /d b is modified to d r /(d b + 1), which is clearly smaller.
Finally, if c is chosen as the color red in Case 2, then the increment of d r has to be −2 and that of d b has to be −1, as this choice dominates all other possibilities. We compare the outcome of this process to the one where in that step the favored option is applied yielding d r = d r + 1 and d b = d b + 2. Then the original outcome d r /d b is modified to (d r + 1)/(d b + 2), and the calculation and the fact that d r > d b > 0 show that it is worth switching to the favored option, proving the claim. Hence, the highest possible ratio d b /d is attained after applying the favored option i times, yielding d b = m + i, d r = 2m − i, d = 3m, and consequently, d b /d = 1 3 + i 3m . Theorem 10. For any n 5000 there exists a state on the n-cycle with β blue vertices and probability p of reaching the blue consensus with the discordant push protocol such that |p − β/n| > 0.005.
Proof. Let ε be the largest absolute error of the estimate β/n over all states on the n-cycle. Let m = n/3 , and pick an initial state for the push protocol with m discordant blue and 2m discordant red vertices as in Lemma 9. Let N = m/4 , δ = 5/12, γ = 51/120, and let X i be the random variable that is 1 if a blue vertex is pushing in the i-th step and 0 otherwise. In particular, the increment of blue vertices in the i-th step for i N is According to Lemma 9, in any of the first N steps of the process, the probability that a blue vertex is pushing is at most 1 3 + N By comparing the two estimations for P(blue wins), we obtain m n − ε m − (1 − 2γ)N n + ε + 0.001 and then Using the trivial estimations n 12N + 11 and N 416, the left hand side is at least Due to Proposition 3 and Theorem 7 it is however possible to estimate the desired probability up to an error term O(1/ √ n) by running the process for O(n 3/2 ) steps. This is a good trade-off as the expected time to reach a consensus from the worst initial case is n 2 /4 + O(n 3/2 ), and it is quadratic in general (cf. Theorem 5). In fact, using this observation, it is possible to write a relatively fast program that runs the experiment on the cycle with 5000 vertices 5000 times from the initial state described before Lemma 9. The result suggests that in that very symmetrical state, the estimate 1/3 for the probability that the blue consensus be reached is highly accurate. If this empirical result is correct, then there must be a more complicated formula than the one suggested by Theorem 7. It should take into consideration the position of blue vertices around the cycle as well as their number, and coincidentally, this formula should assign a value close to 1/3 to the above mentioned initial state.

Further results and future work
It is also possible to obtain asymptotically sharp estimates for the corresponding problems in the star graph with n vertices. This is a typical network when one server is connected the electronic journal of combinatorics 27(1) (2020), #P1.58 to several clients. It was already pointed out in [3] that, quite counter-intuitively, the discordant pull protocol is faster than the discordant push protocol on such graphs if n is large enough. The author of the present paper together with coauthors were able to refine this result and obtain asymptotically sharp estimations for both expected runtimes. It seems plausible to find estimates to the higher moments of the runtime of these protocols with similar techniques, as well.