Files
912-notes/thu_dsa/hash.md

15 lines
464 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Conclusions on Hashing
======================
## 散列函数的设计
散列函数无非一个映射,其功能无非是将词条空间中的元素映射到散列表地址空间,其中前者远远大于后者,所以绝不可能是一个单射
好的散列函数
- 确定性:同一关键码总是被映射到同一地址
- 快速
- 满射:充分利用散列空间
- 均匀避免汇聚clustering。
散列函数
- 除余法
- MAD法
- 折叠法