{"id":14,"date":"2021-01-10T22:50:14","date_gmt":"2021-01-10T14:50:14","guid":{"rendered":"http:\/\/blog.cruciferslab.net\/?p=14"},"modified":"2021-01-10T22:59:47","modified_gmt":"2021-01-10T14:59:47","slug":"timc-2021-%e6%96%b0%e5%b9%b4%e9%a1%8c-q3","status":"publish","type":"post","link":"https:\/\/blog.cruciferslab.net\/?p=14","title":{"rendered":"Timc 2021 \u65b0\u5e74\u984c Q3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u7bc7\u8a8d\u771f\u7684\u6587\u7ae0\u5c31\u4f86\u8a18\u9304\u4e00\u4e0b\u9019\u500b\u5427\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u984c\u76ee<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u539f\u984c\u76ee\u5728<a href=\"https:\/\/www.ptt.cc\/bbs\/Math\/M.1609431322.A.092.html\" data-type=\"URL\" data-id=\"https:\/\/www.ptt.cc\/bbs\/Math\/M.1609431322.A.092.html\">\u9019\u88e1<\/a>\u3002\u9019\u7bc7\u8981\u8a18\u7684\u662f\u4e2d\u9593\u548c\u53e6\u4e00\u500b\u4eba\u6709\u4e9b\u8a0e\u8ad6\u7684\u7b2c\u4e09\u984c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"345\" height=\"184\" src=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/Q3.png\" alt=\"\" class=\"wp-image-97\" srcset=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/Q3.png 345w, https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/Q3-300x160.png 300w, https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/Q3-150x80.png 150w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u89c0\u5bdf<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7c21\u55ae\u89c0\u5bdf\u4e00\u4e0b\u984c\u76ee\u6240\u6307\u5b9a\u7684\u9019\u4e9b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u5e73\u65b9\u6839\u5f8c\u9664\u975e\u662f\u6070\u597d\u70ba\u6574\u6578\uff0c\u5426\u5247\u7121\u6cd5\u99ac\u4e0a\u63a5\u968e\u4e58\u3002<\/li><li>\u56e0\u6b64\u5728\u9023\u7e8c\u7684\u5e73\u65b9\u6839\u64cd\u4f5c\u5f8c\u5e7e\u4e4e\u90fd\u662f\u63a5\u5411\u4e0b\u53d6\u6574\uff0c\u800c\u5728\u9019\u6a23\u7684\u5e73\u65b9\u6839\u7576\u4e2d\u63d2\u5165\u5411\u4e0b\u53d6\u6574\u4e0d\u5f71\u97ff\u5f8c\u4e00\u500b\u5411\u4e0b\u53d6\u6574\u7684\u7d50\u679c (\u7406\u7531\u662f\u5411\u4e0b\u53d6\u6574\u51fd\u6578\u503c\u4e0d\u6703\u6bd4\u8f38\u5165\u503c\u5927\uff0c\u4ee5\u53ca\u6574\u6578\u7684\u5e73\u65b9\u4ecd\u662f\u6574\u6578\u3002) \uff0c\u56e0\u6b64\u9019\u6a23\u505a\u4e0d\u6703\u662f\u6700\u4f73\u3002<\/li><li>\u9664\u4e86 \\(1!=1\\) \u4e4b\u5916\uff0c\u5176\u4ed6\u6574\u6578\u7684\u968e\u4e58\u90fd\u4e0d\u662f\u5b8c\u5168\u5e73\u65b9\u6578\uff0c\u56e0\u6b64\u958b\u5e73\u65b9\u6839\u4e0d\u662f\u6574\u6578\uff0c\u5f9e\u800c\u968e\u4e58\u5f8c\u9023\u7e8c\u7684\u5e73\u65b9\u6839\u5fc5\u9808\u63a5\u4e0a\u4e00\u500b\u5411\u4e0b\u53d6\u6574\u624d\u53ef\u518d\u63a5\u968e\u4e58\u3002<\/li><li>\u5982\u679c\u4e2d\u9593\u7d50\u679c\u51fa\u73fe 1 \u6216 2 \u5247\u5f8c\u7e8c\u5c31\u7121\u6cd5\u812b\u96e2\uff0c\u9019\u662f\u56e0\u70ba\u552f\u4e00\u53ef\u80fd\u5c07\u6578\u5b57\u8b8a\u5927\u7684\u64cd\u4f5c\u662f\u968e\u4e58\uff0c\u4f46 \\(1!=1\\) \u548c \\(2!=2\\) \u90fd\u6c92\u6709\u8b8a\u5927\u3002<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64\u9664\u4e86\u4e00\u958b\u59cb\u7684 2021 \u4e4b\u5916\uff0c\u5f8c\u7e8c\u7684\u52d5\u4f5c\u53ef\u4ee5\u7531\u968e\u4e58\u64cd\u4f5c\u5207\u958b\uff0c\u6bcf\u4e00\u6bb5\u90fd\u6703\u662f\u3008\u968e\u4e58\u2192\u591a\u6b21\u5e73\u65b9\u6839\u2192\u5411\u4e0b\u53d6\u6574\u3009\u9019\u6a23\u5b50\u7684\u6bb5\u843d\u30022021 \u56e0\u70ba\u53ef\u4ee5\u4e0d\u5148\u968e\u4e58\uff0c\u6240\u4ee5\u662f\u7368\u7acb\u7684\u30082021\u2192\u96f6\u6216\u591a\u6b21\u5e73\u65b9\u6839\u2192\u6709\u5e73\u65b9\u6839\u7684\u8a71\u5411\u4e0b\u53d6\u6574\u3009\u9019\u6a23\u7684\u958b\u982d\u6bb5\u843d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u968e\u4e58\u904b\u7b97<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u6a23\u5207\u958b\u7684\u597d\u8655\u662f\uff1a\u958b\u982d\u6bb5\u843d\u4e0d\u770b\u7684\u8a71 (\u53cd\u6b63\u90a3\u908a\u6578\u5b57\u5920\u5c0f)\uff0c\u6bcf\u4e00\u6bb5\u53ea\u6709\u4e00\u500b\u968e\u4e58\u904b\u7b97\uff0c\u800c\u6211\u5011\u53ea\u9700\u8981\u5728\u6700\u5f8c\u5411\u4e0b\u53d6\u6574\u8f49\u6210\u6574\u6578\u6642\u7b97\u51fa\u5be6\u969b\u7684\u6574\u6578\u503c\uff0c\u968e\u4e58\u548c\u5e73\u65b9\u6839\u53ef\u4ee5\u5229\u7528\u5c0d\u6578\u7c21\u5316\u8a08\u7b97\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u904e\u554f\u984c\u4f86\u4e86\uff1a\u9019\u6a23\u4e00\u4f86\u6211\u5011\u5fc5\u9808\u8a08\u7b97 \\(\\log n!\\) \u7684\u503c\uff0c\u800c\u4e14\u9700\u8981\u7a0d\u5fae\u7cbe\u78ba\u4e00\u4e9b\uff0c\u4e0d\u80fd\u53ea\u662f\u7531\u7a4d\u5206\u63a8\u5f97\u7684\u7c97\u7565\u4f30\u8a08\u503c\uff1a$$\\log n!=\\sum_{i=1}^n \\log i\\leq\\int_1^{n+1} \\log x dx=x\\log x-x\\bigg\\vert_1^{n+1}=(n+1)\\log(n+1)-n$$ \u5c0d \\(n=100\\) \u6642\uff0c\\(\\log 100!\\approx363.739\\)\uff0c\u4f46\u4ee3\u5165\u7a4d\u5206\u5f0f\u5f97\u5230 \\(101\\log101-100\\approx366.127\\)\uff0c\u81ea\u7136\u5c0d\u6578\u503c\u5dee\u4e86\u7d04 2.4\uff0c\u4e5f\u5c31\u662f\u5be6\u969b\u6578\u503c\u5dee\u4e86\u7d04\u5341\u500d\u2026\u2026<br>\u5c31\u7b97\u7528\u4e0b\u548c\u8ddf\u4e0a\u548c\u7684\u5e73\u5747\u4f30\u8a08\uff0c\u7a4d\u5206\u5f0f\u4ee3 \\(n=99\\) \u5f97\u5230\u7d04 361.517\uff0c\u5169\u8005\u5e73\u5747\u662f 363.822\uff0c\u4f9d\u7136\u5927\u4e86\u7d04 0.082\uff0c\u5be6\u969b\u6578\u503c\u7d04\u5927\u4e86 8.6%\uff1b\u9019\u986f\u7136\u4e0d\u8db3\u4ee5\u4f7f\u4e2d\u9593\u8a08\u7b97\u5f97\u5230\u6b63\u78ba\u7d50\u679c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u641c\u5c0b\u4e86\u4e00\u4e0b\u7db2\u8def\uff0c\u5728 mathstackexchange \u4e0a\u627e\u5230\u4e86<a href=\"https:\/\/math.stackexchange.com\/a\/138326\" data-type=\"URL\" data-id=\"https:\/\/math.stackexchange.com\/a\/138326\">\u9019\u4e00\u7bc7\u56de\u7b54<\/a>\uff0c\u7d66\u51fa\u4e86\u4e00\u500b<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%96%AF%E9%87%8C%E5%B0%BC%E7%93%A6%E7%91%9F%C2%B7%E6%8B%89%E9%A9%AC%E5%8A%AA%E9%87%91\" data-type=\"URL\" data-id=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%96%AF%E9%87%8C%E5%B0%BC%E7%93%A6%E7%91%9F%C2%B7%E6%8B%89%E9%A9%AC%E5%8A%AA%E9%87%91\">\u62c9\u99ac\u52aa\u91d1<\/a>\u63d0\u51fa\u904e\u7684\u8fd1\u4f3c\u5f0f\uff1a$$\\log n!\\approx n\\log n-n+\\frac16\\log\\left(n(1+4n(1+2n))+\\frac1{30}\\right)+\\frac12\\log\\pi$$ (\u52a0 \\(\\frac1{30}\\) \u662f\u5728\u5176\u4ed6\u56de\u7b54\u88e1\u6709\u63d0\u5230\u904e\u7684\u4fee\u6b63\u9805\uff0c\u4f46\u5728\u9019\u984c\u88e1\u5e7e\u4e4e\u6c92\u6709\u5f71\u97ff)<br>\u9019\u500b\u8fd1\u4f3c\u5f0f\u6709\u591a\u597d\uff1f\u7c21\u55ae\u8a66\u4e86\u4e00\u4e0b\u5728 \\(n=100\\) \u6642\uff0c\u7d66\u51fa\u7684\u7b54\u6848\u548c\u6b63\u78ba\u503c\u5230\u5c0f\u6578\u4e0b\u7b2c 10 \u4f4d\u90fd\u76f8\u540c\uff01\u53ea\u80fd\u8aaa\u4e0d\u6127\u662f\u62c9\u99ac\u52aa\u91d1\u2026\u2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6f14\u7b97\u6cd5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5be6\u969b\u53bb\u641c\u5c0b\u7684\u6f14\u7b97\u6cd5\u5247\u6c92\u4ec0\u9ebc\u7279\u5225\u7684\uff0c\u4f7f\u7528\u7684\u662f\u7d93\u5178\u7684 <a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%88%B4%E5%85%8B%E6%96%AF%E7%89%B9%E6%8B%89%E7%AE%97%E6%B3%95\" data-type=\"URL\" data-id=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%88%B4%E5%85%8B%E6%96%AF%E7%89%B9%E6%8B%89%E7%AE%97%E6%B3%95\">Dijkstra \u6f14\u7b97\u6cd5<\/a>\uff0c\u4f46\u4e26\u4e0d\u76f4\u63a5\u628a\u6574\u5f35\u5716\u5efa\u7acb\u8d77\u4f86\u3002\u539f\u56e0\u5f88\u7c21\u55ae\uff1a\u968e\u4e58\u7684\u6578\u5b57\u592a\u5927\u4e86\u3002\u4e0a\u9762\u63d0\u5230\u904e \\(\\log100!\\approx363.739\\)\uff0c\u9019\u4ee3\u8868 \\(100!\\) \u5be6\u969b\u7684\u6578\u503c\u7d04\u662f \\(e^{363.739}\\approx 9.332\\times10^{157}\\)\uff0c\u7c21\u55ae\u7684\u7a0b\u5f0f\u4e0d\u7528\u79d1\u5b78\u8a18\u865f (aka. \u6d6e\u9ede\u6578) \u6839\u672c\u7121\u6cd5\u8a08\u7b97\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u500b\u592a\u5927\u9020\u6210\u7684\u5f71\u97ff\u4e4b\u4e00\u662f\u5f88\u591a\u5927\u6578\u5b57\u5176\u5be6\u5728\u641c\u5c0b\u904e\u7a0b\u4e2d\u5e7e\u4e4e\u8e29\u4e0d\u5230\u3002\u7e7c\u7e8c\u4ee5 \\(100!\\) \u70ba\u4f8b\uff0c\u7531\u5b83\u958b\u59cb\u9023\u7e8c\u958b\u5e73\u65b9\u6839\u6703\u4f9d\u5e8f\u5f97\u5230\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\\(100!\\approx9.332\\times10^{157}\\)<\/li><li>\\((100!)^{1\/2}\\approx9.661\\times10^{78}\\)<\/li><li>\\((100!)^{1\/4}\\approx3.108\\times10^{39}\\)<\/li><li>\\((100!)^{1\/8}\\approx5.575\\times10^{19}\\)<\/li><li>\\((100!)^{1\/16}\\approx7466640272.6695\\)<\/li><li>\\((100!)^{1\/32}\\approx86409.7232\\)<\/li><li>\\((100!)^{1\/64}\\approx293.9553\\)<\/li><li>\\((100!)^{1\/128}\\approx17.1451\\)<\/li><li>\\((100!)^{1\/256}\\approx4.14066\\)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\u5982\u679c\u9019\u4e00\u6b65\u662f 100\uff0c\u4e0b\u4e00\u6b65\u53ef\u80fd\u6703\u8e29\u5230 7466640272\u300186409\u3001293\u300117\u30014\uff1b\u5c0d\u5c0f\u6578\u5b57\u4f86\u8aaa\u5176\u4ed6\u8d77\u9ede\u6709\u53ef\u80fd\u6703\u5f97\u5230 16 \u6216 18 \u6216 292 \u6216 294\uff0c\u4f46 86408\u300186410\u3001\u751a\u81f3\u662f 7466640271 \u5c31\u5f88\u96e3\u8aaa\u6703\u4e0d\u6703\u99ac\u4e0a\u5c31\u7b97\u5f97\u51fa\u4f86\u3002\u9019\u5c31\u662f\u4e4b\u6240\u4ee5\u70ba\u4ec0\u9ebc\u4e0d\u76f4\u63a5\u628a\u6574\u5f35\u5716\u5efa\u7acb\u8d77\u4f86\u7684\u539f\u56e0\uff1b\u5728 relax \u7684\u6642\u5019\u518d\u53bb\u6c42\u51fa\u5f9e\u73fe\u5728\u9019\u4e00\u9ede\u51fa\u767c\u8d70\u5e7e\u6b65\u6703\u5230\u54ea\u4e9b\u5730\u65b9\u5c31\u884c\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5927\u6578\u4e0a\u9650<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6578\u5b57\u592a\u5927\u7684\u5f71\u97ff\u9084\u6709\u4e00\u500b\uff1a\u9019\u7a2e\u5927\u6578\u5b57\u7684\u968e\u4e58\u53ea\u6703\u662f\u500b\u66f4\u5927\u4e00\u5718\u6771\u897f\u3002\u7e7c\u7e8c\u4e0a\u9762\u7684\u4f8b\u5b50\uff0c\u5982\u679c\u628a \\(100!\\) \u4ee3\u9032 \\(\\log n!\\) \u7684\u5f0f\u5b50\u88e1\uff0c\u6703\u6c42\u5f97\u4e00\u500b\u7d50\u679c\u7d04\u70ba \\(3.38\\times10^{160}\\)\uff1b\u6ce8\u610f\u5230\u9019\u662f\u5c0d\u6578\u503c\uff0c\u6240\u4ee5\u53d6\u6307\u6578\u6703\u5f97\u5230\u5be6\u969b\u503c\u662f \\((100!)!\\approx10^{1.47\\times10^{160}}\\)\uff0c\u5df2\u7d93\u51fa\u73fe\u6307\u6578\u5854\u4e86\u3002\u4e0d\u904e\u597d\u5728\u9019\u500b\u554f\u984c\u5f71\u97ff\u4e0d\u5927\uff1a\u7531\u65bc\u64cd\u4f5c\u4e2d\u8b93\u6578\u5b57\u6e1b\u5c11\u7684\u65b9\u5f0f\u4e3b\u8981\u662f\u5e73\u65b9\u6839 (\u5411\u4e0b\u53d6\u6574\u662f<a href=\"https:\/\/zh.wikipedia.org\/zh-tw\/%E5%86%AA%E7%AD%89\" data-type=\"URL\" data-id=\"https:\/\/zh.wikipedia.org\/zh-tw\/%E5%86%AA%E7%AD%89\">\u51aa\u7b49\u904b\u7b97<\/a>\uff0c\u53ea\u6709\u4e00\u6b21\u6709\u7528\uff1b\u800c\u7531\u524d\u8ff0\u8a0e\u8ad6\u4e5f\u4e0d\u6703\u53d6\u6574\u4e4b\u5f8c\u518d\u5e73\u65b9\u6839\uff0c\u6240\u4ee5\u4f5c\u7528\u66f4\u6709\u9650)\uff0c\u800c\u5e73\u65b9\u6839\u4e00\u6b21\u53ea\u6703\u8b93\u6307\u6578\u5c0d\u534a\uff0c\u6240\u4ee5\u9019\u7a2e\u5927\u6578\u8981\u6e1b\u5c11\u5230\u5c0f\u6578\u7bc4\u570d\u7684\u5e73\u65b9\u6839\u6b21\u6578\u4e5f\u6703\u5f88\u591a\uff0d\uff0d\u4f8b\u5982 \\((100!)!\\) \u9700\u8981\u5e73\u65b9\u6839\u7d04 530 \u6b21\u624d\u6703\u8b8a\u5c0f\u5230\u76f8\u5c0d\u80fd\u638c\u63e1\u7684\u7bc4\u570d\uff1a\\(1.47\\times10^{160}\\big\/2^{530}\\approx4.18\\)\uff0c\u4e5f\u5c31\u662f \\((100!)!\\) \u958b 530 \u6b21\u5e73\u65b9\u6839\u7684\u503c\u7d04 \\(10^{4.18}\\approx15000\\)\u3002\u5728\u5df2\u77e5\u6709 \\(K\\) \u6b65\u89e3\u7684\u6642\u5019\uff0c\u5982\u679c\u51fa\u73fe\u9019\u7a2e\u5176\u968e\u4e58\u9700\u8981\u66f4\u591a\u6b21\u5e73\u65b9\u6839\u624d\u6703\u6e1b\u5c11\u5230\u5c0f\u7bc4\u570d\u7684\u6578\u7684\u8a71\uff0c\u5c0d\u5176\u7528\u968e\u4e58\u662f\u6c92\u6709\u610f\u7fa9\u7684\uff1b\u4e5f\u5c31\u662f\u8aaa\uff0c\u6211\u5011\u53ef\u4ee5\u8a2d\u5b9a\u4e00\u500b\u4e0a\u9650\uff0c\u5982\u679c\u4e2d\u9593\u7d50\u679c\u8d85\u904e\u9019\u500b\u6578\u5b57\u5c31\u4e0d\u5c0d\u5b83\u4f7f\u7528\u968e\u4e58\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee4\u9019\u500b\u4e0a\u9650\u662f \\(M\\)\u3002\u65bc\u662f\u9019\u500b\u5f88\u7c97\u7565\u7684\u689d\u4ef6\u5c31\u662f \\(M\\) \u7684\u968e\u4e58\u8981\u5e73\u65b9\u6839 \\(K\\) \u6b21\u4ee5\u4e0a\u624d\u80fd\u56de\u5230\u6bd4 \\(M\\) \u5c0f\u7684\u6578\uff1a$$\\frac{\\log(M!)}{\\log M}=2^K$$ \u82e5\u4ee5 \\(M\\log M\\)\u505a\u70ba\u5206\u5b50\u7684\u8fd1\u4f3c\uff0c\u5de6\u908a\u5c31\u5316\u7c21\u70ba \\(M\\)\uff0c\u4e5f\u5c31\u662f\u8aaa\u6240\u8981\u7684\u4e0a\u9650\u5c31\u7d04\u662f \\(M\\approx2^K\\)\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(\u5982\u679c\u4ee3\u5e7e\u500b\u5be6\u969b\u7684 \\(M=2^k\\) \u503c\u9032\u53bb\u6703\u767c\u73fe\u6c42\u51fa\u4f86\u7684 \\(K\\) \u6703\u6bd4 \\(k\\) \u7a0d\u5c0f\uff0c\u9019\u7531\u4e0a\u9762\u7684\u8fd1\u4f3c\u516c\u5f0f\u5373\u53ef\u770b\u5230\u539f\u56e0\uff1a\u56e0\u70ba\u6709\u4e00\u500b \\(-n\\) \u7684\u9805\u3002\u5be6\u969b\u904b\u7528\u4e0a\u70ba\u4e86\u88dc\u511f\u9019\u500b\u5dee\u503c\uff0c\u662f\u53ef\u4ee5\u5728\u9078\u5b9a \\(K\\) \u4e4b\u5f8c\u5c07\u4e0a\u9650\u5b9a\u70ba\u6bd4 \\(2^K\\) \u7a0d\u5927\u4e00\u4e9b\u4e9b\u7684\u6578\uff1b\u56e0\u70ba\u9019\u500b\u5dee\u7d04 \\(O(\\frac{n}{\\log n})\\)\uff0c\u6211\u5011\u5c0d\u6307\u6578 \\(K\\) \u52a0\u500b\u5c0f\u503c\u5dee\u4e0d\u591a\u5c31\u80fd\u6db5\u84cb\u5f97\u5230)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u524d\u4e00\u7248\u7a0b\u5f0f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8aaa\u4e86\u9019\u9ebc\u591a\uff0c\u9084\u662f\u628a\u5df2\u7d93\u8dd1\u904e\u7684\u9019\u524d\u4e00\u7248\u7a0b\u5f0f\u7d66\u8cbc\u51fa\u4f86\u597d\u4e86\uff1a<a href=\"https:\/\/gist.github.com\/progheal\/7b1d881150f8cd535cf767fd0ced7ed4#file-factsqrt-cpp\" data-type=\"URL\" data-id=\"https:\/\/gist.github.com\/progheal\/7b1d881150f8cd535cf767fd0ced7ed4#file-factsqrt-cpp\">\u9023\u7d50\u5728\u6b64<\/a>\u3002\u5b83\u7684\u57f7\u884c\u7d50\u679c\u662f\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Found 110 at 88 steps:\n110 &lt;- 784453!, sqrt * 21\n784453 &lt;- 24427!, sqrt * 14\n24427 &lt;- 496!, sqrt * 8\n496 &lt;- 37!, sqrt * 4\n37 &lt;- 4062!, sqrt * 13\n4062 &lt;- 46!, sqrt * 4\n46 &lt;- 26!, sqrt * 4\n26 &lt;- 6!, sqrt * 1\n6 &lt;- 2021, sqrt * 2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u5c31\u662f\u5728\u539f\u6587\u63a8\u6587\u88e1\u6211\u63a8\u7684 88 \u6b65\u89e3\u3002\u5217\u51fa\u4f86\u7684\u9806\u5e8f\u53cd\u904e\u4f86\u7684\u539f\u56e0\u5c31\u53ea\u662f Dijkstra \u6f14\u7b97\u6cd5\u505a\u51fa\u4f86\u7684\u8def\u5f91\u672c\u4f86\u5c31\u662f\u5012\u904e\u4f86\u7531\u76ee\u6a19\u8d70\u56de\u4f86\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u524d\u4e00\u7248\u7a0b\u5f0f\u88e1\u5f88\u591a\u5730\u65b9\u5176\u5be6\u662f\u56e0\u70ba\u53ea\u662f\u7c21\u55ae\u5beb\u5beb\u800c\u5df2\u6240\u4ee5\u4efb\u610f\u6c7a\u5b9a\u7684\uff0c\u4f8b\u5982\u8a08\u7b97\u4e0a\u9650 <code data-enlighter-language=\"cpp\" class=\"EnlighterJSRAW\">MAX_LOG<\/code> \u539f\u672c\u662f\u56e0\u70ba\u6211\u7684\u5c0d\u6578\u662f\u7528\u5e38\u7528\u5c0d\u6578\u4f86\u7b97\u6240\u4ee5\u662f\u6b63\u597d\u5207\u5728 \\(10^{15}\\) \u7684\uff0c\u4f46\u5f8c\u4f86\u60f3\u60f3\u9019\u88e1\u7684\u5c0d\u6578\u679c\u7136\u9084\u662f\u7528\u81ea\u7136\u5c0d\u6578\u6bd4\u8f03\u4e0d\u6703\u6709\u610f\u5916\uff0c\u6240\u4ee5\u5c31\u6539\u6210\u4e86 \\(e^{35}\\approx1.58\\times10^{15}\\approx2^{50.5}\\)\uff0c\u4f46\u9084\u9060\u4e0d\u5230\u9019\u88e1\u7d66\u51fa\u4f86\u9700\u8981\u7684 \\(2^{88}\\) \u4e0a\u9650\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u800c\u8aaa\u5230\u7cbe\u78ba\u5ea6\uff0c\u6263\u6389\u6bd4\u8f03\u6c92\u6709\u8cc7\u6599\u7684\u8fd1\u4f3c\u516c\u5f0f\u7cbe\u78ba\u5ea6\u4e4b\u5916\uff0c\u9019\u88e1\u5176\u5be6\u9084\u6709\u4e00\u500b\u6211\u6709\u9ede\u64d4\u5fc3\u7684\u5730\u65b9\uff1a\u4e2d\u9593\u7684 \\(\\frac16\\log\\left(n(1+2n(1+4n)+\\frac1{30}\\right)\\) \u7684\u8a08\u7b97\uff0c\u53c3\u6578\u7d04 \\(8n^3\\) \u7684\u6578\u503c\u6211\u76f4\u63a5\u7528 <code data-enlighter-language=\"cpp\" class=\"EnlighterJSRAW\">double<\/code> \u8a08\u7b97\u4e86\uff0c\u56e0\u6b64\u6578\u5b57\u53ef\u80fd\u6703\u5927\u5230\u7d04 \\(3\\times10^{46}\\)\uff0d\uff0d\u76f4\u89ba\u4e0a\u4f86\u8aaa\u56e0\u70ba\u662f\u7528\u5728\u5c0d\u6578\uff0c\u9019\u88e1\u7684\u7cbe\u78ba\u5ea6\u640d\u5931\u61c9\u8a72\u5f71\u97ff\u4e0d\u5927\uff0c\u4f46\u7a76\u7adf\u6709\u6c92\u6709\u5f71\u97ff\u9084\u771f\u7684\u4e0d\u6562\u8aaa\u2026\u2026 (\u4e5f\u5c31\u662f\u56e0\u70ba\u9019\u88e1\u6703\u9019\u9ebc\u5927\u7684\u95dc\u4fc2\uff0c\u4e0a\u9762\u5217\u516c\u5f0f\u6642\u624d\u6703\u8aaa\u9019\u88e1\u6709\u6c92\u6709 \\(\\frac1{30}\\) \u5e7e\u4e4e\u6c92\u6709\u5f71\u97ff\u3002\u6211\u662f\u52a0\u9032\u53bb\u4e86\u5c31\u662f\u3002)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd1\u4f3c\u516c\u5f0f\u7684\u7cbe\u78ba\u5ea6\u6211\u6709\u7528\u904e Mathematica \u4efb\u610f\u9078\u4e86\u5e7e\u500b \\(10^{14}\\) \u7b49\u7d1a\u5de6\u53f3\u7684\u6578\u53bb\u8a66\u4e86\uff0c\u610f\u5916\u7684\u7cbe\u6e96\uff1a\u7d50\u679c\u5927\u6982\u81f3\u5c11\u90fd\u6709\u5341\u5e7e\u4f4d\u662f\u6b63\u78ba\u7684\u3002\u4e5f\u5c31\u662f\u8aaa\uff0c\u53ea\u8981\u9019\u516c\u5f0f\u6709\u9019\u7a2e\u7b49\u7d1a\u7684\u6e96\u78ba\uff0c\u90a3\u4e0a\u9762\u7684\u7cbe\u78ba\u5ea6\u640d\u5931\u7684\u5f71\u97ff\u5c31\u771f\u7684\u4e0d\u5927\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u4ed6\u90e8\u4efd\u5c31\u662f\u5f88\u50b3\u7d71\u7684 Dijkstra \u6f14\u7b97\u6cd5\uff0c\u53ea\u4e0d\u904e\u56e0\u70ba\u7528\u7684\u662f\u6c92\u6709 Decrease Key \u7684 <code data-enlighter-language=\"cpp\" class=\"EnlighterJSRAW\">std::priority_queue<\/code> \u7684\u95dc\u4fc2\uff0c\u7528\u4e86\u4e00\u500b\u4e5f\u5f88\u5e38\u898b\u7684\u505a\u6cd5\uff1a\u539f\u672c Decrease Key \u7684\u64cd\u4f5c\u4e5f\u7167\u6a23\u585e\u9032 queue \u88e1\uff0c\u5728\u5f48\u51fa\u4f86\u6642\u6aa2\u67e5\u9019\u4e00\u9805\u662f\u4e0d\u662f\u5df2\u7d93\u505a\u904e\u4e86\uff0c\u662f\u5c31\u5ffd\u7565\u5b83\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code data-enlighter-language=\"cpp\" class=\"EnlighterJSRAW\">LOG_ERR<\/code> \u662f\u7528\u4f86\u5370\u51fa\u5f88\u5927\u91cf\u7684\u4e2d\u9593\u7d50\u679c\uff0c\u9019\u6a23\u6211\u80fd\u6aa2\u67e5\u5230\u5e95\u4e2d\u9593\u7684\u8a08\u7b97\u904e\u7a0b\u4e2d\u6709\u6c92\u6709\u4ec0\u9ebc\u554f\u984c\u9032\u800c\u4fee\u6b63\u3002\u8f38\u51fa\u7684 log \u91cf\u5927\u7d04\u5728 2~3 MB \u5de6\u53f3\uff0c\u6240\u4ee5\u4e0d\u5370 log \u7684\u8a71\u7d50\u679c\u5e7e\u4e4e\u662f\u99ac\u4e0a\u5c31\u51fa\u4f86\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6ea2\u4f4d bug<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65bc\u662f\u9019\u662f\u67d0\u6b21\u6211\u56de\u982d\u6aa2\u67e5 log \u6642\u770b\u5230\u7684\u7247\u6bb5\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"304\" height=\"165\" src=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/log1.png\" alt=\"\" class=\"wp-image-98\" srcset=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/log1.png 304w, https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/log1-300x163.png 300w, https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/log1-150x81.png 150w\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ef\u4ee5\u770b\u5230\u6709\u4e00\u500b\u7d00\u9304\u96d6\u7136\u503c\u51fa\u4f86\u4e86\u4f46\u6c92\u6709\u5f8c\u7e8c\u904b\u7b97\u3002\u5728\u9019\u7248\u7a0b\u5f0f\u7684\u518d\u524d\u4e00\u7248\u66fe\u7d93\u6709\u904e\u985e\u4f3c\u7684\u7d00\u9304\uff0c\u5f8c\u4f86\u67e5\u51fa\u4f86\u662f \\(\\log n!\\) \u7684\u7576\u4e2d \\(n\\) \u7684\u4e09\u6b21\u5f0f\u8a08\u7b97\u6ea2\u4f4d\u9020\u6210 log \u5403\u5230\u8ca0\u6578\u7d66\u51fa NaN\uff1b\u9019\u6b21\u4e00\u6a23\u7684\u73fe\u8c61\u6240\u4ee5\u56de\u982d\u518d\u67e5\u4e00\u6b21\u90a3\u6bb5\u7a0b\u5f0f\uff0c\u7d50\u679c\u9084\u771f\u7684\u627e\u5230\u53c8\u4e00\u500b\u6ea2\u4f4d bug\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"255\" height=\"65\" src=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/bug1.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/bug1.png 255w, https:\/\/blog.cruciferslab.net\/wp-content\/uploads\/2021\/01\/bug1-150x38.png 150w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u7a0b\u5f0f\u5176\u4ed6\u5730\u65b9\u662f 64-bit \u6574\u6578\u7684\u6578\u8b8a\u6210 32-bit \u50b3\u9032\u4f86\u4e86\u2026\u2026\u9019\u9020\u6210\u6240\u6709\u5927\u6578\u5b57\u7684\u8a08\u7b97\u90fd\u4e0d\u662f\u6b63\u78ba\u7684\uff0c\u7b49\u540c\u65bc\u662f\u628a\u968e\u4e58\u64cd\u4f5c\u7684\u4e0a\u9650\u964d\u5230 \\(2^{31}\\) \u4e86\u3002<br>\u628a\u5b83\u6539\u6389\uff0c\u4ee5\u53ca\u628a\u5c0f\u6578\u5b57\u7684\u968e\u4e58\u63d0\u51fa\u53bb\u4e0d\u7d93\u904e log (\u907f\u514d\u4e00\u4f86\u4e00\u56de\u9023\u5c0f\u6578\u5b57\u90fd\u6703\u6b6a\u6389)\uff0c\u6539\u7248\u5f8c\u7684\u7a0b\u5f0f<a href=\"https:\/\/gist.github.com\/progheal\/7b1d881150f8cd535cf767fd0ced7ed4#file-factsqrt2-cpp\" data-type=\"URL\" data-id=\"https:\/\/gist.github.com\/progheal\/7b1d881150f8cd535cf767fd0ced7ed4#file-factsqrt2-cpp\">\u5728\u9019\u88e1<\/a>\u3002\u57f7\u884c\u7d50\u679c\u662f\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Found 110 at 75 steps:\n110 &lt;- 22280837523899!, sqrt * 47\n22280837523899 &lt;- 1278!, sqrt * 8\n1278 &lt;- 120!, sqrt * 6\n120 &lt;- 5!, sqrt * 0\n5 &lt;- 6!, sqrt * 2\n6 &lt;- 2021, sqrt * 2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9019\u5c31\u662f\u6211\u5728<a href=\"https:\/\/www.ptt.cc\/bbs\/Math\/M.1610093649.A.080.html\" data-type=\"URL\" data-id=\"https:\/\/www.ptt.cc\/bbs\/Math\/M.1610093649.A.080.html\">\u5f8c\u4f86\u7684\u56de\u6587<\/a>\u88e1\u7d66\u51fa\u7684 75 \u6b65\u89e3\u4e86\u3002\u9019\u88e1\u51fa\u73fe\u4e86\u4e00\u500b\u5f88\u53ef\u6015\u7684 14 \u4f4d\u6578\u7684\u968e\u4e58\u958b 47 \u6b21\u5e73\u65b9\u6839\uff0c\u9084\u5f88\u7cbe\u6e96\u7684\u76f4\u63a5\u8e29\u4e2d\u76ee\u6a19 110 (\u5927\u7d04\u503c\u662f 110.77)\uff0c\u6240\u4ee5\u6709\u9ede\u6015\u6015\u7684\u624d\u6703\u60f3\u8981\u591a\u65b9\u9a57\u7b97\uff0c\u4e0d\u904e\u770b\u8d77\u4f86\u9019\u500b\u8a08\u7b97\u78ba\u5be6\u8db3\u5920\u7cbe\u78ba\u2026\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6703\u6709\u9019\u7a2e\u5927\u6578\u5b57\u76f4\u63a5\u8e29\u4e2d\u76ee\u6a19\u7684\u72c0\u6cc1\u4e5f\u5c31\u662f\u6211\u5728\u958b\u982d\u6587\u7ae0\u7684\u63a8\u6587\u8aaa\u7684\uff0c\u4e0d\u78ba\u5b9a\u5141\u8a31\u4e2d\u9593\u904e\u7a0b\u662f\u5927\u6578\u5b57\u6709\u6c92\u6709\u53ef\u80fd\u627e\u5230\u66f4\u5c11\u6b65\u6578\u89e3\uff0c\u54ea\u5929\u54ea\u500b\u5927\u6578\u5b57\u5929\u5916\u98db\u4f86\u4e00\u7b46\u76f4\u63a5\u649e\u4e0a\u76ee\u6a19\u6216\u63a5\u8fd1\u76ee\u6a19\u8def\u7dda\u7684\u6578\u90fd\u6709\u53ef\u80fd\uff1b\u9019\u53ea\u80fd\u5728\u6211\u5011\u627e\u5230\u81f3\u5c11\u4e00\u500b\u89e3\u4e4b\u5f8c\u5229\u7528\u524d\u4e00\u6bb5\u63d0\u5230\u7684 \\(M\\) \u503c\u4f30\u8a08\u624d\u80fd\u80af\u5b9a\u5730\u6392\u9664\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5f8c\u2026\u2026<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6211\u7684\u56de\u6587\u90a3\u7bc7\u5e95\u4e0b\u548c\u6211\u8a0e\u8ad6\u7684\u90a3\u4f4d\u7248\u53cb\u7528\u4e86\u53e6\u4e00\u500b\u8a08\u7b97\u67b6\u69cb Magma \u64da\u8aaa\u662f\u9a57\u8b49\u4e86\u9019\u500b 75 \u6b65\u662f\u6700\u4f73\u89e3\u4e86\u3002\u7406\u8ad6\u4e0a\u4f86\u8aaa\uff0c\u7528 Mathematica \u61c9\u8a72\u662f\u4e5f\u80fd\u5beb\u5f97\u51fa\u4f86\u5566\uff0c\u4e0d\u904e\u9084\u6c92\u600e\u9ebc\u7814\u7a76\u5728 Mathematica \u88e1\u5beb priority queue \u6bd4\u8f03\u6709\u6548\u7387\u6240\u4ee5\u5c31\u66ab\u4e14\u653e\u8457\u4e86\uff1b\u8aaa\u4e0d\u5b9a\u4e4b\u5f8c\u60f3\u5230\u4e86\u6703\u56de\u4f86\u5beb\uff1f(\u7b11)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b2c\u4e00\u7bc7\u8a8d\u771f\u7684\u6587\u7ae0\u5c31\u4f86\u8a18\u9304\u4e00\u4e0b\u9019\u500b\u5427\u3002 \u984c\u76ee \u539f\u984c\u76ee\u5728\u9019\u88e1\u3002\u9019\u7bc7\u8981\u8a18\u7684\u662f\u4e2d\u9593\u548c\u53e6\u4e00\u500b\u4eba\u6709\u4e9b\u8a0e\u8ad6\u7684\u7b2c\u4e09\u984c\uff1a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-math","category-programming"],"_links":{"self":[{"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":108,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":128,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/128"}],"wp:attachment":[{"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cruciferslab.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}