1
$\begingroup$

I am not a mathematician, just a user of mathematics, so perhaps this is the wrong place to ask, but there is a problem I need some help with.

You have a $n \times n$ grid, and you start at the $(1,1)$ square. You move randomly one square on the $x$ or $y$ axis (no diagonal movements allowed). You keep moving until you reach square $(n,n)$.

At that moment, the game ends. The variable of interest is $T$, the time it took you to reach the end position. It is clear to me that $T$ is always finite (just intuition: if you are not in $(n,n)$ you always have a chance to reach it, if you are there, you will never leave it, so if the game goes on for long enough you will end up there)

My question is about the distribution of $T$. I am interested in understanding how to define the distribution, and how to compute the expected value of $T$ as a function of $n$. Can you point me to something I could read about it?

Thanks in advance.

  • 0
    Is the $n\times n$ grid from $(0,0)$ to $(n,n)$?2017-01-13
  • 1
    why will you never leave it once you're there?2017-01-13
  • 0
    Does the player always go towards $(n, n)$ or they can go away too?2017-01-13
  • 0
    @spaceisdarkgreen Because the game ends then.2017-01-13
  • 1
    If they're on the right wall, is there a one in three chance that they'll move in each of the given directions? Or is left 50% while up and down are 25%?2017-01-13
  • 0
    @Gyanshu Oh, ok, don't really see how that adds to the intuition for why it's finite then. (agree that it's finite). Also if you always go toward it, then isn't it just a constant?2017-01-13
  • 0
    @Gaffney Is the OP talking about the 'expected' time as in probability?2017-01-13
  • 0
    @spaceisdarkgreen If we always go towards it, it is a constant but as value of $n$ changes, time also changes. So that makes it a function.2017-01-13
  • 0
    Answer to comments: 1. grid has $n$ columns and $n$ rows. so, it is (arbitrarily) numbered from $(1,1)$ to $(n,n)$. Any other numbering convention would be OK too 2. you never leava $(n,n)$ because this is how the game is defined. it ends at the moment you reach that point. 3. The player can move in any direction, towards the goal or away from it 4. When the player hits a corner, it has only two possible moves. When the player hits a wall (top, bottom, left or right) in a place that it is not a corner, it has three possible moves. At any other place it has four possiblities.2017-01-13
  • 0
    6. If $T_n$ is the time it takes to end an $n\times n$ game, then it is a random variable. I am interested in its distribution, specially in its expected value.2017-01-13

1 Answers 1

1

Let $e_n$ be the expected number of moves to get from square (1,1) to square (n,n) in an $n \times n$ grid ($n$ rows, $n$ columns), where "square $(i,j)$" refers to the $1 \times 1$ cell at row $i$, column $j$.

Assumed rule: From any given square other than square (n,n), the next square is randomly chosen from one of the squares in the grid adjacent to the given square.

I doubt that there is a closed form expression for $e_n$ in terms of $n$.

For very small $n$, it's feasible to compute $e_n$ by hand. For example, it's immediate that $e_1 = 0$, and it's easy to show that $e_2 = 4$.

Using a Maple progam, I computed $e_n$ for $1 \le n \le 10$. Here are the results ...

\begin{align} e_1 &= 0 \\ e_2 &= 4 \\ e_3 &= 18\\ e_4 &= 312/7 \approx 44.57142857 \\ e_5 &= 940/11 \approx 85.45454545 \\ e_6 &= 4684/33 \approx 141.9393939 \\ e_7 &= 268170/1247 \approx 215.0521251 \\ e_8 &= 110081552/360161 \approx 305.6453975 \\ e_9 &= 31757976/76627 \approx 414.4489018 \\ e_{10} &= 77013755100/142065451 \approx 542.1005217 \\ \end{align}