- This program computes the basic quantities w, r, M and Z for an ergodic Markov Chain. You specify the Size of the matrix (number of states) and then input the transition matrix for the chain after clicking on "create".