If we call pij the transition probability P(i → j), we define a recursive procedure considering the following probability:
The variable fti represents the probability that the HMM is in the state i (at time t) after t observations (from 1 to t). Considering the HMM assumptions, we can state that fti depends on all possible ft-1j. More precisely, we have:
With this process, we are considering that the HMM can reach any of the states at time t-1 (with the first t-1 observations), and transition to the state i at time t with probability ...