Solving Markov chains using Gaussian elimination