Random Walk

Two weeks ago we attempted to do random walk starting at zero. Prof. Davis created a Mathematica program to show a random walk graph. He kept changing the values to get the session time it took to walk. Starting it a zero there is only four possible moves left, right, up or down (l, r, u, d).

Since random walk = {(0.0)}

a= random walk (1-> 4)

(x, y) = last point n random walk

(-1, 0) if a =1

(1, 0) if a =2

(0, -1) if a = 3

(0, 1) if a =4

By looking at the last four steps in the random walk add (x, y) to random walk if it does not intersect with the last four points other wise do not. In doing this we are trying to keep a track of the last four points we were located on. We next attempted to calcuate a program that not only check the last four points but also if one intersect with the new (x, y) value we simple check the other possible moves available and move to the next one.

Leave a Comment