The following example illustrates the algorithm. Let s = CAGAGT. We set c = -2 and use the following score scheme: a match costs 10, a mismatch costs -10, and an insertion or a deletion costs -10. The table constructed by using the dynamic programming algorithm is shown in Figure 3. The table is constructed in from the top to the bottom. For every row in the table, the w(i, j)'s are computed from left to right. From the table, it is easy to see that the maximum value of w(i, j) is w(2, 5) = 16. From the maximum value w(2, 5) = 16, we know that the local optimal pseudo-periodic region t is a suffix of s[1, 5] = CAGAG and there are 2 letters aligned with spaces and scored as at the right end of the self alignment of the local optimal pseudo-periodic region t. From w(2, 5), we can backtrack w(2, 5) → w(2, 4) → w(2, 3) and stop at w(2, 3) since w(2,3) gets its value from c·i indicating the first segment of the partition of t ends at 3-th letter in s and the length of the segment is 2. Thus, we get t = AGAG. From the self alignment, it is easy to get the partition of π(t) = {AG, AG}.