several different 'sthen there will still be collisions the mad method more sophisticated compression functionwhich helps eliminate repeated pat terns in set of integer keys is the multiply add and divide (or "mad"method this method maps an integer to |ai bmod nwhere is prime numberand (called scaling factorand > (called shiftare integer constants randomly chosen at the time the compression function is determined so that mod this compression function is chosen in order to eliminate repeated patterns in the set of hash codes and get us closer to having "goodhash functionthat isone such that the probability any two different keys collide is / this good behavior would be the same as we would have if these keys were "throwninto uniformly at random with compression function such as thiswhich spreads integers fairly evenly in the range [ , ]and hash code that transforms the keys in our map into integerswe have an effective hash function togethersuch hash function and bucket array define the main ingredients of the hash table implementation of the map adt but before we can give the details of how to perform such operations as putgetand removewe must first resolve the issue of how we will be handling collisions collision-handling schemes the main idea of hash table is to take bucket arrayaand hash functionhand use them to implement map by storing each entry ( ,vin the "bucketa [ ( )this simple idea is challengedhoweverwhen we have two distinct keysk and such that ( ( the existence of such collisions prevents us from simply inserting anew entry ( ,vdirectly in the bucket [ ( )they also complicate our procedure for performing the get( )put(kv)and remove(koperations separate chaining simple and efficient way for dealing with collisions is to have each bucket [istore small mapm implemented using listas described in section holding entries (kvsuch that (ki that iseach separate chains together the entries that hash to index in linked list this collision resolution rule is known as separate chaining assuming that we initialize each bucket [ito be