### 7.4.24 Markov chains: markov

Given the transition matrix of a Markov chain, the markov
command will compute characteristic features of the chain. If M is
a transition matrix, then markov(M) will return the list of
the positive recurrent states, the list of corresponding
invariant probabilities, the list of other strong connected
components, the list of probabilities of ending up in the sequence of
recurrent states.
For example, if you enter

markov([[0,0,1/2,0,1/2],[0,0,1,0,0],[1/4,1/4,0,1/4,1/4],[0,0,1/2,0,1/2],[0,0,0,0,1]])

you will get

[[4]],[[0,0,0,0,1]],[[3,1,2,0]],[[1],[1],[1],[1],[1]]