# The tight-knit community model Who talks to whom in Gridhamshire?

```Model statement & free energy
Laplace’s method
Phase transitions
The tight-knit community model
1
Model statement & free energy
2
Laplace’s method
3
Free energy, phase transitions
1 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Who talks to whom in Gridhamshire?
Neighbours talk about politics: won’t vote independently?
Could look at all pairs (i, j) of (nearest) neighbours
σi σj = +1 means they vote the same way
σi σj = −1 means they vote opposite
But maybe everyone talks to everyone else (facebook, . . . )?
To measure how likely voters are to “align” opinions, consider
E(σ) =
1
N
X
σi σj
all pairs i,j
Larger E: more tendency for voters to align
Assume we know both hM (σ)i and hE(σ)i
Maximum entropy distribution P (σ) of voting patterns?
2 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Calculation of free energy
First rewrite E(σ) =
1
2N
P
i6=j
σi σj
Can be expressed in terms of M : E(σ) = M 2 (σ)/(2N ) − 1/2
Maximum entropy distribution: P (σ) = (1/Z)eλ1 M (σ)+λ2 E(σ)
Abbreviate λ1 ≡ h, λ2 ≡ J
So need to calculate partition function
X
2
Z=
ehM (σ)+(J/2N )M (σ)−J/2
σ
and then free energy F = − ln Z
3 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Counting states
Exponent doesn’t factorize
But get same contribution from every σ with same M (σ)
How many states for given M ?
(N + M )/2 voters vote +1, (N − M )/2 voters −1
So number of states = binomial coefficient:
X
2
N
Z=
ehM +(J/2N )M −J/2
(N + M )/2
M
where M = −N , −N + 2, . . . , N − 2, N
Better than before: a sum with N + 1 rather than 2N terms
Can we simplify further for large N ?
4 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Converting to an integral for large N
Can write sum for Z in terms of normalized poll lead
m = M/N :
X
2
N
Z=
eN [hm+(J/2)m ]−J/2
N (1 + m)/2
m
where m = −1, −1 + 2/N , . . . , 1 − 2/N , 1
Think of numbers being summed as heights of rectangles
P
Rectangle width 2/N , so (2/N ) × m . . . = Riemann sum
For N → ∞, rectangles become narrow, approach integral:
Z N 1
2
N
Z≈
eN [hm+(J/2)m ]−J/2 dm
2 −1 N (1 + m)/2
Subtlety: integrand also depends on N ; replacement of sum
by integral for large N can be shown to work nonetheless
5 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Simplifying the integrand for large N
Want to simplify factorials
N and N (1 ± m)/2 are all large for large N
(except at endpoints m = ±1, but these turn out not to matter)
So can use Stirling n! ≈
Z≈
N
2
Z
1
−1
Here
s(m) = −
√
2πn(n/e)n to get
2 eN s(m)
2
p
eN [hm+(J/2)m ]−J/2 dm
2πN (1 − m2 )
1+m
ln
2
1+m
2
−
1−m
ln
2
1−m
2
6 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Interpretation of s(m)
We defined
s(m) = −
1+m
ln
2
1+m
2
−
1−m
ln
2
1−m
2
This is the entropy of a voter making decisions with
probabilities P (σi = ±1) = (1 ± m)/2
So as before, entropy can be seen as counting number of
states: to exponential accuracy
N
= eN s(m)
N (1 + m)/2
Empirical probabilities are [N (1 ± m)/2]/N = (1 ± m)/2 for
σ = ±1 as found above by inspection
7 / 24
Model statement & free energy
Laplace’s method
Phase transitions
The tight-knit community model
1
Model statement & free energy
2
Laplace’s method
3
Free energy, phase transitions
8 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Laplace’s method: Motivation
Summarizing so far, have for large N
r Z
N 1
˜
Z ≈ e−J/2
(1 − m2 )−1/2 e−N f (m) dm
2π −1
with f˜(m) = −hm − (J/2)m2 − s(m)
How do we do the integral, again for large N ?
˜
Exponential e−N f (m) is largest at the minimum of f˜(m)
Factor N ⇒ drops very quickly away from the minimum
So integrand is sharply peaked around m = m∗ where
m∗ = argminm f˜(m)
is position of minimum
Intuition: large is easier; large N ⇒ small fluctuations in m
9 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Laplace’s method
Method for doing integrals of form IN =
Rb
a
dx w(x)e−N g(x)
Idea: for large N integral is dominated by values of x near
(global) minimum of g(x)
Call position of minimum x∗ = argminx g(x)
p
∗
Result: IN = 2π/[N g 00 (x∗ )]w(x∗ )e−N g(x )
Leading term: −(1/N ) ln IN → g(x∗ ) = minx g(x) for
N →∞
Informally: IN = e−N minx g(x) to exponential accuracy
We’ve assumed that a < x∗ < b: if minimum is at end points,
exponential term in IN is the same but prefactors are different
10 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Application: Stirling approximation
Claim: for large n, n! ≈
√
2πn(n/e)n (lhs/rhs → 1 for n → ∞)
For normalized log factorials, need only leading term:
1
ln n! ≈ ln(n) − 1
n
Formally, lhs − rhs → 0 for n → ∞
Derivation by Laplace’s method:
11 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Back to our partition function
We had Z ≈ e−J/2 [N/(2π)]1/2
Laplace’s method gives us
R1
−1 (1
˜
− m2 )−1/2 e−N f (m) dm
˜
Z ≈ e−J/2 [N/(2π)]1/2 {2π/[N f˜00 (m∗ )]}1/2 [1−(m∗ )2 ]−1/2 e−N f (m
∗)
So free energy per voter f = F/N = −(1/N ) ln Z is
f≈
1
[J + ln(f˜00 (m∗ )) + ln(1 − (m∗ )2 )] + f˜(m∗ )
2N
All terms except last go to zero for N → ∞
So for large N everything is reduced to a minimization
problem:
f = f˜(m∗ ) = min f˜(m)
m
12 / 24
Model statement & free energy
Laplace’s method
Phase transitions
The tight-knit community model
1
Model statement & free energy
2
Laplace’s method
3
Free energy, phase transitions
13 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Tight-knit community model with many voters (large N )
Free energy per voter is f (h, J) = minm f˜(m, h, J) with
J
f˜(m, h, J) = −hm − m2
2
1+m
1+m
1−m
1−m
ln
+
ln
+
2
2
2
2
As we vary h and J, can get phase transitions
E.g. one minimum may split in two
Or one minimum becomes lower than other
2 − s(m) is consistent
Form of f˜(m, h, J) = −hm − (J/2)m
P
with general relation F/N = − C
λ
c=1 c hfc (x)i/N − S[P ]/N
14 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Meaning of f˜(m)
Look at the distribution of M
By counting states with same M as before,
1
2
N
P (M ) =
ehM +(J/2N )M −J/2
(N + M )/2
Z
Convert to probability density p(m) of m = M/N :
P (M ) = (2/N )p(m) for large N
To exponential accuracy,
˜
˜
p(m) = eN [f (h,J)−f (m,h,J)] ∝ e−N f (m,h,J)
So f˜(m, h, J) determines directly the distribution of m
15 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Mean and variance of m
˜
e−N f (m,h,J)
To p(m) ∝
Laplace method
can apply same argument as in
Narrow peak around minimum m∗ of f˜(m, h, J)
Expanding around m∗ shows
p(m) ∝ e−N (∂
2 f˜/∂m2 )(m−m∗ )2 /2
where ∂ 2 f˜/∂m2 is evaluated at m∗ (and the given h, J)
This is a Gaussian with mean and variance
hmi = m∗ ,
h(∆m)2 i = 1/[N (∂ 2 f˜/∂m2 )]
Variance ∝ 1/N as for independent voters: large is easier
Low curvature of f˜ at minimum gives larger variance
16 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Plots of f˜(m, h, J) and p(m)
For h = 0
7
~
f
p(m)
J = 0.4
J = 0.6
J = 0.8
J=1
J = 1.2
J = 1.4
-0.3
-0.4
-0.5
Gridhamshire, N = 400
6
5
4
3
-0.6
2
-0.7
1
-0.8
-1
0
-0.5
0
-1
1
0.5
m
0
-0.5
1
0.5
m
Continuous transition to collective voting at J = 1
17 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Effect of small changes in party preference
h = -0.03
h=0
h = 0.03
-0.5
-0.5
-0.5
-0.6
-0.6
-0.6
-0.7
-0.7
-0.7
-1
-0.5
-0.5
0
0.5
1 -1
-0.5
-0.5
0
0.5
1 -1
-0.5
-0.6
-0.6
-0.6
-0.7
-0.7
-0.7
-1
-0.5
-0.5
0
0.5
1 -1
-0.5
-0.5
0
0.5
1 -1
-0.5
-0.6
-0.6
-0.6
-0.7
-0.7
-0.7
-1
-0.5
0
0.5
1
-1
-0.5
0
0.5
1
-1
J=0.8
-0.5
0
0.5
1
J=1
-0.5
0
0.5
1
J=1.2
-0.5
0
0.5
1
Overall party preference encoded by h
Even small changes in h can have large effects on m
18 / 24
Model statement & free energy
Laplace’s method
Phase transitions
So far: mean poll lead given by position m∗ of peak in p(m)
Equivalently, position of minimum in f˜
Condition ∂ f˜/∂m = 0 can be written as
m∗ = tanh(Jm∗ + h)
Self-consistency equation
Non-interacting case J = 0: m∗ = tanh(h) as before
For J > 1 can have up to 3 different solutions; need to choose
the one with lowest f˜
19 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Dependence on constituency size
hmi vs h for J = 1.1, N = 23 , . . . , 210
0.5
-0.2
-0.1
0.1
0.2
-0.5
Position of lowest minimum in f˜ jumps at h = 0 if J > 1:
abrupt transition
Transition only emerges formally for N → ∞; otherwise hmi
is smooth function of h
20 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Subtleties at h = 0
When no overall bias for either party (h = 0) and strong voter
alignment (J > 1), p(m) has two peaks of equal height
Peak positions are ±m∗ if m∗ is positive solution of
m∗ = tanh(Jm∗ )
But hmi = 0 by symmetry (also true for any finite N at h = 0)
Only case where we need to distinguish m∗ and hmi
Interpretation: half of all constituencies have m ≈ m∗ , the
other half m ≈ −m∗
21 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Finding hmi from free energy
From p(m) we found hmi = m∗ (except at h = 0, J > 1)
Should get same from hM i = −∂F/∂h, i.e. hmi = −∂f /∂h
This is true: if minimum of f˜ is at m∗ (h, J), then using
f (h, J) = f˜(m∗ (h, J), h, J) find
hmi = −∂f /∂h = m∗ (h, J)
22 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Variance h(∆m)2 i from free energy
We know
h(∆M )2 i ≡ hM 2 i − hM i2 = −∂ 2 F/∂h2 = ∂hM i/∂h
So h(∆m)2 i = (1/N )∂hmi/∂h = (1/N )∂m∗ (h, J)/∂h
Differentiating condition ∂ f˜/∂m = 0 for m∗ (h, J) w.r.t. h
gives
1
h(∆m)2 i =
N ∂ 2 f˜/∂m2
Again this agrees with result obtained from p(m)
23 / 24
Model statement & free energy
Laplace’s method
Phase transitions
Phase diagram
Summarize behaviour of tight-knit community as f’n of h and J
24 / 24
```