Topological aspects of the multi-language phases of the Naming Game on community-based networks

The Naming Game is an agent-based model where individuals communicate to name an initially unnamed object. On a large class of networks continual pairwise interactions lead the system to an ultimate consensus state, in which agents converge on a globally shared name. Soon after the introduction of the model, it was observed in literature that on community-based networks the path to consensus passes through metastable multi-language states. Subsequently, it was proposed to use this feature as a mean to discover communities in a given network. In this paper we show that metastable states correspond to genuine multi-language phases, emerging in the thermodynamic limit when the fraction of links connecting communities drops below critical thresholds. In particular, we study the transition to multi-language states in the stochastic block model and on networks with community overlap. We also examine the scaling of critical thresholds under variations of topological properties of the network, such as the number and relative size of communities and the structure of intra-/inter-community links. Our results provide a theoretical justification for the proposed use of the model as a community-detection algorithm.


Introduction
The emergence of spoken languages and their continuous evolution in human societies are complex phenomena in which interaction and self-organization play an essential rôle. Lying at the heart of opinion dynamics [1], these features have attracted great interest from researchers in statistical physics over the past twenty years. After some attempts to ascribe the origin of language conventions to evolutionary mechanisms [2][3][4][5][6][7], in ref. [8] a multi-agent model was proposed where the rise of a globally shared language occurs with no underlying guiding principle and no external influence. The model, known as the Naming Game (NG), was inspired by the seminal work of refs. [9,10].
The NG is a language-game in the sense of ref. [11], with agents iteratively communicating to each other conventional names for a target object. Each agent is endowed with a notebook, in which he/she writes is the speaker's notebook empty? start names. In the original version of the model all notebooks are initially empty. Elementary interactions involve two agents, playing respectively the rôle of speaker and listener. In each iteration the speaker is chosen randomly among the agents, while the listener is chosen randomly among the speaker's neighbours. The speaker-listener interaction is schematically described by the flowchart reported in Fig. 1.
Following ref. [8], the dynamics of the NG was investigated on networks with several topologies, including the fully connected graph [8,12], low-dimensional regular lattices [13], Erdős-Rényi (ER) graphs [14], smallworld networks [15], Barabási-Albert (BA) networks [14,16], etc. In all cases, the system was found to evolve dynamically with the number of different competing names initially inflating and then deflating due to self-organization, until the whole population agrees spontaneously on an ultimate name for the target object (consensus). Theoretical predictions derived from the NG have recently been shown to correctly reproduce experimental results in Web-based live games with controlled design [17].
In ref. [14] it was first pointed out that convergence to consensus follows a special pattern on communitybased networks. Here, after a "creative" transient during which the number of different competing names inflates, the system relaxes to an equilibrium where different communities reach local consensus on different names. In a finite time dynamical fluctuations break the equilibrium and make the system fall into global consensus. The presence of metastable equilibria was soon realized to be of practical worth. In ref. [18] it was shown that local consensus might be used to identify communities in empirical networks. In a sense, this ratified the entrance of the NG into a large family of community detection algorithms [19][20][21][22][23][24][25]. More recently, the goodness of the community partition operated by the NG was investigated in terms of quality indicators [26] (such as the partition modularity [27]) on the benchmark networks of ref. [28]. It is important to recall that community detection is a major problem in network science, since modular networks arise in a variety of applicative contexts (see for instance refs. [20,29,30]). It is also worth noting that the presence of metastable equilibria is not an exclusive feature of the NG. A similar phenomenon is observed in other models of opinion dynamics, such as the majority rule model [31] and an extension of the Axelrod model [32].
While local consensus exists on finite networks only in the form of metastable equilibrium, it becomes fully stable in the thermodynamic limit provided communities are sufficiently isolated. As a consequence, the phase diagram of the model develops a very rich structure. Communities agree or disagree on the ultimate name of their choice depending on how strongly they are connected to each other. Networks on which equal combinations of names survive at equilibrium in the thermodynamic limit correspond to the same multilanguage phase. Despite a growing body of literature, a systematic study of the phase structure of the NG on community-based networks is still lacking. Aim of the present paper is to contribute to filling this gap. Studying the phase structure is important in order to identify theoretical limits within which the model can be used effectively as a community detection algorithm. However, phases depend upon all topological properties of communities, including their number, overlaps, relative size, internal topology and the topology of their interconnections. Since an overall parameterization of all such features is not given, we are forced to adopt a case-by-case strategy, where we investigate the transition to multi-language phases on groups of networks with distinct topological features.
We can summarize the results of our study by stating that i ) steady multi-languages states arise in the thermodynamic limit when links connecting agents in different communities are about 10-20% or less of those connecting agents within their respective communities and ii ) multi-language phases look rather robust against changes in the network topology.
Before we start, we mention that multi-language phases are also observed in the NG under variations of its microscopic dynamics. Examples are the introduction of noise in the loss of memory when two agents agree on a given name [33] or the introduction of single/opposing committed groups of agents who never change their notebook in time [34,35]. The difference is that communities produce stable multi-language states as a purely topological effect. This is a distinguishing feature of the NG: in other models of opinion dynamics communities are unable to hinder the convergence to global consensus, independently of their degree of isolation, even in the thermodynamic limit. An example is represented by the voter model [36], where global consensus can be avoided only by introducing zealot agents [37,38] with competing opinions.
The plan of the paper is as follows. In sect. 2 we set up the notation and introduce the relative intercommunity connectedness, a parameter that we use to compare results on different two-community symmetric networks. In sect. 3 we investigate the phase diagram of the NG in the stochastic block model [39]. In sect. 4, we work out the exact solution to its mean field equations (MFEs) in the special case of the planted partition model [40,41] with two communities. In sect. 5 we derive MFEs for the NG on a network made of two overlapping cliques, then we work out an almost fully analytic solution to them. In sect. 6 we study how the phase transition depends on the number of communities in the planted partition model and in sect. 7 we study how it depends on their relative size. In sect. 8 we extend our study to heterogeneous networks by means of Monte Carlo simulations. Finally, we draw our conclusions in sect. 9.

Relative connectedness in two-community symmetric networks
We consider a graph G = (V, E) and a partition V C = {C (k) } Q k=1 of V, i.e. we assume V = ∪ Q k=1 C (k) and C (i) ∩ C (k) = ∅ for i = k. We let N (k) = |C (k) | > 0 and N = |V|, hence we have N = Q k=1 N (k) . Then we observe that V C induces a partition E C = {E (ik) } Q i,k=1 of E, i.e. E = ∪ Q ik=1 E (ik) with the Q + 1 deterministic parameters Q, {N (k) } Q k=1 and the edge probability laws p (ik) (x, y) = prob (x, y) ∈ E (ik) x ∈ C (i) and y ∈ C (k) , i, k = 1, . . . , Q .
In principle the functions p (ik) (x, y) may be arbitrarily complex. They may depend explicitly on the community indexes (ik), i.e. for each choice of these they may depend upon different discrete or continuous parameters. Indeed, different static network models correspond to different settings of the above degrees of freedom. As such, they allow to explore (limited) subsets of the wider ensemble defined by ECS conditions.
A relevant question is how to compare results for an agent-based model running on different network models, when these are defined in terms of different parameters. Unfortunately, there exists no universal answer to such question. Yet, for two-community networks which are symmetric under exchange of community indexes, we can use a simple indicator that allows to make comparisons. The indicator measures the relative extent to which communities are connected to each other rather than to themselves. To define it, we start from the notion of node degree, which counts the number of neighbours of a given node, and extend it to entire communities. We first introduce the inner average degree of the ith community where 1 A (x) denotes the indicator function of A (i.e. 1 A (x) = 1 if x ∈ A and 1 A (x) = 0 otherwise) and the symbol · represents an average over the corresponding network model. By definition, we have κ on two-community symmetric networks. Then, we introduce the outer average degree of the ith to kth community and again we observe that κ (12) out = κ (21) out on two-community symmetric networks. Finally, we define the relative inter-community connectedness as the ratio ECS conditions are fulfilled provided γ out/in 1. We notice that γ out/in has a rather general valence in that either of eqs. (2.4)-(2.5) depends by no means on the specific topology of E (11) and E (12) . Unfortunately, there is no unambiguous way to generalize γ out/in to networks with two asymmetric and/or more than two communities. Such a generalization goes beyond our aims here.

Q-ary Naming Game in the Stochastic Block Model
As a first step we investigate the dynamics of the NG in the Stochastic Block Model (SBM) [39]. In the SBM we consider Q communities with N (i) = N/Q for i = 1, . . . , Q. We introduce a set of Q(Q + 1)/2 parameters {p (ik) } 1...Q i≤k and we assume p (ik) (x, y) = p (ik) for all i, k. For Q = 2 the SBM yields asymmetric networks whenever p (11) = p (22) . Hence, γ out/in is in general not well defined.
As mentioned in sect. 1, in the original version of the NG [8] agents have empty notebooks at the beginning of the game, hence they invent names. After a while the number of different competing names observed across the network peaks at a value which is O(N/2). Then, it decreases. If we identify the state of an agent with his/her notebook, we see that the number of allowed agent states (notebooks containing all possible combinations of the competing names) inflates exponentially just in the initial stage of the dynamics. This makes studying the system rather impractical beyond numerical simulations. In order to avoid such a complication, we resort to a trick which was first introduced in ref. [43]: instead of starting the game with empty notebooks, we assign precisely one name to each agent. As a result the "creative" transient disappears, while the left side of Fig. 1 reduces to a single square, with the speaker choosing randomly a name from his/her notebook and uttering it. Depending on how many different names we distribute across the network, the trick allows to set the overall dimension of the state space of the system. In particular, in ref. [33] each agent was randomly assigned one of two names, respectively represented by letters A and B.
Since we are interested in community-based networks, we find it preferable to prepare the initial state of the system with agents in a given community being assigned a common name and with different communities being assigned different names. We let A k represent the name initially assigned to C (k) . Then we introduce a Rosetta notebook 1 D = {A 1 , . . . , A Q } and we let S(D) = {D : D ⊂ D}. At time t ≥ 0 an agent x has a certain notebook D, hence D represents the state of x at time t. We count the number of agent states |S(D)| in full generality by counting all notebooks D with 1 ≤ |D| ≤ Q names. There are precisely • Q notebooks with one name, notebooks with three names, . . .
with the factorials at denominator ensuring that the inclusion of states differing by a permutation of names is avoided in the counting. By adding all the above numbers, we get We conclude that the number of agent states still increases exponentially with the number of communities; nevertheless, eq. (3.1) represents the minimum one must cope with to study multi-language phases with no substantial restriction.

Mean field equations
MFEs describe correctly the dynamics of the system in the thermodynamic limit (where stochastic fluctuations become increasingly negligible). In the SBM we define this by letting N → ∞ with Q = const., N (i) /N = const. and p (ik) = const. for all i, k. To derive MFEs we need to take into account and correctly weigh all possible agent-agent interactions yielding an increase/decrease of the fraction of agents in a given state. For each notebook D we introduce local densities At each time the vectors {n (i) D } D∈S(D) fulfill simplex conditions separately for each community, that is to say state densities are constrained by equations Hence, there is one redundant state per community, whose density we represent in terms of the remaining ones via the corresponding simplex equation. We are free to choose the Rosetta notebook D as redundant state for all communities. If we letS(D) = S \ D, then we have Following this choice, we introduce the essential state vector n = {n The domain ofn is the Cartesian product of Q simplices. Taken as a whole,n(t) provides a full kinematic description of the state of the system at time t. Its trajectory in state space is mathematically described by a set of stochastic differential equations, governing the dynamics of the system under the joint action of deterministic drift and random diffusion terms. MFEs follow as the result of switching off all diffusion terms. They read The function f (i) D yields the overall transition rate for the agent state D in the ith community. It includes positive and negative contributions, each corresponding to an interaction involving two neighbouring agents belonging to C (i) or rather an agent belonging to C (i) and a neighbour lying somewhere else. We group terms contributing to f where f all contributions involving agents who belong respectively to the ith and kth communities. The first representation shows that D is a steady state in the ith community provided the balance f is exactly fulfilled. The second one allows to count easily the number of dimensions of the phase space of the system. Indeed, f (ik) D is proportional to the probability of picking up an agent x in the ith community and a neighbour x of x in the kth one. This probability amounts to with ν (ik) = p (ik) /p (ii) . When we look for a steady solution to eqs. (3.6) we annihilate all derivatives on the left hand side. Since the denominator of π (ik) is the same for all k with fixed i, we just factorize all such denominators and leave them out. We thus see that the only parameters a steady solution depends on are precisely the constants {ν (ik) } i =k . Since these are all independent, we conclude that the phase space of the model has Q(Q − 1) dimensions.
Using the representation f is more convenient for calculational purposes. All speaker-before interaction after interaction conditional transition rates , it is advisable to first enumerate its contributions. In full generality we let includes all interactions of the αth type increasing/decreasing n (i) D and N ±,D denotes the overall number of interaction types yielding an increase/decrease of n (i) D . As we just noticed, each contribution to f (i,±,α) D is proportional to π (ik) for some k. The proportionality factor yields the conditional transition rate ∆n (i) D of an interaction between agents x and x given x ∈ C (i) and x ∈ C (k) . Only in the specific case of the binary NG, where S(D) = {{A 1 }, {A 2 }, {A 1 , A 2 }}, can such conditional rates be simply enumerated and calculated with paper and pencil. Indeed, these have concise and well known expressions. For the reader's convenience we report them all in Table 1 (to keep the notation simple, here as well as in the sequel we allow expressions such as n

Phase diagram for Q = 2
As explained above, the phase space of the NG in the SBM corresponds to the 1st orthant of the Q(Q − 1)dimensional Euclidean space generated by parameters {ν (ik) } 1...Q i =k . Recall that we start the game with initial configuration n (k) (3.10) After a while the system reaches an equilibrium state where a certain number of names are left out in favour of others. Surviving names are found not necessarily only in their original communities, but also in other ones over which they spread along the dynamics. If n  C (k) . Phases correspond to all possible ways names colonize communities. In principle, their total number is given by Indeed, assume that k names survive in the final state. The number of ways to choose them out of a set of Q names is Q k , which explains the presence of the binomial coefficient in eq. (3.11). We have to sum over k = 1, . . . , Q to take into account all possibilities. The k surviving names certainly dominate their respective communities, so we are left with the task of distributing them across the remaining Q − k ones. The number of ways to distribute n 1 copies of the first name, n 2 copies of the second one and so forth is (Q − k)!/(n 1 ! . . . n k !), with the factorials at denominator removing unwanted repetitions. The total number of phases is finally obtained by summing over all possible choices of n 1 , . . . , n k . The rightmost expression in eq. (3.11) simply follows from the multinomial theorem. In Table 2, we report the number of phases for the lowest few values of Q. Each phase occupies a sharply bounded region in the phase space. As the reader may notice, the phase structure of the model becomes increasingly complex as Q increases.
The only case where the phase diagram can be easily studied is for Q = 2. For notational simplicity, we introduce symbols ν 1 = p (12) /p (11) and ν 2 = p (12) /p (22) in place of ν (12) and ν (21) respectively. Notice that ν 1 and ν 2 increase when the inter-community links become denser and also when the intra-community ones rarefy. MFEs can be easily worked out, either thanks to Table 1 or via the code provided in App. B. They read The phase diagram of the model, obtained by integrating eqs. (3.12)-(3.15) numerically, is reported in Fig. 2. We observe three different phases: in region I the system converges to a global consensus state where A 1 colonizes C (2) , in region III it converges to the opposite global consensus state, with A 2 colonizing C (1) , while region II corresponds to a multi-language phase. Here large fractions of both communities keep speaking their original language without ever converging to global consensus. It is interesting to observe that the phase structure of the model is qualitatively similar to that obtained for the binary NG on a fully connected graph when competing committed groups of agents are introduced, see Fig. 1 of ref. [35]. Nevertheless, the phase structure here is fully induced by the network topology. Moreover, the cusp of region II, that we shall derive exactly in next section, is located at ν 1 = ν 2 = 0.1321 . . ., while in ref. [35] it is located at p A = p B = 0.1623 . . ..

Binary dynamics in the Planted Partition Model with Q = 2
The Planted Partition Model (PPM) [40,41] includes all networks of the SBM generated by letting p (ii) = p in for i = 1, . . . , Q and p (ik) = p out for i = k. Networks in the PPM are fully symmetric under exchange of community indexes. For Q = 2 we have ECS conditions are fulfilled by graphs with ν 1. In this limit the PPM is in absolute the simplest ensemble of community-based networks.
For Q = 2 the phase space of the system corresponds to the bisecting line of Fig. 2, where ν 1 = ν 2 ≡ ν.
When the system relaxes to equilibrium, all derivatives on the l.h.s. of eqs. (3.12)-(3.15) vanish. Therefore, steady densities are determined by a system of algebraic equations. We want to show that the latter admit a symmetric solutionñ = {ñ This turns out to be stable only for ν lying within region II of Fig. 2. When ν lies outside it, the symmetric solution becomes unstable under small density perturbations. In this region the symmetry is broken by dynamical fluctuations, leading to global consensus on A 1 or A 2 with equal probability. Depending on how large ν is, instabilities may be triggered by density fluctuations occurring along one specific direction or spanning an entire plane in state space, as we shall see in a while. As a result of our ansatz two of MFEs become redundant, so we are left with We let u = x − y and v = 1 − x − y. Adding and subtracting the above two equations yields the equivalent system In particular, eq. (4.7) has two solutions: i ) u = 0 and ii ) u = 0, v = ν/(1 − ν). These hold separately for ν belonging to disjoint subintervals of [0, 1]. If we assume first that u = 0, from eq. (4.6) it follows that To ensure that u(ν) is real, we must have 0 < ν ≤ν = (3 − . for ν ≤ν and i = 1, 2 , (4.10) In Fig. 3 (left) we plot the symmetric steady densities in C (1) vs ν. We notice that bothñ A2 (ν) have discontinuous first order derivatives for ν =ν.

Stability of the symmetric steady solution
In order to investigate the stability of the symmetric solution, we consider densities deviating by a small amount fromñ, i.e. we let n X=A1,A2 vanish simultaneously as t → ∞. By inserting such perturbations into MFEs and by expanding in Taylor series at leading order, we obtain linearized MFEs The stability matrix Λ has constant elements, depending on the components ofñ and the relative connectedness ν (but not on { (i) X }). In particular, we find with σ = 2(1 + ν). It is possible to work out the four eigenvalues of Λ exactly, either by paper-and-pencil calculations or via a simple Maple TM script. Rather exceptionally, their algebraic expressions are sufficiently concise to allow us to report them in full. Indeed, we have The behaviour of these eigenvalues as functions of ν is reported in Fig. 3 (right). For sufficiently small ν all of them are negative, thus granting that the symmetric steady solution is stable. In fact, the transition to the multi-language phase occurs when the eigenvalue λ 1 shifts from negative to positive values [44]. The critical point γ out/in, c = ν c , in correspondence of which we have λ 1 = 0, can be calculated exactly. The equation λ 1 (ν) = 0 is indeed equivalent to a quartic equation for ν with four real simple roots. Among these two are negative and one is larger than one. The fourth root, that we just identify with ν c , is given by Actually, among all network models that we consider in the present paper, the PPM is the only one where a calculation of the critical connectedness can be performed analytically to the very end.
The eigenvector v 1 of Λ corresponding to λ 1 becomes a direction of instability for the symmetric steady solution for ν > ν c . In other words, the projection of the perturbation vector along v 1 diverges asymptotically. From Fig. 3 (right) we observe that also λ 2 shifts to positive values at some point. In particular, it can be shown that λ 2 = 0 for ν =ν. Therefore, as anticipated, the eigenvector v 2 of Λ corresponding to λ 2 represents a second direction of instability for ν >ν.

Numerical integration of mean field equations
It is worthwhile discussing at this point the integration of MFEs. We can take advantage of the analytic solution presented above to fix the details of our numerical recipe, so as to be confident that numerical integration yields correct results when applied to network models for which no analytic solution is available (for instance the SBM with Q = 2 and ν 1 = ν 2 , discussed in sect. 3). First of all, we notice that for A1 . Since the initial state densities, eq. (3.10), are symmetric too and no dynamical fluctuations are encoded in MFEs, nothing can break the exchange symmetry, hence numerical solutions always converge to symmetric steady densities.
To let the system fall into global consensus, we have two possibilities. One is to break the exchange symmetry explicitly in the initial conditions. For instance, we can introduce a contamination of A 2 within C (1) by letting n (1) with 0 < 1. For ν > ν c such a perturbation makes the system converge with certainty to global consensus on A 2 . However, the contamination affects the results of numerical integration. More specifically, it modifies the duration of metastable states, thus changing the value of the critical connectedness by terms O( ). To get rid of this effect, we must integrate numerically MFEs for a sequence of decreasing values of and then extrapolate to → 0 + . Albeit legitimate, the above approach has the drawback that symmetry breaking is implicit in the initial conditions, while MFEs are kept fully symmetric. An opposite possibility is to leave initial conditions unchanged and assume that C (1) and C (2) have different size. For instance, we can let N (2) = (1 + )N (1) for 0 < 1, so that C (2) is slightly larger than C (1) (for ν > ν c the system is then expected to converge to global consensus on A 2 ). This assumption modifies the coefficients {π (ik) }. Indeed, the probability of picking up an agent belonging to C (1) , while the probability of picking up one belonging to C (2) is N (2) /N = (1/2)(1 + /2) + O( 2 ). Therefore, the exchange symmetry is explicitly broken in MFEs. As previously, numerical estimates of the critical connectedness are biased by terms O( ), hence we must extrapolate results to → 0 + . All in all, the above two approaches for breaking the exchange symmetry are equivalent.  Apart from this issue, we discretize MFEs according to the Euler method [45] with step size dt = 0.1. In Fig. 4 (left) we show examples of numerical integrations for a handful of values of ν. The plot has been obtained with asymmetric initial conditions corresponding to = 1.0 × 10 −4 . As anticipated, we observe the presence of metastable states followed by collapse to global consensus. These states have a finite duration depending on ν. In particular, we see from the plot that the closer ν to ν c , the longer metastable states persist, until for ν < ν c they become truly stable. In Fig. 4 (right) we plot the time to consensus T cons as a function of ν. The collapse of metastable states to global consensus takes a finite time ∆t. Therefore, we need to define T cons operatively by setting a threshold. Throughout the paper we define T cons as the lowest value of t for which n (1) This introduces a systematic error, which is however negligible to all purposes, since ∆t/T cons → 0 as ν → ν c . The dependence of T cons upon ν is well described by the function with ν c ( ) and γ( ) converging as → 0 + . In Table 3 we report estimates of the parameters A, ν c , γ, obtained upon fitting data produced by numerical integrations to eq. (4.27). In particular, the critical exponent γ( ) converges to γ(0 + ) 0.96 (for a definition of critical exponents see ref. [46]), while ν c ( ) converges to the exact value, eq. (4.25).
In Fig. 5 (left) we show the equilibrium densities n A k (∞) as obtained from numerical integration of MFEs with asymmetric initial conditions corresponding to = 1.0 × 10 −4 . They are in perfect agreement with the symmetric steady solution derived in sect. 4.1 for ν < ν c . We conclude that our numerical recipe introduces no relevant systematic error in the calculation.

Finite size effects
So far we studied the model in the mean field approximation. This is known to work well only in the thermodynamic limit. In Monte Carlo simulations networks are necessarily made of a finite number of agents. Moreover, due to computational limitations this number is never exceedingly large. The main effect induced by the finiteness of the network is a blurring of the phase transition. The critical connectedness ν c disappears on small networks together with the multi-language phase. The coexistence of different local languages within communities becomes a purely metastable phenomenon, independently of ν. Dynamical fluctuations of state densities are always able to trigger a collapse to global consensus after a finite time since the game start. Of course, the lower ν the longer the system persists in the metastable phase. To quantify this, we average O(100) independent Monte Carlo measures of the time to consensus for several choices of N and ν. In particular, we let p (11) = p (22) = 1 in all our numerical tests, hence the communities that we  simulate are actually cliques. Since measuring time to consensus becomes increasingly costly as ν decreases, we need to set up a threshold beyond which the stochastic dynamics is forcedly arrested. We introduce the bounded time to consensus In Fig. 5 (right) we show the behaviour ofT cons in a range of ν around the critical point ν c for N = 1000, 2000, 4000. We observe thatT cons is essentially the same for all values of N if ν ν c . As ν approaches ν c from aboveT cons begins to rise and the increase is steeper for larger values of N . Finally, we see thatT cons keeps finite for ν < ν c even though it takes soon large values as ν decreases. In principle it is possible to reproduce the observed curves thanks to a numerical technique that allows to build quasi-stationary solutions of the Master Equation for stochastic processes with absorbing states [47,48]. Although this technique has been applied to the NG in other contexts [34,49] with very good results, its use here goes beyond our aims. We conclude by noting that in the crossover region, i.e. in the range of ν across whichT cons (N, ν) rises from O(100) to the upper bound 100 · N , the behaviour ofT cons (N, ν) is well described by the functioñ with β 1.5, in analogy with the findings of ref. [34].

Binary Naming Game on two overlapping cliques
In order to investigate how the coexistence of multi-language states in the NG is affected by the presence of agents belonging simultaneously to different communities, we consider a graph G = C (1) ∪ C (2) made of two partially overlapping cliques, having size N (1) = N (2) = N/2. We recall that C (k) is a clique provided p (kk) (x, y) = 1 for all x, y ∈ C (k) and x = y. We split C (1) and C (2) into two disjoint groups of nodes respectively, i.e. we let in and for all y ∈ C (2) , ii) (x, y) / ∈ E for all x ∈ C (2) in and for all y ∈ C (1) , iii) (x, y) ∈ E for all x ∈ C (1) ov and for all y ∈ C (2) , iv) (x, y) ∈ E for all x ∈ C (2) ov and for all y ∈ C (1) .
We also assume |C (1) in | = |C (2) in | = N in and |C ov | = N ov /2. Therefore, we have N = 2N in + N ov . It will be noticed that these networks have no stochastic elements 2 . An example corresponding to N = 600 and N ov = 60 is reported in Fig. 6. The connectedness parameters are given by with ω = N ov /N in . ECS conditions are fulfilled provided ω 1.
It is possible to study the binary NG on such networks with the same approach used for the PPM. However, we first need to clarify how the overlap contributes to shaping MFEs. So far we considered communities as groups of dynamically homogeneous agents. Accordingly, we identified the state densities n (i) D , introduced in eq. (3.2), as fundamental degrees of freedom of the system. When agents belonging to more than one community are present and they are likewise connected to all of these, assigning such agents to one community or another becomes ambiguous, hence it is advisable to treat them separately. Indeed, in our case we can distinguish precisely three groups of dynamically homogeneous agents, namely C (1) in , C (2) in and C ov = C Possible agent-agent interactions and corresponding conditional rates are still those listed in Table 1, but the probabilities of picking up an agent x and a neighbour x of x belonging to combinations of the above groups must be specified over again. In particular, here we let and we notice that ω = π (1o) /π (11) = π (2o) /π (22) = π (oo) /π (o1) = π (oo) /π (o2) . The above probabilities include all possible pairings, indeed they fulfill π (11) + π (1o) + π (22) + π (2o) + π (oo) + π (o1) + π (o2) = 1 . (5.11) From the above definitions we easily recognize that the system is governed by MFEs In analogy with sect. 4, we can show that these admit a symmetric steady solutionñ = {ñ Moreover, here too there exists a finite critical threshold ω c , such that the symmetric steady solution is stable for ω < ω c and unstable for ω > ω c . In particular, if the game starts with initial conditions n (1) we find that for ω < ω c the system relaxes to a stable symmetric equilibrium with A 1 and A 2 prevailing respectively in C (1) and C (2) , while for ω > ω c the system converges to global consensus on A 2 , due to the symmetry breaking induced by dynamical fluctuations. Now, as a consequence of the exchange symmetry of our ansatz the unknown density values x, y, z are fully determined by algebraic equations    just determined for v(ω) and z(ω) into eq. (5.22), we get with Ω = √ 29ω 2 + 88ω + 64. In order for u(ω) to be real, it must be 0 ≤ ω ≤ω = 2 √ 5 − 4 = 0.472136 . . .. More precisely, it can be shown that the equation u(ω) = 0 is equivalent to a quartic equation in ω with four real simple roots. Among these, onlyω is positive. For ω >ω, i.e. for u = 0, eq. (5.26) holds no more. In this region the unknowns v and z are jointly determined by eqs. . With some algebra we find that the symmetric steady solution, corresponding to initial conditions as specified in eq. (5.18) with = 0, is given by for ω ≤ω and i = 1, 2 , (5.28) for ω >ω , i = 1, 2, o and k = 1, 2 . In Fig. 7 (left) we plot the symmetric steady densities in C (1) in and C ov vs. ω. Results for n (i) A k , i, k = 1, 2 are qualitatively similar to those reported in Fig. 3. Also in this case we see that bothñ

Stability of the symmetric steady solution
The existence of a critical threshold ω c above which the symmetric steady solutionñ becomes unstable is again revealed by a stability analysis similar to that performed in sect. 4.1. The algebra is just a bit harder here. In particular, although the game rules are unchanged and the network is still made of two interacting communities, the state space of the system is now larger: we have six coupled equations in six unknown variables. As a result, the stability matrix has 6 × 6 entries Λ Y (ñ) corresponding to i, k = 1, 2, o and X, Y = A 1 , A 2 . The lack of a direct interaction between agents belonging to C (1) in and C (2) in makes some of these matrix elements vanish. Concretely, we find (1) (1) (1) (1) 47) with ρ 1 = (1+ω)(2+ω) = 1/π (11) = 1/π (22) and ρ 2 = ω −1 (2+ω) 2 = 1/π (o1) = 1/π (o2) . In order to calculate the eigenvalues {λ k } 6 k=1 of Λ we need to solve the secular equation det(Λ − λ1) = 0. With the components ofñ depending on ω either explicitly (in the form of direct and inverse powers of the latter) and implicitly via Ω, the secular determinant turns out to be a polynomial of sixth degree in λ with rational coefficient functions in ω and Ω. Luckily, the determinant factorizes into cubic polynomials, i.e. we have Therefore, the eigenvalues of Λ are simply given by the roots of p 1 and p 2 separately. The behaviour of the eigenvalues as functions of ω is shown in Fig. 7 (right). All eigenvalues are negative for sufficiently small ω, henceñ represents here a stable multi-language steady state. At some point as ω increases (precisely for ω = ω c ), λ 1 shifts from negative to positive values, thus determining a sudden change of phase, with the system converging to global consensus in a finite time. For an even larger value of ω (more precisely for ω =ω), also λ 2 shifts to positive values. It is possible to find analytic expressions for all the eigenvalues of Λ. Below we report only λ 1 , since this is related to the critical threshold ω c . We have  A comparison with the results of sect. 4 shows that the critical connectedness on the network with two overlapping cliques is rather close to that observed in the PPM. This leads us to conclude that, with reference to the stochastic dynamics of the NG, few agents with many links to more than one community make a tie comparable with many agents who tightly belong to a single community and have sparse links to the other.

Finite size effects
In Fig. 8 we show the behaviour of the bounded time to consensusT cons (N, ω) as a function of ω, as obtained from Monte Carlo simulations on finite networks with N = 1000, 2000, 4000 (the exit threshold is set to 100 · N , like in eq. (4.28)). Similar to Fig. 5 (right), also in this caseT cons is seen to increase as ω decreases and, in perfect analogy, the rise is steeper in correspondence of larger values of N . The main (and only) difference is that the appearance of long-lasting metastable states occurs here for values of ω which are about twice the values of ν observed therein, in accordance with ω c 2ν c . This confirms the validity of the analysis we made in the previous pages.
We conclude this section by commenting that since long-lasting multi-language metastable states are observed in a finite volume only for γ out/in below its critical threshold, having γ out/in (ν c ) γ out/in (ω c ) yields a qualitative indication that the NG, when used as a community detection algorithm on empirical networks, is equivalently robust (in the language of ref. [31] we would say that it has an equivalent resolution) in finding overlapping or non-overlapping communities, γ out/in being the same. This result represents the main lesson we learn from the algebraic exercises of sect. 4 and the present one.

Dependence of ν c upon Q in the Planted Partition Model
As seen in sect. 3, the Q-ary NG in the SBM develops an exponentially large number of phases as Q increases. As a result, studying the the phase diagram becomes soon unfeasible. Permutational symmetry certainly helps reduce the complexity of the problem, however the boundary surface of single phases is anyway  We conclude that the geometric structure of the phase diagram, at the boundaries of its domain, is precisely that of Fig. 2.
More difficult is to establish the structure of phases in the bulk of the phase diagram. For instance, we know from Fig. 2 that for Q = 2 the cusp of region II represents the point with maximum Euclidean distance from the origin, for which the system does not converge to global consensus. The formalism developed in sect. 3 and App. A allows us to show that for Q > 2 the NG in the PPM is equally characterized by a critical threshold ν c (Q). The reader may wonder whether it is true as well that in the SBM for Q > 2 the point ν (12) = ν (21) = ν (13) = . . . = ν c (Q) is that with maximum Euclidean distance from the origin, for which language coexistence is observed. We shall see in a while that the answer is negative. In fact, ν c (Q) turns out to be a monotonically decreasing function of Q.
For Q > 2 the dynamics of the NG in the PPM is still described by eqs. (3.6) with all ν (ik) = ν = p out /p in . Owing to the large number of degrees of freedom, we are unable to work out the symmetric steady state of the system exactly, as we did in sect. 4. Since |S(D)| = 2 Q − 2, the overall number of unknowns (or equivalently coupled equations) amounts to Q(2 Q − 2), e.g. for Q = 6 we have 372 coupled equations. The algebraic complexity of the transition rates {f (i) D } increases with Q, too. For these reasons, we can only study the system numerically. Since in the PPM communities have all the same connectedness, either each of them keeps speaking its original language forever or the system goes to global consensus, with one single name colonizing the whole network. In order to let the system reach global consensus, we introduce an asymmetric perturbation in eq. (3.10) that favours A 1 , namely we integrate MFEs with initial conditions for k = 1 .
. Figure 9 -Time to consensus in the PPM with Q > 2.
In Fig. 9, we show the behaviour of T cons as a function of ν for Q = 3, . . . , 6 and for several values of . Numerical integration becomes demanding for Q 5, which is why the rise of T cons in the plot at bottom right (corresponding to Q = 6) is cut off. A glance to the four plots reveals that ν c (Q) decreases as Q increases. The dependence of T cons upon ν is still well described by eq. (4.27). In Table 4 we report estimates of the parameters A, ν c , γ, obtained from fits to the theoretical model. Interestingly, the critical exponent γ(0 + ) appears to be independent of Q (actually, for Q = 5, 6 we observe numerical instabilities in the fits due to a variety of factors, including round-off errors arising in numerical integration of MFEs and a gradual enhancement of the systematic error associated to the finiteness of ∆t/T cons as Q increases, see sect. 4).
In Fig. 10 (left) we plot ν c (Q) vs. 1/Q. We observe an approximately linear behaviour, distorted however by a mild modulation in correspondence of the largest values of Q. This makes it difficult to extrapolate ν c (Q) for Q → ∞ (we leave this as an open problem). The scaling law ν c (Q) · Q const. looks pretty natural in consideration that communities are equally connected to each other in the PPM: since the overall number of inter-community links connecting one community to the rest of the network increases proportionally to Q − 1 for fixed ν, the critical connectedness is expected to decrease correspondingly. The absence of anomalous scaling, such as ν c (Q) · Q α const. with α > 1, is a signal of robustness of multi-language phases against variations of Q. The observed scaling and our previous considerations about the boundaries of the phase diagram suggest as well that the joint union of all multi-language phases in the SBM is reverse convex on a large scale, i.e. it is progressively squeezed towards the origin of the phase space as we approach the "bisecting" line {ν (ik) = ν} i =k . However, this picture needs further investigation to be confirmed or disproved.
To conclude, in Fig. 10 (right) we show the behaviour ofT cons as a function of ν for Q = 3, as obtained   from Monte Carlo simulations. We chose N such that communities have the same size as in Fig. 5 (which corresponds to Q = 2). The plot shows that the crossover region lies in a range of ν that is shifted to the left with respect to Fig. 5, in agreement with the predictions of mean field theory.

Effects induced by a change of the relative size of communities
Another important aspect of the problem is the way and the extent to which a change in the relative size of communities affects locally and/or globally the geometric structure of the phase diagram. To keep the theoretical framework as simple as possible, we assume Q = 2. In this case, we have only one additional parameter. More precisely, we let N (2) = (1 + )N (1) . We assume > 0, hence C (1) is smaller than C (2) . We also let ν 1 = p (12) /p (11) and ν 2 = p (12) /p (22) , as we also did in sect. 3. Since the network is no more symmetric under exchange of community indexes, γ out/in is not well defined. The dynamics of the binary NG is still ruled by eqs. (3.12)-(3.15), but the probabilities of picking up an agent x and a neighbour x of x in one community or the other are now given by The above probabilities correctly fulfill π (11) + π (12) + π (21) + π (22) = 1. Since the exchange symmetry is explicitly broken, steady solutions to MFEs are inevitably asymmetric. As such, they are also harder to  work out than for = 0. Accordingly, we solve MFEs by numerical integration. In Fig. 11 we show phase diagrams corresponding to = 0.1, 0.5, 1.0. We see that region II is progressively squeezed downwards, while it simultaneously expands rightwards, as increases. If we approximate region II by a rectangle with sides at ν 1 = ν 1,c and ν 2 = ν 2,c , then Fig. 11 suggests that ν 1,c · N (2) const. and ν 2,c · N (1) const. For instance, for = 1 we have N (2) = 2N (1) and we find ν 1,c 0.055, which is about half the value found for = 0. The above scaling laws look pretty natural in consideration that agents in C (1) have a number of neighbours in C (2) increasing proportionally to N (2) for fixed ν 1 and the other way round. Hence, ν 1,c (ν 2,c ) is expected to decrease as N (2) (N (1) ) increases. The absence of anomalous scaling, such as ν 1,c · (N (2) ) α const. or ν 2,c · (N (1) ) α const. with α > 1, is a signal of robustness of multi-language phases against variations of the relative size of communities.
8 Dependence of γ out/in, c upon the topology of {E (ik) } It is well known that realistic networks are heterogeneous (node degrees display high variability). Networks typically result from growth processes where new nodes join progressively those already in place. As a result, their topology cannot be described by static functions such as p (ik) (x, y). In order to examine how the critical point of the multi-language phase depends on the internal topology of communities and their interconnections, we study a network model with two interacting BA communities. Specifically, we fix N and consider first two disjoint BA subgraphs G BA (N (k) , m 0 , m) [51], each made of N (k) = N/2 nodes, with m 0 and m denoting respectively the number of initial nodes of each subgraph and the number of links each new node establishes, based on preferential attachment, when it joins the subgraph. In particular, we let m 0 = m = 5 in our numerical simulations. Then, we consider three possible definitions of E (12) , all relying on one parameter ρ: ER : we statically connect nodes belonging to different communities with probability p out (N ) = 4mρ/N ; E (12) SF1 : starting with no inter-community links, we alternately choose at random a node belonging to one community and connect it to a target node belonging to the other one. The target node is chosen using a variant of preferential attachment where only inter-community links are taken into account when defining the target-node degree distribution. We stop the growth process as soon as |E (12) SF1 | = mρN . We end up with E SF1 having a scale-free topology. Moreover, there is no inter-community assortativity, i.e. nodes with high inner degree in one community do not tend to attach preferably to nodes with  (right) BA communities interconnected by scale-free links (with inter-community assortativity). In both cases, N = 600, ρ = 0.1, the size of each node is proportional to its overall degree and the spatial position of nodes represents the equilibrium configuration of the Force Atlas visualization algorithm [50].
high inner degree in the other one; SF2 : we generate inter-community links similar to E SF1 , the only difference being that, concerning preferential attachment, both intra-and inter-community links are now taken into account when defining the target-node degree distribution. Again, E SF2 develops a scale-free topology. Yet, there is intercommunity assortativity in this case.
The connectedness parameters are given by Examples of networks with N = 600, inter-community links generated according to E SF1 or E SF2 and ρ = 0.1 are reported in Fig. 12.
The main assumption underlying mean field theory is that agents are all equivalent. When links are heterogeneously distributed, this assumption is violated. In such a case, agents with many neighbours may (or may not) turn out to be more influential than agents with few ones, depending on the microscopic dynamics of the system. When this happens, MFEs lose predictive accuracy. Historically, the problem arose first in the context of epidemic spreading and was solved by Pastor-Satorras and Vespignani with the introduction of heterogeneous mean field theory [52,53]. Here, agents with different degrees are treated separately. By analogy, the dynamics of the NG on heterogeneous community-based networks is expected to be accurately described by equations κκ2 of picking up an agent x with degree κ in C (i) and a neighbour x of x with degree κ 2 in C (k) for some k, κ 2 . Since agents can have arbitrarily large degrees in the thermodynamic limit, the number of heterogeneous MFEs is virtually infinite. In view of this, it seems reasonable to impose an upper cut-off κ max to the agent degree. Numerical solutions are then expected to converge as κ max → ∞.  We leave for future research the precise computation of the critical connectedness γ out/in, c on heterogeneous networks via eqs. (8.5). Instead, we present here results obtained from numerical simulations. In particular, in Fig. 13 we show the behaviour of the bounded time to consensusT cons as a function of ρ for the network models introduced above. Although plots are qualitatively similar, the crossover region depends rather significantly on the topology of E (12) . In this range of ρ we can fit data to the curve described by eq. (4.29), with ν c replaced by ρ c . We report our estimates of ρ c and β in Table 5. Pairwise comparisons suggest the following considerations.
• The network model with E (12) ER differs from the PPM only in the internal structure of communities. A comparison of γ out/in,c in these models suggests that BA communities yield a more efficient opinion spread than ER ones. We know from ref. [14] that T cons ∝ N 1.4 for both BA and ER networks (with no community structure). This is not in contradiction with our finding, which concerns indeed the effectiveness by which fluctuations break consensus within communities.
• A comparison of ρ c in the network models with E (12) ER and E (12) SF1 suggests that BA communities yield a more efficient opinion spread when interacting via random than via scale-free links, provided the latter have no correlation with the internal degree distribution. In other words, the effectiveness by which fluctuations break local consensus is largely reduced when intra-and inter-community links are heterogeneously distributed with no correlation to each other.
• A comparison of ρ c in the network models with E (12) SF1 and E (12) SF2 shows that inter-community assortativity allows to restore the effectiveness by which fluctuations break local consensus. Indeed, γ out/in,SF2,c is very close to the critical connectedness observed in the PPM.
In the end the variability of γ out/in, c is not dramatic. A glance to all network models we considered so far shows that, whenever γ out/in is well defined, its critical value lies always in the range 0.1 ÷ 0.2. Although it is not possible to parameterize the dependence of ρ c upon the topological structure of E (ik) in a simple way, such limited variation of ρ c is a clear signal of robustness of multi-language phases under variations of the network topology.

Conclusions
We studied the phase structure of the Naming Game (NG) on community-based networks. Prior to this paper it was known in the literature that communities of agents playing the NG tend to develop own long-lasting languages when sufficiently isolated. We showed that on infinitely extended networks the latter become everlasting. In other words, communities induce genuine multi-language phases in the thermodynamic limit. Our interest in studying these was both theoretical and practical. On the theoretical side, the NG is a nontrivial agent-based model -designed to investigate the emergence of spoken languages in human societieswhose phase structure is fully determined by the topology of the underlying network. On the practical side, the NG is an algorithm that, within limits, allows to detect communities in a given network. Either way, a first-principle analysis of which aspects of communities are more relevant or critical in order to guarantee the stability of local languages was lacking.  It should be clear that studying the phase structure of the NG on community-based networks is an ill-posed problem because the concept of community is not strictly defined by itself [25]. ECS conditions, introduced in sect. 2, define a huge ensemble of networks for which no universal parameterization exists. Hence, the phase diagram of the system cannot be simply explored by varying a fistful of parameters. To bypass this difficulty we considered several distinct network models. Each of them was meant to highlight the dependence of multi-language phases upon specific features of communities. We studied the phase diagram in the stochastic block model to have a clear picture of how an increase in the fraction of links connecting communities triggers a sharp transition from local to global consensus. In connection with this, we derived exactly the cusp of the multi-language phase (region II of Fig. 2) to show that in at least a simple case it is possible to get full insight into the phase transition. Then, we studied the NG on a network with two overlapping cliques to understand whether connectedness is more or less efficient than overlap in order to spread languages across communities. We finally examined the dependence of critical thresholds upon topological properties of the network, such as the number and relative size of communities or the structure of intra-/inter-community links, to investigate whether the model displays anomalous scaling somewhere in the phase space.
The overall picture emerging from our study is that multi-language phases in the NG display a high degree of robustness against changes in the network topology. The characteristic scale of the connectedness parameter γ out/in (sect. 2), at which metastable equilibria become stable, lies at γ out/in,c ∼ 0.1 − −0.2, depending on specific features of the underlying network model. Such large values provide a full theoretical justification for using the NG as a community detection algorithm, in accordance with the original proposal of ref. [18] and the analysis performed in ref. [26]. Connectedness and overlap seem to contribute to a similar degree to break local equilibria and make the system converge to global consensus. The phase diagram appears to scale trivially under variations of the relative size of communities. Although the geometric structure of multi-language phases becomes increasingly complex as the number of communities Q increases, at least the critical point corresponding to networks with fully symmetric communities displays a natural scaling with Q. Finally, the critical threshold γ out/in,c on two-community symmetric networks shows a mild dependence upon the topology of the intra-/inter-community links.
The phase structure induced by communities in the stochastic block model is remarkably similar to that induced by competing committed groups of agents on the fully connected graph [35]. The analytic structure of mean field equations is different in one case and the other, yet their solutions bear a strong resemblance. The rationale behind such similarity is not known.

D
otherwise . (A.1) In other words, the operator θ k removes the kth name from a notebook. We also let i.e. the operator ρ k extracts the kth name out of a notebook. We finally let that is to say Σ A is the set of all notebooks containing the name A.
We find it convenient to work out f (i) D separately for notebooks with |D| = 1 (single-name notebooks) and |D| > 1 (multi-name notebooks). Indeed, if the initial conditions are chosen as in eq. (3.10), densities n (i) D with |D| = 1 can increase throughout the game only owing to agent-agent interactions where a certain multi-name notebook collapses to D, whereas densities n (i) D with |D| > 1 can increase only when an agent adds a name to his/her notebook thus attaining D. We start from the latter.
Case I : |D| > 1. In order to let n (i) D increase, the only possibility is that a listener belonging to the ith community has initially a notebook differing from D by the lack of one name and a speaker belonging to any community has a notebook containing that name. Therefore, we let N +,D = 1 for |D| > 1. The contribution to MFEs is given by The factor of 1/|D| represents the probability that the speaker chooses the name ρ • D among those in his/her notebook.
In order to let n (i) D decrease, a listener or a speaker in the ith community must have initially notebook D and must modify it when interacting with another agent. The latter must have a notebook sharing at least one name with D. Qualitatively, these are two different types of transitions, therefore we let N −,D = 2 for |D| > 1.
• Type-I transitions lowering n (i) The listener belongs to the ith community and the speaker belongs to any community. The listener has initially notebook D, while the speaker has a notebook which has a non-vanishing overlap with D. The contribution to MFEs is given by The factor of 1/|D| represents again the probability that the speaker chooses the name ρ • D among those in his/her notebook.
• Type-II transitions lowering n (i) The speaker belongs to the ith community and the listener belongs to any community. The speaker has initially notebook D, while the listener has a notebook which has a non-vanishing overlap with D. The contribution to MFEs is given by where the factor of 1/|D| represents once more the probability that the speaker chooses the name ρ • D among those in his/her notebook.
Case II : |D| = 1. In this case D = {A } for some = 1, . . . , Q. As mentioned above, n A can increase only because a listener or a speaker in the ith community has initially a multi-name notebook containing A , which collapses to D = {A } when he/she interacts with another agent belonging to any community. The latter too must have initially a notebook containing A . There are three different types of transitions, thus we let N +,A = 3.
• Type-I transitions increasing n (i) A The listener belongs to the ith community and the speaker belongs to any community. The speaker has notebook D = {A }, while the listener has any multi-name notebook D L ∈ Σ A (D) with |D L | > 1 (otherwise the interaction leaves the system unchanged!). The contribution to MFEs is given by (A.7) • Type-II transitions increasing n (i) A The speaker belongs to the ith community and the listener belongs to any community. The listener has notebook D = {A }, while the speaker has any multi-name notebook D S ∈ Σ A (D) with |D S | > 1 (otherwise the interaction leaves again the system unchanged!). The contribution to MFEs is given by where the factor of 1/|D S | represents the probability that the speaker chooses the name A among those in his/her notebook.
• Type-III transitions increasing n (i) A The speaker belongs to the ith community and the listener belongs to any community or the other way round. The speaker has a notebook D S ∈ Σ A k (D) with |D S | > 1 and the listener has a notebook D L ∈ Σ A k (D) with |D L | > 1. The contribution of this type of interaction to MFEs is given by where the factor of 1/|D S | represents the probability that the speaker chooses the name A among those in his/her notebook and the factor of 2 takes into account that n (i) A increases by 2 fractional units following the transition if both speaker and listener belong to the ith community.
We finally discuss transitions lowering n (i) A . For this to happen it is necessary that an agent belonging to the ith community, who has initially notebook D = {A }, switches to a multi-name notebook. This is possible only provided the agent adds a second name to his/her notebook and this can occur only if the agent is a listener. The speaker's notebook might either contain A or not and we must take care of properly counting the probability of not choosing A in the former case, otherwise we fall back into Case I/Type-II. Therefore, we find it better to work out separately the two types of transitions and correspondingly we let N −,A = 2.
• Type-I transitions lowering n where the factor of |DS|−1 |DS| represents the probability that the speaker chooses a name different from A among those in his/her notebook.
• Type-II transitions lowering n where no probability coefficient is needed in front of the product of densities, such as in all previous cases, since here the speaker can choose equivalently any name among those in his/her notebook.
When the above sums are expanded, lengthy and tedious algebraic expressions are generated, even for the case Q = 3. To enable interested readers to write down complete MFEs, we provide in App. B an essential and correctly working Maple TM code for the PPM (it generates MFEs for Q = 6, as set at line 3). The code can be easily generalized to the SBM, while its output can be easily adapted for numerical analysis.
We apply in sect. 6 the formalism here presented. end do: