Imagine a knight on a corner square of an otherwise empty chessboard. Move the knight by choosing at random from the legal knight-moves. What is the mean time until the knight first returns to the starting square?
At first sight this looks like a messy problem which will require numerical calculations. But the knight is moving as random walk on a finite graph (rather than just some more general Markov chain), and elementary theory reduces the problem to counting the numer of edges of the graph, giving the answer of 168 moves. See Chapter 3 yyy.
Around 1980 I wrote a little Basic program that would display a random walk on the screen of my home computer. First, a pixel in the middle of the screen was lit up. Then one of the four directions N,E,W,S was selected uniformly at random and the walk proceeded one step in the chosen direction. That new pixel was lit up on the screen, and the process was repeated from the new point, etc. For a while, the walk is almost always quickly visiting pixels it hasn’t visited before, so one sees an irregular pattern that grows in the center of the screen. After quite a long while, when the screen is perhaps 95% illuminated, the growth process will have slowed down tremendously, and the viewer can safely go read War and Peace without missing any action. After a minor eternity every cell will have been visited. Any mathematician will want to know how long, on the average, it takes until each pixel has been visited. Edited from Wilf [336].
Taking the screen to be pixels, we have a random walk on the discrete two-dimensional torus , and the problem asks for the mean cover time, that is the time to visit every vertex of the graph. Such questions have been studied for general graphs (see Chapter 6), though ironically this particular case of the two-dimensional torus is the hardest special graph. It is known that mean cover time is asymptotically at most , and conjectured this is asymptotically correct (see Chapter 7 yyy). For this works out to be about 13 million. Of course, in accordance with Moore’s Law what took a minor eternity in 1980 takes just a few seconds today.
Let be the set of all -regular graphs with n vertices and with the edges at each vertex labeled . A universal traversal sequence is a sequence that satisfies
for each and each initial vertex of the deterministic walk “at step choose edge ” visits every vertex.
What is the shortest length of such a sequence?
To get a partial answer, instead of trying to be clever about picking the sequence, consider what happens if we just choose uniformly at random. Then the walk on a graph is just simple random walk on . Using a result that the mean cover time on a regular graph is one can show (see Chapter 6 yyy) that most sequences of length are universal traversal sequences.
Paradoxically, no explicit example of a universal traversal sequence this short is known. The argument above fits a general theme that probabilistic methods can be useful in combinatorics to establish the existence of objects which are hard to exhibit constructively: numerous examples are in the monograph by Alon and Spencer [28].
Repeated random shuffles of a -card deck may be modeled as a Markov chain on the space of all possible configurations of the deck. Different physical methods of shuffling correspond to different chains. The model for the most common method, riffle shuffle, is described carefully in Chapter 9 (xxx section to be written). A mathematically simpler method is top-to-random, in which the top card is reinserted at one of the possible positions, chosen uniformly at random (Chapter 9 section yyy). Giving a precise mathematical interpretation to the question
how many steps of the chain (corresponding to a specified physical shuffle) are needed until the distribution of the deck is approximately uniform (over all configurations)?
is quite subtle; we shall formalize different interpretations as different mixing times, and relations between mixing times are discussed in Chapter 4 for reversible chains and in Chapter 8 (xxx section to be written) for general chains. Our favorite formalization is via the variation threshold time , and it turns out that
(1.1) | |||||
For the usual deck with these suggest and shuffles respectively.
Suppose you have a function with , where is given by some explicit but maybe complicated formula. How can you devise a scheme to sample a random point in with the normalized probability density ?
For the elementary “inverse distribution function” trick is available, and for small simple acceptance/rejection methods are often practical. For large the most popular method is some form of Markov chain Monte Carlo (MCMC) method, and this specific -dimensional sampling problem is a prototype problem for MCMC methods. The scheme is to design a chain to have stationary distribution . A simple such chain is as follows. From a point , the next point is chosen by a two-step procedure. First choose from some reference distribution (e.g. multivariate Normal with specified variance, or uniform of a sphere of specified radius) on ; then set with probability and set with the remaining probability.
Routine theory says that the stationary density is indeed and that as the distribution of the chain after steps converges to this stationary distribution. So a heuristic algorithm for the sampling problem is
Choose a starting point, a reference distribution and a number of steps, simulate the chain for steps, and output the state of the chain after steps.
To make a rigorous algorithm one needs to know how many steps are needed to guarantee closeness to stationarity; this is a mixing time question. The conceptual issues here are discussed in Chapter 11. Despite a huge literature on methodology and applications of MCMC in many different settings, rigorous results are rather scarce. A notable exception is in the sampling setting above where is a concave function, where there exist complicated results (outlined in Chapter 11 xxx to be written) proving that a polynomial (in ) number of steps suffice.
A self-avoiding walk (SAW) of length in the lattice is a walk for which the are distinct and successive pairs are adjacent. Understanding the asymptotics of the cardinality of the set of SAWs of length (dimension is the most interesting case) is a famous open problem. A conceptual insight is that, for large , the problem
find an algorithm which counts approximately
can be reduced to the problem
find an algorithm which gives an approximately uniform random sample from .
To explain, note that each walk in is a one-step extension of some walk in . So the ratio equals the mean number of extensions of a uniform random SAW from , which of course can be estimated from the empirical average of the number of extensions of a large sample of SAWs from .
Similar schemes work for various other families of combinatorial sets of increasing size, provided one has some explicit connection between and . As in the previous word problem, one can get an approximately uniform random sample by MCMC, i.e. by designing a chain whose stationary distribution is uniform, and simulating a sufficiently large number of steps of the chain: in making a rigorous algorithm, the issue again reduces to bounding the mixing time of the chain. The case of SAWs is outlined in Chapter 11 section yyy.
The last two word problems hinted at large classes of algorithmic problems; here is a different, more specific problem. A finite connected graph has a finite number of spanning trees, and so it makes sense to consider a uniform random spanning tree of . How can one simulate this random tree?
It turns out there is an exact method, which involves running random walk on until every vertex has been visited; then for each (other than the initial vertex) let the tree include the edge by which the walk first visited . This gives some kind of random spanning tree; it seems non-obvious that the distribution is uniform, but that is indeed true. See Chapter 8 section yyy.
Consider a graph where each vertex is colored, initially with different colors. Each vertex from time to time (precisely, at times of independent Poisson processes of rate ) picks an adjacent vertex at random and changes its color to the color of the picked neighbor. Eventually, on a finite graph, all vertices will have the same color: how long does this take?
This question turns out to be related (via a certain notion of duality) to the following question. Imagine particles, initially one at each vertex, which perform continuous-time random walk on the graph, but which coalesce when they meet. Eventually they will all coalesce into one particle: how long does this take? On the complete graph on vertices, the mean time in each question is . See Chapter 10 section yyy.
You have two parents, four grandparents and eight great-grandparents. In other words, for small
you have exactly g’th-generation ancestors, and you are related to each of them.
But what about larger ? Clearly you didn’t have distinct 120’th-generation ancestors! Even taking , one can argue it’s unlikely you had different 10th-generation ancestors, though the number is likely only a bit smaller – say 1,000, in round numbers. Whether you are actually related to these people is a subtle question. At the level of grade-school genetics, you have 46 chromosomes, each a copy of one parental chromosome, and hence each a copy of some 10th-generation ancestor’s chromosome. So you’re genetically related to at most 46 of your 10th-generation ancestors. Taking account of crossover during chromosome duplication leads to a more interesting model, in which the issue is to estimate hitting probabilities in a certain continuous-time reversible Markov chain. It turns out (Chapter 13 yyy) that the number of 10th-generation ancestors who are genetically related to you is about 340. So you’re unlikely to be related to a particular 10th-generation ancestor, a fact which presents a curious sidebar to the principle of hereditary monarchy.