On the previous page Duncan Clarke laid out an array of numbers that makes it easy to find the number of edges in the network. Add up Duncan's numbers and you get 336. But this counts each edge twice, so divide by 2 and see that there are 168 edges, which matches what my source says.
We need a definition from network/graph theory: the degree of a vertex is the number of edges attached to that vertex.
Step 2 A branch of mathematics called Markov chain theory is concerned with random walks. One can prove that for a Markov chain that is modeled by an undirected network, if all edges at a given vertex are equally weighted the mean return time M to get back to a starting vertex is given by
M = 2E/d where E is the total number of edges in the network and d is the degree of the starting vertex.
We know from part 1 that for a knight moving on an 8x8 board, E = 168. Since a corner square has two knight moves available to it, d = 2. Thus
M = 2(168)/2 = 168.
Shallow Blue's experimental approach and Duncan Clarke's theoretical approach both came close!
The book moves on to other topics in Markov chain theory, but I have been goofing around with other chess-like things we can do with the formula given above in this post. I'll plop them into one or more posts below.
Sticking with the knight as the chess piece so that E remains 168, but putting the knight onto a central square of the standard board (like d4) which has degree 8, the mean return time is
M = 2(168)/8 = 42.
For a king on a fully infinite board, E = infinity and d = 8, so
M = 2(infinity)/8 = infinity.
In this case the king will sometimes return in finite time to its starting square, but sometimes will wander off and never come back, driving the mean to infinity. This is what wolfgang worried might happen to the knight on a standard board, but in fact the mean return time was finite in that case.
For a bishop on a semi-infinite board, E = infinity. If the bishop starts in a corner square, d = 7, and
M = 2(infinity)/7 = infinity.
Starting the bishop anywhere else can give a different d, but M will still be infinity.
For a rook on a semi-infinite board, or a double semi-infinite board, or a fully infinite board, E = infinity and d = infinity.
M = 2(infinity)/infinity = indeterminate
I am going to conjecture that any time E and d are both infinite for some chess piece (we omit pawns which are irreversible, such that their network would be a directed graph rather than an undirected graph), the mean return time M is infinite. A way to prove this would be to find a formula for E(k) and d(k) where they are considered functions of the number k of squares on the board, and let k go to infinity.