Re: Hash table
From: Marty (reply_at_to.forum)
Date: 08/19/04
- Next message: Daniel Friend: "Accessing UserControl Custom Properties After Added Programically"
- Previous message: Supra: "Re: how will i do in vb.net.............."
- In reply to: Jon Skeet [C# MVP]: "Re: Hash table"
- Next in thread: Jon Skeet [C# MVP]: "Re: Hash table"
- Reply: Jon Skeet [C# MVP]: "Re: Hash table"
- Messages sorted by: [ date ] [ thread ]
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.
>
- Next message: Daniel Friend: "Accessing UserControl Custom Properties After Added Programically"
- Previous message: Supra: "Re: how will i do in vb.net.............."
- In reply to: Jon Skeet [C# MVP]: "Re: Hash table"
- Next in thread: Jon Skeet [C# MVP]: "Re: Hash table"
- Reply: Jon Skeet [C# MVP]: "Re: Hash table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|