Hexagonal Spider Web - a modified version

A spider has its web in the shape of a regular hexagon . A fly is stuck to the web at a vertex that is diametrically opposite from the vertex at which the spider is. The spider can walk freely along the edges of the hexagon. At each vertex, it randomly chooses between walking on one of the two adjacent edges or staying at the vertex, all three choices with equal probability. If the time it takes to travel an edge is 5 5 seconds, while the waiting time at a vertex is 2 2 seconds, find the expected time (in seconds) it will take the spider to get to the fly?

Note: At the end of a waiting period at a vertex, a new random decision to stay at the vertex, or move along one of the two edges is made, with equal probability for the three choices.

Inspired by this problem


The answer is 54.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Mark Hennings
Jun 1, 2019

Suppose that the spider is moving on a regular N N -gon. Let the vertices be labelled 0 , 1 , 2 , . . . , N 1 0,1,2,...,N-1 , with the fly at vertex 0 0 . Let E j E_j be the expected time for the spider to reach the fly, given that it is at vertex j j and just about to move. Then E j = 1 3 ( 2 + E j ) + 1 3 ( 5 + E j 1 ) + 1 3 ( 5 + E j + 1 ) = 4 + 1 3 ( E j 1 + E j + E j + 1 ) E_j \; = \; \tfrac13(2 + E_j) + \tfrac13(5 + E_{j-1}) + \tfrac13(5 + E_{j+1}) \; = \; 4 + \tfrac13(E_{j-1} + E_j + E_{j+1}) for 1 j N 1 1 \le j \le N-1 , with E 0 = E N = 0 E_0 = E_N = 0 . Thus E j + 1 2 E j + E j 1 + 12 = 0 1 j N 1 E_{j+1} - 2E_j + E_{j-1} + 12 \; = \; 0 \hspace{2cm} 1 \le j \le N-1 and hence E j = A + B j 6 j 2 E_j = A + Bj - 6j^2 for 0 j N 0 \le j \le N . Since E 0 = E N = 0 E_0 = E_N = 0 we see that E j = 6 j ( N j ) E_j = 6j(N-j) .

In this case N = 6 N=6 , and we want E 3 = 54 E_3 = \boxed{54} .

Great solution! A question and a comment.

1) Can you say what about the recurrence relation tipped you off to a quadratic solution? I can see that the solution works, but would not have come up with it.

2) The previous version of this problem had solution E j = 0 , 5 , 8 , 9 , 8 , 5 , 0 E_j = 0, 5, 8, 9, 8, 5, 0 for N = 6 N = 6 . This new version has solution E j = 0 , 30 , 48 , 54 , 48 , 30 , 0 E_j = 0, 30, 48, 54, 48, 30, 0 . So the only dependence on the moving time ( m = 5 m = 5 seconds) and the waiting time ( w = 2 w = 2 seconds) amounts to a scaling factor of m + w 2 = 6 m + \frac w2 = 6 . I have been trying to see a way to just argue this directly without building the algebraic relations.

Matthew Feig - 2 years ago

Log in to reply

Recurrence relations are very much like differential equations. If you are familiar with the methods for solving second order DEs with constant coefficients, this is not hard. E j + 1 2 E j + E j 1 = 12 E_{j+1} - 2E_j + E_{j-1} \; = \; -12 is a nonhomogeneous second order recurrence relation with constant coefficients. We need a CF and a PI.

For the CF, we try to solve E j + 1 2 E j + E j 1 = 0 E_{j+1} - 2E_j + E_{j-1} \; =\; 0 by looking for solutions of the form E j = u j E_j = u^j . This brings us to the indicial equation u 2 2 u + 1 = 0 u^2 - 2u + 1 = 0 , of which u = 1 u=1 is the only repeated root. This yields the CF as A + B j A + Bj for constants A , B A,B .

To find the PI, we note that the nonhomogeneous term 12 -12 is part of the CF, associated to the double root u = 1 u=1 of the indicial equation. This leads us to look for a PI of the form α j 2 \alpha j^2 , and all we now need to do is determine α \alpha .

Mark Hennings - 2 years ago

Log in to reply

Thanks. I was mainly curious if you first looked for exponential solutions like E j = u j E_j = u^j for the homogeneous part (which is probably what I would have done), or if you expected pure polynomials from the beginning. The coefficients ( 1 , 2 , 1 1, -2, 1 ) are exactly what's needed to represent the 2nd differences of a sequence and to give the repeated root of 1 1 . So E n E_n is a sequence with constant 2nd differences of 12 -12 .

Matthew Feig - 2 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...