World's most popular travel blog for travel bloggers.

[Answers] Hash function which is invariant under small changes

, , No Comments
Problem Detail: 

I am looking for a hash function which is invariant under small changes.

E.g., if I have two strings MyString and MySttring which slightly differ, their hash values should only differ slightly as well.

Actually, this is the opposite of the normal concept of a hash functions (Avalanche effect) where even slight changes in the input lead to big changes in the output.

Does any one know of such a concept or a hash function? (It should not be the identity function ;))

Background: I want to store personal data (name, surname, date of birth). Due to data privacy laws, it is not allow to store the data in clear text. So, I need to hash it. There might be typing errors or OCR errors when storing the data. So, two hash values of the same person might differ. But they should only differ a little, so I know that the input data must have been very similar.

Asked By : JavAlex

Answered By : Yuval Filmus

Use locality-sensitive hashing. Make sure you're not breaking the law.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/56483

3.2K people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback