数据结构c语言版李建中版pptchapter8课件.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
数据结构c语言版李建中版pptchapter8课件

CHAPTER 8;Symbol Table;The ADT of Symbol Table;Search vs. Hashing;Static Hashing;Identifier Density and Loading Density;Synonyms;Overflow and Collision;Example;Hashing Functions;M = 2i fD(X) depends on LSBs of X Example. (1) Each character is represented by six bits. (2) Identifiers are right-justified and zero-filled. 000000A1 = … 000001011100 000000B1 = … 000010011100 000000C1 = … 000011011100 00000X41 = … 011000011100 00NTXY1 = … 011000011001011100;(3) Identifiers are left-justified and zero-filled. 60-bit word ;Programs in which many variables are permutations of each other. Example. X=X1X2 Y=X2X1 X1 -- C(X1) X2 -- C(X2) Each character is represented by six bits X: C(X1) * 26 + C(X2) Y: C(X2) * 26 + C(X1) (fD(X) - fD(Y)) % P (where P is a prime number) = C(X1) * 26 % P + C(X2) % P - C(X2) * 26 % P- C(X1) % P P = 3 64 % 3 * C(X1) % 3 + C(X2) % 3 - 64 % 3 * C(X2) % 3- C(X1) % 3 = C(X1) % 3 + C(X2) % 3 - C(X2) % 3- C(X1) % 3 = 0 P = 7? M is a prime number such that M does not divide rk?a for small k and a (Knuth) for example, M = 1009 ;Hashing Functions ;P1;Digital Analysis;Overflow Handling;Data Structure for Hash Table;Hash Algorithm via Division;Example;Linear Probing (linear open addressing);Linear Probing;Problem of Linear Probing;Coalesce Phenomenon;Quadratic Probing;rehashing;Data Structure for Chaining;Chain Insert;Results of Hash Chaining;暇杨邪筛琳渠鹿利举魔旺遣砌咕敛仑粒常敲地窍八痒聋掩风教桂洼忽跃蟹数据结构c语言版李建中版pptchapter8课件数据结构c语言版李建中版pptchapter8课件;dynamic hashing (extensible hashing);*Figure 8.8:Some identifiers requiring 3 bits per character(p.414) ;*Figure 8.9: A trie to hole identifiers(p.415);Extendiable Hashing;If keys do not uniformly divide up among pages, then the directory can glow quite large, but most of entries will point

文档评论(0)

baa89089 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档