Markov chain program