Definition: A string matching algorithm that compares string's hash values, rather than the strings themselves. For efficiency, the hash value of the next position in the text is easily computed from the hash value of the current position.
Also known as Rabin-Karp.
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 16 November 2009.
HTML page formatted Fri Feb 23 10:06:07 2018.
Cite this as:
Paul E. Black, "Karp-Rabin", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 16 November 2009. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/karpRabin.html