Last time:
Today:
Let’s say we want to find some pattern $p$ (bit string) in some text $x$.
Question: Does $p$ occur in $x$? If yes, can you find where?
Naive solution: $\mathcal{O}(mn)$
Famous algorithm: Knuth-Morris-Pratt (KMP)
Solves string matching in time $\mathcal{O}(n+m)$
Fragile X Syndrome
Take some DNA sequence $\{A,G,C,T\}^*$. A person has this syndrome if the following is present in their DNA: $GCG(CGG|AGG)^+AGG$