The best local ungapped alignments of variable length may be found either by dynamic programming with a high gap-penalty, or using heuristic methods. Since the heuristic methods are primarily used for database searching they are described in Section 6.