From: Rick Bradley Date: 2002-06-07T07:26:39+09:00 Subject: Re: Hashes sensitive to simularity * Niklas Frykholm (r2d2@acc.umu.se) [020606 16:56]: > [Thomas Hurst]: > > Ideally similar strings would have identical hashes so it's a simple hash > > lookup, otherwise I might have to do some work, and we can't have that ;) > > That is not possible in the general case, consider for example > > s1 = 'AAAAA' > s2 = 'BAAAA' > s3 = 'BBAAA' > s4 = 'BBBAA' > s5 = 'BBBBA' > s6 = 'BBBBB' > > Since s1 is "similar" to s2, they should have the same hash value. > Since s2 is "similar" to s3, they should have the same hash value. On the contrary, soundex meets the poster's criteria, it just may not be the most flexible or natural function for disparate data sets. The definition of "similar" is critical to the solution. Rick -- http://www.rickbradley.com MUPRN: 444 (88F/95F) | stay free If you hope random email haiku | to keep building GDP. | He is right, said St.