Download THE CHINESE REMAINDER CLOCK FIGURE 1. It is ten twenty

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

Theorem wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Elementary mathematics wikipedia , lookup

Transcript
THE CHINESE REMAINDER CLOCK
F IGURE 1. It is ten twenty-seven.
W HAT ’ S THE TIME ?
Locate the clock which is closest to you: it should give you one number for the hours
and one number for the minutes. You can either read those numbers (digital clock) or
there are moving hands that tell you what those numbers are (analog clock).
The minutes are represented by a number from 0 to 59. The hours are represented by
a number from 1 to 12 however it is better for the mathematics to write 0 rather than 12.
So the hours are some number H from 0 to 11 and the minutes are some number M
from 0 to 59.
Because of the Chinese Remainder Theorem you can rest sure of the following: to
determine H it suffices to know its remainders after division by 3 and by 4; to determine
1
2
THE CHINESE REMAINDER CLOCK
M it suffices to know its remainders after division by 3, by 4 and by 5. In short: once
you know these remainders, you are able to tell the time. This is the mathematical idea
behind the Chinese Remainder Clock (CRC for short).
If n
1 is an integer we call n-remainder the remainder after division by n. The
possible n-remainders are:
0, 1, 2 . . . , n
1
These numbers repeat theirselves cyclically because adding to the dividend some multiple of n does not change the n-remainder. Also pin down for later use that the difference
between a number and its n-remainder is always a multiple of n.
The vertices of an n-gon can be used to describe the n-remainders. This is what we
have in the analog clock, where n = 12 for the hours and n = 60 for the minutes. In
the CRC we have instead n = 3 and n = 4 for the hours (the inner part of the dial)
while for the minutes we have n = 3, n = 4 and n = 5 (the outer part of the dial). As
in the usual analog clock the top vertex corresponds to the zero remainder and the next
remainder comes clockwise.
The CRC is an analog clock with five moving hands. You have to perform a small
mental calculation for reading the time: some strategies are explained below, but you
can develop your own one!
The CRC illustrates 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 factorization of n.
As a historical curiosity, the Maya Calendar also combines rotations with different
periods (see for example [5]).
The Chinese Remainder Theorem is part of modular arithmetic (which is also called
arithmetic of the clock!). This very important theorem is to be found in most university texts about algebra, elementary number theory and cryptography, see for example [2, Chapter 2], [3, Chapter 8] or [4, Chapter 3]. Online resources are for example [1] and [7]. A working CRC may be freely downloaded at [6].
R EADING THE HOURS
The inner part of the dial of the CRC tells us the hours, namely some number H from
0 to 11. We can uniquely determine H as soon as we know its remainders after division
by 3 and by 4. The 3-remainder H3 is either 0,1 or 2 and it is described by the position
of the purple sphere (the smallest circle). The 4-remainder H4 is either 0,1,2 or 3 and it
is described by the position of the orange sphere (the second circle). The zero remainder
is on top and the next remainder comes clockwise, see Figure 2.
We can find H by trial and error with at most three attempts. Indeed the difference
H H4 is a multiple of 4 hence H can only be
H4
H4 + 4
H4 + 8
THE CHINESE REMAINDER CLOCK
3
0
3
0
2
1
1
2
F IGURE 2. The 3-remainder is 1, the 4-remainder is 2.
These numbers have different 3-remainders and we select the one whose 3-remainder
equals H3 . For the example in Figure 2 we get either 2, 6 or 10 and we select 10 because
the 3-remainder must be 1.
We can also compute H as follows:
H is the remainder after division by 12 of
Indeed we can write
H3 · 4 + H4 · 9
H3 · 4 + H4 · 9 = H3 + 3 · (H3 + H4 · 3) = H4 + 4 · (H3 + H4 · 2)
hence this number has the right remainders after division by 3 and by 4. Taking the
12-remainder of the number does not alter this property and outputs a number in the
range from 0 to 11. For the example in Figure 2 we get the 12-remainder of 22, which is
10. Other methods for finding H are possible, and you can develop your own strategy.
R EADING THE MINUTES
The outer part of the dial of the CRC tells us the minutes, namely some number M
from 0 to 59. We can uniquely determine M as soon as we know its remainders after
division by 3, by 4 and by 5.
The 3-remainder M3 is either 0,1 or 2 and it is described by the position of the green
sphere (the third circle). The 4-remainder M4 is either 0,1,2 or 3 and it is described by
the position of the blue sphere (the fourth circle). The 5-remainder M5 is either 0,1,2,3
or 4 and it is described by the position of the red sphere (the fifth circle). The zero
remainder is on top and the next remainder comes clockwise, see Figure 3.
First of all, the parity of M is the same as the parity of M4 (because M M4 is a
multiple of 4). So we know if M is even or odd.
Moreover, the last cipher of M has the same parity of M and it is either M5 or M5 + 5
(because M equals M5 plus a multiple of 5). For the example in Figure 3 the last cipher
of M is odd and it is either 2 or 7 so it must be 7.
Once we know the last cipher of M we can find M by trial and error with at most
six attemps. We may even reduce to three attemps: if M and its last cipher C have
the same 4-remainder then M is one of C, C + 20, C + 40 and otherwise M is one of
4
THE CHINESE REMAINDER CLOCK
0
0
0
4
1
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.
C + 10, C + 30, C + 50. The reason for this is that adding 20 does not change the
4-remainder, while adding 10 does. For the example in Figure 3 we have C = 7 and
M4 = 3, so M is one of 7,27 or 47: we select 27 because the 3-remainder must be 0.
We could also use this formula:
M is the remainder after division by 60 of
Indeed this number is also of the form
M3 · 40 + M4 · 45 + M5 · 36
M3 + 3 · (M3 · 39 + M4 · 15 + M5 · 12)
= M4 + 4 · (M3 · 10 + M4 · 11 + M5 · 9) = M5 + 5 · (M3 · 8 + M4 · 9 + M5 · 7)
so it has the correct remainders after division by 3, 4 and 5. This does not change by
taking the 60-remainder so we find a number M from 0 to 59 as desired. For the example
in Figure 3 we get the 60-remainder of 207, which is 27.
There are several other recipes for determining M . Moreover, shortcuts are possible
for special configurations, for example if two numbers between M3 , M4 and M5 are
equal. Which strategy is the best is a matter of personal preference!
Q UESTIONS FOR THE READER
(1) Looking at the dial, how can we quickly tell if M is even? How can we quickly
tell if M is divisible by 12?
(2) At what times are all five spheres on the vertical line passing through the center
of the dial?
(3) Suppose that M4 and M5 are equal. Which are the three possible values for M ?
(4) How does a given configuration on the dial change after 36 minutes?
THE CHINESE REMAINDER CLOCK
5
F IGURE 4. The displayed times are 00:00, 00:01, 10:58 and 01:02 respectively.
Acknowledgements. Many thanks go to Keith Conrad for the wonderful idea of drawing circles on the dial, and many thanks go to Albrecht Beutelspacher for pointing out
the interesting example of the Maya Calendar. A special thank goes to to the nonmathematicians who had fun with the CRC and supported this project.
Summary: We investigate a clock based on the Chinese Remainder Theorem. This
application illustrates the geometrical meaning of the theorem. Moreover, it provides a
small challenge even for non-mathematicians: anybody can choose his own strategy for
reading the clock.
R EFERENCES
[1] Chinese Remainder Theorem. In Wikipedia. Retrieved January 20, 2015, from
http://en.wikipedia.org/wiki/Chinese remainder theorem
6
THE CHINESE REMAINDER CLOCK
[2] H. Davenport, The Higher Arithmetic: An Introduction to the Theory of Numbers, Sixth edition.
Cambridge University Press,1992.
[3] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Sixth edition. Oxford
University Press, Oxford, 2008.
[4] K. Ireland and M. Rosen, A classical Introduction to Modern Number Theory. Second edition.
Graduate Texts in Mathematics, 84. Springer-Verlag, New York, 1990.
[5] Maya Calendar. In Wikipedia. Retrieved January 20, 2015, from
http://en.wikipedia.org/wiki/Maya calendar
[6] A. Perucca, The Chinese Remainder Clock
http://www.uni-regensburg.de/Fakultaeten/nat Fak I/perucca/CRC.html
[7] E. W. Weisstein, Chinese Remainder Theorem, From MathWorld–A Wolfram Web Resource.
http://mathworld.wolfram.com/ChineseRemainderTheorem.html