Markov Chain
Markov Chain
Markov chains, named after Andrey Markov, a stochastic model that depicts a
sequence of possible events where predictions or probabilities for the next state
are based solely on its previous event state, not the states before. In simple
words, the probability that n+1 th steps will be x depends only on the nth steps
not the complete sequence of steps that came before n. This property is known
as Markov Property or Memorylessness. Let us explore our Markov chain with
the help of a diagram,
Python3
import scipy.linalg
import numpy as np
# of words.
n = 20
StartingState = 0
CurrentState = StartingState
# dictionary
n -= 1
print("stop")
pi = left[:, 0]
pi_normalized