
read AppsWZmulti:

#symmetirc random walk in the cubic lattice
L:=[[[1,0,0],1/6],[[-1,0,0],1/6],[[0,1,0],1/6],[[0,-1,0],1/6],
[[0,0,1],1/6],[[0,0,-1],1/6] ]:

print(`Consider a walk in the square lattice where the `):
print(`distribution of the fundamental steps is`):
print(L):

print(`Let a(n) be the probability of being at the origin after n steps.`):
print(`the probability of returning to the origin after n steps .`):


print(`The linear recurrence operator annihilating a_n:=`):
print(RandomWalkRecurrence(L,n,N));
print(`The whole thing took`, time(), `seconds of CPU time `):

quit:











