{"id":541,"date":"2020-08-26T15:34:22","date_gmt":"2020-08-26T07:34:22","guid":{"rendered":"https:\/\/www.notown.club\/?p=541"},"modified":"2020-08-26T15:38:46","modified_gmt":"2020-08-26T07:38:46","slug":"%e5%93%88%e5%b8%8c%e5%86%b2%e7%aa%81%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e5%8f%8a%e5%93%88%e5%b8%8c%e5%87%bd%e6%95%b0%e7%9a%84%e6%9e%84%e9%80%a0%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.notown.top\/?p=541","title":{"rendered":"\u54c8\u5e0c\u51b2\u7a81\u7684\u89e3\u51b3\u65b9\u6cd5\u53ca\u54c8\u5e0c\u51fd\u6570\u7684\u6784\u9020\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u5728\u5143\u7d20\u7684\u5173\u952e\u5b57k\u548c\u5143\u7d20\u7684\u5b58\u50a8\u4f4d\u7f6ep\u4e4b\u95f4\u5efa\u7acb\u4e00\u4e2a\u5bf9\u5e94\u7684\u5173\u7cfbf\uff0c\u4f7f\u5f97p= f(k)\uff0c\u5176\u4e2df\u5c31\u79f0\u4e3a<strong>\u54c8\u5e0c\u51fd\u6570<\/strong>\u3002\u63d2\u5165\u6570\u636e\u65f6\uff0c\u628a\u5173\u952e\u5b57\u4e3ak\u7684\u5143\u7d20\u76f4\u63a5\u5b58\u5165f(k)\u7684\u4f4d\u7f6e\uff0c\u4ee5\u540e\u5f53\u67e5\u627e\u5173\u952e\u5b57\u4e3ak\u7684\u5143\u7d20\u65f6\uff0c\u5c31\u76f4\u63a5\u627ef(k)\u7684\u4f4d\u7f6e\uff0c\u4ece\u800c\u8fbe\u5230\u4e86\u5173\u952e\u5b57\u76f4\u63a5\u5b58\u53d6\u5143\u7d20\u7684\u76ee\u7684\u3002<\/p>\n\n\n\n<p>\u56e0\u4e3a\u54c8\u5e0c\u51fd\u6570\u603b\u662f\u4e0d\u5b8c\u7f8e\u7684\uff0c\u5f53\u5173\u952e\u5b57\u96c6\u5408\u5f88\u5927\u65f6\uff0c\u5173\u952e\u5b57\u503c\u4e0d\u540c\u7684\u5143\u7d20\u53ef\u80fd\u4f1a\u6620\u5c04\u5230\u54c8\u5e0c\u8868\u4e2d\u7684\u540c\u4e00\u4e2a\u5730\u5740\u4e0a\uff0c\u5373k1!=k2\uff0c\u4f46f(k1)==f(k2)\u3002\u8fd9\u5c31\u662f<strong>\u54c8\u5e0c\u51b2\u7a81<\/strong>\u3002<\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u54c8\u5e0c\u51b2\u7a81\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e00\u3001\u5f00\u653e\u5b9a\u5740\u6cd5<\/strong><\/p>\n\n\n\n<p>\u63d2\u5165\u5143\u7d20\u65f6\uff0c\u5148\u6839\u636e\u5143\u7d20\u5173\u952e\u5b57\uff0c\u7b97\u51fa\u5143\u7d20\u5728\u54c8\u5e0c\u8868\u4e2d\u7684\u4f4d\u7f6e\uff0c\u5982\u679c\u51fa\u73b0\u4e86\u51b2\u7a81\uff0c\u4f7f\u7528\u67d0\u79cd\u63a2\u6d4b\u6280\u672f\u5728\u6563\u5217\u8868\u4e2d\u5f62\u6210\u4e00\u4e2a<strong>\u63a2\u6d4b\u5e8f\u5217<\/strong>\uff0c\u6cbf\u6b64\u5e8f\u5217\u9010\u4e2a\u4f4d\u7f6e\u5f80\u4e0b\u8d70\uff0c\u76f4\u5230\u78b0\u5230\u7a7a\u7684\u4f4d\u7f6e\uff08\u5f00\u653e\u7684\u5730\u5740\uff09\u5c31\u8fdb\u884c\u63d2\u5165\u3002<br>\u67e5\u627e\u5143\u7d20\u7684\u65f6\u5019\uff0c\u540c\u6837\u5148\u6839\u636e\u5143\u7d20\u5173\u952e\u5b57\uff0c\u8ba1\u7b97\u51fa\u5143\u7d20\u5728\u54c8\u5e0c\u8868\u4e2d\u7684\u4f4d\u7f6e\uff0c\u5982\u679c\u8be5\u4f4d\u7f6e\u4e0a\u7684\u5143\u7d20\u7684\u5173\u952e\u5b57\u5e76\u4e0d\u662f\u6211\u4eec\u9700\u8981\u67e5\u627e\u7684\u5219\u6309\u63a2\u6d4b\u5e8f\u5217\u5f80\u4e0b\u8d70\uff0c\u76f4\u5230\u627e\u5230\u6240\u9700\u5143\u7d20\u6216\u8005\u9047\u5230\u7a7a\u7684\u4f4d\u7f6e\uff08\u5f00\u653e\u7684\u5730\u5740\uff09\u5219\u5224\u5b9a\u4e3a\u4e0d\u5b58\u5728\u8be5\u5143\u7d20\u3002<\/p>\n\n\n\n<p><strong>Note: \u7528\u5f00\u653e\u5b9a\u5740\u5efa\u7acb\u6563\u5217\u8868\u65f6\uff0c\u5efa\u8868\u65f6\uff0c\u5e94\u8be5\u5c06\u8868\u4e2d\u7684\u6240\u6709\u5355\u5143\uff08\u5355\u5143\u4e2d\u5b58\u50a8\u7684\u5173\u952e\u5b57\uff09\u7f6e\u7a7a\u3002<\/strong><\/p>\n\n\n\n<p>\u5f62\u6210\u63a2\u6d4b\u5e8f\u5217\u7684\u65b9\u6cd5\u6709\u4e3b\u8981\u6709\u4e09\u79cd\uff1a<strong>\u7ebf\u6027\u63a2\u6d4b\u6cd5\u3001\u7ebf\u6027\u8865\u507f\u63a2\u6d4b\u6cd5\u3001\u968f\u673a\u63a2\u6d4b\u6cd5<\/strong><\/p>\n\n\n\n<p>1\u3001\u7ebf\u6027\u63a2\u6d4b\u6cd5<br>\u5c06\u6563\u5217\u8868T(0,1, &#8230; ,m-1)\u770b\u6210\u662f\u4e00\u4e2a\u5faa\u73af\u7684\u5411\u91cf\uff0c\u82e5\u521d\u59cb\u63a2\u6d4b\u7684\u5730\u5740\u4e3ad ( d= f(key))\uff0c\u5219\u6700\u957f\u7684\u63a2\u6d4b\u5e8f\u5217\u4e3a\uff1a<br>d, d+1, d+2, &#8230; , m-1 , 0 ,  1 , &#8230; ,d-1<br>\u6216\u8005\u7528\u51fd\u6570\u5f62\u5f0f\u8868\u793a\u63a2\u6d4b\u5e8f\u5217<br>arr = ( f ( key ) + i ) % m                        (0 \u2264 i \u2264 m-1)<\/p>\n\n\n\n<p>\u7ebf\u6027\u63a2\u6d4b\u6cd5\u5904\u7406\u51b2\u7a81\uff0c\u601d\u8def\u6e05\u6670\uff0c\u7b97\u6cd5\u7b80\u5355\uff0c\u4f46\u5b58\u5728\u4ee5\u4e0b<strong>\u7f3a\u70b9<\/strong>\uff1a<br>\u2460\u5f53\u6574\u4e2a<strong>\u54c8\u5e0c\u8868\u90fd\u88ab\u586b\u6ee1\u7684\u65f6\u5019\u9700\u8981\u53e6\u4f5c\u5904\u7406<\/strong>\uff0c\u6bd4\u5982\u518d\u5efa\u7acb\u4e00\u4e2a\u987a\u5e8f\u8868\u6765\u5b58\u50a8\u6ea2\u51fa\u6570\u636e<br>\u2461\u51fa\u73b0\u54c8\u5e0c\u51b2\u7a81\u4f1a<strong>\u4f7f\u5220\u9664\u5de5\u4f5c\u53d8\u5f97\u56f0\u96be<\/strong>\uff0c\u56e0\u4e3a\u51fa\u73b0\u54c8\u5e0c\u51b2\u7a81\u65f6\uff0c\u4f1a\u6309\u63a2\u6d4b\u5e8f\u5217\u4e00\u8def\u8d70\u4e0b\u53bb\u67e5\u627e\u6240\u9700\u5143\u7d20\uff0c\u5982\u679c\u4e2d\u95f4\u67d0\u4e2a\u5143\u7d20\u88ab\u5220\u4e86\uff0c\u5c31\u4f1a\u76f4\u63a5\u8fd4\u56de\u67e5\u627e\u4e0d\u5230\u3002\u56e0\u6b64\u5220\u9664\u4e0d\u80fd\u662f\u771f\u6b63\u7684\u5220\u9664\uff0c\u53ea\u80fd\u7ed9\u8981\u5220\u9664\u7684\u5143\u7d20\u6807\u4e0a\u6807\u8bb0<br>\u2462\u7ebf\u6027\u63a2\u6d4b\u6cd5\u5bb9\u6613<strong>\u4ea7\u751f\u5806\u805a\u73b0\u8c61<\/strong>\u3002\u5806\u805a\u73b0\u8c61\u5c31\u662f\u6307\u5728\u54c8\u5e0c\u8868\u91cc\uff0c\u5143\u7d20\u5f88\u5bb9\u6613\u5360\u636e\u8fde\u7eed\u7684\u4f4d\u7f6e\uff0c\u5e76\u4e14\u5f62\u6210\u4e00\u5927\u7247\uff0c\u540c\u65f6\u5f62\u6210\u6b63\u53cd\u9988\uff0c\u8d8a\u6765\u8d8a\u5bb9\u6613\u7ed3\u5757\u3002\u800c\u4e00\u65e6\u5806\u805a\u7684\u8bdd\uff0c\u54c8\u5e0c\u8868\u7684\u6548\u7387\u5c31\u4f1a\u53d8\u6210O(n)<\/p>\n\n\n\n<p>2\u3001\u7ebf\u6027\u8865\u507f\u63a2\u6d4b\u6cd5<br>\u7ebf\u6027\u8865\u507f\u63a2\u6d4b\u6cd5\u76f8\u5f53\u4e8e\u7ebf\u6027\u63a2\u6d4b\u6cd5\u7684<strong>\u6b65\u957f\u4ece1\u6539\u5230k<\/strong>\uff0c\u5373\u63a2\u6d4b\u5e8f\u5217\u7684\u51fd\u6570\u8868\u793a\u4e3a\uff1a<br>arr = ( f (key) +ki ) % m                   (0 \u2264 i \u2264 m-1 , k\u4e0em\u4e92\u8d28)<br><strong>\u76f8\u5bf9\u4e8e\u7ebf\u6027\u63a2\u6d4b\u6cd5\u800c\u8a00\uff0c\u53ef\u80fd\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u51cf\u5c11\u4e86\u5806\u805a\u73b0\u8c61<\/strong><\/p>\n\n\n\n<p>3\u3001\u968f\u673a\u63a2\u6d4b\u6cd5<br>\u5c06\u7ebf\u6027\u63a2\u6d4b\u7684\u6b65\u957f\u4ece\u5e38\u6570\u6539\u4e3a\u968f\u673a\u6570\uff0c\u5728\u5b9e\u9645\u7a0b\u5e8f\u4e2d\u5e94<strong>\u9884\u5148\u7528\u968f\u673a\u6570\u53d1\u751f\u5668\u4ea7\u751f\u4e00\u4e2a\u968f\u673a\u5e8f\u5217<\/strong>\uff0c\u5c06\u6b64\u5e8f\u5217\u4f5c\u4e3a\u4f9d\u6b21\u63a2\u6d4b\u7684\u6b65\u957f\u3002<br><strong>\u76f8\u5bf9\u4e8e\u7ebf\u6027\u63a2\u6d4b\u6cd5\u800c\u8a00\uff0c\u4e5f\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u51cf\u5c11\u4e86\u5806\u805a\u73b0\u8c61<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e8c\u3001\u518d\u54c8\u5e0c\u6cd5<\/strong><\/p>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u5c31\u662f<strong>\u6784\u9020\u591a\u4e2a\u4e0d\u540c\u7684\u54c8\u5e0c\u51fd\u6570<\/strong>f1,f2, &#8230; \u3002<br>\u5f53\u63d2\u5165\u5143\u7d20\uff08\u5143\u7d20\u5173\u952e\u5b57\u4e3akey\uff09\u65f6\uff0c\u5148\u5230 f1(key)\u7684\u4f4d\u7f6e\uff0c\u5982\u679c\u51fa\u73b0\u4e86\u51b2\u7a81\uff0c\u5219\u5230 f2(key)\u7684\u4f4d\u7f6e\uff0c\u4f9d\u6b21\u7c7b\u63a8\u3002<br>\u5f53\u67e5\u627e\u5143\u7d20\uff08\u5143\u7d20\u5173\u952e\u5b57\u4e3akey\uff09\u65f6\uff0c\u5148\u5230f1(key)\u7684\u4f4d\u7f6e\uff0c\u5982\u679cf1(key)\u662f\u7a7a\u4f4d\u7f6e\uff08\u5f00\u653e\u5730\u5740\uff09\uff0c\u5219\u8fd4\u56de\u627e\u4e0d\u5230\uff0c\u5982\u679c\u8be5\u4f4d\u7f6e\u4e0a\u5143\u7d20\u7684\u5173\u952e\u5b57\u5c31\u662f\u6240\u9700\uff0c\u5219\u8fd4\u56de\u8be5\u503c\uff0c\u5426\u5219\u5c31\u7ee7\u7eed\u627ef2(key)\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002<br><strong>\u7279\u70b9\uff1a\u4e0d\u6613\u4ea7\u751f\u5806\u805a\uff0c\u4f46\u589e\u52a0\u4e86\u8ba1\u7b97\u65f6\u95f4\uff0c\u5e76\u4e14\u4e0d\u80fd\u4fdd\u8bc1\u5728\u5143\u7d20\u4e2a\u6570\u5c11\u4e8e\u54c8\u5e0c\u8868\u5bb9\u91cf\u7684\u65f6\u5019\u80fd\u7a33\u5b9a\u63d2\u5165\u5143\u7d20<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e09\u3001\u94fe\u5730\u5740\u6cd5<\/strong><\/p>\n\n\n\n<p>\u53ef\u4ee5\u7406\u89e3\u4e3a\u54c8\u5e0c\u51fd\u6570\u8ba1\u7b97\u51fa\u6765\u7684\u5730\u5740\u5b58\u50a8\u7684\u4e0d\u662f\u4e00\u4e2a\u5143\u7d20\uff0c\u800c\u662f<strong>\u5b58\u50a8\u4e86\u4e00\u4e2a\u5355\u94fe\u8868\u7684\u5934\u6307\u9488<\/strong>\u3002<br>\u5f53\u63d2\u5165\u5143\u7d20\uff08\u5143\u7d20\u5173\u952e\u5b57\u4e3akey\uff09\u65f6\uff0c\u901a\u8fc7f (key)\u8ba1\u7b97\u51fa\u4e00\u4e2a\u94fe\u8868\u7684\u9996\u5730\u5740\uff0c\u5e76\u4e14\u6309\u7167\u5c3e\u63d2\u6cd5\u7684\u65b9\u5f0f\u63d2\u5165\u5143\u7d20\u3002<br>\u5f53\u67e5\u627e\u5143\u7d20\uff08\u5143\u7d20\u5173\u952e\u5b57\u4e3akey\uff09\u65f6\uff0c\u901a\u8fc7f (key)\u8ba1\u7b97\u51fa\u4e00\u4e2a\u94fe\u8868\u7684\u9996\u5730\u5740\uff0c\u6309\u7167\u987a\u5e8f\u904d\u5386\u7684\u65b9\u5f0f\u67e5\u627e\u5143\u7d20\u3002<br>\u7279\u70b9\uff1a\u4e0d\u4f1a\u51fa\u73b0\u54c8\u5e0c\u8868\u6ea2\u51fa\u7684\u60c5\u51b5\u3001\u63d2\u5165\u5220\u9664\u64cd\u4f5c\u65b9\u4fbf\uff0c\u4f46\u662f\u4e00\u65e6<strong>\u5f53\u5143\u7d20\u4e2a\u6570\u8fdc\u5927\u4e8e\u54c8\u5e0c\u8868\u57fa\u672c\u5bb9\u91cf\u7684\u60c5\u51b5\uff0c\u63d2\u5165\u5220\u9664\u64cd\u4f5c\u5c31\u76f8\u5f53\u4e8eO(n)\uff0c\u5373\u904d\u5386\u94fe\u8868\u7684\u590d\u6742\u5ea6<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u56db\u3001\u5efa\u7acb\u516c\u5171\u6ea2\u51fa\u533a<\/strong><\/p>\n\n\n\n<p>\u5c06\u54c8\u5e0c\u8868\u5206\u4e3a<strong>\u57fa\u672c\u8868<\/strong>\u548c<strong>\u6ea2\u51fa\u8868<\/strong>\u4e24\u90e8\u5206\uff0c\u4e24\u4e2a\u8868\u7684\u54c8\u5e0c\u51fd\u6570\u76f8\u540c\uff0c\u51e1\u662f\u548c\u57fa\u672c\u8868\u53d1\u751f\u51b2\u7a81\u7684\u5143\u7d20\uff0c\u4e00\u5f8b\u586b\u5165\u6ea2\u51fa\u8868\u3002<br><strong>\u7279\u70b9\uff1a\u4e0d\u80fd\u4fdd\u8bc1\u5728\u5143\u7d20\u4e2a\u6570\u5c11\u4e8e\u54c8\u5e0c\u8868\u5bb9\u91cf\u7684\u65f6\u5019\u80fd\u7a33\u5b9a\u63d2\u5165\u5143\u7d20\uff08\u6bd4\u5982\u53ea\u6709\u4e00\u4e2a\u57fa\u672c\u8868\u4e00\u4e2a\u6ea2\u51fa\u8868\uff0c\u800c\u63d2\u5165\u4e86\u54c8\u5e0c\u51fd\u6570\u8ba1\u7b97\u51fa\u76f8\u540c\u5730\u5740\u7684\u4e09\u4e2a\u4e0d\u540c\u5143\u7d20\uff0c\u6700\u540e\u4e00\u4e2a\u5143\u7d20\u63d2\u5165\u65f6\u5c31\u4f1a\u5931\u8d25\uff09<\/strong><\/p>\n\n\n\n<p class=\"has-large-font-size\"><strong>\u54c8\u5e0c\u51fd\u6570\u7684\u6784\u9020\u65b9\u6cd5<\/strong><\/p>\n\n\n\n<p>\u6784\u9020\u539f\u5219\uff1a<br>\u2460\u51fd\u6570\u672c\u8eab\u4fbf\u4e8e\u8ba1\u7b97<br>\u2461\u8ba1\u7b97\u51fa\u6765\u7684\u5730\u5740\u5206\u5e03\u5747\u5300\uff08\u5373\u5bf9\u4efb\u610f\u5173\u952e\u5b57k\uff0cf(k)\u5bf9\u5e94\u4e0d\u540c\u5730\u5740\u7684\u6982\u7387\u76f8\u7b49\uff0c\u76ee\u7684\u662f\u5c3d\u53ef\u80fd\u51cf\u5c11\u51b2\u7a81\uff09<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e00\u3001\u6570\u5b57\u5206\u6790\u6cd5<\/strong><\/p>\n\n\n\n<p>\u5982\u679c<strong>\u4e8b\u5148\u77e5\u9053\u5173\u952e\u5b57\u7684\u96c6\u5408\uff0c\u5e76\u4e14\u5173\u952e\u5b57\u7684\u4f4d\u6570\u6bd4\u54c8\u5e0c\u8868\u7684\u5730\u5740\u7801\u4f4d\u591a\u65f6<\/strong>\uff0c\u53ef\u4ee5\u4ece\u5173\u952e\u5b57\u4e2d\u9009\u51fa\u5206\u5e03\u8f83\u5747\u5300\u7684\u82e5\u5e72\u4f4d\uff0c\u6784\u6210\u54c8\u5e0c\u5730\u5740\u3002<br>\u4f8b\u5982\uff1a\u6211\u4eec\u670950\u4e2a\u5143\u7d20\uff0c\u5173\u952e\u5b57\u53ef\u8868\u793a\uff08\u7f16\u7801\uff09\u4e3a6\u4f4d\u5341\u8fdb\u5236\u7684\u6574\u6570\uff0cd1d2d3d4d5d6\uff0c\u5982\u679c\u54c8\u5e0c\u8868\u5bb9\u91cf\u53d6100\uff0c\u5219\u54c8\u5e0c\u8868\u5730\u5740\u7a7a\u95f4\u4e3a00~99\u3002\u5047\u8bbe\u7ecf\u8fc7\u5206\u6790\uff0c\u5404\u5173\u952e\u5b57\u4e2dd2\u548cd6\u53d6\u503c\u76f8\u5bf9\u5747\u5300\uff0c\u5219\u54c8\u5e0c\u51fd\u6570f (key) = f(  d1d2d3d4d5d6) = d2d6\u3002\u5c31\u6bd4\u5982 f(123456)=26\u3002<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e8c\u3001\u5e73\u65b9\u53d6\u4e2d\u6cd5<\/strong><\/p>\n\n\n\n<p>\u5982\u679c\u65e0\u6cd5\u786e\u5b9a\u5173\u952e\u5b57\u4e2d\u54ea\u51e0\u4f4d\u5206\u5e03\u8f83\u5747\u5300\u65f6\uff0c\u53ef\u4ee5<strong>\u5148\u6c42\u51fa\u5173\u952e\u5b57\u7684\u5e73\u65b9\u503c\uff0c\u7136\u540e\u6309\u9700\u8981\u53d6\u5e73\u5747\u503c\u7684\u4e2d\u95f4\u51e0\u4f4d\u4f5c\u4e3a\u54c8\u5e0c\u5730\u5740<\/strong>\u3002\u56e0\u4e3a\uff0c\u5e73\u65b9\u540e\u4e2d\u95f4\u51e0\u4f4d\u548c\u5173\u952e\u5b57\u4e2d\u6bcf\u4e00\u4f4d\u90fd\u76f8\u5173\uff0c\u6545\u4e0d\u540c\u5173\u952e\u5b57\u4f1a\u4ee5\u8f83\u9ad8\u6982\u7387\u4ea7\u751f\u4e0d\u540c\u7684\u54c8\u5e0c\u5730\u5740\u3002<br>\u4f8b\u5982\uff1a\u6211\u4eec\u628a\u82f1\u6587\u5b57\u6bcd\u5728\u5b57\u6bcd\u8868\u4e2d\u7684\u4f4d\u7f6e\u5e8f\u53f7\u4f5c\u4e3a\u8be5\u82f1\u6587\u5b57\u6bcd\u7684\u5185\u90e8\u7f16\u7801\u3002\u4f8b\u5982K\u662f\u7b2c\u5341\u4e00\u4f4d\uff0c\u7f16\u7801\u4e3a11\uff0cE\u4e3a05\uff0cY\u4e3a25\uff0cA\u4e3a01\uff0cB\u4e3a02\u3002\u4e8e\u662f\u53ef\u5f97&#8221;KEYA&#8221;,&#8221;KEYB&#8221;,&#8221;AKEY&#8221;,&#8221;BKEY&#8221;\u7684\u7f16\u7801\uff0c\u5c06\u5176\u5e73\u65b9\u540e\u53d6\u4e2d\u95f4\u4e09\u4f4d\u5373\u53ef\u5f53\u4f5c\u5176\u5bf9\u4e8e\u7684\u54c8\u5e0c\u5730\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+------+----------+-----------------+--------------+\n | key_ | Encoding | After_Pow       | Hash_address|\n +------+----------+-----------------+-------------+\n | AKEY | 01110525 | 001233265775625 | 265         |\n | BKEY | 02110525 | 004454315775625 | 315         |\n | KEYA | 11050201 | 122157778355001 | 778         |\n | KEYB | 11050202 | 126564795010404 | 795         |\n +------+----------+-----------------+-------------+<\/pre>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u4e09\u3001\u5206\u6bb5\u53e0\u52a0\u6cd5<\/strong><\/p>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u662f<strong>\u8ba9\u5173\u952e\u5b57\u5206\u6bb5\u76f8\u52a0\u5f97\u5230\u5730\u5740<\/strong>\uff0c\u5177\u4f53\u600e\u4e48\u5206\u6bb5\u8981\u770b\u54c8\u5e0c\u8868\u7684\u5730\u5740\u4f4d\u6570\u3002\u6bd4\u5982\u54c8\u5e0c\u8868\u7684\u5bb9\u91cf\u5c31\u662f1000\uff0c\u5219\u5b83\u662f\u4e09\u4f4d\u5341\u8fdb\u5236\u7684\u54c8\u5e0c\u5730\u5740\uff08000~999\uff09\u3002\u90a3\u4e48\u5173\u952e\u5b57\u4e5f\u8981\u6574\uff08\u7f16\u7801\uff09\u6210\u5341\u8fdb\u5236\uff0c\u5e76\u4e14\u6bcf\u4e09\u4f4d\u5212\u5206\u4e3a\u4e00\u6bb5\uff0c\u6700\u540e\u76f8\u52a0\u3002\u76f8\u52a0\u65f6\u5982\u679c\u662f\u76f4\u63a5\u76f8\u52a0\u5c31\u79f0\u4e3a\u79fb\u4f4d\u6cd5\uff0c\u5982\u679c\u65f6\u6298\u53e0\u76f8\u52a0\u5c31\u79f0\u4e3a\u6298\u53e0\u6cd5\uff0c\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">   1  2  3               1  2  3\n   4  5  6               6  5  4\n+  7  8              +   7  8\n--------------      ----------------\n1  3  5  9            1  5  5  7\n\uff08\u79fb\u4f4d\u6cd5\uff09        \uff08\u6298\u53e0\u6cd5\uff1a\u5947\u6570\u884c\u6b63\u5e38\u6446\u653e\uff0c\u5076\u6570\u884c\u53cd\u7740\u653e\uff09<\/pre>\n\n\n\n<p>\u6700\u540e\u53d6\u540e\u4e09\u4f4d\u4f5c\u4e3a\u54c8\u5e0c\u5730\u5740\u5373\u53ef<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>\u56db\u3001\u9664\u7559\u4f59\u6570\u6cd5<\/strong><\/p>\n\n\n\n<p>\u5047\u58f0\u54c8\u5e0c\u8868\u957f\u4e3am\uff0cp\u4e3a\u5c0f\u4e8e\u7b49\u4e8em\u7684\u6700\u5927\u7d20\u6570\uff0c\u5219\u54c8\u5e0c\u51fd\u6570\u4e3af (k ) = k % p<br>\u4f8b\u5982\uff1a\u5df2\u77e5\u6563\u5217\u5143\u7d20\u4e3a( 18 ,75, 60, 43, 54, 90, 46)\uff0c\u8868\u957fm = 10\uff0cp=7\uff0c\u5219\u6709<br>f (18) = 18%7=4 \uff0cf(75) = 75 % 7 =5 \uff0cf(60) = 60 % 7 =4<br>f (43) = 43%7=1 \uff0cf(54) = 54 % 7 =5 \uff0cf(90) = 90 % 7 =6<br>f (46) = 46%7=4 \uff0c<br>\u4f46\u6b64\u65f6\u51b2\u7a81\u8f83\u591a\uff0c\u5e94\u8be5\u8ba9p\u66f4\u5927\u4e00\u70b9\uff0c\u6240\u4ee5\u5bb9\u91cfm \u4e5f\u8981\u66f4\u5927\uff0c\u5f53\u53d6m=p=13\u65f6\uff0c\u6709\u5982\u4e0b\u7ed3\u679c<br>f (18) = 18%13=5 \uff0cf(75) = 75 %13 =10 \uff0cf(60) = 60 % 13 =8 <br>f (43) = 43%13=4 \uff0cf(54) = 54 %13 =2 \uff0cf(90) = 90 % 13 =12  <br>f (46) = 46%13=7 <br>\u6b64\u65f6\u5219\u4e0d\u4f1a\u53d1\u751f\u51b2\u7a81<\/p>\n\n\n\n<p>\u4e94\u3001\u4f2a\u968f\u673a\u6570\u6cd5<\/p>\n\n\n\n<p>\u91c7\u7528<strong>\u4e00\u4e2a\u4f2a\u968f\u673a\u51fd\u6570\u4f5c\u4e3a\u54c8\u5e0c\u51fd\u6570<\/strong>\uff0c\u5373f(key) = random( key)<\/p>\n\n\n\n<p>\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5e94\u8be5\u6839\u636e\u5177\u4f53\u60c5\u51b5\u5b9a\u5236\u54c8\u5e0c\u51fd\u6570\uff0c\u5e76\u4e14\u901a\u8fc7\u5b9e\u9645\u6570\u636e\u53bb\u6d4b\u8bd5\u6027\u80fd\uff0c\u4e00\u822c\u6709\u4ee5\u4e0b\u4e94\u4e2a\u56e0\u7d20\u8981\u8003\u8651<br>\u2460\u8ba1\u7b97\u54c8\u5e0c\u51fd\u6570\u6240\u9700\u65f6\u95f4<br>\u2461\u5173\u952e\u5b57\u957f\u5ea6<br>\u2462\u54c8\u5e0c\u8868\u5927\u5c0f<br>\u2463\u5173\u952e\u5b57\u5206\u5e03\u60c5\u51b5<br>\u2464\u8bb0\u5f55\u67e5\u627e\u7684\u9891\u7387<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u5143\u7d20\u7684\u5173\u952e\u5b57k\u548c\u5143\u7d20\u7684\u5b58\u50a8\u4f4d\u7f6ep\u4e4b\u95f4\u5efa\u7acb\u4e00\u4e2a\u5bf9\u5e94\u7684\u5173\u7cfbf\uff0c\u4f7f\u5f97p= f(k)\uff0c\u5176\u4e2df\u5c31\u79f0\u4e3a\u54c8\u5e0c\u51fd\u6570\u3002\u63d2\u5165\u6570\u636e&hellip;<a href=\"https:\/\/www.notown.top\/?p=541\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">\u54c8\u5e0c\u51b2\u7a81\u7684\u89e3\u51b3\u65b9\u6cd5\u53ca\u54c8\u5e0c\u51fd\u6570\u7684\u6784\u9020\u65b9\u6cd5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[16,1],"tags":[],"class_list":["post-541","post","type-post","status-publish","format-standard","hentry","category-16","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts\/541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=541"}],"version-history":[{"count":6,"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts\/541\/revisions"}],"predecessor-version":[{"id":547,"href":"https:\/\/www.notown.top\/index.php?rest_route=\/wp\/v2\/posts\/541\/revisions\/547"}],"wp:attachment":[{"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.notown.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}