{'fraction_non_alphanumeric': 0.03814262023217247, 'fraction_numerical': 0.020269025244149624, 'mean_word_length': 4.544433094994893, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Sznajd opinion dynamics with global and local neighbourhood

In this modification of the Sznajd consensus model on the square lattice, two people of arbitrary distance who agree in their opinions convince their nearest neighbours of this opinion. Similarly to the mean field theory of Slanina and Lavicka, the times needed to reach consensus are distributed exponentially and are quite small. The width of the phase transition vanishes reciprocally to the linear lattice dimension. Advertising has effects independent of the system size. For more than two opinions, three opinions reach a consensus in roughly half of the samples, and four only rarely and only for small lattices.

Of the many recently simulated models of opinion dynamics [1,2,3,4,5], the Sznajd model [6] was studied particularly often; see [7] for reviews and [8,9] for recent examples. In particular, Slanina and Lavicka [10] made a mean field theory and some simulations, where each pair of agents (spins) can be neighbours. This infinite-range version agreed with many aspects of nearest neighbour interactions on square (or higher-dimensional) lattices. The main difference was that for infinite range the time needed to reach a consensus was short and its distribution decayed exponentially, while for nearestneighbour square lattices it was long and distributed in a more complicated way. The present paper introduces an intermediate global-local model with interactions both between arbitrarily selected agents and nearest neighbours, on the square lattice. In this model, each of N = L × L lattice sites carries an agent which has one of Q possible opinions. At each iteration we select N times two agents randomly; if and only if they share the same opinion, then each of the two agents convinces its four nearest neighbours on the lattice of the same opinion. Boundaries are neglected as usual [7]. If bounded confidence [3,4] is used, only those neighbours are convinced whose opinions differ by ±1 from the opinion of the convincing pair; then opinion 2 can convince opinions 1 and 3, but opinion 1 can convince only opinion 2, not opinion Q. If advertising [11,12] is used, then at each iteration with ten percent probability each agent independently adopts opinion 2, independent of the previous opinion or that of the neighbours. Initially, the opinions are distributed randomly and independently. For the simple case Q = 2 without advertising (bounded confidence is meaningless at Q = 2) this new model shows the usual phase transition: If the initial probability p of opinions 1 is larger than 1/2, then at the end everybody shares this opinion 1; if p < 1/2, everybody has opinion 2 at the end. In a finite lattice, the phase transition is rounded, and Fig.1 shows the width W of the transition such that at initial concentration p = 0.5 + W , of the 1000 samples about 700 show consensus for opinion 1, and at p = 0.5−W only 300 of 1000 do so. Over three orders of magnitude in linear lattice dimension L we see W ∝ 1/L .
We regard this simple power law as an indication that the model belongs to the universality class of infinite range, even though [10] does not give such a finite-size scaling. For nearest-neighbour interactions, [13] gave no clear exponent. Another law W ∝ 1/L would follow from a simple majority rule for the initial opinions: On a finite lattice of N sites the difference in the numbers of opinions 1 and 2 follows a binomial distribution about zero, which for large N approaches a Gaussian of width ∝ √ N or relative width W ∝ 1/ √ N = 1/L. Thus the majority rule has a sharp phase transition for infinite systems, with a finite width proportional to 1/L for finite lattices.
The reason why up to L = 10, 001 could be simulated, far larger than any previous Sznajd lattice, is evident from Fig.2: Consensus is found after a few iterations, and the distribution of the needed number τ of iterations decays exponentially after a maximum at about 7. As a function of L, the average time < τ > increases logarithmically, Fig.3. Both results agree with the mean field theory of [10]. If Q = 3 or 4, again a consensus is always found (not shown). This changes if bounded confidence, as introduced above, restricts the convincing power. Then for Q = 4, a consensus is reached only rarely, and only for  small lattices (not shown). For Q = 3, on the other hand, about half of the 10,000 simulated samples reach a consensus, Fig.4. For the nearest-neighbour model, the border between consensus and failure was between Q = 3 and 4, while now it is near 3. With advertising and Q = 2, Fig.4 shows, in contrast to the nearestneighbour case [11,12], a size-independent initial concentration of p ≃ 0.52 at which the two percent initial majority for opinion 1 counteracts the ten percent advertising for opinion 2. (If advertising is doubled to 20 percent, the initial majority also doubles to four percent: p ≃ 0.54; not shown.) In contrast, for nearest neighbour interaction [12,11], advertising wins if the system is large enough.
In summary, our global-local mixture of infinite-range interaction and nearest-neighbour interaction is far superior numerically to nearest-neighbour interactions, and gives the short relaxation times, distributed exponentially and increasing as log(L), of the mean field model [10].
Thanks are due to S. Havlin for suggesting to look for an upper critical dimension, and D. Stauffer for help.