计算机科学 > 数据结构与算法
[提交于 2010年12月8日]
标题:On Tuning the Bad-Character Rule: the Worst-Character Rule
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In this note we present the worst-character rule, an efficient variation of the bad-character heuristic for the exact string matching problem, firstly introduced in the well-known Boyer-Moore algorithm. Our proposed rule selects a position relative to the current shift which yields the largest average advancement, according to the characters distribution in the text. Experimental results show that the worst-character rule achieves very good results especially in the case of long patterns or small alphabets in random texts and in the case of texts in natural languages.
提交历史
来自:Simone Faro[v1] 2010年12月8日 星期三 00:00:00 UTC