|
|
Line 1: |
Line 1: |
| {{Unreferenced|date=December 2009}}
| | Andera is what you can contact her but she by no means really liked that title. Credit authorising is how she tends to make a living. One of the extremely best things in the globe for him is doing ballet and he'll be beginning something else along with it. North Carolina is the place he loves most but now he is considering other options.<br><br>Check out my site - [http://www.rambledog.com/members/dorotdenton/activity/400336/ free tarot readings] |
| In [[modular arithmetic]], the question of when a linear [[modular arithmetic|congruence]] can be solved is answered by the '''linear congruence theorem'''. If ''a'' and ''b'' are any [[integer]]s and ''n'' is a positive integer, then the congruence
| |
| :<math>ax \equiv b \pmod {n}</math>
| |
| has a solution for ''x'' if and only if ''b'' is divisible by the [[greatest common divisor]] ''d'' of ''a'' and ''n'' (denoted by gcd(''a'',''n'')). When this is the case, and ''x''<sub>0</sub> is one solution of (1), then the set of all solutions is given by
| |
| | |
| :<math>\{x_0+k\frac{n}{d}\mid k\in\Bbb{Z}\}.</math>
| |
| | |
| In particular, there will be exactly ''d'' = gcd(''a'',''n'') solutions in the set of residues {0,1,2,...,''n'' − 1}. The result is a simple consequence of [[Bézout's identity]].
| |
| | |
| ==Example==
| |
| For example, examining the equation a''x'' ≡ 2 ('''mod''' 6) with different values of ''a'' yields
| |
| :<math>3x \equiv 2 \pmod 6\ </math>
| |
| Here d = gcd(3,6) = 3 but since 3 does not divide 2, there is no solution.
| |
| :<math>5x \equiv 2 \pmod 6\ </math>
| |
| Here ''d'' = gcd(5,6) = 1, which divides any ''b'', and so there is just one solution in {0,1,2,3,4,5}: ''x'' = 4.
| |
| :<math>4x \equiv 2 \pmod {6}\ </math>
| |
| Here ''d'' = gcd(4,6) = 2, which does divide 2, and so there are exactly two solutions in {0,1,2,3,4,5}: ''x'' = 2 and ''x'' = 5.
| |
| | |
| ==Solving a linear congruence==
| |
| In general solving equations of the form:
| |
| :<math>ax \equiv b \pmod {n}</math>
| |
| If the greatest common divisor ''d'' = gcd(''a'', ''n'') divides ''b'', then we can find a solution ''x'' to the congruence as follows: the [[extended Euclidean algorithm]] yields integers ''r'' and ''s'' such ''ra'' + ''sn'' = ''d''. Then ''x'' = ''rb''/''d'' is a solution. The other solutions are the numbers congruent to ''x'' modulo ''n''/''d''.
| |
| | |
| For example, the congruence
| |
| :<math>12x \equiv 20 \pmod {28}\ </math>
| |
| has 4 solutions since gcd(12, 28) = 4 divides 20. The extended Euclidean algorithm gives (−2)·12 + 1·28 = 4, i.e. ''r'' = −2 and ''s'' = 1. Therefore, one solution is ''x'' = −2·20/4 = −10, and −10 = 4 modulo 7. All other solutions will also be congruent to 4 modulo 7. Since the original equation uses modulo 28, the entire solution set in the range from 0 to 27 is {4, 11, 18, 25}.
| |
| | |
| ==System of linear congruences==
| |
| By repeatedly using the linear congruence theorem, one can also solve systems of linear congruences, as in the following example: find all numbers ''x'' such that
| |
| :<math>2x \equiv 2 \pmod {6}</math>
| |
| :<math>3x \equiv 2 \pmod {7}</math>
| |
| :<math>2x \equiv 4 \pmod {8}</math>
| |
| By solving the first congruence using the method explained above, we find <math>x \equiv 1 \pmod{3}</math>, which can also be written as <math>x = 3k + 1</math>. Substituting this into the second congruence and simplifying, we get
| |
| :<math>9k \equiv - 1 \pmod{7}</math>. | |
| Solving this congruence yields <math>k \equiv 3 \pmod{7}</math>, or <math>k = 7l + 3</math>. It then follows that <math>x = 3 (7l + 3) + 1 = 21l + 10</math>. Substituting this into the third congruence and simplifying, we get
| |
| :<math>42l \equiv - 16 \pmod{8}</math>
| |
| which has the solution <math>l \equiv 0 \pmod{4}</math>, or <math>l = 4m</math>. This yields <math>x = 21(4m) + 10 = 84m + 10</math>, or
| |
| :<math>\equiv 10 \pmod{84}</math>
| |
| which describes all solutions to the system.
| |
| | |
| ==See also==
| |
| *[[Chinese remainder theorem]]
| |
| | |
| {{DEFAULTSORT:Linear Congruence Theorem}}
| |
| [[Category:Modular arithmetic]]
| |
| [[Category:Theorems in number theory]]
| |
Andera is what you can contact her but she by no means really liked that title. Credit authorising is how she tends to make a living. One of the extremely best things in the globe for him is doing ballet and he'll be beginning something else along with it. North Carolina is the place he loves most but now he is considering other options.
Check out my site - free tarot readings