Markov Chain with 7 sided polygon and 2 balls 7 men stand at the vertices of a 7-sided polygon and play a game with 2 balls. Initially (at time 0), the men at vertices A and D hold a ball each. The game ends when any man receives the two balls simultaneously. Before the game ends, and at times 1,2,..., any man holding exactly 1 ball throws it to his clockwise neighbour with probability a (where 0 < a < 1), or to his anti-clockwise neighbour with probability b (1 - a). All such actions are independent. The game can be modelled as a Markov chain by defining state k, k = 0,1,2,3, as the distance between the 2 balls, measured in number of sides covered by the shorter route around the polygon.

 The diagram is as shown:




(a) What is the transition probability matrix?
(b) Find all the classes of the Markov chain. Is there any closed class? Is there any recurrent class? State your reasons briefly.
(c) Find the expected number of times the 2 balls are held by two men who are neighbours of each other.


Attempt:


I have been working on this problem for hours and still cannot solve it. 
I understand that part (a) requires me to compute the individual probability in the transition matrix. I got 
$\begin{bmatrix}1 & 0 & 0 & 0\\0 & a^2 + b^2 + ab & 0 & ab
\\ab & 0 & a^2 + b^2 & ab\\0 & ab & ab & a^2 + b^2\end{bmatrix}$ 

Not sure if I got it correct, as I traced the states based on the diagram shown. The first row is all 0 because we do not want to throw any more balls in that state (game ends).
 For part (b), I believe that there are no closed or recurrent classes as since all states, one way or the other, are accessible from each other...
 For part (c), I am confused with the question, and would really appreciate any help.


Thanks guys!
 A: (This answer solves the original version of the question, where $0$ is not an absorbing state. Later on, the transition matrix was modified, and $p(0,0)$ put to $1$. This modification was both unnecessary in the context of the actual mathematical question asked and inappropriate in a Q&A context since an answer was already posted at the time.)
There is only one communicating class since the path $0\to2\to3\to1\to3\to2\to0$ has positive probability and joins $0$ to $0$ passing through every state. Hence the Markov chain is irreducible. The unique class $\{0,1,2,3\}$ is obviously closed and recurrent. This is not asked but note that some loops $x\to x$ have positive probability hence the Markov chain is also aperiodic.
The Markov chain starts at $3$ and stops when hitting $0$. To compute the expected number of visits of $1$, define $n_x$ as the expected number of visits of $1$ before hitting $0$ starting at $x$. Then the usual one-step recursion reads $n_3=p(3,1)(1+n_1)+p(3,2)n_2+p(3,3)n_3$, $n_2=p(2,2)n_2+p(2,3)n_3$, and $n_1=p(1,1)(1+n_1)+p(1,3)n_3$, where each $p(x,y)$ denotes the transition probability from $x$ to $y$. 
This $3\times3$ Cramér system yields $(n_1,n_2,n_3)$, and in particular $n_3$ the expected number of visits of $1$ before hitting $0$ when the Markov chain starts at $3$. (This value might be $n_3=2/(ab)$.)
