The first term is straightforward to compute. The second term can be computed using dynamic programming, analogous to computing the likelihood in HMMs [1]}. We initialize:
\(\alpha (y_{1})= \psi _{1} \eta _{1}\) 
