Sei sulla pagina 1di 5

Chinese Remainder Theorem

According to D. Wells, the following problem was posed by Sun Tsu Suan-Ching (4th century AD):
There are certain things whose number is unknown. Repeatedly divided by [Math
Processing Error] the remainder is [Math Processing Error] by [Math Processing Error] the
remainder is [Math Processing Error] and by [Math Processing Error] the remainder
is [Math Processing Error] What will be the number?
Oystein Ore mentions another puzzle with a dramatic element from Brahma-SphutaSiddhanta (Brahma's Correct System) by Brahmagupta (born 598 AD):
An old woman goes to market and a horse steps on her basket and crashes the eggs. The
rider offers to pay for the damages and asks her how many eggs she had brought. She
does not remember the exact number, but when she had taken them out two at a time,
there was one egg left. The same happened when she picked them out three, four, five,
and six at a time, but when she took them seven at a time they came out even. What is the
smallest number of eggs she could have had?
Problems of this kind are all examples of what universally became known as the Chinese Remainder
Theorem. In mathematical parlance the problems can be stated as finding n, given its remainders of
division by several numbers[Math Processing Error]
(1)
[Math Processing Error]
The modern day theorem is best stated with a couple of useful notations. For non-negative
integers [Math Processing Error] their greatest common divisor is defined as
[Math Processing Error]
where, as always, [Math Processing Error] means that [Math Processing Error] divides [Math
Processing Error]exactly. The least common multiple of [Math Processing Error] numbers is defined
as
[Math Processing Error]
Both [Math Processing Error] and [Math Processing Error] are symmetric functions of their
arguments. They are complementary in the sense that, for [Math Processing Error]

[Math Processing Error]


(A proof and an interactive illustration for this identity appears elsewhere.)
However, for [Math Processing Error] a similar identity does not in general hold. For an example,
consider two triplets: [Math Processing Error] and [Math Processing Error] Both have exactly the
same [Math Processing Error]and [Math Processing Error] but obviously different products. On the
other hand, both [Math Processing Error] and[Math Processing Error] are associative:
[Math Processing Error]
and, both equal [Math Processing Error] Similarly,
[Math Processing Error]

Note
If, for a prime [Math Processing Error] [Math Processing Error] with [Math Processing Error] being the
largest exponent with that property, then [Math Processing Error] where [Math Processing
Error] and [Math Processing Error] is the largest exponent with that property. Similarly, the greatest
common divisor of several numbers is the product of the largest powers of the primes that divide all
the given numbers.
Associativity allows one to proceed a step at a time with an inductive argument without putting all
eggs into a basket at once. Jumping at the opportunity I'll prove the most basic case of [Math
Processing Error]

Theorem 1
Two simultaneous congruences
[Math Processing Error]
are only solvable when [Math Processing Error] The solution is unique modulo [Math Processing
Error]
(When [Math Processing Error] and [Math Processing Error] are coprime their [Math Processing
Error] is [Math Processing Error] By convention, [Math Processing Error]holds for any [Math
Processing Error] and [Math Processing Error]

Proof
By a generalization of Euclid's algorithm, there are integers [Math Processing Error] and [Math
Processing Error]such that

[Math Processing Error]

Since [Math Processing Error] for some, possibly different [Math Processing Error] and [Math
Processing Error]
(2)
[Math Processing Error]
Then [Math Processing Error] satisfies both congruences in the theorem. This proves the existence
of a solution.
To prove the uniqueness part, assume [Math Processing Error] and [Math Processing Error] satisfy
the two congruences. Taking the differences we see that
[Math Processing Error] and [Math Processing Error]
which implies [Math Processing Error]
As was previously stated, a more general theorem can now be proved by induction.

Theorem 2
The simultaneous congruences (1)
[Math Processing Error]
are only solvable when [Math Processing Error] for all [Math Processing Error] and[Math Processing
Error] [Math Processing Error] The solution is unique modulo [Math Processing Error]

Proof
Theorem 1 serves the initial step verification. Assume the theorem holds for [Math Processing
Error] congruences and consider [Math Processing Error] of them.
[Math Processing Error]
Let [Math Processing Error] be a solution to the first [Math Processing Error] equations. Then the
congrurence [Math Processing Error] has a solution. (Observe that every solution of the latter also
satisfies the first [Math Processing Error] congruences.) To be able to apply the already proven
Theorem 1, we need to show that
(3)
[Math Processing Error]

Let's write [Math Processing Error] Then we know that [Math Processing Error] for these values
of [Math Processing Error] But [Math Processing Error] for some [Math Processing
Error] implying [Math Processing Error] so that
[Math Processing Error]
If so,
[Math Processing Error]
because [Math Processing Error]
Thus the system
[Math Processing Error]
has a solution which is unique modulo
[Math Processing Error]
It also satisfies the whole set of [Math Processing Error] congruences.

Corollary
The simultaneous congruences (1)
[Math Processing Error]
where all [Math Processing Error]'s are pairwise coprime has a unique solution modulo [Math
Processing Error]
If some [Math Processing Error]'s are not mutually prime, a solution may not exist unless the
corresponding congruence agree. For example, the system [Math Processing Error] and [Math
Processing Error] has not solution, while the system[Math Processing Error] and [Math Processing
Error] does.
Let's now solve the two problems we started the page with.

Problem #1
Solve
[Math Processing Error]
From [Math Processing Error], [Math Processing Error] for some integer [Math Processing
Error] Substituting this into[Math Processing Error] gives [Math Processing Error] Looking up [Math

Processing Error] in the division tablemodulo [Math Processing Error] this reduces to a simpler
equation
[Math Processing Error]
which, in turn, is equivalent to [Math Processing Error] for an integer [Math Processing
Error] Substitution into [Math Processing Error] yields [Math Processing Error] This now goes
into [Math Processing Error] Casting out 7 gives[Math Processing Error] From here, [Math
Processing Error] and, finally, [Math Processing Error]
Note that [Math Processing Error] Thus we have solutions [Math Processing Error]

Problem #2
Solve
[Math Processing Error]
With the experience we acquired so far, the combination of [Math Processing Error] is equivalent to
[Math Processing Error]
[Math Processing Error] Plugging this into [Math Processing Error] gives [Math Processing
Error] Casting out [Math Processing Error] simplifies this to [Math Processing Error] and then [Math
Processing Error] From the division tables modulo [Math Processing Error] [Math Processing
Error] Therefore, [Math Processing Error] Finally, [Math Processing Error] Allowing for an average
size farmer, the most likely number of eggs she might expect to be compensated for is [Math
Processing Error]
Note: The Chinese Remainder Theorem finds an important application in the clendrical
calculations

Potrebbero piacerti anche