1

Problem

The Probabilities involving 3 equally possible moves in 1D line.

Imagine a one-dimensional line with a "walker" in the middle position ($x=0$)

Walker can make one of the following moves each turn:

  • move right ($x-1$)
  • move left ($x+1$)
  • rest on the same spot ($x\pm 0$)

The Walker is cursed with a confusion spell thus all of his moves are equally likely to happen, one each turn.

For a given number of $n$ turns, what is the probability of finding the Walker at a specific $x$ position?


My attempt

If we visualize the starting position like this: ($W=$ Walker) $$...[x_{-2}][x_{-1}][W][x_1][x_2]...$$

Then for $n$ turns, the following number of paths lead to the following positions like this: $$(1) (1) (1)$$ $$(1)(2)(3)(2)(1)$$ $$(1)(3)(6)(7)(6)(3)(1)$$ $$(1)(4)(10)(16)(19)(16)(10)(4)(1)$$ $$(1)(5)(15)(30)(45)(51)(45)(30)(15)(5)(1)$$ $$(1)(6)(21)(50)(90)(126)(141)(126)(90)(50)(21)(6)(1)$$ $$(1)(7)(28)(77)(161)(266)(357)(393)(357)(266)(161)(77)(28)(1)$$ $$...$$

Where the middle () is the center, $x=0$ position.

For example, take the $5^{th}$ turn ($n=5$), and look at the $x$ position $=-2$ or $=2$ and its value (Number of paths leading to it, lets call it $P_x$) and see that for $x=\pm 2$ it is $P_x=30$, and the probability of the Walker standing there is: $$\frac{30}{3^5}$$ Which is equal to 12.34567...% percent.

So is can be calculated using this visualization like this: $$ \frac{P_x}{3^n} $$


So How would one calculate $P_x$ (Total number of paths leading to given $x$ position) using a formula or expressions, for given number of turns $n$ ?


Update

I have observed so far:

  • $P_x$ for ($x=\pm n$) is obviously: $$1$$

  • For ($x=\pm n\mp 1$) it is $$n$$

  • For ($x=\pm n\mp 2$) it is: $$ \frac{n(n+1)}{2}$$

  • For ($x=\pm n\mp 3$) it is: $$ \frac{(n-1)(n^2+4n)}{6} $$

  • For ($x=\pm n\mp 4$) it is: $$ \frac{(n-1)(n^3+7n^2-6n)}{24} $$

  • For ($x=\pm n\mp 5$) it is: $$ \frac{(n-1)(n-2)(n^3+13n^2-12n)}{120} $$

And as it follows, notice that 1,2,6,24,120... is actually $1!,2!,3!,4!,5!...$ and $1$ alone is $0!$


Could then $P_x(x,n)$ be somehow be generalized into a single expression? So one can find easily expressions for $P_x$ for ($x=\pm n\mp k$) ? Also, these previous expressions I've observed seem very familiar to me and that drives me crazy...


Vepir
  • 13,072

1 Answers1

2

To arrive at $x$ using $k$ moves to the right, $k-x$ moves to the left and $n-k-(k-x)=n+x-2k$ non-moves, there are

$$ \binom n{k,k-x,n+x-2k}=\frac{n!}{k!(k-x)!(n+x-2k)!} $$

choices for the ordering of the moves, and this has to be summed with the constraints $k\ge0$, $k-x\ge0$ and $n+x-2k\ge0$.

For instance, for $x=n-2$ and $n\ge2$ this is

$$ \sum_{k=n-2}^{n-1}\frac{n!}{k!(k-n+2)!(2n-2-2k)!}=n!\left(\frac1{(n-2)!2!}+\frac1{(n-1)!}\right)=\frac{n(n-1)}2+n=\frac{n(n+1)}2\;. $$

These numbers are called trinomial coefficients, and you can read more about them at Wikipedia, MathWorld and OEIS.

joriki
  • 242,601
  • I'm curios now, how could then the probability of finding the walker at his $x$ positions be calculated if we say that the moves aren't equally likely to happen, but have $c_1,c_2,c_3$ chances of occurring? ($c_1+c_2+c_3=1=100$%) Or does this require some other calculations, and possibly is a problem for another question? In that case, what do you think I should look into before attempting to try to solve this case? – Vepir Mar 13 '16 at 11:53
  • 1
    @Matta: That just multiplies the terms in the sum by factors $c_1^kc_2^{k-x}c_3^{n+x-2k}$ (where before you had an overall factor $\left(\frac13\right)^n$). – joriki Mar 13 '16 at 11:54
  • I actually first attempted to look at this in 2D, inspired by something similar: http://math.stackexchange.com/questions/1691507/path-density-between-two-points , but then decited that it would be simpler in 1D, thus this question. I have now posted the 2D problem, and expanded it a bit, so if you have any ideas or clues on it it would be helpful: http://math.stackexchange.com/questions/1696843/2d-walks-on-a-square-grid-the-number-of-paths-leading-to-specific-x-y – Vepir Mar 14 '16 at 10:08