「九去法」の版間の差分

提供: miniwiki
移動先:案内検索
(1版 をインポートしました)
(内容を「'''九去法'''(きゅうきょほう、くきょほう、{{lang-en-short|casting out nines}}) 四則計算の検算方法の一。 ある整数を9で割った余…」で置換)
(タグ: Replaced)
 
1行目: 1行目:
'''九去法'''(きゅうきょほう、くきょほう、{{lang-en-short|casting out nines}})とは、[[整数]]の[[算術|四則演算]]の[[検算]]の一種である。入力と出力の[[数字根]]を求めることで、その計算が正しいかどうかを確認するテストになる。非常に単純な方法なので、その数学的意味を理解できなくても活用可能である。
+
'''九去法'''(きゅうきょほう、くきょほう、{{lang-en-short|casting out nines}}
  
== 概要 ==
+
四則計算の検算方法の一。
九去法という名称は、検算過程で 9 を無視することを意味している。ある数値の各桁の数字を足し合わせるが、9 および合計が 9 になる数字は無視して加算しない。各数値について1桁の数字を求め、本来の計算と同じ計算(加法なら足し算)をその数字について行う(この場合も 9 を無視した数字根を求める)。入力となる各数値についてこのようにして求められた数字と出力について求めた数字が一致しなければ、計算が間違っていることになる。
 
  
この方法は[[電卓]]なしでもできるほど単純であるが、問題がないわけではない。九去法は整数や[[小数]]以外では使えず、[[分数]]や[[指数|冪乗]]には使えない。また、元々の計算結果が全くのでたらめであった場合に、九去法では偶然正しいと判定される可能性がある。また、九去法の過程で計算間違いをする可能性も当然ながら存在する。
+
ある整数を9で割った余りと、その整数の各位の数の和を9で割った余りとは等しいという原理を利用するもの.
  
電卓や[[コンピュータ]]の普及により、九去法は最近ではあまり使われなくなった。日本では[[安永_(元号)|安永]]4年([[1775年]])に出版された[[和算]]書『[[算法少女]]』の第八問に九去法が取り上げられている<ref>[[#小寺2009|小寺(2009)]]、附録19頁</ref>。この本によれば「[[阿波国|阿波]]の人が[[浪花]]にきてこの術〔九去法〕を十金で売っていた.好事家が争って求めていたという.」と解説されている<ref>[[#小寺2009|小寺(2009)]]、77-81頁</ref>。
 
  
== 例 ==
+
{{テンプレート:20180815sk}}
以下では[[加法]]、[[減法]]、[[乗法]]、[[除法]]のそれぞれについて九去法を使った例を示す。
 
 
 
=== 加法 ===
 
{|
 
|-
 
|align="right"| <math>\mathit{3} 2 \mathit{6} 4\, </math>
 
|<math>\Rightarrow</math>
 
|<math>\mathit{6}\, </math><sup>*</sup>
 
|まず、足して 9 になる数字(イタリック体で示す)を除く。
 
|-
 
|align="right"| <math>\mathit{8415}\, </math>
 
|<math>\Rightarrow</math>
 
|<math>0\, </math><sup>†</sup>
 
|残った数字を足し合わせ、最終的に一桁の数字になるまでそれを繰り返す。
 
|-
 
|align="right"| <math>2 \mathit{9} 46\, </math>
 
|<math>\Rightarrow</math>
 
|<math>\mathit{3}\, </math><sup>‡</sup>
 
|こうして得られた値を excess と呼ぶ。
 
|-
 
|align="right"| <math>\underline{+\mathit{3} 20 \mathit{6}}</math>
 
|<math>\Rightarrow</math>
 
|<math>2\, </math><sup>**</sup>
 
|得られた excess 群に同じ作業をして、最終的に1つの数字を得る。
 
|-
 
|align="right"| <math>\mathit{1} 7 \mathit{8} 31\, </math>
 
|
 
|rowspan="2"| <math>\bigg\Downarrow</math>
 
|[[総和]]結果についても同じことを行い、一桁の数字を得る。
 
|-
 
|align="center"|<math>\Downarrow</math>
 
|-
 
|align="center"|<math>{2}\, </math><sup>††</sup>
 
|<math>\Leftrightarrow</math>
 
|<math>2\, </math>
 
|総和の excess と足される数値群の最終的な excess は等しくなければならない。
 
|}
 
 
 
:<sup>*</sup>2 + 4 = 6 <br>
 
:<sup>†</sup>数字が残らないため<br>
 
:<sup>‡</sup>2 + 4 + 6 = 12; 1 + 2 = 3<br>
 
:<sup>**</sup>2 + 0 = 2<br>
 
:<sup>††</sup>7 + 3 + 1 = 11; 1 + 1 = 2<br>
 
 
 
=== 減法 ===
 
{|
 
|-
 
|align="right"| <math>\mathit{5643}\, </math>
 
|<math>\Rightarrow</math>
 
|<math>0(9)\, </math>
 
|まず、9 そのものと、足して 9 になる数字(イタリック体)を減数と被減数から除く。
 
|-
 
|align="right"| <math>\underline{-2\mathit{891}}\, </math>
 
|<math>\Rightarrow</math>
 
|<math>-2\, </math>
 
|残った数字を足し合わせ、最終的に1つの数字を得る。
 
|-
 
|align="right"| <math>\mathit{2} 7 \mathit{52}\, </math>
 
|
 
|rowspan="2"| <math>\bigg\Downarrow</math>
 
|減算結果にも同じことを行い、1つの数字を得る。
 
|-
 
|align="center"|<math>\Downarrow</math>
 
|
 
|ゼロから 2 を引くと負になるので、9 を借りてきて計算する。
 
|-
 
|align="center"|<math>{7}\, </math>
 
|<math>\Leftrightarrow</math>
 
|<math>7\, </math>
 
|被減数と減数の excess の差は減算結果の excess と等しくなければならない。
 
|}
 
 
 
=== 乗法 ===
 
{|
 
|-
 
|align="right"| <math>\mathit{5} \mathit{4} 8\, </math>
 
|<math>\Rightarrow</math>
 
|<math>8\, </math>
 
|各乗数の数値から 9 そのものと、足して 9 になる数字(イタリック体)を除く。
 
|-
 
|align="right"| <math>\underline{\times 62 \mathit{9}}\, </math>
 
|<math>\Rightarrow</math>
 
|<math>8\, </math>
 
|残った数字を足し合わせ、最終的に1つの数字を得る。
 
|-
 
|align="right"| <math>{\mathit{3} 44 \mathit{69} 2}\, </math>
 
|
 
|rowspan="2"| <math>\bigg\Downarrow</math>
 
|2つの excess をかけて、結果に同様の操作を行って1つの数字を得る。
 
|-
 
|align="center"|<math>\Downarrow</math>
 
|
 
|同じように積からも excess を求める。
 
|-
 
|align="center"|<math>{1}\, </math>
 
|<math>\Leftrightarrow</math>
 
|<math>1\, </math><sup>*</sup>
 
|積の excess と 乗数の excess から得られた数字は等しくなければならない。
 
|}
 
 
 
:<sup>*</sup>8 × 8 = 64; 6 + 4 = 10; 1 + 0 = 1
 
 
 
=== 除法 ===
 
{|
 
|-
 
|align="center"| <math>8\times</math>
 
|align="center"|<math>4+\, </math>
 
|align="center"|<math>3\, </math>
 
|align="center"|<math>\Longrightarrow</math>
 
|align="center"|<math>8\, </math>
 
|法数、商、余りのそれぞれについて、9 と足して 9 になる数を除く。
 
|-
 
|align="center" rowspan="2"| <math>\bigg\Uparrow</math>
 
|align="center"|<math>\Uparrow</math>
 
|align="center"| <math>\Uparrow</math>
 
|
 
|
 
|残った数字を足し合わせて1つの数字を得る。
 
|-
 
|align="right"| <math>877\, </math>
 
| <math>r. 84\, </math>
 
|
 
|
 
|法数と商の excess をかけて、余りの excess をそれに加算する。
 
|-
 
|align="right"| <math>314\, </math>
 
|<math>\overline{)\mathit{2754}62}\, </math>
 
|align="center" colspan="2"| <math>\Longrightarrow</math>
 
|align="center"|<math>8\, </math>
 
|同様に被除数からも excess を求める。
 
|-
 
|
 
|
 
|
 
|
 
|
 
|(9 と 9 になる数字はイタリック体で表す)
 
|-
 
|
 
|
 
|
 
|
 
|
 
|被除数の excess は他の数値の excess から求められる数字と等しくなければならない。
 
|}
 
 
 
== 何故うまくいくのか ==
 
九去法は[[合同式]]の性質を利用した検算方法である。9 を法とする計算において、''x'' と ''x&#39;''(および ''y'' と ''y&#39;'')が合同であれば、''x''&nbsp;+&nbsp;''y'' と ''x&#39;''&nbsp;+&nbsp;''y&#39;'' も合同であり、''x''&nbsp;&minus;&nbsp;''y'' と ''x&#39;''&nbsp;&minus;&nbsp;''y&#39;'' も合同であり、''x''&nbsp;×&nbsp;''y'' と ''x&#39;''&nbsp;×&nbsp;''y&#39;'' も合同となる。
 
 
 
:<math>x \equiv x' \pmod{9},\ y \equiv y' \pmod{9} \implies \begin{cases} x+y \equiv x'+y' \pmod{9}, \\
 
x-y \equiv x'-y' \pmod{9}, \\
 
x \times y \equiv x' \times y' \pmod{9}.\end{cases}</math>
 
 
 
整数の計算式に限れば、次が成り立つ。すなわち整数を構成する[[十進記数法]]の各数字の総和と元の数値は 9 を法として合同である。このため、数字を足し合わせた結果についても、さらに数字を足し合わせていき、最終的に一桁の数字を得たとき、その数字は元の数値と 9 を法として合同である。また、この際に 9 を除いても結果は変わらない(9 は 9 を法としたとき 0 となるため)。
 
 
 
:<math>10 \equiv 1 \pmod{9} \implies 10^{k} \equiv 1 \pmod{9} \ \textrm{for}\  k \geqq 1.
 
\begin{cases} & x = a_{n} 10^{n} + a_{n-1} 10^{n-1} + \cdots + a_0  \\
 
\implies & x \equiv a_{n} + a_{n-1} + \cdots + a_0 \pmod{9}.\end{cases}</math>
 
 
 
簡単に要約すると、計算結果が正しければ 9 で割った余りも必ず一致するので、それを確かめているのである。
 
 
 
計算式が正しければ、両辺は等しく、両辺に上記の操作を施した結果も等しくなる。しかし、1/9 の確率で元の数値が違っていても 9 を法とした値が同じになる場合もある。
 
計算結果が誤っていても正しい値と誤った値の差がちょうど 9 の倍数であれば 9 で割った余りが一致してしまうからである。
 
 
 
分数の計算は、分数を小数で表現したとき[[有限小数]]になる場合は九去法を使えるが、[[循環小数]]になる場合は九去法を使えない。
 
 
 
== 歴史 ==
 
3世紀のローマの[[ヒッポリュトス (対立教皇)|ヒッポリュトス]]は九去法を知っていた。その後12世紀のインドの数学者らも九去法を使っていた<ref>{{Harvtxt|Cajori|1991|p=91}}</ref>。
 
 
 
== 脚注 ==
 
{{Reflist}}
 
 
 
== 参考文献 ==
 
* {{Citation|last=Cajori|first=Florian|author-link=Florian Cajori|year=1991|title=A History of Mathematics (AMS Chelsea Publishing)|publisher=[[アメリカ数学会|AMS]]|location=New York, NY|edition=5|page=91|isbn=0-8218-2102-4|url=http://www.ams.org/bookstore-getitem/item=CHEL-303-H|ref=harv}}
 
** {{Cite book|和書|author=フロリアン・カジョリ|authorlink=フロリアン・カジョリ|others=[[石井省吾]]訳註|year=1970|title=数学史|volume=上(古代・中世・ルネッサンス)|publisher=津軽書房|asin=B000J9ZD0E|ref=カジョリ1970}}
 
* {{Cite book|和書|author=小寺裕|authorlink=小寺裕|date=2009-11-10|title=和算書「算法少女」を読む|series=[[ちくま学芸文庫]] Math&Science|publisher=筑摩書房|isbn=978-4-480-09255-7|url=http://www.chikumashobo.co.jp/product/9784480092557/|ref=小寺2009}}
 
 
 
== 関連項目 ==
 
{{Div col}}
 
*[[数字根]]
 
*[[数字和]]
 
*[[チェックサム]]
 
*[[チェックディジット]]
 
{{Div col end}}
 
 
 
== 外部リンク ==
 
* {{Kotobank|九去法|2=デジタル大辞泉}}
 
* {{MathWorld|title=Casting Out Nines|urlname=CastingOutNines}}
 
* [http://niquette.com/puzzles/paranump.html "Paranormal Numbers"] by Paul Niquette
 
  
 
{{DEFAULTSORT:きゆうきよほう}}
 
{{DEFAULTSORT:きゆうきよほう}}

2018/10/9/ (火) 11:22時点における最新版

九去法(きゅうきょほう、くきょほう、: casting out nines

四則計算の検算方法の一。

ある整数を9で割った余りと、その整数の各位の数の和を9で割った余りとは等しいという原理を利用するもの.




楽天市場検索: