I am trying to save space using hash values ββof strings. I have a very specific requirement, a simplified description of which is as follows:
I have two sets of string values, and a value is provided at runtime. I need to get a list of all rows from the second set, which starts with a line from the first set and ends with the query value. Here is a greatly simplified view and description:
set1: my_test_val_1 my_test_val_2 set2: my_test_val_1_extended_to_another_value my_test_val_2_extended_as_well
My goal is to store the hash values ββof these sets, as in:
set1: hash(my_test_val_1) ... set2: hash(my_test_val_1_extended_to_another_value)
to save in space and when '_extended_to_another_value' comes as a request, use a hash function with the distribution property over the addition:
hash(my_test_val_1) + hash('_extended_to_another_value') = hash_value_to_search
My attempts to find a hash function that supports this property, the failure occurred, most likely due to not using the correct keywords for the search, so even if you can describe the correct conditions for what I describe above, this will help
source share