The document discusses two string matching algorithms: Knuth-Morris-Pratt (KMP) and Boyer-Moore (BM). KMP runs in linear time but checks every character, while BM can be sub-linear as it does not need to check every character. The document provides pseudocode examples and comparisons of the running times of KMP and BM on different length patterns, finding that BM performs best on longer patterns while KMP has better performance on shorter patterns. Both algorithms have widespread applications in areas like web search engines, spam filters, and natural language processing.