Example of gap extension penalty calculation. This figure shows an example of columns a8 and b12 being aligned. '*', '·', and '-' denote a residue, a static null, and a dynamic null, respectively. We assume that piecewise linear gap cost g(x) is maxk = 1,2{-(u
k
x + v
k
)} and critical gap length x
c
(= ⌊(v2 - v1)/(u1 - u2)⌋) is 4. Gap extension penalty is u1 if x ≤ 4, otherwise u2. Running gap profile vectors and are {(1, )} and {(1, + + ), (3, + ), (11, )}, respectively. Dynamic gap information (A) is {(0, 1), (2, 2), (7, 1)}. Segment profile is {(1, ), (3, + ), (5, + + )}. Similarly, the profile vectors of B are defined: = {(7, )}, = {(0, )}, (B) is empty, and = {(1, 0), (9, )}. In what follows, we consider the non-trivial calculation of the gap extension penalty with respect to the gap of B1, the target gap. By using and (A), we find that the two dynamic gaps specified by (2, 2) and (7, 1) in (A) are partially and completely aligned with the target gap, respectively. Consequently, the total number of nulls aligned with null columns of dynamic gaps to be removed is 2. Therefore, the number of columns of B1 is 5(= 7 - 2). By subtracting 5 from 8 (the end position of the segment), the starting position of A, 3, is obtained. Then, the gap extension penalty with respect to the gap of B1 is (F1·u1 + F2·u2) where F1 = + and F2 = . Note that A1 is not involved in the gap extension penalty because a1,8 is a null.