Presentation is loading. Please wait.

Presentation is loading. Please wait.

Extendable hashing M.B.Chandak.

Similar presentations


Presentation on theme: "Extendable hashing M.B.Chandak."— Presentation transcript:

1 Extendable hashing M.B.Chandak

2 Extendible hashing Keys 64 Width Bits (2) Bits (3) 288 32 100000 10 100 8 001000 00 001 1064 40 101000 101 120 56 111000 11 111 148 20 010100 01 010 204 12 001100 641 1 000001 000 700 60 111100 258 2 000010 1586 50 110010 110 44 101100 Two bit hash table 00 01 10 11 8 148 288 120 204 1064 700 641 44 1586 258 In above hash table, “00” bucket is completely occupied. If new element is to be added is 68 Then 68 mod 64 = 4, binary(4) = If first two bits are used then 68 is mapped to bucket “00”, which results in collision.

3 How to handle collision
Keys 64 Width Bits (2) Bits (3) 288 32 100000 10 100 8 001000 00 001 1064 40 101000 101 120 56 111000 11 111 148 20 010100 01 010 204 12 001100 641 1 000001 000 700 60 111100 258 2 000010 1586 50 110010 110 44 101100 68 4 000100 The bucket 000 and 001 are added as bucket 00 is full The bucket 01, 10 and 11 remains same with g=2 000 001 01 10 11 010 011 100 101 110 111 641 8 148 288 120 258 204 1064 700 68 44 1586


Download ppt "Extendable hashing M.B.Chandak."

Similar presentations


Ads by Google