Description: The Rabin–Karp algorithm is a string searching algorithm created by Michael O. Rabin and Richard M. Karp in 1987 that uses hashing to find any one of a set of pattern strings in a text. For text of length n and p patterns of combined length m, its average and best case running time is O(n+m) in space O(p), but its worst-case time is O(nm). In contrast, the Aho–Corasick string matching algorithm has asymptotic worst-time complexity O(n+m) in space O(m).
A practical application of Rabin–Karp is detecting plagiarism. Given source material, Rabin–Karp can rapidly search through a paper for instances of sentences from the source material, ignoring details such as case and punctuation. Because of the abundance of the sought strings, single-string searching algorithms are impractical. Platform: |
Size: 32768 |
Author:Tanya |
Hits:
Description: 字符串模式匹配的RK算法,其中的滚动哈希很有价值-RK string pattern matching algorithm, in which the rolling hash valuable Platform: |
Size: 1007616 |
Author:linge |
Hits: