Time: 20 min

                                                                        QUIZ-6

                        ID:                                           Name:

                        Section:

 

            Question: Explain using examples, why do you prefer ‘XOR’ instead of ‘AND’ in hashing pattern (considering all the bits of strings).Write some characteristics of good hash function.

 

2nd part: Characteristics of good hash function: write all the design principles of class-notes

 

1st part: Give an example to prove AND’s operation on some characters (different, like {a,b,c}, {b,r,d}, etc)  to show their more inclination towards same hash value which increases ‘primary clustering more than ‘XOR’ operation.

 

 

 

 

 

 

            Question: Explain the similarities and dissimilarities between quadratic probing and double hashing. Use examples if needed.

 

Quadratic hash function:  h+i^2 (i=0,1,2,3..)

Double hash function: h,h+h’, h+2h’, h+3h’,…..

If you find a consequence that h’=1, it will partially be similar to double hash function, so on.