Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rabin-Karp’s Algorithm: How to choose the prime number and x? #44

Open
hamidgasmi opened this issue Feb 26, 2020 · 0 comments
Open

Rabin-Karp’s Algorithm: How to choose the prime number and x? #44

hamidgasmi opened this issue Feb 26, 2020 · 0 comments
Assignees

Comments

@hamidgasmi
Copy link
Owner

How to make the trade-off between collision numbers and performance of recurrence calculation for H[i]?

More the prime is bigger, less false positive we gets. This is supposed to make our code faster.

In the other hand, more the prime is bigger, the related division and multiplication operations get slower.

@hamidgasmi hamidgasmi changed the title Polynomial Hashing: How to choose the prime number and x? Rabin-Karp’s Algorithm: How to choose the prime number and x? Feb 26, 2020
@hamidgasmi hamidgasmi self-assigned this Feb 26, 2020
hamidgasmi pushed a commit that referenced this issue Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant