An Algebraic Formalization of Forward and Forward-backward Algorithms | Read Paper on Bytez