- Where Developers Learn, Share, & Build Careers
Below page 264 of CLRS, the authors say that after getting r0 = 17612864, the R4 yield is 14 Bits Hash Value H (K) = 67. I do not understand that 67 is 670011 due to 67 in binary 67 which is 7 bits. In the textbook:
Edit In textbooks, suppose we have k = 123456, p = 14, m = 2 ^ 14 = 16384, and w = 32 To optimize suggestion of Nith, we select the fraction of the form A / 2 ^ 32 which is closest (\ Sqrt (5) - 1) / 2, so that A = 2654435769/2 ^ 32 then k * s = 327706022297664 = (76300 * 2 ^ 32) + 17612864, and hence r1 = 76300 and r0 = 17612864. The 14 most important bit values of r0 get H (K) = 67. Its most important is 14 bits which is besides: 17612864 =
0x010CC040 = 0000 0000 1100 1100 0000 0100 0000
0000 0001 0000 11
0x43 , which is
67
int32 input = 17612864; Int32 output = input & gt; & Gt; (32-14); // 67
Comments
Post a Comment