Example of searching for "ababc" in text "abdabadabc"
text: a b d a b a b a b c
T[x]: 11010 10101 11111 11010 10101 11010 10101 11010 10101 01111
state: 11110 11101 11111 11110 11101 11010 10101 11010 10101 01111
Ex. state "10101 means there are 2 partial matches, of lengths 2,4
(starting at the right)
Advantages:
- Easy to implement in hardware
- Only need to store 1 char. of text (no buffering or text storage)
- Can handle regular expressions: sets of chars, don't cares
- Extends to don't cares or errors in text