Doing such a complex thing reduces "collisions" and makes hashing effective..
Well, I didnt get you fully on dat "4 bytes of string together" ...

I think u should refer to" Article 6.6, Chapter 6(Structures) "in "The
C programming Language by Dennis Rtchie" book..

Its very well explained there...!!

The book can be googled ...its easily available..

Good luck..!!

On 7/26/11, syl <[email protected]> wrote:
> thanks for the info...i saw a method of using 4 bytes of string
> together and then add them and finally take a modulus....doing such a
> complex thing ...is thr any way to recover the string back using the
> key only.....can you give an example where you have seen using hashing
> with strings...that would clarify my doubt to more extent...
>
> On Jul 26, 6:07 pm, Don <[email protected]> wrote:
>> A string hash function typically takes a string as an argument and
>> returns an integer which can be used as an index into a hash table
>> which allows it to be found quickly. The purpose is to relate a string
>> to something else in an efficient way. For instance, a symbol table
>> which stores variable names and needs to quickly find the type and the
>> value (or the address of the value) could use a hash table to avoid
>> having to search through the whole table. There are many theories on
>> the best hash functions for hashing strings. While two different
>> strings may produce the same hash index, a good hash function should
>> produce a reasonably uniform distribution of results, and should
>> produce different results for similar strings. Any hashing method
>> needs to deal with "collisions" or how to handle the case where two
>> strings are hashed to the same index. Some schemes use a linked list
>> or binary tree withing the hash "bucket", and some use a rehash which
>> stores one of the strings somewhere else. If a hash table becomes too
>> full, it can become much less efficient, particularly if the method of
>> resolving collisions is not well designed.
>>
>> Don
>>
>> On Jul 26, 7:49 am, syl <[email protected]> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > can anyone please tell me how to do hashing with strings......just
>> > wanna confirm...and most importantly what is the use of it...i have
>> > never used it....
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to