Finding The Solution With Basic Algebra and Modular Arithmetic
For example, consider the problem of finding an integer x such that
A brute-force approach converts these congruences into sets and writes the elements out to the product of 3×4×5 = 60 (the solutions modulo 60 for each congruence):
- x ∈ {2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, …}
- x ∈ {3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, …}
- x ∈ {1, 6, 11, 16, 21, 26, 31, 36, 41, 46, 51, 56, …}.
To find an x that satisfies all three congruences, intersect the three sets to get:
- x ∈ {11, …}.
Which can be expressed as
Another way to find a solution is with basic algebra, modular arithmetic, and stepwise substitution.
We start by translating these equivalences into equations for some t, s, and u:
- Equation 1: x = 2 + 3 × t (mod 3)
- Equation 2: x = 3 + 4 × s (mod 4)
- Equation 3: x = 1 + 5 × u (mod 5).
Start by substituting the x from equation 1 into equivalence 2: 2 + 3 × t = 3 (mod 4), hence 3 × t = 1 (mod 4), or t = (1/3) (mod 4) = 3 (mod 4), meaning that t = 3 + 4 × s for integer s.
Plug t into equation 1: x = 2 + 3 × t (mod 3) = 2 + 3 × (3 + 4 × s) (mod 3) = 11 + 12 × s (mod 3).
Plug this x into equivalence 3: 11 + 12 × s = 1 (mod 5). Casting out 5s, we get 1 + 2 × s = 1 (mod 5), or 2 × s = 0 (mod 5), meaning that s = 0 + 5 × u for integer u.
Finally, x = 11 + 12 × s = 11 + 12 × (5 × u) = 11 + (60 × u). Since 60 = lcm(3, 4, 5), we have solutions 11, 71, 131, 191, …
Read more about this topic: Chinese Remainder Theorem
Famous quotes containing the words finding the, finding, solution, basic, algebra and/or arithmetic:
“A child is born with the potential ability to learn Chinese or Swahili, play a kazoo, climb a tree, make a strudel or a birdhouse, take pleasure in finding the coordinates of a star. Genetic inheritance determines a childs abilities and weaknesses. But those who raise a child call forth from that matrix the traits and talents they consider important.”
—Emilie Buchwald (20th century)
“As one delves deeper and deeper into Etiquette, disquieting thoughts come. That old Is- It-Worth-It Blues starts up again softly, perhaps, but plainly. Those who have mastered etiquette, who are entirely, impeccably right, would seem to arrive at a point of exquisite dullness. The letters and the conversations of the correct, as quoted by Mrs. Post, seem scarcely worth the striving for. The rules for finding topics of conversation fall damply on the spirit.”
—Dorothy Parker (18931967)
“The truth of the thoughts that are here set forth seems to me unassailable and definitive. I therefore believe myself to have found, on all essential points, the final solution of the problems. And if I am not mistaken in this belief, then the second thing in which the value of this work consists is that it shows how little is achieved when these problems are solved.”
—Ludwig Wittgenstein (18891951)
“Southerners, whose ancestors a hundred years ago knew the horrors of a homeland devastated by war, are particularly determined that war shall never come to us again. All Americans understand the basic lessons of history: that we need to be resolute and able to protect ourselves, to prevent threats and domination by others.”
—Jimmy Carter (James Earl Carter, Jr.)
“Poetry has become the higher algebra of metaphors.”
—José Ortega Y Gasset (18831955)
“I hope I may claim in the present work to have made it probable that the laws of arithmetic are analytic judgments and consequently a priori. Arithmetic thus becomes simply a development of logic, and every proposition of arithmetic a law of logic, albeit a derivative one. To apply arithmetic in the physical sciences is to bring logic to bear on observed facts; calculation becomes deduction.”
—Gottlob Frege (18481925)