Eclyps19
February 13th, 2008, 06:21 AM
I somewhat understand Chain, Linear, and Quadratic hashing, but I am confused about double hashing.
I'd like to know if any of you could help with a couple questions I'm stuck on.
First question I'm stuck on:
Hash the following numbers into a table of size 23 using double hashing. Use 17 for R. {12, 23, 345, 678, 923, 15, 92, 7, 99}
Could someone at least point me in the right direction on this?
Next question:
How can we guarantee that the quadratic problem will be able to place every data element in the table?
--To my knowledge, and from what I've done, quadratic probing is when you do the hash function, you place the item in the next available space instead of next to another item. If this is the case though, it would seem that you wouldn't ALWAYS be able to place every element on the table. What if the number of elements exceeds the table size?
Thanks guys.
I'd like to know if any of you could help with a couple questions I'm stuck on.
First question I'm stuck on:
Hash the following numbers into a table of size 23 using double hashing. Use 17 for R. {12, 23, 345, 678, 923, 15, 92, 7, 99}
Could someone at least point me in the right direction on this?
Next question:
How can we guarantee that the quadratic problem will be able to place every data element in the table?
--To my knowledge, and from what I've done, quadratic probing is when you do the hash function, you place the item in the next available space instead of next to another item. If this is the case though, it would seem that you wouldn't ALWAYS be able to place every element on the table. What if the number of elements exceeds the table size?
Thanks guys.