of the square are used to get the hash value since the middle bits of the square usually depend on all the characters in the identifierit is expected that different identifiers will result in different values the number of middle bits that we select depends on table size therefore if is the number of middle bits used to form hash valuethen the table size will be rhence when you use mid square method the table size should be power of notes open hashing the simplest form of open hashing defines each slot in the hash table to be the head of linked list all records that hash to particular slot are placed on that slot' linked list the figure below illustrates hash table where each slot stores one record and link pointer to the rest of the list records within slot' list can be ordered in several waysby insertion orderby key value orderor by frequency-of-access order ordering the list by key value provides an advantage in the case of an unsuccessful searchbecause know to stop searching the list once you encounter key that is greater than the one being searched for if records on the list are unordered or ordered by frequencythen an unsuccessful search will need to visit every record on the list given table of size storing recordsthe hash function will (ideallyspread the records evenly among the positions in the tableyielding on average / records for each list assuming that the table has more slots than there are records to be storedyou can hope that few slots will contain more than one record in the case where list is empty or has only one recorda search requires only one access to the list thusthe average cost for hashing should be th( howeverif clustering causes many records to hash to only few of the slotsthen the cost to access record will be much higher because many elements on the linked list must be searched open hashing is most appropriate when the hash table is kept in main memorywith the lists implemented by standard in-memory linked list storing an open hash table on disk in an efficient way is difficultbecause members of given linked list might be stored on different disk blocks this would result in multiple disk accesses when searching for particular key valuewhich defeats the purpose of using hashing let be the universe of keys(aintegers (bcharacter strings (ccomplex bit patterns lovely professional university