Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Binyamin Dissen
Is there a preferred hashing algorithm for such strings? The strings will be fixed length with trailing blanks. I was thinking of simply doing a MOD64 (or higher) of the sum of the non-blank part of the string by words, but as this is text with a limited character set, would this lead to

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread zMan
What's the goal of the hashing -- obfuscation? Shortening the data? On Tue, Jul 27, 2010 at 3:18 PM, Binyamin Dissen bdis...@dissensoftware.com wrote: Is there a preferred hashing algorithm for such strings? The strings will be fixed length with trailing blanks. I was thinking of simply

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Binyamin Dissen
On Tue, 27 Jul 2010 15:32:24 -0400 zMan zedgarhoo...@gmail.com wrote: :What's the goal of the hashing -- obfuscation? Shortening the data? Lookup. Does the entry exist, and if so what are its attributes. If does not exist, add. :On Tue, Jul 27, 2010 at 3:18 PM, Binyamin Dissen

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread zMan
OK, I have a splitting headache and may be dense anyway: how is it easier to look it up once it's hashed? What am I missing? On Tue, Jul 27, 2010 at 3:36 PM, Binyamin Dissen bdis...@dissensoftware.com wrote: On Tue, 27 Jul 2010 15:32:24 -0400 zMan zedgarhoo...@gmail.com wrote: :What's the

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Kirk Talman
Discussion List IBM-MAIN@bama.ua.edu wrote on 07/27/2010 03:18:49 PM: From: Binyamin Dissen bdis...@dissensoftware.com Subject: Hashing algorythm for text strings without embedded blanks Is there a preferred hashing algorithm for such strings? The strings will be fixed length with trailing

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Thomas Kern
This is what I have used in past mainframe applications: http://www.vm.ibm.com/download/packages/descript.cgi?HASHWF /Tom Kern Binyamin Dissen wrote: Is there a preferred hashing algorithm for such strings? The strings will be fixed length with trailing blanks. I was thinking of simply

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Binyamin Dissen
On Tue, 27 Jul 2010 15:43:47 -0400 zMan zedgarhoo...@gmail.com wrote: :OK, I have a splitting headache and may be dense anyway: how is it easier to :look it up once it's hashed? What am I missing? Not easier, faster. Assume 10 strings. A serial search will take on average 5 compares. A

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Hal Merritt
[mailto:ibm-m...@bama.ua.edu] On Behalf Of Binyamin Dissen Sent: Tuesday, July 27, 2010 3:14 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Hashing algorythm for text strings without embedded blanks On Tue, 27 Jul 2010 15:43:47 -0400 zMan zedgarhoo...@gmail.com wrote: :OK, I have a splitting headache and may

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Paul Gilmartin
On Tue, 27 Jul 2010 15:43:08 -0500, Hal Merritt wrote: Am I missing something? Why not use a binary chop search? That is, each compare cuts the universe in half. For a million entries, you would need 20 or less compares. http://en.wikipedia.org/wiki/Binary_search_algorithm Insertion? For

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Binyamin Dissen
:Subject: Re: Hashing algorythm for text strings without embedded blanks : :On Tue, 27 Jul 2010 15:43:47 -0400 zMan zedgarhoo...@gmail.com wrote: : ::OK, I have a splitting headache and may be dense anyway: how is it easier to ::look it up once it's hashed? What am I missing? : :Not easier, faster

Re: Hashing algorythm for text strings without embedded blanks

2010-07-27 Thread Joel C. Ewing
Explanation of hashing functions and table look up: If you have a table with entries identified by a key, one of the typical requirements is to locate a table entry having some given key (or prove the entry doesn't exist). If the range of key values is suitably small so that all key values may