World Congress on Engineering 2007, London, Canada, 2 - 04 July 2007, pp.337-341
In pattern matching, scanning a given pattern in a particular order greatly influences the performance. This study investigates the effect of different pattern scan orders on natural language text and on DNA sequence data. Besides the well-known right-to-left ordering of Boyer-Moore, and from the least frequent character to most frequent one of Sunday's optimal mismatch algorithm, four alternative character search sequence orderings based on newly introduced distant n-gram statistics are proposed within this work. In all experiments, Sunday's pattern matching algorithm, where the characters of a given pattern can be scanned in any order, is used as the main framework. On natural language test data, the alternative pattern scan orders give better results in 60% of the test keywords. On genome data best ordering among the tested six approaches is the right-to-left order.