methods to generate an index within the valid range there are many different techniques available for this conversion the simplest approach is to sum the ascii values of the individual characters for exampleif we use this method to hash the string 'hashing'the result will be this approach works well with small hash tables but when used with larger tablesshort strings will not hash to the larger index valuesthey will only be used when probed for examplesuppose we apply this method to strings containing seven characterseach with maximum ascii value of summing the ascii values will yield maximum value of second approach that can provide good results regardless of the string length uses polynomials an- an- sn- sn- sn- where is non-zero constantsi is the ith element of the stringand is the length of the string if we use this method with the string 'hashing'where the resulting hash value will be this value can then be used with the division method to yield an index value within the valid range the hashmap abstract data type one of the most common uses of hash table is for the implementation of map in factpython' dictionary is implemented using hash table with closed hashing the definition of the map adt from allows for the use of any type of comparable keywhich differs from python' dictionary since the latter requires the keys to be hashable that requirement can limit the efficient use of the dictionary since we must define our own hash function for any user-defined types that are to be used as dictionary keys our hash function must produce good results or the dictionary operations may not be very efficient in this sectionwe provide an implementation for the map that is very similar to the approach used in implementing python' dictionary since this version requires the keys to be hashablewe use the name hashmap to distinguish it from the more general map adt for the implementation of the hashmap adtwe are going to use hash table with closed hashing and double hashing probe the source code is provided in listing on the next page the hash table in implementing the hashmap adtwe must first decide how big the hash table should be the hashmap adt is supposed to be general purpose structure that can store any number of key/value pairs to maintain this propertywe must allow the hash table to expand as needed thuswe can start with relatively small table ( and allow it to expand as needed by rehashing each time the load factor is exceeded the next question we need to answer is what load factor