Download THE CHINESE REMAINDER THEOREM CLOCK FIGURE 1. The

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

List of important publications in mathematics wikipedia , lookup

Addition wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Arithmetic wikipedia , lookup

Brouwer fixed-point theorem wikipedia , lookup

Elementary mathematics wikipedia , lookup

Fundamental theorem of calculus wikipedia , lookup

Chinese remainder theorem wikipedia , lookup

Theorem wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
THE CHINESE REMAINDER THEOREM CLOCK
ANTONELLA PERUCCA
A BSTRACT. In a clock we usually have some number H from 0 to 11 for the hours
and some number M from 0 to 59 for the minutes. We can determine H if we know his
remainder after division by 3 and by 4. Similarly we can determine M if we know his
remainder after division by 3, by 4 and by 5. The Chinese Remainder Theorem Clock
displays these remainders: the time may be recovered with a small calculation. This
is an application of the Chinese Remainder Theorem that may be useful for didactical
purposes or simply as an entertainment.
F IGURE 1. The time 10:27 is displayed on the clock.
1
2
ANTONELLA PERUCCA
1. I NTRODUCTION
What is the Chinese Remainder Theorem Clock? It is a clock whose functioning
exploits some mathematical facts that follow from the Chinese Remainder Theorem. In
Sections 2 and 3 we explain in detail how to read the clock.
The branch of the mathematics to which the Chinese Remainder Theorem belongs is
called modular arithmetic or also arithmetic of the clock. However the most related
object is probably the cyclical Maya Calendar, that also exploits periodical phenomenon
with different periods (see for example [4]).
How does the Chinese Remainder Theorem help? In a digital clock there is some
number H from 0 to 11 giving the hours and there is some number M from 0 to 59
giving the minutes. So there are 12 = 3 × 4 possible hours and 60 = 3 × 4 × 5 possible
minutes. To determine H it suffices to specify its remainder after division by 3 and by
4. To determine M it suffices to specify its remainder after division by 3, by 4 and by 5.
This is due to the Chinese Remainder Theorem.
What does the dial show? The n vertices of a regular n-gon can be used to describe
the n possible remainders after division by n, namely the n integers
0, 1, 2 . . . , n − 1
This is what we usually have in an analog clock, where n = 12 for the hours and n = 60
for the minutes.
In the Chinese Remainder Theorem Clock we have n = 3 and n = 4 for the hours (see
the inner part of the dial) while for the minutes we have n = 3, n = 4 and n = 5 (see the
outer part of the dial). As in the usual analog clock we have: the top vertex corresponds
to the zero remainder; the next remainder comes clockwise. The Chinese Remainder
Theorem Clock is then an analog clock with five moving hands.
What is the purpose of the Chinese Remainder Theorem Clock? First, one can use
the Clock to explain the geometrical meaning of the Chinese Remainder Theorem: a
rotation with N steps can be described by elementary rotations whose number of steps
are prime powers, namely the prime powers appearing in the factorisation of N .
Secondly, the Clock is a good excuse for practising divisions and for familiarizing with
the periodic nature of remainders. Moreover, some small arithmetical problems may be
visualized on the Clock dial (see Section 4).
Last but not least the Clock can be entertaining (also for non-mathematicians): anybody
who simply wants to play around with numbers may have found something for him.
Further references. For the interested reader the key-words are: Chinese Remainder
Theorem (for the integers), modular arithmetic, congruence, linear congruence, congruence system, division with remainder. The Chinese Remainder Theorem is to be found
in most university texts about algebra and elementary number theory and also in several
introductory books about cryptography (due to its applications in this area). See for
THE CHINESE REMAINDER THEOREM CLOCK
3
example [2, Chapter 8] and [3, Chapter 3]. We recommend lecture notes of the corresponding university courses and also the dedicated webpages (for example [1] and [6]).
A working Chinese Remainder Theorem Clock may be found online in [5].
Acknowledgements. Many thanks to Keith Conrad and Fritz Hörmann for helpful discussions, and to Albrecht Beutelspacher for pointing out to me the Maya Calendar. A
special thank goes to to the non-mathematicians who had fun with the Clock and supported this project.
2. R EADING THE HOURS
Aim. The inner part of the displays tells us the hours, namely a number H from 0 to
11. We have to find this number H: what we know is the remainder of H after division
by 3 and by 4 respectively.
How do I know the remainders? The remainder after division by 3 is either 0,1 or 2
and it is described by the position of the purple sphere. The zero remainder is on top,
and the next remainder comes clockwise.
The remainder after division by 4 is either 0,1,2 or 3 and it is described by the position
of the orange sphere. The zero remainder is on top, and the next remainder comes
clockwise.
0
0
3
2
1
1
2
F IGURE 2. The 3-remainder is 1, the 4-remainder is 2.
Guessing the hours. Our number H is one of the following:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
We have a list with twelve numbers. We start dividing them by 3 and by 4. When we
find a number with the right remainders, that is our number H.
For example, suppose that the 3-remainder of H is 1 and the 4-remainder of H is 2. Let
us try H = 7. The 3-remainder of 7 is 1 (this is good news) however the 4-remainder of
7 is not 2 (this is bad news). So 7 is a wrong guess. Let us try H = 10. The 3-remainder
of 10 is 1, and the 4-remainder of 10 is 2. Excellent! 10 is a good guess, we have
H = 10.
4
ANTONELLA PERUCCA
For guessing the right number H we have to do some attemps, in the worst case scenario
we have to try all 12 numbers.
One recipe for reading the hours. Our number H is one of the following:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
We have a list with twelve numbers. If we know what the 4-remainder is, there are only
three numbers left. If we also know the 3-remainder, we can then determine the number
uniquely.
For example, if the 4-remainder of H equals 2 then H can only be 2, 2 + 4 = 6 or
2 + 8 = 10. If moreover the 3-remainder of H equals 1 then H must be 10.
In general, if the 4-remainder of H is R then H can only be R, R+4 or R+8. These three
numbers have different 3-remainders: with at most three attemps, we have determined
H uniquely.
One formula for reading the hours. We want to determine a number H between 0
and 11 such that the 3-remainder is some given number R3 and the 4-remainder is some
given number R4 . Then we have:
H is the 12-remainder of
R3 · 4 + R4 · 9
For example with R3 = 1 and R4 = 2 we get
R3 · 4 + R4 · 9 = 1 · 4 + 2 · 9 = 22
whose 12-remainder is 10. Thus H = 10.
The number 4 in the formula (respectively, 9) has been chosen because the 3-remainder
and the 4-remainder are 1 and 0 (respectively, 0 and 1).
3. R EADING THE MINUTES
Aim. The outer part of the displays tells us the minutes, namely a number M from 0 to
59. We have to find this number M : what we know is the remainder of M after division
by 3, by 4 and by 5 respectively.
How do I know the remainders? The remainder after division by 3 is either 0,1 or 2
and it is described by the position of the green sphere. The zero remainder is on top,
and the next remainder comes clockwise.
The remainder after division by 4 is either 0,1,2 or 3 and it is described by the position
of the blue sphere. The zero remainder is on top, and the next remainder comes clockwise.
The remainder after division by 5 is either 0,1,2,3 or 4 and it is described by the position of the red sphere. The zero remainder is on top, and the next remainder comes
clockwise.
THE CHINESE REMAINDER THEOREM CLOCK
5
0
0
0
1
4
3
1
2
3
1
2
2
F IGURE 3. The 3-remainder is 0, the 4-remainder is 3, the 5-remainder
is 2.
Guessing the minutes. Our number M is one of the following:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 . . . , 57, 58, 59
We have a list with sixty numbers. We start dividing them by 3, by 4 and by 5. When
we find a number with the right remainders, that is our number M .
For example, suppose that the 3-remainder of M is 0, the 4-remainder of M is 3 and the
5-remainder of M is 2. Let us try M = 39. The 3-remainder of 39 is 0 (this is good
news) and the 4-remainder of 39 is 3 (this is good news) however the 5-remainder of 39
is not 2 (this is bad news). So 39 is a wrong guess. Let us try H = 27. The 3-remainder
of 27 is 0, the 4-remainder of 27 is 3 and the 5-remainder of 27 is 2. Excellent! 27 is a
good guess, we have M = 27.
For guessing the right number M we have to do several attemps, in the worst case scenario we have to try all 60 numbers. This might take quite some time, so we recommend
some alternative methods.
One recipe for reading the minutes. Our number M is one of the following:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 . . . , 57, 58, 59
We have a list with sixty numbers.
Determining the last cipher of the minutes: First of all, we can read off the 4-remainder
whether M is even or odd: if the 4-remainder of M is even (respectively, odd) then M
is even (respectively, odd).
We use this parity information together with the 5-remainder to determine the last cipher
of M . Namely, if the 5-remainder of M is some number R5 then the last cipher of M is
either R5 or R5 + 5, namely the one with the correct parity. Indeed the last cipher of M
6
ANTONELLA PERUCCA
has the same parity of M .
For example if the 4-remainder of M is 3 then we know that M is odd. Moreover, if the
5-remainder of M is 2 then the last cipher is either 2 or 7. So the last cipher of M must
be 7.
Determining the minutes: Since we know the last cipher of M there are only six possible
candidates. For example if the last cipher of M is 7 then we are left with
7, 17, 27, 37, 47, 57
We can try these numbers and see if they have the right 3-remainder and the right 4remainder. This means guessing, but in the worst case scenario we have only to try 6
numbers.
If we want to discard some more of these numbers prior to guessing, we can look at the
last cipher C of M . If C has the same 4-remainder as M we keep
C, C + 20, C + 40
If C has not the same 4-remainder as M we keep instead
C + 10, C + 30, C + 50
In this way we select the three numbers out of the given six that have the good 4remainder.
For example if we know that the last cipher of M is 7 and the 4-remainder of M is 3,
then 7 and M have the same 4-remainder so we keep
7, 27, 47
With at most three attemps, we have determined M uniquely. For example if the 3remainder of M has to be 0 then we find M = 27.
One formula for reading the minutes. We want to determine a number M between
0 and 59 such that the 3-remainder is some given number R3 , the 4-remainder is some
given number R4 and the 5-remainder is some given number R5 . Then we have:
M is the 60-remainder of
R3 · 40 + R4 · 45 + R5 · 36
For example with R3 = 0 and R4 = 3 and R5 = 2 we get
R3 · 40 + R4 · 45 + R5 · 36 = 0 · 40 + 3 · 45 + 2 · 36 = 207
whose 60-remainder is 27. Thus M = 27.
The number 40 in the formula (45 and 36 respectively) has been chosen because the
3-remainder, the 4-remainder and the 5-remainders are 1, 0 and 0 (0, 1, 0 and 0, 0, 1
respectively).
Examples. Now the reader has all he needs to read the clock and can try to understand
the following examples:
THE CHINESE REMAINDER THEOREM CLOCK
F IGURE 4. The displayed times are 00:00, 00:01, 06:00, 00:30, 11:58
and 7:43 respectively.
7
8
ANTONELLA PERUCCA
4. S MALL MATHEMATICAL PROBLEMS RELATED TO THE CLOCK
(1) Reading the clock: This problem means that the appropriate remainders of the
two numbers H and M are given. The aim is to determining H and M . We
have seen three possible methods to solve this problem. The interested reader
may try to understand the methods in detail (this requires some familiarity with
modular arithmetic).
(2) Drawing the clock: This problem means that the two numbers H and M are
given. The aim is to determining the display of the clock that corresponds to
this number. One has to determine the remainders of H after division by 3 and
4 and the remainders of M after division by 3, by 4 and by 5. Then one has to
set the corresponding positions of the spheres.
(3) Understanding the zero remainders: If the 3-remainder of H is 0 then this exactly means that H is divisible by 3 i.e. it is a multiple of 3. The same holds for
M . If some remainder is zero the corresponding sphere is on top. So we have:
If the violet (respectively, orange) sphere is on top this means that H is a multiple of 3 (respectively, 4). If both spheres are on top then H is 0.
If the green (respectively: blue,red ) sphere is on top this means that M is a
multiple of 3 (respectively: 4, 5). If all three spheres are on top then M is 0.
If two of the three spheres are on top but the thirds one is not this respectively
means that M is divisible by 20 (and not by 3) or by 15 (and not by 4) or by 12
(and not by 5).
(4) Understanding the addition of +1: Adding 1 to a number means that we also
have to add +1 to the remainders. If some remainder is already as big as possible we have then to set it back to 0. On the clock this means that we shift each
sphere of one position clockwise. Similarly subtracting one means that we shift
each sphere of one position counterclockwise.
(5) Understanding the multiplication by −1: A multiplication by −1 for the given
time means reversing the direction of time. On the clock we swap clockwise and
counterclockwise hence a time and his negative would be displayed symmetrically with respect to the vertical line passing through the center of the clock.
For example the time 1:02 (62 minutes after 00:00) is symmetrical to 10:58 (62
minutes before 00:00). This simmetry is also to be found in any analog clock.
As for the usual analog clocks, the times that are invariant by reversing the direction of time are 0 and 6 for the hours and 0 and 30 for the minutes.
THE CHINESE REMAINDER THEOREM CLOCK
9
F IGURE 5. The symmetrical times 01:02 and 10:58 are displayed.
R EFERENCES
[1] Chinese Remainder Theorem. In Wikipedia. Retrieved January 19, 2015, from
http://en.wikipedia.org/wiki/Chinese remainder theorem
[2] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Sixth edition. Oxford
University Press, Oxford, 2008.
[3] K. Ireland and M. Rosen, A classical Introduction to Modern Number Theory. Second edition.
Graduate Texts in Mathematics, 84. Springer-Verlag, New York, 1990.
[4] Maya Calendar. In Wikipedia. Retrieved January 19, 2015, from
http://en.wikipedia.org/wiki/Maya calendar
[5] A. Perucca, The Chinese Remainder Theorem Clock
http://www.uni-regensburg.de/Fakultaeten/nat Fak I/perucca/CRT-clock.html
[6] E. W. Weisstein, Chinese Remainder Theorem, From MathWorld–A Wolfram Web Resource.
http://mathworld.wolfram.com/ChineseRemainderTheorem.html