Oh, What A Knight!

A knight moves on a chessboard according the standard rules of chess, but in a totally random manner. Thus, at each move, the knight is equally likely to move to any of the squares it can reach. For example, a knight on a corner square 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 can move to any one of eight possible squares, each with probability 1 8 \tfrac18 .

If the knight starts its journey at a corner square, what is the expected number of moves that it takes to return to its starting square?


The answer is 168.

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 16, 2016

Every square on the chessboard has a scope , equal to the number of squares to which a knight on that square can move. The knight's journey is a described by a Markov chain, where the transition probability p i j p_{ij} of a knight moving from square i i to square j j is p i j = { s i 1 if j is a knight’s move away from i , 0 otherwise p_{ij} \; = \; \left\{ \begin{array}{lll} s_i^{-1} & \hspace{1cm} & \mbox{if } j \mbox{ is a knight's move away from } i, \\ 0 & & \mbox{otherwise} \end{array} \right. where s i s_i is the scope of the square i i . Note that s i p i j = s j p j i s_ip_{ij} \; = \; s_jp_{ji} for all squares i , j i,j , since the above expression is equal to 1 1 if squares i i and j j are a knight's move apart, and equal to 0 0 otherwise. This means that the Markov chain is time-reversible, and in particular that i s i p i j = i s j p j i = s j \sum_i s_i p_{ij} \; = \; \sum_i s_j p_{ji} \; = \; s_j for all j j , and hence this Markov chain has the (unique) invariant distribution π i = s i s \pi_i \; = \; \frac{s_i}{s} where s = i s i s \; =\; \sum_i s_i is the sum of the scopes of all the squares. By standard theory (for a non-null recurrent irreducible Markov chain), the expected return time to a square i i is equal to π i 1 \pi_i^{-1} , and so is equal to s s i \frac{s}{s_i} .

The 4 4 corner squares have scope 2 2 , while the eight squares adjacent to the four corners have scope 3 3 . There are 20 20 squares with scope 4 4 (the remaining 16 16 edge squares and the four squares "one diagonal in" from the corner squares). There are then 16 16 squares with scope 6 6 , while the 16 16 central squares have scope 8 8 . Thus s = 4 × 2 + 8 × 3 + 20 × 4 + 16 × 6 + 16 × 8 = 336 s \; = \; 4\times2 + 8\times3 + 20\times4 + 16\times6 + 16\times8 \; = \; 336 and hence the expected return time of the knight to a corner square is 336 2 = 168 \frac{336}{2} = \boxed{168} .

+1 Your solution is a great read. Very nice use of this result.

Thanks for contributing and helping other members aspire to be like you!

Calvin Lin Staff - 4 years, 8 months ago

Nice problem. I saw a nice video about introduction to Markov Chains and then tried this problem.

Ishan Singh - 4 years, 4 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...