completed exercises FiniteMarkovChains