Re: Hash table

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Marty (reply_at_to.forum)
Date: 08/19/04


Date: Thu, 19 Aug 2004 19:40:04 GMT

Thanks Jon,

Ok, I can handle collisions. Where can I look to learn this identity
hash algorithm?

Regards,

Marty

Jon Skeet [C# MVP] wrote:

> Marty <reply@to.forum> wrote:
>
>>Does anyone has to face the problem of hashing a string of 12 characters
>>AND avoid any collision?
>>
>>I'm looking for some algorithm who could return a good (small) hash
>>value for any string of 12 characters.
>
>
> For 12 characters to have a non-colliding hash, you'll need more than
> 24 bytes of hash. There are various ways of making it non-colliding -
> an identity hash would do, to start with, if your one goal is to avoid
> collisions. You obviously can't have a shorter hash and have no
> collisions - there are too many strings and not enough possible hash
> values! The point of a hash is usually to take a large amount of data
> and hash it into a smaller value which is *unlikely* to collide with
> that created by a different chunk of source data - but once you specify
> that collisions mustn't occur at all, hashing just doesn't work as a
> concept.
>



Relevant Pages

  • Re: When will md5crk complete?
    ... and in that case birthday attack ... > His core message is correct however: you shouldn't be using MD5. ... Collisions DO exist for every hash algorithm... ...
    (sci.crypt)
  • a makeshift hash solution
    ... a good way to do that would be to include a hash of the key. ... to do the hashing 'in house' but i didn't want the hash to be too big ... and i also didn't want it to be easy to find collisions. ... in order to defeat a file hash, you don't need to recover the original ...
    (sci.crypt)
  • Re: Hashing
    ... Computing the hash function, which is handled by the instructions: ... reserved word/identifier when searching through the reserved words ... collisions and four slots that have four collisions. ...
    (alt.lang.asm)
  • Re: Simple Algorithm (Perfect Hashing?)
    ... a hash algorithm does something similar but in a one-way fashion and ... Collisions are naturally not permitted! ... In fixed hash tables you use a table whose length is a prime number. ... the hash function looks like ...
    (comp.programming)
  • Re: Hashing
    ... A good hash ... > greater is it better performance due to less collisions". ... then the probability that you need a rehash on any scan is something ... > 'hash method' simply because they use hash codes, ...
    (alt.lang.asm)