Note that a strictly greedy algorithm could be confused by this situation and could align, for example, to in Figure 1 if the similarity among these two instances of the motif happens to be slightly stronger than the similarity among and , and among and , respectively. However, DIALIGN uses a greedy approach only for multiple alignment where an exact solution is not feasible, but for pairwise alignment, the program returns an optimal alignment with respect to the underlying objective function. Thus, under the above assumtion, a meaningful alignment will be produced even if exhibits stronger similarity to than to .