The forward-backward algorithm.pdf