Talk:Rabin–Karp algorithm: Difference between revisions

Content deleted Content added
Magazine article: new section
Line 196:
== Magazine article ==
 
The whole article reads like a popular magazine article.
The whole article reads like a popular magazine article. For example, the text says, ''Luckily, a good hash function on reasonable strings usually does not have many collisions, so the expected search time will be acceptable.'' I hope I'm not relying on luck for reliability. We may presume, as scholars and computer scientists, that a good hash function is chosen, and the ''prima facie'' evidence of a good hash function is few collisions. A good hash function will minimize collisions even on unreasonable strings.
 
For example, ''A brute-force substring search algorithm checks all possible positions: [pseudocode omitted] This algorithm works well in many practical cases,''. We do this in Computer Science 101, when we're learning about nested loops. About the best we can say about this algorithm is that it will find the substring(s). String search is a critical software function, and doing it well requires a scholarly approach. Brute force is hardly ever a good solution in the software world.
 
The whole article reads like a popular magazine article. For example, the text says, ''Luckily, a good hash function on reasonable strings usually does not have many collisions, so the expected search time will be acceptable.'' I hope I'm not relying on luck for reliability. We may presume, as scholars and computer scientists, that a good hash function is chosen, and the ''prima facie'' evidence of a good hash function is few collisions. A good hash function will minimize collisions even on unreasonable strings.
 
Then there's this: