Finding the probability of an observation III: The forward procedure
A forward variable, ?i(t)= P(o1o2…o t-1, Xt=i| ?) is stored at (si, t)in the trellis and expresses the total probability of ending up in state si at time t.
Forward variables are calculated as follows:
Initialization: ?i(1)= ?i , 1? i ? N
Induction: ?j(t+1)=?i=1N?i(t)aijbijot, 1? t?T, 1? j?N
Total: P(O|?)= ?i=1N?i(T+1)
This algorithm requires 2N2T multiplications (much less than the direct method which takes (2T+1).NT+1