The String Matching Problem

Given a pattern string $P \in \Sigma^*$, with length |P| = m and a text string $T \in \Sigma^*$, with length |T| = n, where m,n > 0 and $m
\le n$:

If P occurs as a substring of T, find the first occurrence--that is, find s such that T[s+1..s+m] = P[1,m] ($0
\le s \le n-m$).


next up previous
Next: Extensions Up: STRING MATCHING Previous: Notation