{"id":399,"date":"2012-03-21T18:26:57","date_gmt":"2012-03-21T09:26:57","guid":{"rendered":"http:\/\/www.rainyman.net\/nest\/?p=399"},"modified":"2017-03-28T14:50:44","modified_gmt":"2017-03-28T05:50:44","slug":"n%e6%ac%a1%e5%a4%9a%e9%a0%85%e5%bc%8f%e3%81%ae%e5%80%a4%e3%81%ae%e8%a8%88%e7%ae%97","status":"publish","type":"post","link":"https:\/\/blog.rainyman.jp\/nest\/?p=399","title":{"rendered":"n\u6b21\u591a\u9805\u5f0f\u306e\u5024\u306e\u8a08\u7b97"},"content":{"rendered":"<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">\u76ee\u6b21<\/p><ul class=\"toc_list\"><li><a href=\"#n\"><span class=\"toc_number toc_depth_1\">1<\/span> n\u6b21\u591a\u9805\u5f0f\u306e\u5024\u306e\u8a08\u7b97<\/a><\/li><li><a href=\"#n1\"><span class=\"toc_number toc_depth_1\">2<\/span> n\u6b21\u591a\u9805\u5f0f\u306e1\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b97<\/a><\/li><li><a href=\"#np\"><span class=\"toc_number toc_depth_1\">3<\/span> n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b97<\/a><\/li><li><a href=\"#np-2\"><span class=\"toc_number toc_depth_1\">4<\/span> \u304a\u307e\u3051:n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u4e00\u822c\u5f62<\/a><\/li><li><a href=\"#i\"><span class=\"toc_number toc_depth_1\">5<\/span> \u53c2\u8003<\/a><\/li><\/ul><\/div>\n<p>\u6570\u5024\u8a08\u7b97\u3067n\u6b21\u591a\u9805\u5f0f\u306e\u5b9f\u6839\u3092\u6c42\u3081\u308b\u65b9\u6cd5\u3092\u66f8\u304f\u524d\u306b\uff0c\u307e\u305a\u306f\u591a\u9805\u5f0f\u306e\u5024\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8a08\u7b97\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\uff0e<\/p>\n\n<h2><span id=\"n\">n\u6b21\u591a\u9805\u5f0f\u306e\u5024\u306e\u8a08\u7b97<\/span><\/h2>\n\n<p>n\u6b21\u591a\u9805\u5f0f\u306e\u4fc2\u6570\u304c\u6b21\u6570\u304c\u4f4e\u3044\u65b9\u304b\u3089$$a_{0}, a_{1}, a_{2}, \\ldots , a_{n},$$($$a_{0}$$\u304c\u5b9a\u6570\u9805)\u3068\u3059\u308b\u3068\uff0c\nn\u6b21\u591a\u9805\u5f0f$$f(x)$$\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u305b\u308b\uff0e<\/p>\n\n<div>\\(f(x)=\\sum_{i=0}^{n}a_{i}x^{i}=a_{0}+a_{1}x+a_{2}x^{2}+\\ldots+a_{n}x^{n} \\ldots (1)\\)<\/div>\n\n<p>\u3053\u308c\u3092\u7d20\u76f4\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u66f8\u304d\u4e0b\u3059\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n\n<div><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nfloat a[n+1] = { \/* coefficients *\/ };\nfloat x = \/* some value *\/;\nfloat fx = a[0];\n\nfor(int i = 1; i &lt;= n; ++i)\n  fx += a[i] * pow(x, i);\n<\/pre><\/div>\n\n<p>\u3053\u306e\u3084\u308a\u65b9\u3092\u63a1\u7528\u3059\u308b\u3068\uff0cx\u306e\u51aa\u4e57\u306e\u8a08\u7b97\u91cf\u304c\u7121\u99c4\u306b\u306a\u308a\u307e\u3059\uff0e\n(\u4f8b\u3048\u3070$$x^4$$\u306f$$x^3\\cdot x$$\u3068\u3057\u3066\u8a08\u7b97\u3067\u304d\u308b\u306e\u306b\uff0c\u4e0a\u306e\u30b3\u30fc\u30c9\u3060\u3068x\u306e\u51aa\u4e57\u3092\u500b\u5225\u306b\u8a08\u7b97\u3057\u3066\u3044\u307e\u3059\uff0e\u300c\u3042\u308b\u5024\u306e\u51aa\u4e57\u300d\u306b\u76f8\u5f53\u3059\u308b\u6a5f\u68b0\u8a9e\u306f\u3042\u308a\u307e\u305b\u3093\u304b\u3089\uff0cpow\u3092\u547c\u3076\u305f\u3073\u306b\u30eb\u30fc\u30d7\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u3068\u8003\u3048\u3089\u308c\u307e\u3059\uff0e)\uff0e<\/p>\n\n<p>\u3068\u3053\u308d\u3067\u5f0f(1)\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5909\u5f62\u3067\u304d\u307e\u3059\uff0e<\/p>\n\n<div>\\(f(x)=a_{0}+a_{1}x+a_{2}x^{2}+\\ldots+a_{n}x^{n}\\)<\/div>\n\n<div>\\(f(x)=a_{0}+x(a_{1}+a_{2}x+\\ldots+a_{n}x^{n-1})\\)<\/div>\n\n<div>\\(f(x)=a_{0}+x(a_{1}+x(a_{2}+\\ldots+a_{n}x^{n-2}))\\)<\/div>\n\n<div>\\(f(x)=a_{0}+x(a_{1}+x(a_{2}+x(a_{3}\\cdots+x(a_{n-1}+x\\cdot a_{n})\\cdots)))\\)<\/div>\n\n<p>\u305f\u3068\u3048\u30704\u6b21\u591a\u9805\u5f0f\u306a\u3089<\/p>\n\n<div>\\(f(x)=a_{0}+a_{1}x+a_{2}x^{2}+a_{3}x^{3}+a_{4}x^{4}\\)<\/div>\n\n<div>\\(=a_{0}+x(a_{1}+a_{2}x+a_{3}x^{2}+a_{4}x^{3})\\)<\/div>\n\n<div>\\(=a_{0}+x(a_{1}+x(a_{2}+a_{3}x+a_{4}x^{2}))\\)<\/div>\n\n<div>\\(=a_{0}+x(a_{1}+x(a_{2}+x(a_{3}+a_{4}x)))\\)<\/div>\n\n<p>\u3068\u3044\u3046\u3088\u3046\u306a\u5f62\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n\n<p>\u3053\u306e\u3088\u3046\u306a\u5909\u5f62\u306b\u3088\u3063\u3066\u8a08\u7b97\u3092\u697d\u306b\u3059\u308b\u65b9\u6cd5\u3092<a href=\"http:\/\/en.wikipedia.org\/wiki\/Horner_scheme\">\u30db\u30fc\u30ca\u30fc\u6cd5<\/a>\u3068\u3044\u3046\u3088\u3046\u3067\u3059\uff0e\n\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7d1a\u6570\u3092\u8003\u3048\u308b\u3068\u7c21\u5358\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u66f8\u304d\u4e0b\u3059\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n\n<div>\\(\nf(x)=P_{0} \\\\\nP_{0}=a_{0}+xP_{1} \\\\\nP_{1}=a_{1}+xP_{2} \\\\\n\\vdots \\\\\nP_{i}=a_{i}+xP_{i+1} \\\\\n\\vdots \\\\\nP_{n}=a_{n} \\\\\n\\)<\/div>\n\n<div><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nfloat a[n+1] = { \/* coefficients *\/ };\nfloat x = \/* some value *\/;\nfloat fx = a[n];\n\nfor(int i = n-1; i &gt;= 0; --i)\n  fx = a[i] + x * fx;\n<\/pre><\/div>\n\n<h2><span id=\"n1\">n\u6b21\u591a\u9805\u5f0f\u306e1\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b97<\/span><\/h2>\n\n<p><em>(\u66f8\u304d\u304b\u3051)<\/em><\/p>\n\n<div>\\(f'(x)=P&#8217;_{0}\\)<\/div>\n\n<div>\\(P&#8217;_{0}=P_{0}+xP&#8217;_{1}\\)<\/div>\n\n<div>\\(P&#8217;_{1}=P_{1}+xP&#8217;_{2}\\)<\/div>\n\n<div>\\(\\vdots\\)<\/div>\n\n<div>\\(P&#8217;_{i}=P_{i}+xP&#8217;_{i+1}\\)<\/div>\n\n<div>\\(\\vdots\\)<\/div>\n\n<div>\\(P&#8217;_{n-1}=P_{n-1}\\)<\/div>\n\n<div><pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\nfloat a[n+1] = { \/* coefficients *\/ };\nfloat x = \/* some value *\/;\nfloat fx = a[n];\nfloat dfx = 0;\n\nfor(int i = n-1; i &gt;= 0; --i)\n{\n  dfx = fx + x * dfx;\n  fx  = a[i] + x * fx;\n}\n<\/pre><\/div>\n\n<h2><span id=\"np\">n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b97<\/span><\/h2>\n\n<p><em>(\u66f8\u304d\u304b\u3051)<\/em><\/p>\n\n<div>\\( \\\\\nf^{(p)}(x)=p!\\cdot P^{(p)}_{0} \\\\\nP^{(p)}_{0}=P^{(p-1)}_{0}+xP^{(p)}_{1} \\\\\nP^{(p)}_{1}=P^{(p-1)}_{1}+xP^{(p)}_{2} \\\\\n\\vdots \\\\\nP^{(p)}_{i}=P^{(p-1)}_{i}+xP^{(p)}_{i+1} \\\\\n\\vdots \\\\\nP^{(p)}_{n-p}=P^{(p-1)}_{n-p} \\\\\n\\)<\/div>\n\n<h2><span id=\"np-2\">\u304a\u307e\u3051:n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u4e00\u822c\u5f62<\/span><\/h2>\n\n<div>\\(f^{(p)}(x)=\\sum^{n}_{i=p}(n-i)^{\\underline{n}}a_{i}x^{i-p}\\)<\/div>\n\n<p>\u4e0b\u964d\u968e\u4e57<\/p>\n\n<div>\\(x^{\\underline{n}}=\\prod^{n-1}_{i=0}(x-i)=\\frac{x!}{(x-n)!}\\)<\/div>\n\n<h2><span id=\"i\">\u53c2\u8003<\/span><\/h2>\n\n<ul>\n<li><a href=\"http:\/\/math.fullerton.edu\/mathews\/n2003\/hornermod.html\">Horner&#8217;s Method<\/a><\/li>\n<li><a href=\"http:\/\/www.amazon.co.jp\/%E3%83%8B%E3%83%A5%E3%83%BC%E3%83%A1%E3%83%AA%E3%82%AB%E3%83%AB%E3%83%AC%E3%82%B7%E3%83%94%E3%83%BB%E3%82%A4%E3%83%B3%E3%83%BB%E3%82%B7%E3%83%BC-%E6%97%A5%E6%9C%AC%E8%AA%9E%E7%89%88%E2%80%95C%E8%A8%80%E8%AA%9E%E3%81%AB%E3%82%88%E3%82%8B%E6%95%B0%E5%80%A4%E8%A8%88%E7%AE%97%E3%81%AE%E3%83%AC%E3%82%B7%E3%83%94-William-H-Press\/dp\/4874085601\">\u30cb\u30e5\u30fc\u30e1\u30ea\u30ab\u30eb\u30ec\u30b7\u30d4\u30fb\u30a4\u30f3\u30fb\u30b7\u30fc \u65e5\u672c\u8a9e\u7248\u2015C\u8a00\u8a9e\u306b\u3088\u308b\u6570\u5024\u8a08\u7b97\u306e\u30ec\u30b7\u30d4<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6b211 n\u6b21\u591a\u9805\u5f0f\u306e\u5024\u306e\u8a08\u7b972 n\u6b21\u591a\u9805\u5f0f\u306e1\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b973 n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u5024\u306e\u8a08\u7b974 \u304a\u307e\u3051:n\u6b21\u591a\u9805\u5f0f\u306ep\u968e\u5c0e\u95a2\u6570\u306e\u4e00\u822c\u5f625 \u53c2\u8003 \u6570\u5024\u8a08\u7b97\u3067n\u6b21\u591a\u9805\u5f0f\u306e\u5b9f\u6839\u3092\u6c42\u3081\u308b\u65b9\u6cd5\u3092\u66f8\u304f\u524d\u306b\uff0c\u307e\u305a\u306f\u591a\u9805\u5f0f\u306e\u5024\u3092 [&hellip;]<\/p>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,3],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/399"}],"collection":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=399"}],"version-history":[{"count":80,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions"}],"predecessor-version":[{"id":462,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=\/wp\/v2\/posts\/399\/revisions\/462"}],"wp:attachment":[{"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rainyman.jp\/nest\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}