Finite Weighted Dynamics

Leanamics contributors

A shared library for finite stochastic dynamics using normalized real weights, finite sums, and limits of finite-time probabilities. These are generic library results, rather than statements attributed to a particular opinion-dynamics paper.

1 Uniform expectations

Definition 1 Finite uniform average
✓
#

For a finite type \(A\), set \(\operatorname {avg}(f)=\sum _{a\in A}f(a)/|A|\). When \(A\) is empty this is zero, following Lean’s division convention.

Lemma 2 Product independence
✓
#

Uniform averages factor over independent coordinates and are invariant under bijections of the sample space.

Lemma 3 Finite trajectories
✓

The recursively defined expectation over \(T\) independent draws equals the uniform average over functions \(\{ 0,\ldots ,T-1\} \to A\).

Proof ▶

Separate the first coordinate using the finite-function/product equivalence, then induct on \(T\). The empty sample space is handled separately.

Iterated uniform averages over two finite sets commute; in particular an outer average commutes with the trajectory expectation \(\mathrm{expList}\), which also commutes with finite sums and vanishes on the zero functional.

Proof ▶

Exchange the order of finite summation; for \(\mathrm{expList}\), induct on \(T\).

2 Weighted distributions and kernels

Definition 5 Normalized real weights
✓

A distribution consists of nonnegative real weights \(p_a\) with \(\sum _a p_a=1\). Its expectation is \(\sum _a p_a f(a)\), and an event probability is the expectation of its indicator. Such a distribution cannot exist on an empty type.

Lemma 6 Uniform agreement
✓

On a nonempty finite type the normalized uniform distribution agrees with the existing finite average.

Independent coordinates have product weights. Expectations of product observables factor, and transporting weights along a function commutes with expectation.

Proof ▶

Distribute products over finite sums; for pushforward interchange the two sums and evaluate each fiber indicator.

The finite average is Mathlib’s finite expectation, \(\operatorname {avg}(f)=\mathbb {E}_{a\in A}f(a)\) (Finset.expect); both vanish on an empty type. On a nonempty type the independent product of uniform distributions on \(A\), indexed by a finite set \(I\), is the uniform distribution on \(A^I\). Hence \(\mathrm{expList}\) over \(T\) rounds is the expectation of \(F\) over \(T\) i.i.d. uniform draws, both as Mathlib’s \(\mathbb {E}_{\omega \colon \{ 0,\ldots ,T-1\} \to A}\) and under the product distribution.

Proof ▶

Mathlib’s finite expectation is a sum divided by a cardinality. Every point of \(A^I\) has product weight \(|A|^{-|I|}=|A^I|^{-1}\). Combine both with Lemma 3.

Definition 9 Transition kernel
✓

A finite kernel assigns a distribution to every state. Its operator iterates compute expectations at finite times; trajectory functionals additionally record the history.

Lemma 10 Endpoint agreement
✓
#

Ignoring history in a trajectory expectation recovers the iterated transition operator.

3 Stationarity and absorption

Theorem 11 Existence of stationary weights
✓
#

Every stochastic kernel on a nonempty finite type has a distribution \(p\) with \(pK=p\).

Proof ▶

Average the first \(n+1\) evolved distributions. The stationarity defect of this Cesàro average is \((p_{n+1}-p_0)/(n+1)\), which tends to zero coordinatewise. Compactness of the finite probability simplex gives a convergent subsequence; continuity of finite sums implies that its limit is stationary.

Lemma 12 Uniform absorption block
✓
#

Let \(f\) be a zero-one survival indicator with \(Kf\le f\). Suppose for each state \(a\) there is \(n_a\) with \((K^{n_a}f)(a){\lt}1\). There are \(m{\gt}0\) and \(0\le q{\lt}1\) such that \(K^m f\le qf\).

Proof ▶

Take one plus the maximum of the finitely many access times. Antitonicity of survival probabilities puts every state below one at that time. Their finite maximum supplies \(q\). At states with \(f=0\), absorption keeps the expectation zero.

Theorem 13 Geometric decay and convergence
✓

Under these hypotheses, \(K^{nm}f\le q^n f\), and \(K^t f(a)\to 0\) for every state \(a\).

Proof ▶

Induct over blocks using positivity and linearity. The geometric bound tends to zero. For arbitrary \(t\), compare with \(m\lfloor t/m\rfloor \) by antitonicity.

Let \(\varphi \) equal \(\varphi _A\) on an event \(A\) and \(\varphi _B\) on an event \(B\), and let \(S\) be the event of lying in neither. If \(\mathbb {E}_{x_0}\varphi (X_T)=\varphi (x_0)\) and \(m\le \varphi -\varphi _B\le M\) on \(S\), then \(\varphi (x_0)-\varphi _B-(\varphi _A-\varphi _B)\Pr _{x_0}(X_T\in A)\) lies between \(m\Pr _{x_0}(X_T\in S)\) and \(M\Pr _{x_0}(X_T\in S)\). Hence, if \(\varphi _A\ne \varphi _B\), the conservation law holds for every \(T\) and \(\Pr _{x_0}(X_T\in S)\to 0\), then \(\Pr _{x_0}(X_T\in A)\to (\varphi (x_0)-\varphi _B)/(\varphi _A-\varphi _B)\); if moreover \(A\) is absorbing, this is the supremum of the finite-time probabilities.

Proof ▶

Pointwise, \(\varphi -\varphi _B=(\varphi _A-\varphi _B)1_A+(\varphi -\varphi _B)1_S\) (on \(A\cap B\) both sides vanish). Take expectations at time \(T\) and bound the last term by monotonicity. For the limit, take \(M=-m=\sum _a|\varphi (a)-\varphi _B|\) and squeeze. If \(A\) is absorbing, the finite-time probabilities increase, so their limit is their supremum.

4 Rounds, concentration and phases

Definition 15 Kernel of a round-based process
✓

A deterministic update \(\mathrm{step}\colon S\times R\to S\) driven by a uniform round \(r\in R\) defines the kernel \(K(s)=\mathrm{law}(\mathrm{step}(s,r))\). Its \(T\)-step expectations are expectations over \(T\) i.i.d. uniform rounds.

Proof ▶

Induction on \(T\), unfolding one round of \(\mathrm{expList}\).

Theorem 16 Time reversal of i.i.d. rounds
✓

For every functional \(F\) of \(T\) i.i.d. uniform rounds, \(\mathbb {E}F(r_T,\dots ,r_1)=\mathbb {E}F(r_1,\dots ,r_T)\). In particular the \(T\)-step expectations of a round-based process are also obtained by applying the rounds last to first.

Proof ▶

Write both sides as uniform averages over \(\mathrm{Fin}\, T\to R\) and reindex by the involution \(i\mapsto T-1-i\).

Theorem 17 Hoeffding and Bernstein inequalities
✓

Let \(X=\sum _{i{\lt}n}Y_i(\omega _i)\) with independent uniform coordinates. If each \(Y_i\) is \(\{ 0,1\} \)-valued, \(\Pr (X\ge \mathbb {E}X+\lambda )\le e^{-2\lambda ^2/n}\). If \(Y_i-\mathbb {E}Y_i\le b\) and \(\sum _i\mathrm{Var}\, Y_i\le \sigma ^2\), then \(\Pr (X\ge \mathbb {E}X+\lambda )\le \exp \bigl(-\lambda ^2/(2\sigma ^2(1+b\lambda /(3\sigma ^2)))\bigr)\).

Proof ▶

Markov’s inequality applied to \(e^{tX}\), which factors over the coordinates. Hoeffding’s lemma bounds each Bernoulli factor; for Bernstein, \(e^y\le 1+y+y^2/(2(1-u/3))\) for \(y\le u{\lt}3\) bounds each factor, and \(t\) is chosen as \(\lambda /(\sigma ^2+b\lambda /3)\).

Let \(X=\sum _iX_i\) be a sum of independent \(\{ 0,1\} \)-valued trials with \(\Pr (X_i=1)=p_i\), and let \(\mu _L\le \mu =\sum _ip_i\le \mu _H\). For \(\delta {\gt}0\),

\[ \Pr (X\ge (1+\delta )\mu _H)\le \Bigl(\frac{e^{\delta }}{(1+\delta )^{1+\delta }}\Bigr)^{\mu _H} \le e^{-\delta ^2\mu _H/(2+\delta )}, \]

and for \(0{\lt}\delta {\lt}1\),

\[ \Pr (X\le (1-\delta )\mu _L)\le \Bigl(\frac{e^{-\delta }}{(1-\delta )^{1-\delta }}\Bigr)^{\mu _L} \le e^{-\delta ^2\mu _L/2}. \]

The trials are \(\{ 0,1\} \)-valued observables of the coordinates of an independent product of distributions, independent biased coins (counting the heads in any subset), or the coordinates of one uniform round (Mitzenmacher–Upfal, Probability and Computing, Theorems 4.4 and 4.5 with Exercise 4.7).

Proof ▶

Markov’s inequality applied to \(e^{tX}\), which factors over the coordinates; each factor is \(1+p_i(e^t-1)\le e^{p_i(e^t-1)}\), so \(\mathbb {E}e^{tX}\le e^{\mu _H(e^t-1)}\) for \(t\ge 0\) and \(\mathbb {E}e^{tX}\le e^{\mu _L(e^t-1)}\) for \(t\le 0\). Take \(t=\log (1+\delta )\), respectively \(t=\log (1-\delta )\). The closed forms follow from \(\log (1+\delta )\ge 2\delta /(2+\delta )\) (the first term of the series of \(\log \frac{1+x}{1-x}\) at \(x=\delta /(2+\delta )\)) and \((1-\delta )\log (1-\delta )\ge -\delta +\delta ^2/2\).

Theorem 19 Nested phases
✓
#

Let \(A_1\supseteq \cdots \supseteq A_T\) be sets of states such that from \(A_i\) the chain stays in \(A_i\) with probability at least \(1-\varepsilon \) and, for \(i{\lt}T\), enters \(A_{i+1}\) with probability at least \(1-\nu \). From \(A_1\), after \(\ell T\) steps the chain is in \(A_T\) with probability at least \(1-T(\ell \varepsilon +\nu ^\ell )\).

Proof ▶

Track the indicator of lying outside a set. In \(\ell \) steps the chain leaves \(A_i\) with probability at most \(\ell \varepsilon \), and misses \(A_{i+1}\) in all \(\ell \) steps with probability at most \(\nu ^\ell \). Sum over the \(T\) phases.

5 Drift and graph rounds

Definition 20 Time-dependent chain
✓

A family of kernels \((K_t)_{t\ge 0}\) moves the chain from time \(t\) to time \(t+1\) with \(K_t\); \(\mathrm{iterateSeq}(K,n,f)(a)\) is the expectation of \(f\) at time \(n\) from \(a\). A constant family gives the iterates of a single kernel.

Proof ▶

Induction on \(n\).

Theorem 21 Drift lemma; Berenbrink et al., ICALP 2016, Lemma 2.2
✓

Let \(\Psi \ge 0\), and for \(t{\lt}T\) let \(c_t\ge 0\), \(\mathbb {E}[\Psi (X_{t+1})\mid X_t=x]\le \Psi (x)-c_t/\Psi (x)\) when \(\Psi (x){\gt}0\), and \(\mathbb {E}[\Psi (X_{t+1})\mid X_t=x]=0\) when \(\Psi (x)=0\). If \(\sum _{t{\lt}T}c_t\ge 4\Psi (x_0)^2\), then \(\Pr _{x_0}(\Psi (X_T)=0)\ge 1/2\).

Proof ▶

Let \(q=\Pr (\Psi (X_T){\gt}0)\); survival is nonincreasing, so it is at least \(q\) before \(T\). With \(\lambda =q/\Psi (x_0)\), the bound \(1/y\ge 2\lambda -\lambda ^2y\) linearizes the drift: \(\mathbb {E}\Psi (X_{t+1})\le (1+c_t\lambda ^2)\mathbb {E}\Psi (X_t) -2c_t\lambda \Pr (\Psi (X_t){\gt}0)\le \mathbb {E}\Psi (X_t)-c_t\lambda q\). (The paper uses Jensen’s inequality here; this is its optimal-\(\lambda \) form.) Summing, \(0{\lt}m q\le \mathbb {E}\Psi (X_T)\le \Psi (x_0)(1-4q^2)\) if \(q{\gt}0\), where \(m{\gt}0\) is the least positive value of \(\Psi \); hence \(q\le 1/2\).

Theorem 22 Multiplicative drift; the argument of Lemma 2.4 there
✓

Let \(\Psi \ge 0\) with every positive value at least \(\Psi _{\min }{\gt}0\), and \(\mathbb {E}[\Psi (X_{t+1})\mid X_t=x]\le (1-\delta _t)\Psi (x)\) for all \(x\) and \(t{\lt}T\). Then \(\Pr _{x_0}(\Psi (X_T){\gt}0)\le \prod _{t{\lt}T}(1-\delta _t)\, \Psi (x_0)/\Psi _{\min }\).

Proof ▶

By induction \(\mathbb {E}\Psi (X_T)\le \prod _{t{\lt}T}(1-\delta _t)\Psi (x_0)\) (the factors are nonnegative unless \(\Psi \equiv 0\)); then Markov’s inequality \(\mathbf1_{\Psi {\gt}0}\le \Psi /\Psi _{\min }\).

In a round \(r\in \prod _vN(v)\) every vertex picks a neighbour. Under the uniform distribution the picks are independent and uniform: \(\mathbb {E}\prod _vf_v(r_v)=\prod _v\mathbb {E}_{u\in N(v)}f_v(u)\), and, without isolated vertices, \(\mathbb {E}g(r_v)=\mathbb {E}_{u\in N(v)}g(u)\). A uniform vertex \(v\) with a uniform round gives the sequential step “uniform vertex, uniform neighbour \(r_v\)”.

Proof ▶

\(\sum _r\prod _vf_v(r_v)=\prod _v\sum _{u\in N(v)}f_v(u)\) and \(|\prod _vN(v)|=\prod _v\deg v\); the marginals take \(f_w=1\) for \(w\ne v\).

For a uniform dart \(d\) of \(G\), \(\mathbb {E}F(d_1,d_2)=\sum _v\sum _{u\in N(v)}F(v,u)/(2|E|)\); reversing \(d\) preserves the law, its underlying edge is a uniform edge, and its tail is \(v\) with probability \(\deg v/(2|E|)\).

Proof ▶

Group the darts by tail (the darts with tail \(v\) are the neighbours of \(v\)) or by edge (each edge carries two darts).

6 Hitting times

Definition 25 Hitting probability
✓
#

\(\mathrm{hitProb}(K,B,n)(a)=\Pr _a(\exists s\le n,\ X_s\in B)=\Pr _a(T_B\le n)\), the expectation over the first \(n\) transitions of the indicator that one of the states at the times \(0,\dots ,n\) lies in \(B\).

Let \(V\ge 0\) vanish on \(B\) and be at least \(V_{\min }{\gt}0\) off \(B\), with \(\mathbb {E}[V(X_{t+1})\mid X_t=x]\le \rho V(x)\) for \(x\notin B\). Then \(\Pr _a(T_B{\gt}t)\le \rho ^tV(a)/V_{\min }\).

Proof ▶

In the chain stopped on entering \(B\), being outside \(B\) at time \(t\) is the event \(T_B{\gt}t\); apply Theorem 22 to the stopped chain with \(\delta =1-\rho \).

Theorem 27 Hitting-time bound; Doerr, Goldberg, Minder, Sauerwald, Scheideler, SPAA 2011, Claim 2.9
✓

Let \(c_1{\gt}1\) and \(c_2,c_3,c_4,c_6{\gt}0\). There is \(c_5{\gt}0\) such that for every finite chain and observable \(X\in \{ 0,\dots ,q\} \) with \(c_4\log q\le q\): if from every state below the target \(\Pr [X_{t+1}\ge \min \{ c_1X_t,q\} ]\ge 1-e^{-c_2X_t}\), and \(\Pr [X_{t+1}\ge 1]\ge c_3\) when \(X_t=0\), then \(X\) reaches \(c_4\log q\) within \(c_5\log q+\log _{c_1}(c_4\log q)\) steps with probability at least \(1-q^{-c_6}\) (equivalently within \(C\log q\) steps).

Proof ▶

The paper omits the proof. Let \(p=\min \{ c_3,1-e^{-c_2}\} \), \(\theta =1/p\) and \(\beta =c_2/2\). For a large threshold \(x_0\) take \(g(x)=1-\eta (\theta ^x-1)\) for \(x\le x_0\), with \(\eta \) chosen so that \(g(x_0)=1/2\), and \(g(x)=\tfrac 12e^{-\beta (x-x_0)}\) for \(x\ge x_0\); let \(V=g(X)\) below the target and \(V=0\) on it. Below \(x_0\) a step goes up by at least one with probability at least \(p\), and \(pg(x+1)+1-p\le \rho g(x)\) with \(\rho =1-(1-p)\eta /2\); above \(x_0\) growth by \(c_1\) fails with probability at most \(e^{-c_2x}\), and the expected potential is at most \(\tfrac 38e^{-\beta (x-x_0)}\le \rho g(x)\). Since \(V\le 1\) and \(V\ge \tfrac 12q^{-\beta c_4}\) below the target, Lemma 26 gives \(\Pr (T{\gt}t)\le 2\rho ^tq^{\beta c_4}\le q^{-c_6}\) for \(t\ge (1+\beta c_4+c_6)\log q/\log (1/\rho )\).