database - Extendible hashing: why does anyone use most significant bits? -



database - Extendible hashing: why does anyone use most significant bits? -

when coding extendible hashing, 1 has selection of using important bits or to the lowest degree important bits of hash value in order determine bucket hash to. using to the lowest degree important bits has number of advantages:

when double directory, can re-create pointers, instead of having create new directory interleaves them. you can simplify give-and-take of algorithm not talking bits @ all, , using modular arithmetic hashing in general. using 3 to the lowest degree important bits take bucket same h(x) = x mod 2^3. you don't need specify in advance width of binary numbers; if you're using important bits, need have specific bit length in mind.

what can't wrap head around why reference after reference after reference shows extendible hashing done important bits. far can tell, advantage important bits yields diagram on paper (or on screen) doesn't have crossing lines. there reason why many sources important bits instead of least?

i went original source paper fagin, et. al. address this:

"we note if had used suffixes of pseudokeys instead of prefixes, algorithm doubling directory easy: consist of making sec re-create of nonheader portion of directory, after first copy. however, chose utilize prefixes sake of intuitive simplicity (thus, using prefixes keys can accessed in pseudokey order, rather in inverted pseudokey order). "

i don't understand why saw approach more intuitive, dispense whole bit thought , go modular arithmetic instead, appears @ to the lowest degree rationale.

database algorithm hash

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -