next up previous
Next: Monte Carlo Up: A one-dimensional random walk Previous: A one-dimensional random walk

Exact enumeration

in this approach, the number and probability of all walks for a given $N$ and $x$ are determined explicitly. Imagine that we represent by bits 0 and 1 as step to the right or left, respectively. The number of possible walks with a given $N$ is going to be equivalent to the number of combinations of $N$ bits, that is, $2^N$. The value of $x$ for each configuration of ones and zeroes is going to be given by the difference between the number of ones and the number of zeroes. If $n$ is the number of ones, this is $x=n-(N-n)=2n-N$. From here we obtain that $n=(x+N)/2$. The probability $P_N(x)$ for each configuration will be given by $p^{n}q^{N-n}$. Since the number of configurations with a given $x$ or $n$ is $N_{conf}(n)=\frac{N!}/{n!(N-n)!}$, we obtain:

\begin{displaymath}
P_N(x)=\frac{N!}{n!(N-n)!}p^{n}q^{N-n}.
\end{displaymath}



Adrian E. Feiguin 2004-06-01