Blast method
Blast uses a heuristic method to find the highest scoring local alignment between the query sequence and the search set sequence.
The original blast algorithm did not allow gaps, and relied on the statistics of ungapped alignments.
The current version of Blast allows short gaps and has better statistics.