Documentation

CslibFrontier.Probability.MarkovChain.Coloring

Glauber dynamics for proper colorings #

Glauber dynamics for q-colorings of a finite graph G with n vertices and maximum degree Δ ([LP17], Sections 3.3.1 and 14.3): at each step a vertex w is chosen uniformly at random and recolored with a color chosen uniformly from the colors absent from its neighbors (SimpleGraph.allowedColors). As in [LP17], Section 14.3, the chain runs on all colorings V → Fin q, proper or not. It is reversible with respect to the uniform distribution on proper colorings (Cslib.Probability.MarkovChain.isReversible_glauberColoring), which is nonempty when Δ < q by greedy coloring.

Rapid mixing ([LP17], Theorem 14.10). If q > 2Δ then t_mix(ε) ≤ ⌈((q - Δ) / (q - 2Δ)) n (log n - log ε)⌉ (Cslib.Probability.MarkovChain.mixingTime_glauberColoring_le). The proof is path coupling for the Hamming distance: two colorings differing at one vertex v are updated at the same uniformly random vertex w with an optimal coupling of the two uniform color choices (Cslib.Probability.MarkovChain.exists_coupling_glauberColoringOn). The colorings disagree after the update with probability at most 1 / (q - Δ) when w is a neighbor of v, never when w = v, and stay at distance one otherwise, giving the contraction 1 - (1 - Δ / (q - Δ)) / n of [LP17], (14.19).

Frozen boundary. The approximate counting algorithm of [LP17], Section 14.4.2, runs the same dynamics with only the vertices of a set U updated (Cslib.Probability.MarkovChain.glauberColoringOn; glauberColoring is the case U = univ). The uniform distribution on the proper colorings agreeing with a coloring b off U (SimpleGraph.frozenColorings) is reversible. The chain started at a coloring that agrees with b off U stays among such colorings, so path coupling on that closed set (Cslib.Probability.MarkovChain.IsStationary.dist_le_of_pathCoupling_on) gives the bound (1 - c / |U|) ^ t |U| on the distance to stationarity, c = (q - 2Δ) / (q - Δ). In particular t ≥ ((q - Δ) / (q - 2Δ)) n (log n - log δ) steps suffice for distance δ whenever |U| ≤ n (Cslib.Probability.MarkovChain.dist_glauberColoringOn_frozen_le_of_le), the form of [LP17], (14.23). The chain does not mix on all of V → Fin q, since colorings that differ off U never meet, so the bound is stated for starting colorings that agree with b off U.

Main definitions #

Main results #

References #

Glauber dynamics #

noncomputable def Cslib.Probability.MarkovChain.recolor {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (x : V → Fin q) (w : V) :
PMF (V → Fin q)

The heat-bath update at w: recolor w with a uniformly random allowed color. If no color is allowed, which cannot happen when Δ < q or when x is proper, the coloring is unchanged.

noncomputable def Cslib.Probability.MarkovChain.glauberColoringOn {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (q : ℕ) (U : Finset V) (hU : U.Nonempty) :
MarkovChain (V → Fin q)

Glauber dynamics updating the vertices of U ([LP17], proof of Theorem 14.14): recolor a uniformly random vertex of U with a uniformly random color absent from its neighbors. The colors off U are frozen.

noncomputable def Cslib.Probability.MarkovChain.glauberColoring {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Nonempty V] (q : ℕ) :
MarkovChain (V → Fin q)

Glauber dynamics for colorings ([LP17], Sections 3.3.1 and 14.3): recolor a uniformly random vertex with a uniformly random color absent from its neighbors.

theorem Cslib.Probability.MarkovChain.recolor_apply {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] {x : V → Fin q} {w : V} (h : (G.allowedColors x w).Nonempty) (y : V → Fin q) :
(recolor G x w) y = if Function.update x w (y w) = y ∧ y w ∈ G.allowedColors x w then (↑(G.allowedColors x w).card)⁻¹ else 0

The heat-bath update moves to y with probability 1 / |A_w(x)| if y agrees with x off w and y w is allowed.

theorem Cslib.Probability.MarkovChain.eq_of_mem_support_recolor {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] {x y : V → Fin q} {w : V} (hy : y ∈ (recolor G x w).support) {u : V} (hu : u ≠ w) :
y u = x u

The heat-bath update at w changes only the color of w.

Stationarity #

Reversibility ([LP17], Sections 3.3.1 and 14.3): Glauber dynamics for colorings is reversible with respect to the uniform distribution on proper colorings.

The uniform distribution on proper colorings is stationary for Glauber dynamics.

Reversibility with a frozen boundary ([LP17], proof of Theorem 14.14): the uniform distribution on the proper colorings agreeing with b off U is reversible for the dynamics updating the vertices of U.

theorem Cslib.Probability.MarkovChain.isStationary_recolor_frozen {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] {U : Finset V} {b : V → Fin q} (hne : (G.frozenColorings q U b).Nonempty) {w : V} (hw : w ∈ U) :
{ step := fun (x : V → Fin q) => recolor G x w }.IsStationary (PMF.uniformOfFinset (G.frozenColorings q U b) hne)

A single heat-bath update at a vertex w ∈ U preserves the uniform distribution on the colorings frozen off U.

Path coupling #

theorem Cslib.Probability.MarkovChain.exists_coupling_glauberColoringOn {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hq : G.maxDegree < q) {U : Finset V} (hU : U.Nonempty) {x y : V → Fin q} (hxy : hammingDist x y = 1) (hU' : ∀ u ∉ U, x u = y u) :
∃ (ω : PMF ((V → Fin q) × (V → Fin q))), PMF.map Prod.fst ω = (glauberColoringOn G q U hU).step x ∧ PMF.map Prod.snd ω = (glauberColoringOn G q U hU).step y ∧ ∑ p : (V → Fin q) × (V → Fin q), (ω p).toReal * ↑(hammingDist p.1 p.2) ≤ (1 - (1 - ↑G.maxDegree / ↑(q - G.maxDegree)) / ↑U.card) * ↑(hammingDist x y)

One-step contraction with a frozen boundary ([LP17], (14.18) and (14.19)): if Δ < q, two colorings at Hamming distance one that agree off U admit a coupling of one step of the dynamics updating U under which the expected Hamming distance is at most 1 - (1 - Δ / (q - Δ)) / |U|.

theorem Cslib.Probability.MarkovChain.exists_coupling_glauberColoring {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] [Nonempty V] (hq : G.maxDegree < q) {x y : V → Fin q} (hxy : hammingDist x y = 1) :
∃ (ω : PMF ((V → Fin q) × (V → Fin q))), PMF.map Prod.fst ω = (glauberColoring G q).step x ∧ PMF.map Prod.snd ω = (glauberColoring G q).step y ∧ ∑ p : (V → Fin q) × (V → Fin q), (ω p).toReal * ↑(hammingDist p.1 p.2) ≤ (1 - (1 - ↑G.maxDegree / ↑(q - G.maxDegree)) / ↑(Fintype.card V)) * ↑(hammingDist x y)

One-step contraction for colorings ([LP17], (14.18) and (14.19)): if Δ < q, two colorings at Hamming distance one admit a coupling of one Glauber step under which the expected Hamming distance is at most 1 - (1 - Δ / (q - Δ)) / n.

Path coupling bound for colorings ([LP17], proof of Theorem 14.10): if 2Δ < q then d(t) ≤ (1 - c / n) ^ t n with c = (q - 2Δ) / (q - Δ).

Rapid mixing of Glauber dynamics for colorings ([LP17], Theorem 14.10): for a graph with n vertices and maximum degree Δ, if q > 2Δ then t_mix(ε) ≤ ⌈((q - Δ) / (q - 2Δ)) n (log n - log ε)⌉.

Mixing with a frozen boundary #

theorem Cslib.Probability.MarkovChain.dist_glauberColoringOn_frozen_le {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hq : 2 * G.maxDegree < q) {U : Finset V} (hU : U.Nonempty) {b : V → Fin q} (hne : (G.frozenColorings q U b).Nonempty) (t : ℕ) {x : V → Fin q} (hx : ∀ u ∉ U, x u = b u) :
dist ((glauberColoringOn G q U hU ^ t).step x) (PMF.uniformOfFinset (G.frozenColorings q U b) hne) ≤ (1 - ↑(q - 2 * G.maxDegree) / ↑(q - G.maxDegree) / ↑U.card) ^ t * ↑U.card

Path coupling bound with a frozen boundary ([LP17], proof of Theorem 14.14): if 2Δ < q, then from any coloring x that agrees with b off U, t steps of the dynamics updating U are within (1 - c / |U|) ^ t |U| of the uniform distribution on the proper colorings agreeing with b off U, where c = (q - 2Δ) / (q - Δ).

theorem Cslib.Probability.MarkovChain.dist_glauberColoringOn_frozen_le_of_le {V : Type u_1} {q : ℕ} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (hq : 2 * G.maxDegree < q) {U : Finset V} (hU : U.Nonempty) {b : V → Fin q} (hne : (G.frozenColorings q U b).Nonempty) {n : ℕ} (hn : U.card ≤ n) {δ : ℝ} (hδ : 0 < δ) {t : ℕ} (ht : ↑(q - G.maxDegree) / ↑(q - 2 * G.maxDegree) * ↑n * (Real.log ↑n - Real.log δ) ≤ ↑t) {x : V → Fin q} (hx : ∀ u ∉ U, x u = b u) :
dist ((glauberColoringOn G q U hU ^ t).step x) (PMF.uniformOfFinset (G.frozenColorings q U b) hne) ≤ δ

Frozen-boundary sampling time ([LP17], (14.23)): if 2Δ < q, |U| ≤ n and t ≥ ((q - Δ) / (q - 2Δ)) n (log n - log δ), then from any coloring that agrees with b off U, t steps of the dynamics updating U are within δ of the uniform distribution on the proper colorings agreeing with b off U.