while the simplest algorithm to search for the presence of pattern string p in text t overlays the pattern string at every position in the text