
Computer Assignment 3
Math 5040 โ Fall 2002
Due: Wednesday October 2 2002
Random Walk on
๎
/r
๎
Consider the Markov chain {Xn}on {0,1,2,...,rโ1}with
Pk,j =(1
2if j=kยฑ1 mod r
0 otherwise
For which values of ris the chain aperiodic. Pick such a value greater than 10. Simulate
the Markov chain. Does each realization of the chain converge to a value? By simulation,
estimate the distribution of Xnfor large (say larger than 10000) n. What is happening to
the distribution of Xnfor large values of n.
Bernoulli-Laplace Model of Diffusion
There are two urns, each always with Nparticles. There are a total of Nwhite particles,
and a total of Nblack particles. At each unit of time, a particle is chosen from each urn
and interchanged.
Let Xnbe the number of white particles in the first urn. Then
P(k, k + 1) = ๎1โk
N๎2
P(k, k โ1) = ๎k
N๎2
P(k, k) = 2 k
N๎1โk
N๎.
Simulate this Markov chain. For each realization of {Xn}, does it appear that Xnis
converging to something? What about the distribution of Xn. Estimate via simulation the
distribution of Xnfor large n. What is happening for nlarge?
1