step add the individual parts that isobtain the sum of kn the hash value is produced by ignoring the last carryif any note that the number of digits in each part of the key will vary depending upon the size of the hash table for exampleif the hash table has size of then there are locations in the hash table to address these locationswe need at least three digitsthereforeeach part of the key must have three digits except the last part which may have lesser digits example given hash table of locationscalculate the hash value using folding method for keys and solution since there are memory locations to addresswe will break the key into parts where each part (except the lastwill contain two digits the hash values can be obtained as shown belowkey parts sum hash value and (ignore the last carry and and collisions as discussed earlier in this collisions occur when the hash function maps two different keys to the same location obviouslytwo records cannot be stored in the same location thereforea method used to solve the problem of collisionalso called collision resolution techniqueis applied the two most popular methods of resolving collisions are open addressing chaining in this sectionwe will discuss both these techniques in detail collision resolution by open addressing once collision takes placeopen addressing or closed hashing computes new positions using probe sequence and the next record is stored in that position in this techniqueall the values are stored in the hash table the hash table contains two types of valuessentinel values ( - and data values the presence of sentinel value indicates that the location contains no data value at present but can be used to hold value when key is mapped to particular memory locationthen the value it holds is checked if it contains sentinel valuethen the location is free and the data value can be stored in it howeverif the location already has some data value stored in itthen other slots are examined systematically in the forward direction to find free slot if even single free location is not foundthen we have an overflow condition the process of examining memory locations in the hash table is called probing open addressing technique can be implemented using linear probingquadratic probingdouble hashingand rehashing linear probing the simplest approach to resolve collision is linear probing in this techniqueif value is already stored at location generated by ( )then the following hash function is used to resolve the collisionh(ki[hc/(kimod