6.893 Randomness in Computation Spring Term, 1996

Lecture 3 : March 5, 1996

Lecturer: Ronitt Rubinfeld Scribe: Yoav Yerushalmi

1 Outline

This lecture covers the idea of Random Walkers, and how to couple random walks. Coupling is a technique ofr bounding time for a random walker to reach stationary distribution. This is useful for uniform random generation as well as counting.

2 Introduction example

Example 1 The Amazing Ronitt performs a magic trick!!!

Take a pack of cards with only the aces and cards up to five. Think of a random i ∈ [1..5]

Repeat

• count off i cards, where each card has a number ∈ [1..5].

• new i ⟵ number on i^{th} card..

until deck runs out. Then output current i.

It turns out that although this seems completely random, several paths through the deck converge, and so in general, one final card can be much more likely to be the result than any other for a particular shuffle. In the case of:

3 A 4 5 5 4 4 3 3 3 2 A 5 2 A 5 2 A 2 4

In this example, the last “2” is more likely to be the result than any other card. We shall now see why, and how we can use this to our advantage.

3 Random Walkers

Definition 1 A random walk starts at some state, and walks around until it is at a stable state.

3.1 Reaching Steady State Distribution

A few symbols to define

• π̃ is the stationary distribution.

• π^{t} is the distribution at time t = π^{0}A^{t} = (........π^{t}(j)......) where π^{t}(j) is the probability of being at node j at time t.

• π̃ = lim_{t→∞} π^{t}

For most purposes, however, we don’t really want to walk forever to get to π̃. All that is important to us is to get “very close” to it. Before we can do that, however, we need to know what “close” means. to do this, we define a total variation distance, then, from that, we can compute the mixing time for Markov chains.

Definition 2 Total Variation Distance is the distance between distribution D_{1} and D_{2}, and is computed in the following manner:

|D_{1}, D_{2}|_{1} = ∑_{i∈V} |D_{1}(i) − D_{2}(i)|

Definition 3 Mixing Time is a measure of how long it takes for two distributions to get “close” on a graph.

T (ϵ) = min t, ∀π^{0}, |π̃, π^{t}|_{1} < ϵ

Definition 4 A Markov chain is rapidly mixing if

∀π^{0}, ∀t > t_{0} ∈ O(log |v|, log(1/ϵ)) : |π̃, π^{t}|_{1} < ϵ

An example of a rapidly mixing graph includes the set of graphs that are completely connected and have self-loops.

An example of a non-rapidly mixing graph is a circle.

3.2 Stationary Distribution Observations

Observation 1 A random walker at stationary distribution remains at stationary distribution:

π̃P^{t} = (π̃P)P^{t−1} = π̃

Observation 2 if we start at an arbitrary state and walk until we meet a random walker, then we are also at stationary distribution. We can’t follow or aim for each other, but we are allowed to coordinate the walks.

4 The Coupling Argument

Definition 5 coupling time is the expected time it takes to bring two walkers together (assuming coordination).

Example 2 Example with a hypercube containing self-loops.

n = 2^{d} nodes in the hypercube.

P_{ij} = \{ \begin{matrix}\frac{1}{2d} if (i, j) ∈ H \\ \frac{1}{2} if i = j \\ 0 otherwise \end{matrix}

Walk according to P for some number of steps (to be calculated later).

X =< X_{1}, X_{2}, ..., X_{d} >
Y =< Y_{1}, Y_{2}, ..., Y_{d} >

Using the following coordinator’s algorithm :

• pick a direction randomly and uniformly i ∈_{R} {1..d}

• if X_{i} = Y_{i}, then flip coin

– Heads: X,Y move along i.

– Tails: X, Y stay in place.

Note that X and Y are always the same distance apart.

• if x_{i} ≠ y_{i}, then flip coin – Heads: X moves along i, Y stays in place

– Tails: X stays in place, Y moves along i Note that x and y are getting closer to each other.

1. We have that X and Y move according to correct probabilities.

2. Once i is chosen, for all the following steps, X_{i} = Y_{i}. Therefore, X and Y are coupled after all possible directions are chosen at least once. This takes on average of d ln d steps.

We now have discovered a way to make two walkers meet while still apparently being random, and this is done in a short number of steps.

Theorem 1 coupling rates.

• T is the expected coupling time.

• P^{t} is the distribution at time t.

• π̃ is the static distribution.

then

\frac{1}{2}|P^{t} − π̃|_{1} ≤ \frac{T}{t}

Lemma 1 to above

• X, Y are distributions over S. (These distributions may be correlated if so desired).

• x and y are drawn from X and Y respectively.

Pr[x ≠ y] ≥ |X − Y |_{1}

Proof: of lemma

∀a ∈ S, P (a) ≡ Pr[x = y = a]

Note that P (a) ≤ X(a) and P (a) ≤ Y (a).

Pr[x ≠ y] = 1 − ∑_{a∈S} P (a) = \frac{1}{2}[(∑_{a} X(a) − P (a)) + (∑_{a} Y (a) − P (a))]

= \frac{1}{2}[∑_{a} |X(a) − P (a)| + ∑_{a} |P (a) − Y (a)|]

≥ \frac{1}{2} ∑_{a} |X(a) − Y (a)| = \frac{1}{2}|X − Y |_{1}

Proof: of theorem.

\frac{1}{2}|P_{t} − π|_{1} ≤ Pr_{x∈P^{t},y∈π̃}[x ≠ y] = Pr[not coupled at time t] ≤ \frac{T}{t} .

(This was calculated using Markov’s Thm.) To get ϵ discrepancy, simply walk \frac{T}{ϵ} steps.

Example 3 Generating random spanning trees of an undirected graph G. We need to think of this problem in terms of Markov chains, so think of this as directed edges towards a root, where a vertex is the pair (spanning tree, root). Repeat:

1. choose a random edge from G out of root x to some node y.

2. add this edge to the spanning tree. This creates a cycle

3. delete the edge coming out of y. y becomes the new root, and the cycle is broken However, this is not an undirected Markov chain. So our formulas will fail. Choosing an edge already in the tree implies reversing the direction of the edge. The out-degree of the vertex in the Markov Chain = in-degree = degree in G of root node (since the original is undirected). This implies that the stationary distribution in any vertex is

\frac{degree(root)}{total number of vertices in chain}

Pr[ generate T] = ∑_{r∈V} Pr[gen(T, r)] = ∑_{r} \frac{deg(r)}{number of vertices}

= \frac{2 ∗ number of edges}{total number of vertices in chain}

Coordinator Strategy:

1. run the two processes independently until roots collide.

2. force roots to move identically after (1).

coupling time = E[time for roots to collide] + E[coupling|identical roots]

outgoing edge changed iff vertex is a root node. If the roots are the same, then when an edge is chosen, the roots have the same outgoing edge. therefore, after (1), once a vertex is root, its out edges are the same in both walkers.

Once all vertices are visited, the walkers are coupled.

amount of time needed to move after collision ≤ E[cover time of G]