Markov Chains, Probabilistic Models, Text Generation, Hidden Markov Models, Python.
distribution for this Markov chain, you can use different methods. First, I will use the Monte Carlo approach. # Monte Carlo approach def monte_carlo(steps, start): steps = steps start_state = start pi = np.array([0, 0, 0]) pi[start_state] = 1 prev_state = start_state itr = 0 while(itr<steps):