Let's say you have these two sequences of strings
abc cba bc
bc abc cba
I'm trying to create a mapping for such sequences(the sequence is also a string) so that the above two sequences are mapped into the same bucket.
My initial thought would be to add the results of a hashing function that is applied to each string separately. In this way their order won't matter. If I applied the hashing function to the sequence string as a whole, then of course the hash result would be different.
However I'm very new to the world of string hashing functions and I have no idea whether this approach would be efficient.
In this website http://www.partow.net/programming/hashfunctions/index.html
I found many different implementations for string hashing, however I'm not sure which one would be the "best" for my needs.
Some technical details about each string in the sequence is that each of them won't have more than 25 characters. Also each sequence won't have more than 3 strings.
Questions
1.
Would this approach of adding the results of a string hashing function to each string of the sequence work?
2.
If yes which string hashing function should I use that would give a low amount of collisions and also be time efficient?
Thank you in advance