notes the hash table therefore is the one shown below task " hash function must be deterministic and stateless discuss hash functions some of the methods of defining hash function are discussed below modular arithmeticin this methodfirst the key is converted to integerthen it is divided by the size of index rangeand the remainder is taken to be the hash value the spread achieved depends very much on the modulus if modulus is power of small integers like or then many keys tend to map into the same indexwhile other indices remain unused the best choice for modulus is often but not always is prime numberwhich usually has the effect of spreading the keys quite uniformly truncationthis method ignores part of keyand use the remainder part directly as hash value (considering non-numeric fields as their numerical codeif the keys for example are eight digit numbers and the hash table has entriesthen the firstsecondand fifth digit from right might make hash value so maps to it is fast methodbut often fails to distribute keys evenly foldingin this methodthe identifier is partitioned into several parts all but the last part being of the same length these parts are then added together to obtain the hash value for example an eight digit integer can be divided into groups of threethreeand two digits the groups are the added togetherand truncated if necessary to be in the proper range of indices hence maps to truncated to since all information in the key can affect the value of the functionfolding often achieves better spread of indices than truncation mid square methodin this methodthe identifier is squared (considering non-numeric fields as their numerical code)and then the appropriate number of bits from the middle lovely professional university