Simulation of Finite Time-homogeneous Markov Chains