Calculation of the H matrix. The vector C shown in Figure 1 is joined by a further five vectors to store the maximum score M on the current path, and the start S and current end-point E for the optimal alignment. To simplify the figure, only one element of each vector is illustrated. The sub-figures show the building up of the score, start and end point for the first locally optimal alignment to be found when processing the H matrix. In each sub-figure, the heavy-boxed cells of H have been assigned to the optimal alignment. The lightly boxed cells lie on the alignment path, but may follow the current maximum cell M. In Figure 2f, the score, start and end points of the locally optimal alignment has been stored in the results list, indexed by the row in which the alignment starts (3).