enumeration of lattice walks (derivation of formulas)


Square lattice

The method of counting walks hinges on the concept of walk generating functionMathworldPlanetmath: a Laurent polynomial F(a,b) in two variables a,b such that [axby]Fn equals the number of walks from (0,0) to (x,y)×, where [axby]P(a,b) denotes the coefficientMathworldPlanetmath of axby in P(a,b).

The idea is to encode each possible step that can be taken from a vertex to an adjacent vertex as a term in F(a,b). In the case of the square lattice, there are four possible steps from a given vertex: left, right, up, or down. They are encoded as a, 1/a, b and 1/b. So the walk generating polynomialMathworldPlanetmathPlanetmath is F(a,b)=a+1/a+b+1/b. Each term in the expansion of Fn corresponds to a walk of length n starting at a fixed vertex. For example, a term in F4 such as a1/b1/a1/a=a-1b-1 would correspond to the walk of length 4 consisting of the following sequence of steps: right, down,left, left. Moreover, when the term is written as a monomialMathworldPlanetmathPlanetmath axby, the exponents x,y are precisely the coordinates of the end point of the walk (assuming the origin as the starting point of the walk). Thus in this example the walk would end at vertex (-1,-1). When all like terms in the expansion are collected it becomes clear that [axby]Fn counts the number of walks from (0,0) to (x,y).

To obtain an explicit formula for the number of walks from the origin to (x,y) we factor F=(a+b)(1+1/ab), raise to the n-th power, use the binomial expansion, and collect like terms:

Fn =(a+b)n(1+1/ab)n
=(i(ni)aibn-i)(j(nj)a-jb-j)
=(i,j)(ni)(nj)ai-jbn-i-j

The number of walks w(x,y,n) of length n is the coefficient of axby, namely

w(x,y,n) =i-j=x,n-i-j=y(ni)(nj)

If n and x+y have different parity, there are no integers i,j satisfying the summation constraints, and thus the coefficient of axby is zero, indicating that there are no walks of length n from the origin to (x,y). If, on the other hand, n and x+y have the same parity, the constraints admit only one solution (i,j), namely i=(n+x-y)/2 and j=(n-x-y)/2. Thus, in this case,

w(x,y,n)=(nn+x-y2)(nn-x-y2)

Triangular lattice

In the case of a triangular lattice, the walk generating function is F=a+1/a+b+1/b+b/a+a/b, where each term correspond to the possible steps that can be taken from a vertex to an adjacent vertex: right, left, up, down, diagonally up, diagonally down. It can also be written as F=(1/a+1/b)(1+a)(1+b)-2. The number of walks of length n from the origin to (x,y) is given by the coeeficient of axby in Fn. Using the binomial expansion, one obtains:

Fn =[(1/a+1/b)(1+a)(1+b)-2]n
=k(-2)n-k(nk)(1/a+1/b)k(1+a)k(1+b)k
=k(-2)n-k(nk)i(ki)(1/a)k-i(1/b)ij(kj)ajj(kj)bj
=k(-2)n-k(nk)(i,j,j)(ki)(kj)(kj)aj-k+ibj-i

The number of walks (x,y,n) of length n from the origin to (x,y) is the coefficient of axby:

w(x,y,n) =k(-2)n-k(nk)j-k+i=x,j-i=y(ki)(kj)(kj)

Adding the summation constraints for the inner sum, we get j+j=k+x+y, thus j=k+x+y-j and i=j-y=k+x-j. Therefore

w(x,y,n) =k(-2)n-k(nk)j(kj)(kj-x-y)(kj-x)

In particular, the number of closed walks of length n starting and ending at (0,0) is

w(0,0,n)=k(-2)n-k(nk)j(kj)3

Honeycomb lattice

First we observe that the honeycomb lattice is a bipartite graphMathworldPlanetmath: a graph with vertex set V=V1V2 such that every edge is from V1 to V2. In the case of the honeycomb lattice, V=×=V1V2 where V1={(x,y)V:x+y0(mod3)} and V2={(x,y)V:x+y1(mod3)}. Every edge in the honeycomb lattice joins a vertex in V1 to a vertex in V2. Notice that a walk starting at a vertex in V1 will end at a vertex in V1 (resp. V2) if it has even (resp. odd) length.

From a vertex (i,j)V1 the possible steps are up, right, or diagonally down. These are encoded by F=a+b+1/ab; on the other hand, if (i,j)V2, the possible steps from (i,j) are left, down, or diagonally up, encoded by G=1/a+1/b+ab. Since a walk of even length n from say (0,0) must alternate between points in V1 and points in V2, each such walk corresponds to a term in the expansion of (FG)n/2, and w(x,y,n)=[axby](FG)n/2. Since FG=1+(a+b)(a+1/ab)(b+1/ab), we have

(FG)n/2 =k(nk)(a+b)k(a+1/ab)k(b+1/ab)k
=k(nk)i(ki)ak-ibij(kj)ak-j(1/ab)jj(kj)bk-j(1/ab)j
=k(nk)i,j,j(ki)(kj)(kj)a2k-i-2j-jbk+i-j-2j

Thus for n even,

w(x,y,n) =[axby](FG)n/2
=k(nk)2k-i-2j-j=x,k+i-j-2j=y(ki)(kj)(kj)

The constraints under the inner sum imply j=k-j-(x+y)/3 and i=k-j-x+(x+y)/3. Thus if x+y0(mod3) they are not satisfied by any integers i, j, j, and w(x,y,n)=0. This simply reflects the fact that there are no even length walks from a vertex in V1 to a vertex in V2. On the other hand, if x+y0(mod3), using (pq)=(pp-q) we obtain

w(x,y,n)=kn/2(n/2k)j(kj+x-(x+y)/3)(kj)(kj+(x+y)/3)

Walks of odd length n from (0,0) to (x,y)V2 can be computed by w(x,y,n)=w(x-1,y,n-1)+w(x,y+1,n-1)+w(x+1,y+1,n-1), where the terms in the right hand side can be computed by the previous formula.

For x=y=0 we obtain the following formula for the number of closed walks of even length n starting and ending at (0,0):

w(0,0,n)=kn/2(n/2k)j(kj)3

An alternative expansion yields another formula for w(x,y,n) that contains a single summation. Writing FG=(1+a2b+ab2)(1+a-2b-1+a-1b-2), we obtain

(FG)n/2 =k(n/2k)(a2b+ab2)kk(n/2k)(a-2b-1+a-1b-2)k
=k,j(n/2k)(kj)(a2b)k-j(ab2)jk,j(n/2k)(kj)(a-2b-1)k-j(a-1b-2)j
=k,j,k,j(n/2k)(n/2k)(kj)(kj)a2k-2k-j+jbk-k+j-j

The number of walks w(x,y,n) is the coefficient of axby, namely

w(x,y,n) =2k-2k-j+j=x,k-k+j-j=y(n/2k)(n/2k)(kj)(kj)

The constraints under the summation imply 3k-3k=x+y and 3j-3j=2y-x, thus k=k-(x+y)/3 and j=j+(x-2y)/3. Therefore

w(x,y,n) =k(n/2k)(n/2k-(x+y)/3)j(kk-j)(k-(x+y)/3j+(x-2y)/3)

But

j(kk-j)(k-(x+y)/3j+(x-2y)/3) =(2k-(x+y)/3k+(x-2y)/3)

by Vandermonde’s convolution. Therefore

w(x,y,n) =k=0n/2(n/2k)(n/2k-(x+y)/3)(2k-(x+y)/3k+(x-2y)/3)

Setting (x,y)=(0,0) we obtain the following formula for the number of closed walks starting and ending at (0,0):

w(0,0,n)=k=0n/2(n/2k)2(2kk)

Dice lattice

The dice lattice is also a bipartite graph, with vertex set V0V1V2, where Vi={(x,y)×:x+yi(mod3)}, and with edges going from V0 to V1V2. The possible moves are:

  • From a vertex in V0: east,west,north,south, northeast,southwest, encoded as a,1/a,b,1/b,ab,1/ab.

  • From a vertex in V1: west, south, northeast, encoded as 1/a,1/b,ab.

  • From a vertex in V2: east, north, southwest, encoded as a,b,1/ab.

Moreover, starting at a vertex in V1, moves a,b,1/ab take us to a vertex in V2, and moves 1/a,1/b,ab take us to a vertex in V3. Of course any move from a vertex in V2V3 takes us back to a vertex in V1. After these observations and a moment’s reflection, we conclude that for even n the number of walks of length n starting at (0,0) is the coefficient of axby in

[FG+GF]n/2 =2n/2(FG)n/2

where F=a+b+1/ab and G=1/a+1/b+ab are defined as in the case of the honeycomb lattice. So the number of walks of even length from (0,0) to (x,y) is 2n/2 times the corresponding number of walks in the honeycomb lattice, and the formulas for the dice lattice follow.

Title enumeration of lattice walks (derivation of formulas)
Canonical name EnumerationOfLatticeWalksderivationOfFormulas
Date of creation 2013-03-22 19:21:44
Last modified on 2013-03-22 19:21:44
Owner csguy (26054)
Last modified by csguy (26054)
Numerical id 4
Author csguy (26054)
Entry type Derivation
Classification msc 05A15