原书出处
Introduction to Algorithms, Fourth Edition
32 第32章 字符串匹配
xa ⊐ ya. The ⊏ and ⊐ relations are transitive. The following lemma will be useful later.
Lemma 32.1 (Overlapping-suffix lemma) Suppose that x, y, and z are strings such that x ⊐ z and y ⊐ z. If |x| ≤ |y|, then x ⊐ y. If |x| ≥ |y|, then y ⊐ x. If |x| = |y|, then x = y. Proof See Figure 32.2 for a graphical proof. ▪ For convenience, denote the k-character prefix P[1:k] of the pattern P[1:m] by P[:k]. Thus, we can write P[:0] = ϵ and P[:m] = P = P[1:m]. Similarly, denote the k-character
prefix of the text T by T[:k]. Using this notation, we can state the string-matching prob
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Introduction to Algorithms, Fourth Edition/_epub-src/OEBPS/chapter032.xhtml
EPUB SHA-256:ec7ced04bb875b93983816aef7a667855a4b71c5cf53b63406b9439c74e27aea