Another Knight On The Tiles

A knight moves on a chessboard according the standard rules of chess, but in a random manner. At each move, then, the knight is equally likely to move to any of the squares it can reach. Thus a knight at a corner square of the board will move to either of the two squares it can reach with probability 1 2 \tfrac12 , while a knight in the centre of the board will move to any one of eight possible squares, each with probability 1 8 \tfrac18 .

This chessboard has a "safe zone," consisting of the four central squares. The knight starts its journey on one of the squares in the safe zone. The expected number of moves it must make until it returns to any square in the safe zone can be written as a b \tfrac{a}{b} , where a a and b b are coprime positive integers. What is the value of a + b a + b ?


The answer is 23.

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
Oct 18, 2016

We do not have to consider a Markov chain on all 64 64 squares of the chessboard. There are 10 10 types of square on a chessboard (distinguished by the number and type of squares that a knight can reach from them), as shown in the diagram, and we see that the safe zone consists of all the squares of type 10 10 . If we consider a Markov chain on the 10 10 classes of squares, then the transition matrix for this chain is

M = ( 0 0 0 0 0 1 0 0 0 0 0 0 1 3 0 0 0 1 3 1 3 0 0 0 1 4 0 0 0 1 4 1 4 0 1 4 0 0 0 0 0 1 4 1 4 0 1 4 1 4 0 0 0 0 1 2 0 0 0 0 1 2 0 1 6 0 1 6 1 6 0 0 1 6 0 1 6 1 6 0 1 6 1 6 0 0 1 6 0 1 6 1 6 1 6 0 1 4 0 1 4 0 0 1 4 0 0 1 4 0 0 1 8 1 8 1 8 1 8 1 8 0 1 4 1 8 0 0 0 0 0 1 4 1 4 1 4 1 4 0 ) M \; = \; \left( \begin{array}{cccccccccc} 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & \frac13 & 0 & 0 & 0 & \frac13 & \frac13 & 0 & 0 \\ 0 & \frac14 & 0 & 0 & 0 & \frac14 & \frac14 & 0 & \frac14 & 0 \\ 0 & 0 & 0 & 0 & \frac14 & \frac14 & 0 & \frac14 & \frac14 & 0 \\ 0 & 0 & 0 & \frac12 & 0 & 0 & 0 & 0 & \frac12 & 0 \\ \frac16 & 0 & \frac16 & \frac16 & 0 & 0 & \frac16 & 0 & \frac16 & \frac16 \\ 0 & \frac16 & \frac16 & 0 & 0 & \frac16 & 0 & \frac16 & \frac16 & \frac16 \\ 0 & \frac14 & 0 & \frac14 & 0 & 0 & \frac14 & 0 & 0 & \frac14 \\ 0 & 0 & \frac18 & \frac18 & \frac18 & \frac18 & \frac18 & 0 & \frac14 & \frac18 \\ 0 & 0 & 0 & 0 & 0 & \frac14 & \frac14 & \frac14 & \frac14 & 0 \end{array} \right)

This is a finite irreducible (so non-null recurrent) Markov chain, which can be seen as identical to the random walk on the following multigraph (with a loop), so that the transition probability from state i i to state j j is equal to p i j = { n i j s i if j is connected to i by at least one edge , 0 otherwise p_{ij} \; = \; \left\{ \begin{array}{lll}\frac{n_{ij}}{s_i} & \hspace{1cm} & \mbox{if } j \mbox{ is connected to } i \mbox{ by at least one edge}, \\ 0 & & \mbox{otherwise} \end{array}\right. where n i j n_{ij} is the number of termini of edges at state i i that lead to state j j , and s i = j n i j s_i \; = \; \sum_j n_{ij} is the scope of the state i i . Note that, in the case of state 9 9 , which possesses a loop, we have n 99 = 2 n_{99} = 2 and s 9 = 8 s_9 = 8 . For all other values of i i and j j , n i j n_{ij} is either 1 1 or 0 0 . We want to know the expected return time from state 10 10 to state 10 10 .

Since s i p i j = s j p j i s_i p_{ij} \; = \; s_j p_{ji} for each i , j i,j , since this expression is equal to n i j n_{ij} whenever there is an edge from i i to j j , and 0 0 otherwise, we see that π i = s i s 1 i 10 \pi_i \; = \; \frac{s_i}{s} \hspace{2cm} 1 \le i \le 10 is the (unique) invariant distribution for this Markov chain, where s = i = 1 10 s i s = \sum_{i=1}^{10}s_i . We note that s 10 = 4 s_{10} = 4 and s = 42 s = 42 , so that (by standard Markov chain theory) the expected return time from state 10 10 to state 10 10 is π 10 1 = 21 2 \pi_{10}^{-1} = \frac{21}{2} , making the answer 21 + 2 = 23 21 + 2 = \boxed{23} .


Alternatively, we could let e j e_j be the expected number of moves to reach a type 10 10 square from a type j j square, for 1 j 9 1 \le j \le 9 . Conditional probability thinking tells us that e 1 = 1 + e 6 e 2 = 1 + 1 3 ( e 3 + e 7 + e 8 ) e 3 = 1 + 1 4 ( e 2 + e 6 + e 8 + e 9 ) e 4 = 1 + 1 4 ( e 5 + e 6 + e 8 + e 9 ) e 5 = 1 + 1 2 ( e 4 + e 9 ) e 6 = 1 + 1 6 ( e 1 + e 3 + e 4 + e 7 + e 9 ) e 7 = 1 + 1 6 ( e 2 + e 3 + e 6 + e 8 + e 9 ) e 8 = 1 + 1 4 ( e 2 + e 4 + e 7 ) e 9 = 1 + 1 8 ( e 3 + e 4 + e 5 + e 6 + e 7 + 2 e 9 ) \begin{array}{rcl} e_1 & = & 1 + e_6 \\ e_2 & = & 1 + \tfrac13(e_3 + e_7 + e_8) \\ e_3 & = & 1 + \tfrac14(e_2 + e_6 + e_8 + e_9) \\ e_4 & = & 1 + \tfrac14(e_5 + e_6 + e_8 + e_9) \\ e_5 & = & 1 + \tfrac12(e_4 + e_9) \\ e_6 & = & 1 + \tfrac16(e_1 + e_3 + e_4 + e_7 + e_9) \\ e_7 & = & 1 + \tfrac16(e_2 + e_3 + e_6 + e_8 + e_9) \\ e_8 & = & 1 + \tfrac14(e_2 + e_4 + e_7) \\ e_9 & = & 1 + \tfrac18(e_3 + e_4 + e_5 + e_6 + e_7 + 2e_9) \end{array} Solving these equations, we can calculate the desired answer of 1 + 1 4 ( e 6 + e 7 + e 8 + e 9 ) = 1 + 1 4 ( 57496 5923 + 55593 5923 + 52055 5923 + 59930 5923 ) = 21 2 1 + \tfrac14(e_6 + e_7 + e_8 + e_9) \; =\; 1 + \frac14\left(\frac{57496}{5923} + \frac{55593}{5923} + \frac{52055}{5923} + \frac{59930}{5923}\right) \; = \; \frac{21}{2}

I also began with the approach that there are 10 types of squares on the chessboard; but as it works out, I think it is easier to use 16 different square types (represented by e.g. the whole upper left quadrant).

In that case we can see that:

\bullet 4 out of the 16 s i s_i values are 8

\bullet 4 of them are 6

\bullet 5 of them are 4

\bullet 2 of them are 3

\bullet 1 of them is 2

And (keeping the designation of the safe zone as type 10) we have s = 8 4 + 6 4 + 4 5 + 2 3 + 2 = 84 s=8*4+6*4+4*5+2*3+2 =84 and hence s / s 10 = 84 8 = 21 2 s/s_{10} = \frac{84}{8} = \frac{21}{2} as before.

Peter Byers - 4 years, 7 months ago

Log in to reply

That will certainly work. Going with 16 16 rather than 10 10 classes creates a graph with more vertices and more edges (my State 5 has scope 2 2 , yours would have scope 4 4 ; my state 8 8 has scope 4 4 , and yours would have scope 8 8 . I guess it is a matter of taste how much symmetry you choose to take advantage of!

Mark Hennings - 4 years, 7 months ago

Log in to reply

Thanks Mark. I should clarify that my main point is not the number of types (10 or 16), but the fact that we can solve the problem on the basis of how many moves a knight could make from each square, without needing all the details of the transition matrix.

Peter Byers - 4 years, 7 months ago

Log in to reply

@Peter Byers No, I see your point - in my solution some of the knights' moves "double up" or even "quadruple up" on the graph. You do need to be a little careful, once you have labelled the 16 square in the top-left quadrant, how you are going to label the squares in the other three quadrants. I think that either applying either a rotational symmetry, or else a horizontal and vertical reflectional symmetry, will work. There is no possibility of uncertainty in my solution. Swings and roundabouts...

Mark Hennings - 4 years, 7 months ago

Log in to reply

@Mark Hennings Well, I'm not sure what you mean by possibility of uncertainty, but you put a significant amount of work into getting the transition matrix and the multigraph. That is, of course, not wasted effort since it's helpful for someone learning how to do those things; but I think you should note that you were not required to do so by the problem, inasmuch as the expected number of moves is a function of the s i s_i values, which could be computed more easily.

I think someone reading your solution could get the idea that the problem is much more difficult than it actually is.

Peter Byers - 4 years, 7 months ago

Log in to reply

@Peter Byers You want to label the squares in the top-left quadrant 1 1 to 16 16 . How are you going to label the squares in the other three quadrants? If you are going to get a Markov chain on 16 16 states, this will need to be done consistently. Since my numbering of 10 10 classes used the full rotational and reflectional symmetry of the board, there was no issue about deciding how to label the other quadrants.

I put a significant amount of work into typing the transition matrix and drawing a pretty picture of the graph, but the calculations were not hard to do.

If you think an easier to understand solution is possible, feel free to post one...

Mark Hennings - 4 years, 7 months ago

Why does this work, exactly? Surely just the scope of all the different states isn’t enough information, right?

Ivo Zerkov - 2 years, 9 months ago

Log in to reply

As you can see from the further discussion here, whether it works would depend on how it is implemented.

Mark Hennings - 2 years, 9 months ago

Log in to reply

@Mark Hennings It seems to me you’re sort of missing the point of what Peter is saying - he claims that the only calculation necessary to solve the problem is taking the number of possible knight moves, s s , and dividing that by the number of “safe” knight moves, namely ones which send the knight to the center, s 10 s_{10} . 336 32 = 21 2 \frac{336}{32}=\frac{21}{2} .

Ivo Zerkov - 2 years, 9 months ago

Log in to reply

@Ivo Zerkov No, I am not missing the point. We need to take account of the fact that the target is more than one square. My system of classifying the squares enables us to consider a Markov chain on the smallest class of squares possible. Peter wants to do the argument in one quadrant, without accounting for the fact that some moves will take the knight outside the quadrant. The calculation is suggestive, but the argument is incomplete. You will note that Peter never followed by my invitation to post a solution.

Mark Hennings - 2 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...