Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340

Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/hitowomusubu/www/wp/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
一次不定方程式の解法 | 夢を叶える塾
スポンサーリンク

一次不定方程式の問題の解法

ホームページのリニューアルに伴い一部のページは新しいサイトにリダイレクトされます。

 

一次不定方程式の整数解を求める問題です。
一次不定方程式に関する知識はユークリッドの互除法と一次不定方程式をご参照ください。

基本問題

次の方程式の整数解を全て求めなさい。
(1)3x+2y=0
(2)3x+2y=1

解き方

(1)はax=byの形に変形することで、整数の素因数分解が1通りに表せるという性質が使えるようになります。
(2)は1つ解を見つけるとその解を使った式から(1)のような形に式を変形することができます。

解説

(1)3x+2y=0
一次不定方程式は式が一つだと解が無数に存在します。
例えば、(-2,3)という整数解もあれば、\displaystyle (1,-\frac{3}{2})という解もあります。
問題は整数解を求める問題ですから、前者はその整数解の中の1つです。
整数解という性質が整数の性質を使えるようにしてくれます。

問題を解いていきましょう。
与えられた方程式を変形すると、
3x=-2y・・・①
です。
整数解ですからx,yは整数の場合を考えましょう。
すると、この両辺は整数になっています。
整数の素因数分解は1通りに表せます。
左辺は3xxは整数ですから3の倍数です。
右辺は-2yyは整数ですから2の倍数です。
左辺も右辺も2の倍数であり、3の倍数であり、つまり、6の倍数になるという事です。

左辺は3xですから6の倍数になるためにはxは2の倍数である必要があります。
右辺は-2yですから6の倍数になるためにはyは3の倍数である必要があります。
2の倍数は2と整数の積です。
x=2k(kは整数)という形で表すことができます。

x=2kとすると3x=3\cdot 2k=6kです。
①の3x=-2yに代入して、6k=-2yと書けます。
式を変形してy=-3kとなります。
全てのx=2k(kは整数)に対してy=-3kとすることで、この整数の組(x,y)が解になります。
一方でこの形以外で整数解は存在しません。
(存在するとxが2の倍数でなくなり、-2yも2の倍数でなくなり、yが整数であることに矛盾します。)

従って、(x,y)=(2k,-3k)(kは整数)がすべての整数解になります。

なお係数の2と3が互いに素なので話は単純になっています。

(2)3x+2y=1・・・①
(1)の形に変形できれば、同じ方法で解くことができます。

さて、1つ整数解を見つけましょう。
(1,-1)あたりがすぐ見つかるでしょうか。
これは解になっているわけですから、代入したままの回りくどい書き方をすると
3\cdot 1+2\cdot -1=1・・・②
ですね。
この形、引き算すると右辺が共に1なので0になります
①-②を計算しましょう。
3x+2y=1
3\cdot 1+2\cdot -1=1
3(x-1)+2(y+1)=0・・・③
ここで(1)の問題3x+2y=0と比べると、xがx-1になり、yがy+1になっただけですね。
よく似た形になっています。
(1)と同じことを用いて答えを導くことができます。

3(x-1)+2(y+1)=0を変形して3(x-1)=-2(y+1)とします。
左辺は3(x-1)x-1は整数ですから3の倍数です。
右辺は-2(y+1)y+1は整数ですから2の倍数です。
左辺も右辺も2の倍数であり、3の倍数であり、つまり、6の倍数になるという事です。

左辺は3(x-1)ですから6の倍数になるためにはx-1は2の倍数である必要があります。
右辺は-2(y+1)ですから6の倍数になるためにはy+1は3の倍数である必要があります。
2の倍数は2と整数の積です。
x-1=2k(kは整数)という形で表すことができます。
これは変形するとx=2k+1(kは整数)となります。

x-1=2kとすると3(x-1)=3\cdot 2k=6kです。
3(x-1)=-2(y+1)に代入して、6k=-2(y+1)と書けます。
式を変形してy=-3k-1となります。
全てのx=2k+1(kは整数)に対してy=-3k-1とすることで、この整数の組(x,y)が解になります。

(1)で求めた答えを使って解く方法も紹介します。
(1)3x+2y=0と(2)3(x-1)+2(y+1)=0はよく似ていますがx-1,y+1というずれがあるので、x'=x-1,y'=y+1としましょう。
3x'+2y'=0・・・④
④の解は(1)の解ですから、3x+2y=0の整数解(2k,-3k)(kは整数)です。
という事で、
x'=2k
y'=-3k
これをx'=x-1,y'=y+1で戻すと
x-1=2k
x=2k+1
y+1=-3k
y=-3k-1
となります。
全ての整数解は(x,y)=(2k+1,-3k-1)(kは整数)になります。

応用問題

次の方程式の整数解を求めなさい。
103x+29y=1

解き方

基本問題は整数解がすぐに見つかりました。
応用問題も整数解が1つ見つかれば同じ解き方で解けますね
ユークリッドの互除法を使います。

解説

103x+29y=1
中々すぐに整数解は見つからないと思います。

103と29は互いに素な数ですね。
ここでユークリッドの互除法を使います。
ユークリッドの互除法はユークリッドの互除法の解法をご参照ください。
103=29\times 3+16
29=16\times 1+13
16=13\times 1+3
13=3\times 4+1
これを変形すると、
103-29\times 3=16
29-16\times 1=13
16-13\times 1=3
13-3\times 4=1
1を3,13で表し、3を13,16で表し、13を16,29で表し、16を29,103で表せたら、1が29と103で表せそうですね
互いに素な数は最大公約数が1なので、ユークリッドの互除法を使うと必ず最後に1が出てきます。
やってみましょう。

1=13-3\times 4
1=13-(16-13\times 1)\times 4=13-16\times 4 +13\times 4=13\times 5-16\times 4
1=(29-16\times 1)\times 5-16\times 4=29\times 5 -16\times 5 -16 \times 4 =29\times 5 -16\times 9
1=29\times 5 -(103-29\times 3)\times 9=29\times 5 -103\times 9 +29\times 27=29 \times 32 - 103\times 9
確認してみると29 \times 32 =928,103\times 9=927です。
x=-9,y=32103x+29y=1の解になっています。

後はこの解を使って引き算でしたね。
103x+29y=1・・・①
103(-9)+29(32)=1・・・②
①-②を計算すると
103(x+9)+29(y-32)=0
29と103は互いに素ですが、このような時は基本問題のときと全く同じ議論で話を進めることができます。
103(x+9)=-29(y-32)
となるので、左辺は103の倍数、右辺は29の倍数、両辺103×29の倍数になります。
左辺はx+9が29の倍数になりますね。
x+9=29k(kは整数)で整数解が表せることとなり、x=29k-9(kは整数)
これに対するyy-32=-103ky=-103k+32(kは整数)
解は、(x,y)=(29k-9,-103k+32)(kは整数)となります。

確かめておきましょう。
k=1のとき(x,y)=(20,-71)
103\cdot 20+29\cdot (-71)=2060-2059=1
大丈夫そうですね。

終わりに

一次不定方程式の整数解の問題も知らないと解法をその場で思いつくのは難しいタイプの問題だと思います。
知っていれば得点しやすいので、必ず演習問題に取り組んでおきましょう

にほんブログ村 地域生活(街) 東北ブログへ にほんブログ村 地域生活(街) 東北ブログ 米沢情報へ にほんブログ村 教育ブログへ にほんブログ村 教育ブログ 塾教育へ
スポンサーリンク