Figure 2.
Unidirectional (left) and bidirectional (right) searches for the RNA sequence-structure pattern (RSSP) with P = NNNUGCUNNN and R = (((....))), which represents a stem-loop structure of length m = 10. The numbers indicate the order in which the pattern characters are matched against the target sequence. In the unidirectional search, the characters are matched in a single direction, beginning (ending) with a character in φ(P[0]) (φ(P[m - 1])). In the bidirectional search, the loop region of the pattern can be matched first. Then, pairing bases are matched consecutively by switching the search direction, represented by the red arrows.