ping hu's and ian wyszynski's implementation of a finite markov chain. have fun!