Rabin-Karp Rolling Hash String Search: Window Hash, Collisions and Spurious Hits
A belt of wooden letter tiles slides under a brass reading frame while a rolling polynomial hash is updated in constant time per step. Change the text length, pattern length, alphabet, base and modulus to see hash hits, true matches, spurious collisions and how many letter comparisons Rabin-Karp saves against the naive search. Blender-built tiles and frame, with numerical checks built in.
A belt of wooden letter tiles slides under a brass reading frame while a rolling polynomial hash is updated in constant time per step. Change the text length, pattern length, alphabet, base and modulus to see hash hits, true matches, spurious collisions and how many letter comparisons Rabin-Karp saves against the naive search. Blender-built tiles and frame, with numerical checks built in.
A belt of wooden letter tiles slides under a brass reading frame while a rolling polynomial hash is updated in constant time per step. Change the text length, pattern length, alphabet, base and modulus to see hash hits, true matches, spurious collisions and how many letter comparisons Rabin-Karp saves against the naive search. Blender-built tiles and frame, with numerical checks built in.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install