[algogeeks] Re: Hashing with strings

2011-07-26 Thread Don
Usually a hash function is one-way, meaning that you can't recover the original string. That is because there are many more possible values for the string than for the hash index, making the hash function a many-to-one relationship. A very common hash function which I believe was mentioned in Knut

Re: [algogeeks] Re: Hashing with strings

2011-07-26 Thread Puneet Gautam
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...

[algogeeks] Re: Hashing with strings

2011-07-26 Thread syl
thanks for the info...i saw a method of using 4 bytes of string together and then add them and finally take a modulusdoing 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

[algogeeks] Re: Hashing with strings

2011-07-26 Thread Don
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 name