Abstract-In this paper, we improve the idea of the near-optimal alignments. Though the near optimal alignments increase the possibility to find the correct alignment, too many of them may confuse the biologists. So we present the filter scheme for the near-optimal alignments. An easy method to trace the nearoptimal alignments and an algorithm to filter those alignments are proposed.1 The time complexity of our algorithm is O(dmn) in the worst case, where d is the maximum distance between the near-optimal alignments and the optimal alignment, and m, n are the lengths of the input sequences, respectively.