function hash 
Author Message
 function hash

Hello !!!!!!

    I am a student of Computer Sciencie and i am looking for an easy  hash
function that can work with 15 o more characters... It's for working in a
table of 500-1000 elements. ANY idea?

Thanks !!!!!

--
--
 Ignacio Robledo Rosell

  http://www.*-*-*.com/ ~g990406
 ****************************************
 "When code matters more than comercials"
 ****************************************



Fri, 14 Nov 2003 06:07:19 GMT  
 function hash

Quote:

> Hello !!!!!!

>     I am a student of Computer Sciencie and i am looking for an easy  hash
> function that can work with 15 o more characters... It's for working in a
> table of 500-1000 elements. ANY idea?

You might find the package GNAT.HTable to be useful.

This package is included in the public GNAT distribution.

Jim Rogers
Colorado Springs, Colorado USA



Fri, 14 Nov 2003 08:23:07 GMT  
 function hash

Quote:

>     I am a student of Computer Sciencie and i am looking for an easy  hash
> function that can work with 15 o more characters... It's for working in a
> table of 500-1000 elements. ANY idea?

You might find the article "Fast Hashing of Variable-Length Text
Strings," by P. K. Pearson (CACM 1990 Jun) of interest. It describes a
fast "hashing function specifically tailored to variable-length text
strings."

An implementation of this function is part of the PragmAda Reusable
Components, available from

http://home.earthlink.net/~jrcarter010/pragmarc.htm

or from the mirror at www.adapower.com.

--
Jeff Carter
"Your mother was a hamster and your father smelt of elderberries."
Monty python & the Holy Grail



Fri, 14 Nov 2003 14:47:55 GMT  
 function hash
Thank you very much !!!!! all the information is very
usefull ... thanks again

--
--
 Ignacio Robledo Rosell

 http://zipi.fi.upm.es/~g990406
 ****************************************
 "When code matters more than comercials"
 ****************************************



Sat, 15 Nov 2003 01:04:51 GMT  
 function hash

Quote:

> You might find the article "Fast Hashing of Variable-Length Text
> Strings," by P. K. Pearson (CACM 1990 Jun) of interest. It describes a
> fast "hashing function specifically tailored to variable-length text
> strings."

> An implementation of this function is part of the PragmAda Reusable
> Components, available from

> http://home.earthlink.net/~jrcarter010/pragmarc.htm

A hash function returning only 256 different values?  Are there any
applications for it?


Mon, 17 Nov 2003 04:48:08 GMT  
 function hash

Quote:

> A hash function returning only 256 different values?  Are there any
> applications for it?

Given the original poster's requirements of handling 500-1000 elements,
that's only 2-4 per bin, so it seemed suitable.

--
Jeff Carter
"We call your door-opening request a silly thing."
Monty Python & the Holy Grail



Mon, 17 Nov 2003 08:45:14 GMT  
 function hash

Quote:


> > A hash function returning only 256 different values?  Are there any
> > applications for it?

> Given the original poster's requirements of handling 500-1000 elements,
> that's only 2-4 per bin, so it seemed suitable.

In particular with long strings, this will result in a measurable
performance degradation in comparison to a real hash function because
of the necessity to perform additional key comparisons.


Mon, 17 Nov 2003 15:22:09 GMT  
 function hash
Quote:
>A hash function returning only 256 different values?  Are there any
>applications for it?

  Anytime cutting the size of a search by a factor of 256 seems useful.
Or a cheap test to see whether it's worth an expensive comparison to
check for a match with one of a few objects.


Mon, 17 Nov 2003 15:13:08 GMT  
 function hash

Quote:



> > > A hash function returning only 256 different values?  Are there any
> > > applications for it?

> > Given the original poster's requirements of handling 500-1000 elements,
> > that's only 2-4 per bin, so it seemed suitable.

> In particular with long strings, this will result in a measurable
> performance degradation in comparison to a real hash function because
> of the necessity to perform additional key comparisons.

I don't understand. If there are only 256 bins (not unreasonable) then
there are *bound* to be collisions for a large key space (eg all the
sentences in Jane Eyre).

If you need a perfect hash (eg for the reserved words in Ada) that's
quite a different problem.



Tue, 18 Nov 2003 03:21:17 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Hash.new(Hash.new) doesn't use Hash.new as default value

2. Text-to-Numeric hashing function

3. hash function for strings

4. Hashing Function: Anyone know a good one?

5. Hashing Function: Anyone know a good one?

6. Looking for high-quality hashing function for dynamic linker

7. Looking for high-quality hashing function for dynamic linker

8. Scanner Hash Function in OCS

9. Looking for high-quality hashing function for dynamic linker

10. Near Final PEP 247 - API for Cryptographic Hash Functions

11. hashing function for strings

12. hashing functions

 

 
Powered by phpBB® Forum Software