Charging Station: Solving Frequent Words with Mismatches Problem
Learn how to solve the problem of Frequent Words with Mismatches.
We'll cover the following...
We'll cover the following...
This lesson uses some notation from Charging Station: The Frequency Array.
To prevent having to generate all 4 k-mers in order to solve the Frequent Words with Mismatches Problem, our goal is to consider only those k-mers that are close to a k-mer in Text, i.e., those with Hamming distance at most d from this k-mer. Given a k-mer Pattern, we, therefore, define its d-neighborhood Neighbors(Pattern, d) as the set of all k-mers that are close to Pattern. For example, Neighbors(ACG, 1) consists of ten 3-mers:
ACG ...