{"id":1129,"date":"2026-08-08T22:18:59","date_gmt":"2026-08-08T13:18:59","guid":{"rendered":"http:\/\/154.12.39.243\/?p=1129"},"modified":"2026-08-09T10:25:18","modified_gmt":"2026-08-09T01:25:18","slug":"web3%e5%89%8d%e7%bd%ae%e7%9f%a5%e8%af%86","status":"publish","type":"post","link":"https:\/\/kktsuki.space\/index.php\/2026\/08\/08\/web3%e5%89%8d%e7%bd%ae%e7%9f%a5%e8%af%86\/","title":{"rendered":"web3\u524d\u7f6e\u77e5\u8bc6"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u6574\u9664\u4e0e\u4f59\u6570<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7ed9\u5b9a\u4e24\u4e2a\u6574\u6570$a,b$,\u5176\u4e2d$b&gt;0$,\u5219\u4e00\u5b9a\u53ef\u4ee5\u5199\u6210$$a=bq+r\\ \\ \\ \\ \\ 0\\leq r&lt;b$$\u5176\u4e2d$q$\u662f\u5546\uff0c$r$\u662f\u4f59\u6570\uff0c\u82e5$r=0$\uff0c\u5c31\u79f0$a$\u6574\u9664\u4e8e$b$,\u8bb0\u4f5c$a|b$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6a21\u8fd0\u7b97<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982$17\\mod 5=2$\uff0c$12\\mod 5=2$\uff0c$17\u8ddf12$\u867d\u7136\u4e0d\u662f\u540c\u4e00\u4e2a\u6574\u6570\uff0c\u4f46\u5b83\u4eec\u5728\u6a21$5$\u8fd0\u7b97\u4e0b\u5f97\u5230\u7684\u662f\u540c\u4e00\u4e2a\u503c$2$,\u6240\u4ee5\u5728\u6a21$5$\u8fd0\u7b97\u7684\u610f\u4e49\u4e0b\u8ba4\u4e3a\u662f\u540c\u4e00\u4e2a\u6570\uff0c\u6240\u4ee5$$a\\equiv b\\ \\ \\ \\ (\\mod n) $$\u7684\u672c\u8d28\u5c31\u662f$$n|(a-b)$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6700\u5927\u516c\u7ea6\u6570<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8003\u8651\u4e24\u4e2a\u6570$$18,30$$$18$\u7684\u56e0\u6570\u6709$$1,2,3,6,9,18$$30\u7684\u56e0\u6570\u6709$$1,2,3,5,6,10,15,30$$\u5171\u540c\u56e0\u6570\u4e2d\u6700\u6253\u7684\u6570\u662f$6$\uff0c\u6240\u4ee5$18$,$30$\u7684\u6700\u5927\u516c\u56e0\u6570\u662f$6$,\u8868\u793a\u4e3a$$\\gcd(18,30)=6$$\u5982\u679c$$\\gcd(8,15)=1$$\u5c31\u79f0$a,b$\u4e92\u8d28\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982$$\\gcd(8,15)=1$$\u4e92\u8d28\u8fd9\u4e2a\u6761\u4ef6\u53ef\u4ee5\u7528\u6765\u8bc1\u660e\u540e\u9762\u7684\u6570\u7684\u6a21\u9006\u5143\u5b58\u5728\u6027\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u627e\u6700\u5927\u516c\u56e0\u6570\u65f6\u53ef\u4ee5\u4e0d\u7528\u628a\u5168\u90e8\u6570\u5217\u51fa\u6765\u4e00\u4e2a\u4e2a\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b27\u51e0\u91cc\u5f97\u7b97\u6cd5\uff0c\u4f8b\u5982\u6c42$$\\gcd(30,18)$$\u5148\u505a\u9664\u6cd5$$30=18+12$$\u6240\u4ee5$$\\gcd(30,18)=\\gcd(18,12)$$$$18=12+6$$$$\\gcd(18,12)=\\gcd(12,6)$$$$12=6\\times 2$$\u56e0\u6b64$$\\gcd(30,18)=6$$\u8fd0\u7b97\u89c4\u5f8b\u5c31\u8ddf\u5b8c\u7f8e\u7684\u9ec4\u91d1\u56de\u65cb\u4e00\u6837$$gcd(a,b)=gcd(b,a\\mod b)$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u62d3\u5c55\u6b27\u51e0\u91cc\u5f97\u7b97\u6cd5<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5927\u516c\u56e0\u6570$\\gcd(a,b)$\u53ef\u4ee5\u5199\u6210$ax+by$.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u5c31\u662f\u8bf4\u5b58\u5728\u6574\u6570$x,y$\u4f7f\u5f97$$\\gcd(a,b)=\\gcd(a,b)=ax+by$$\u4f8b\u5982$\\gcd(30,18)=6$\u53ef\u4ee5\u662f$$30\\times (-1)+18\\times 2=6$$\u5373$$36-30=6$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6a21\u9006\u5143<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u5982$$3x=1 \\ \\ (\\mod 7) $$x\u5c31\u662f$3^{-1}$\u5c06\u5f0f\u5b50\u5199\u6210\u62d3\u5c55\u6b27\u51e0\u91cc\u5f97\u7b97\u6cd5\u7684\u5f62\u5f0f$$3x-1=7k$$$$3x+7(-k)=1$$\u672c\u8d28\u4e0a\u662f\u5728\u627e$$3x+7y=1$$\u663e\u7136$y=-2,x=5$\u662f\u4e00\u7ec4\u89e3\uff0c\u90a3\u4e48$3^{-1}=5$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64\u5f97\u5230\u4e00\u4e2a\u91cd\u8981\u7ed3\u8bba$$a\\text{\u5728\u6a21}n\\text{\u4e0b\u5b58\u5728\u9006\u5143}\\Longleftrightarrow \\gcd(a,n)=1$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5feb\u901f\u6a21\u5e42<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6709\u4e00\u4e2a\u95ee\u9898$$a^{n}\\mod p$$\u4f8b\u5982$$3^{1000} \\mod 7$$\u6211\u4eec\u4e0d\u9700\u8981\u76f4\u63a5\u8ba1\u7b97\uff0c\u800c\u662f\u5229\u7528\u5e73\u65b9\uff0c\u4f8b\u5982\u8ba1\u7b97$$3^{13}\\mod 7$$\u56e0\u4e3a$$13=8+4+1$$\u4e0d\u65ad\u5e73\u65b9\u6709$$\\begin{split}3^{1}&amp;\\equiv 3\\ (\\mod 7)\\newline 3^{2}&amp;\\equiv 2\\ (\\mod 7)\\newline 3^{4}&amp;\\equiv 4\\ (\\mod 7)\\newline 3^{8}&amp;\\equiv 2\\ (\\mod 7)\\newline\\end{split}$$\u4e8e\u662f$$3^{13}=3^{8+4+1}$$\u56e0\u6b64$$3^{8}\\cdot 3^{4} \\cdot 3 \\equiv 2\\times 4\\times 3 \\equiv 3 \\ (\\mod 7)$$\u6240\u4ee5$$3^{13}\\equiv3 \\ (\\mod 7)$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5229\u7528\u6574\u9664\u6784\u9020\u5546\u73af<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4efb\u610f\u7684$a,b$\u5b9a\u4e49\u7b49\u4ef7\u5173\u7cfb$$a\\sim b=6|(a-b)$$\u5373$$a\\sim b\\to a-b=6k$$\u5176\u4e2d$k\\in\\mathbb{Z}$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u81ea\u53cd\u6027\uff1a$a-a=0$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u79f0\u6027\uff1a$a-b=6k,b-a=-6k$\u6545$$6|(b-a)$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f20\u9012\u6027\uff1a\u5982\u679c$a\\sim b,b\\sim c$\u90a3\u4e48\u5b58\u5728$k,l\\in \\mathbb{Z}$\u4f7f\u5f97$$a-b=6k,b-c=6l$$\u6240\u4ee5$$a-c=a-b+b-c=6k-6l=6(k-l)$$\u6545$$6|(a-c)$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64$\\sim$\u7684\u786e\u662f\u4e00\u4e2a\u7b49\u4ef7\u5173\u7cfb<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u800c\u4efb\u610f\u4e00\u4e2a\u6574\u6570\u9664\u4ee5$6$,\u4f59\u6570\u53ea\u80fd\u662f$$0,1,2,3,4,5$$\u56e0\u6b64\u6574\u6570\u88ab\u5212\u5206\u4e3a\u516d\u4e2a\u7b49\u4ef7\u7c7b$$[0],[1],[2],[3],[4],[5]$$\u4e5f\u53ef\u4ee5\u5199\u6210\u966a\u96c6\u7684\u5f62\u5f0f$$[a]=a+6\\mathbb{Z}$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e2a\u96c6\u5408\u4e0a\u5b9a\u4e49\u52a0\u6cd5$$[a]+[b]=[a+b]$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9a\u4e49\u4e58\u6cd5$$[a][b]=[ab]$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5206\u522b\u9a8c\u8bc1\u5176\u826f\u5b9a\u4e49\u6027\uff0c\u8bbe$[a]=[a^{\\prime}],[b]=[b^{\\prime}]$,\u6240\u4ee5\u5b58\u5728$k,l$\u4f7f\u5f97$$a-a^{prime}=6k,b-b^{\\prime}=6l$$$$a-a^{\\prime}+b-b^{prime}=6(k+l)$$\u56e0\u6b64\u52a0\u6cd5\u662f\u826f\u5b9a\u4e49\u7684\uff0c\u540c\u7406\u4e58\u6cd5\u4e5f\u662f\u826f\u5b9a\u4e49\u7684<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u6b64\u5f97\u5230\u4e86\u5546\u73af$$\\mathbb{Z}\/6\\mathbb{Z}$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u4e2d\u52a0\u6cd5\u5355\u4f4d\u5143\u662f$[0]$\uff0c\u4e58\u6cd5\u5355\u4f4d\u5143\u662f$[-1]$,\u52a0\u6cd5\u9006\u5143\u662f$[-a]$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528\u7406\u60f3\u7684\u8bed\u8a00\u5219\u662f$$(6)=6\\mathbb{Z}$$\u662f$\\mathbb{Z}$\u7684\u7406\u60f3\uff0c\u4e14$$a\\sim b\\Longleftrightarrow a-b\\in (6)$$<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8d39\u9a6c\u5c0f\u5b9a\u7406<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u4e8e\u8d39\u9a6c\u5c0f\u5b9a\u7406\u7684\u7b80\u5355\u4ecb\u7ecd\u53ef\u4ee5\u770b\u7ef4\u57fa\u767e\u79d1<a href=\"https:\/\/zh.wikipedia.org\/wiki\/%E8%B4%B9%E9%A9%AC%E5%B0%8F%E5%AE%9A%E7%90%86\">https:\/\/zh.wikipedia.org\/wiki\/%E8%B4%B9%E9%A9%AC%E5%B0%8F%E5%AE%9A%E7%90%86<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u8d39\u9a6c\u5c0f\u5b9a\u7406\u7528\u5546\u73af\u7684\u8bed\u8a00\u8868\u793a\uff1a\u5982\u679c$p$\u662f\u7d20\u6570\uff0c\u90a3\u4e48\u5bf9\u4efb\u610f\u7684\u6574\u6570$a$$$a^{p}\\equiv a \\ (\\mod p)$$\u8fd9\u610f\u5473\u7740$$p|(a^{p}-a)$$\u7b49\u4ef7\u4e8e$$[a^{p}]=[a]\\text{\u5728}\\mathbb{Z}\/p\\mathbb{Z}\\text{\u4e2d\u6210\u7acb}$$\u5373\u5728\u5546\u73af$$\\mathbb{Z}\/(p)=\\mathbb{Z}\/p\\mathbb{Z}$$\u4e2d\uff0c\u6bcf\u4e2a\u5143\u7d20$x$\u90fd\u6ee1\u8db3$$x^{p}=x$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u77e5\u9053$\\mathbb{Z}\/p\\mathbb{Z}$\u662f\u4e00\u4e2a\u57df\uff0c\u5728\u5176\u4e2d\u53d6\u4efb\u610f\u4e00\u4e2a\u975e\u96f6\u5269\u4f59\u7c7b$$[a]\\neq [0]$$\u6709$$\\gcd(a,p)=1$$\u7b49\u4ef7\u4e8e\u5b58\u5728\u6574\u6570$k,l$\u4f7f\u5f97$$ak+pl=1$$\u653e\u5165\u6a21$p$\u8fd0\u7b97$$[ak]+[pl]=[1]$$\u5373$$[ak]=[1]$$\u57df\u4e2d\u6240\u6709\u975e\u96f6\u5143\u7d20\u90fd\u6709\u4e58\u6cd5\u9006\u5143\uff0c\u6545$$[a]^{-1}=[k]$$<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5546\u73af$\\mathbb{Z}\/p\\mathbb{Z}$\u4e2d\u7684\u5143\u7d20\u662f$$[0],[1],\\cdots,[p-1]$$\u53bb\u6389\u96f6\u5143\u7d20$[0]$\u5269\u4e0b\u975e\u96f6\u5143\u7d20$$[1],[2],\\cdots,[p-1]$$\u57df\u4e2d\u6240\u6709\u7684\u975e\u96f6\u5143\u7d20\u90fd\u5177\u6709\u4e58\u6cd5\u9006\u5143\uff0c\u6240\u4ee5\u5269\u4e0b\u7684\u975e\u96f6\u5143\u7d20\u5728\u4e58\u6cd5\u4e0b\u6784\u6210\u4e58\u6cd5\u7fa4$(\\mathbb{Z}\/p\\mathbb{Z})^{*}$,\u8fd9\u4e2a\u7fa4\u7684\u9636$$|(\\mathbb{Z}\/p\\mathbb{Z})^{*}|=p-1$$\u53d6\u4efb\u610f\u975e\u96f6\u5143\u7d20$[a]$,\u6839\u636e\u62c9\u683c\u6717\u65e5\u5b9a\u7406\u5f97\u5230$$[a]^{p-1}=[1]$$\u8fd9\u5c31\u662f\u8d39\u9a6c\u5c0f\u5b9a\u7406<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6574\u9664\u4e0e\u4f59\u6570 \u7ed9\u5b9a\u4e24\u4e2a\u6574\u6570$a,b$,\u5176\u4e2d$b&gt;0$,\u5219\u4e00\u5b9a\u53ef\u4ee5\u5199\u6210$$a=bq+r\\ \\ \\ \\ \\ 0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1129","post","type-post","status-publish","format-standard","hentry","category-math"],"_links":{"self":[{"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/posts\/1129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/comments?post=1129"}],"version-history":[{"count":20,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/posts\/1129\/revisions"}],"predecessor-version":[{"id":1162,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/posts\/1129\/revisions\/1162"}],"wp:attachment":[{"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/media?parent=1129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/categories?post=1129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kktsuki.space\/index.php\/wp-json\/wp\/v2\/tags?post=1129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}