{"id":2566,"date":"2022-12-24T23:35:06","date_gmt":"2022-12-24T15:35:06","guid":{"rendered":"http:\/\/tihar-tech.cn\/?p=2566"},"modified":"2023-03-30T21:04:40","modified_gmt":"2023-03-30T13:04:40","slug":"%e6%95%b0%e8%ae%ba-%e7%bb%84%e5%90%88%e6%95%b0%e5%8e%9f%e7%90%86%e5%8f%8a%e7%bc%96%e7%a0%81%e8%bf%90%e7%ae%97","status":"publish","type":"post","link":"http:\/\/139.196.114.170\/?p=2566","title":{"rendered":"\u6570\u8bba &#8211; \u7ec4\u5408\u6570\u539f\u7406\u53ca\u7f16\u7801\u8fd0\u7b97"},"content":{"rendered":"<h3>\u7ec4\u5408\u6570\u8ba1\u7b97\u539f\u7406<\/h3>\n<p>n\u4e2a\u6570\u5b57\u4e2d\u968f\u673a\u9009\u62e9m\u4e2a\u8fdb\u884c\u5168\u6392\u5217\uff0c\u5171\u6709 <code class=\"katex-inline\">\\small A_n^m = C_n^mA_m^m<\/code> \u79cd\u6392\u5217<\/p>\n<p>\u6216\u7531\u5168\u6392\u5217\u4e2d\u9009\u53d6\u76f8\u540c\u6570\u5b57\u65f6\u7684\u4e0d\u540c\u6392\u5217 <code class=\"katex-inline\">\\small A_m^m<\/code> \u6b21\u5f97\u5230\u4e0b\u5f0f<\/p>\n<p>\u7ec4\u5408\u6570\u8ba1\u7b97\u516c\u5f0f <code class=\"katex-inline\">\\small C_n^m = \\frac{A_n^m}{A_m^m} = \\frac{n!}{m!(n-m)!}<\/code><\/p>\n<h3>\u7ec4\u5408\u6570\u7f16\u7801<\/h3>\n<p>\u516c\u5f0f\u6a21\u62df\u9636\u4e58\u5bb9\u6613\u8d85\u51fa\u8868\u793a\u8303\u56f4\uff0c\u5e94\u91c7\u7528\u6027\u8d28\u907f\u514d<\/p>\n<h4>\u4e58\u9664\u4ea4\u66ff\u907f\u514d\u6ea2\u51fa<\/h4>\n<p>\u6309\u4ee5\u4e0b\u53d8\u5f62\u5f0f\u4e58\u4e00\u9879\u9664\u4e00\u9879\uff0c\u9632\u6b62\u4e58\u6cd5\u6ea2\u51fa<\/p>\n<pre><code class=\"language-katex\">\\tiny\n\\begin{aligned}\nC_n^m &amp;= \\frac{n!}{m!(n-m)!}\\\\\n&amp;=\\frac{(n-m+1)(n-m+2)\\cdots n}{m!}\\\\\n&amp;=(\\frac{n-m+1}{1}) \\cdot (\\frac{n-m+2}{2}) \\cdots (\\frac{n}{m})\\\\\n\\end{aligned}<\/code><\/pre>\n<p>\u6309\u6570\u5b57\u5012\u5e8f\u8ba1\u7b97\u65f6\uff0c\u521d\u59cb\u7684\u9664\u6570\u8f83\u5927\uff0c\u4f1a\u51fa\u73b0int\u672a\u6574\u9664\u800c\u5bfc\u81f4\u7cbe\u5ea6\u4e22\u5931\uff0c\u5982 <code class=\"katex-inline\">\\small C_8^4<\/code><\/p>\n<pre><code class=\"language-java\">\/\/ C_8^4 = 60\uff0c\u6b63\u786e\u7ed3\u679c\u4e3a70\npublic int C(int n, int m) {\n    long res = 1;\n    for (int i = 0; i &lt; m; i++)\n        res = res * (n - i) \/ (m - i);\n    return (int) res;\n}<\/code><\/pre>\n<p>\u6309\u6570\u5b57\u5927\u5c0f\u5347\u5e8f\u8ba1\u7b97\uff0c\u521d\u59cb\u5c0f\u9664\u6570\u4f5c\u4e3a\u88ab\u9664\u6570\u56e0\u5b50\u53ef\u4ee5\u6574\u9664<\/p>\n<pre><code class=\"language-java\">public int C(int n, int m) {\n    long res = 1;\n    int diff = n - m;\n    for (int i = 1; i &lt;= m; i++)\n        res = res * (diff + i) \/ i;\n    return (int) res;\n}<\/code><\/pre>\n<h4>\u52a0\u6cd5\u62c6\u5206\u907f\u514d\u6ea2\u51fa<\/h4>\n<p>\u52a8\u6001\u89c4\u5212\u72b6\u6001\u8f6c\u79fb\u65b9\u7a0b <code class=\"katex-inline\">\\small C_n^m = C_{n-1}^{m-1} + C_{n-1}^{m}<\/code><\/p>\n<p>\u5982\u679c\u9009\u62e9\u7b2cn\u9879\uff0c\u5219\u5269\u4f59m-1\u9879\u4ecen-1\u9879\u4e2d\u9009\u51fa<\/p>\n<p>\u5982\u679c\u4e0d\u9009\u62e9\u7b2cn\u9879\uff0c\u5219m\u9879\u5747\u4ece\u5176\u4f59n-1\u9879\u4e2d\u9009\u51fa<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ec4\u5408\u6570\u8ba1\u7b97\u539f\u7406 n\u4e2a\u6570\u5b57\u4e2d\u968f\u673a\u9009\u62e9m\u4e2a\u8fdb\u884c\u5168\u6392\u5217\uff0c\u5171\u6709 \\small A_n^m = C_n^mA_m^m \u79cd &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/139.196.114.170\/?p=2566\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u6570\u8bba &#8211; \u7ec4\u5408\u6570\u539f\u7406\u53ca\u7f16\u7801\u8fd0\u7b97\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/posts\/2566"}],"collection":[{"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.196.114.170\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2566"}],"version-history":[{"count":9,"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/posts\/2566\/revisions"}],"predecessor-version":[{"id":2686,"href":"http:\/\/139.196.114.170\/index.php?rest_route=\/wp\/v2\/posts\/2566\/revisions\/2686"}],"wp:attachment":[{"href":"http:\/\/139.196.114.170\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.196.114.170\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2566"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.196.114.170\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}