Reusing common expressions to speed up the forward algorithm. The actual computation of the likelihood of the observed sequence 10100010011001 given a specific HMM. The rectangles represent matrices and vectors and lines between them represent dependencies. In stage 1 the matrices are computed. The solid black lines show the amount of work performed, while the grey lines show the amount of work saved due to redundancy. C2 is for example computed as the product C1C0, and this multiplication is saved three times. In the second stage α
is computed from the compressed sequence and the matrices. As in Figure 1α
is computed from αi−1 and .