Denote by A(k) the vector whose components are the indices for the aligned traces corresponding to the k th position in the resulting assembly. Then the cost of the alignment is8