THE CHINESE REMAINDER CLOCK

Similar documents
Chinese Remainder Theorem explained with rotations

A SURVEY OF PRIMALITY TESTS

THESIS. Presented in Partial Fulfillment of the Requirements for the Degree Master of Science in the Graduate School of The Ohio State University

arxiv:math/ v1 [math.nt] 9 Aug 2004

WHAT IS SPECIAL ABOUT THE DIVISORS OF 24?

The primitive root theorem

A Note on Cyclotomic Integers

MATH 361: NUMBER THEORY FOURTH LECTURE

ax b mod m. has a solution if and only if d b. In this case, there is one solution, call it x 0, to the equation and there are d solutions x m d

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

MODULAR ARITHMETIC KEITH CONRAD

Proof of Infinite Number of Triplet Primes. Stephen Marshall. 28 May Abstract

IRREDUCIBILITY TESTS IN F p [T ]

LEGENDRE S THEOREM, LEGRANGE S DESCENT

COMP424 Computer Security

Characters and triangle generation of the simple Mathieu group M 11

CHAPTER 1. REVIEW: NUMBERS

[Part 2] Asymmetric-Key Encipherment. Chapter 9. Mathematics of Cryptography. Objectives. Contents. Objectives

On the Sum of Corresponding Factorials and Triangular Numbers: Some Preliminary Results

1 Overview and revision

SQUARE PATTERNS AND INFINITUDE OF PRIMES

Fermat s Last Theorem for Regular Primes

1 Modular Arithmetic Grade Level/Prerequisites: Time: Materials: Preparation: Objectives: Navajo Nation Math Circle Connection

The Chinese Remainder Theorem

Mathematics for Cryptography

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Proof of Beal s Conjecture

MATHEMATICS EXTENDED ESSAY

Asymptotic formulae for the number of repeating prime sequences less than N

Polynomials, Ideals, and Gröbner Bases

REAL NUMBERS. Any positive integer a can be divided by another positive integer b in such a way that it leaves a remainder r that is smaller than b.

Sequences. 1. Number sequences. 2. Arithmetic sequences. Consider the illustrated pattern of circles:

arxiv: v1 [math.co] 27 Aug 2015

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Odd-powered triples and Pellian sequences

A Classical Introduction to Modern Number Theory

Four Basic Sets. Divisors

MATH Fundamental Concepts of Algebra

Standard forms for writing numbers

Modular numbers and Error Correcting Codes. Introduction. Modular Arithmetic.

CYCLICITY OF (Z/(p))

Proofs of the infinitude of primes

Algebra. Modular arithmetic can be handled mathematically by introducing a congruence relation on the integers described in the above example.

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

Notes on Systems of Linear Congruences

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

In this initial chapter, you will be introduced to, or more than likely be reminded of, a

Section 11 Direct products and finitely generated abelian groups

An Approach to Hensel s Lemma

Representing Integers as the Sum of Two Squares in the Ring Z n

Equidivisible consecutive integers

Error Correcting Codes Prof. Dr. P Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore

When is n a member of a Pythagorean Triple?

The Chinese Remainder Theorem

Chapter 5. Modular arithmetic. 5.1 The modular ring

UNDERSTANDING RULER AND COMPASS CONSTRUCTIONS WITH FIELD THEORY

Discrete Structures Lecture Solving Congruences. mathematician of the eighteenth century). Also, the equation gggggg(aa, bb) =

QUADRATIC CONGRUENCES FOR COHEN - EISENSTEIN SERIES.

Public Key Encryption

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

THE CONGRUENT NUMBER PROBLEM

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

FERMAT S TEST KEITH CONRAD

Chakravala - a modern Indian method. B.Sury

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Number Theory and Group Theoryfor Public-Key Cryptography

The RSA Cipher and its Algorithmic Foundations

198 VOLUME 46/47, NUMBER 3

KINDERGARTEN Correlation of Project Learning Tree s PreK 8 Environmental Education Activity Guide with the Common Core Standards for Mathematics

4 PRIMITIVE ROOTS Order and Primitive Roots The Index Existence of primitive roots for prime modulus...

Scott Taylor 1. EQUIVALENCE RELATIONS. Definition 1.1. Let A be a set. An equivalence relation on A is a relation such that:

Elliptic Curves. Kenneth A. Ribet. PARC Forum October 17, UC Berkeley

1: Please compute the Jacobi symbol ( 99

Digit Reversal Without Apology

Lesson 8: Why Stay with Whole Numbers?

Lecture 3: Miscellaneous Techniques

SUMS OF SQUARES WUSHI GOLDRING

NUMBER THEORY. Anwitaman DATTA SCSE, NTU Singapore CX4024. CRYPTOGRAPHY & NETWORK SECURITY 2018, Anwitaman DATTA

Division Algorithm B1 Introduction to the Division Algorithm (Procedure) quotient remainder

Rational Points on Conics, and Local-Global Relations in Number Theory

CONGRUENT NUMBERS AND ELLIPTIC CURVES

GRE Quantitative Reasoning Practice Questions

1 i<j k (g ih j g j h i ) 0.

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

Vector Spaces. Chapter 1

1 Notes for lectures during the week of the strike Part 2 (10/25)

The Humble Sum of Remainders Function

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

CRYPTOGRAPHY AND LARGE PRIMES *

Number theory (Chapter 4)

For your quiz in recitation this week, refer to these exercise generators:

3 The fundamentals: Algorithms, the integers, and matrices

On Anti-Elite Prime Numbers

NOTES ON 2009 MEMORANDUM

K. Ireland, M. Rosen A Classical Introduction to Modern Number Theory, Springer.

Grade 8 Chapter 7: Rational and Irrational Numbers

Chapter 9 Mathematics of Cryptography Part III: Primes and Related Congruence Equations

Transcription:

THE CHINESE REMAINDER CLOCK ANTONELLA PERUCCA WHAT TIME IS IT? Consider an analog clock: from the location of the minute hand we determine a number between and 59, and from the location of the hour hand we determine a number between and. We present an alternative based on the Chinese Remainder Theorem, which we call the Chinese Remainder Clock. More generally, we geometrically illustrate the Chinese Remainder Theorem via analog clocks with several hands. 4 FIGURE. It is :7. Look at the position of the filled-in dots: the inner two rings give the -remainder and the 4-remainder of the hour ( = + = 4 + ), while the outer three rings give the - remainder, the 4-remainder, and the 5-remainder of the minutes (7 = 9 + = 6 4 + = 5 5 + ). We have to tell the time, namely the hours (some number H from to ) and the minutes (some number M from to 59). Because of the Chinese Remainder Theorem to determine H it suffices to know its remainders after division by and by 4 while to determine M it suffices to know its remainders after division by, by 4, and by 5. In short: once we know those remainders, we are able to tell the time. This is the simple mathematical idea behind the Chinese Remainder Clock.

ANTONELLA PERUCCA The possible n-remainders are:,,..., n. If we go through the list of integers and divide them by n, then the n-remainders repeat cyclically. This is because adding some multiple of n does not change the n-remainder. For later use: the difference between a number and its n-remainder is 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 = for the hours and n = 6 for the minutes. In the Chinese Remainder Clock we have instead n = and n = 4 for the hours (the inner part of the dial) while for the minutes we have n =, n = 4, and n = 5 (the outer part of the dial). As in the usual analog clock the top vertex corresponds to and the next number comes clockwise. The Chinese Remainder Clock is thus an analog clock with five moving hands. One has to perform a small mental calculation for reading the time: some strategies are explained in the last section. To determine the number which leaves the displayed remainders, one can proceed by trial and error. Thus everyone who is familiar with division can read the time. Moreover, developing an efficient method for reading the time is an exercise in arithmetic algorithms (even for non-mathematicians). Different people prefer different strategies according to which kind of mental calculation they do best, and shortcuts are possible for special configurations on the dial. One working Chinese Remainder Clock is online at [6] (note that it takes the time of your electronic device so it works fine with time-zones and daylight saving time). In general, one moving hand in a clock describes a discrete periodic phenomenon, where finitely many situations repeat cyclically. Thus the Chinese Remainder Clock illustrates the meaning of the Chinese Remainder Theorem, which (in short) is the following: a periodic phenomenon with period n amounts to the interaction of periodic phenomena whose periods are prime powers, namely the prime powers appearing in the factorization of n. We explain this in detail in the next section: the discussion gives insight into the Chinese Remainder Theorem and provides a proof of this result without equations. The Chinese Remainder Theorem is part of modular arithmetic and, being a fundamental result, is to be found in most university texts about algebra, elementary number theory, and cryptography, see for example [, Chapter ], [, Chapter 8], or [4, Chapter ]. Online resources are for example [] and [7]. Although modular arithmetic is also called arithmetic of the clock there seems to be no well-known reference where the Chinese Remainder Theorem is presented in terms of rotations or periodic phenomena. Finally, as a historical curiosity, we mention that the Maya Calendar also combines rotations with different periods (see for example [5] for a description). THE CHINESE REMAINDER THEOREM REVISITED The Chinese Remainder Theorem for rotations. Consider a circle with one marked point on it, and fix some positive integer m. At every time unit let the point move on the

THE CHINESE REMAINDER CLOCK circle of /m-th of the full angle clockwise. The phenomenon is periodic: after m time units the point is back to the initial position, and this is the fundamental period. There are m positions for the point, each occuring once in every period. For convenience we suppose in the figures that the position at time is the top. Now consider two such rotations, with integer parameters m and m. There are m m possible configurations for the pair of marked points, but in general not all of them occur because the rotations are simultaneous (this is evident if m = m ). The fundamental period is the smallest positive time at which both points are back to the initial position so it is the least common multiple lcm(m, m ). Each configuration occurs at most once in every period because getting the same configuration implies that both points did full turns. From this we can deduce that the fundamental period equals the number of occurring configurations. As a special case, if m and m are coprime then the fundamental period is the product m m and every configuration occurs. For example with m = 4 and m = 5 the fundamental period is and every configuration occurs, while with m = 4 and m = 6 the fundamental period is so exactly out of the 4 configurations occur, see Figures and. FIGURE. With m = 4 and m = 5, the configurations at time,, and 7. FIGURE. With m = 4 and m = 6, the configurations at time 7, and an impossible configuration. The above statements can be easily generalized by considering n rotations with integer parameters m to m n. The fundamental period is lcm(m,..., m n ) and this equals the number of occurring configurations for the n-tuple of marked points. As a special case we get:

4 ANTONELLA PERUCCA The Chinese Remainder Theorem for rotations. Let m, m,..., m n be pairwise coprime positive integers. For each integer m in this set consider a circle with one marked point on it, which at every time unit rotates of /m-th of the full angle clockwise. The fundamental period for this phenomenon is the product m m n, and every possible configuration for the n-tuple of marked points occurs exactly once in every period. Even if the integer parameters are not coprime, the configuration of the marked points determines the time inside a period because it occurs at most once. The Chinese Remainder Theorem for periodic phenomena. A discrete periodic phenomenon (finitely many situations repeat cyclically) can be seen as a rotation with as many steps as the fundamental period. So we also have: The Chinese Remainder Theorem for periodic phenomena. If m, m,..., m n are pairwise coprime positive integers then a periodic phenomenon with period m m n amounts to the collection of simultaneous periodic phenomena whose periods are m to m n. As a special case, if m is an integer greater than, a periodic phenomenon with period m can be described by periodic phenomena whose periods are prime powers, namely the prime powers appearing in the factorization of m. The Chinese Remainder Theorem for lists of remainders. The usual formulation of the Chinese Remainder Theorem deals with remainders for the division, which are given by a congruence system. We state this result more directly: The Chinese Remainder Theorem for lists of remainders. Let m, m,..., m n be pairwise coprime positive integers. For every integer consider the n-tuple of its remainders after division by m to m n. Two integers produce the same n-tuple if and only if they leave the same remainder after division by the product m m n, and all n-tuples consisting of remainders after division by m to m n are produced. Since the integers from to (m m n ) leave different remainders after division by m m n we get the following corollary: Let m, m,..., m n be pairwise coprime positive integers. An integer from to (m m n ) is uniquely determined by the n-tuple of its remainders after division by m to m n. Without the assumption of coprimality we need to consider the integers from to lcm(m,..., m n ) instead. Indeed two integers give rise to the same n-tuple if and only if they leave the same remainder after division by lcm(m,..., m n ). Not necessarily all n-tuples consisting of remainders after division by m to m n do occur, but exactly lcm(m,..., m n ) of them.

THE CHINESE REMAINDER CLOCK 5 To show these assertions we can make use of the corresponding results for rotations, once we have explained how lists of remainders correspond to configurations of marked points. Consider one rotation as above with parameter m: the m positions for the marked point can be named clockwise with the integers from to m, starting with the position at time. We thus identify the positions with the m-remainders in such a way that for every integer a the position at time a corresponds to the m-remainder of a. The same can be done by considering rotations with parameters m to m n : the configuration of the n marked points at time a corresponds to the n-tuple of remainders of a. Note that the time inside a period is given by the remainder of a after division by the fundamental period i.e. by the product m m n if the parameters are pairwise coprime and in general by lcm(m,..., m n ). An impossible configuration for the marked points corresponds to an impossible list of remainders, see Figure 5 for an example. 4 FIGURE 4. With m = 4 and m = 5, the configuration at time 7 corresponds to the 4-remainder and the 5-remainder. 5 4 FIGURE 5. With m = 4 and m = 6, this configuration is impossible and indeed no integer leaves 4-remainder and 6-remainder.

6 ANTONELLA PERUCCA READING THE CHINESE REMAINDER CLOCK Reading the hours. The Chinese Remainder Clock tells us the hours, namely some number H from to. We can uniquely determine H as soon as we know its remainders after division by and by 4. The -remainder H is either, or and it is described by the position of the purple sphere (the smallest circle). The 4-remainder H 4 is either,,, or 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 6. FIGURE 6. The -remainder is, the 4-remainder is. We can find H by trial and error with at most three attempts. Indeed the difference H H 4 is a multiple of 4 hence H can only be H 4 H 4 + 4 H 4 + 8. These numbers have different -remainders and we select the one whose -remainder equals H. For the example in Figure 6 we get either, 6, or and we select because the -remainder must be. We can also compute H as follows: Indeed we can write H is the remainder after division by of H 4 + H 4 9. H 4 + H 4 9 = H + (H + H 4 ) = H 4 + 4 (H + H 4 ), hence this number has the correct remainders after division by and by 4. Taking the -remainder of the number does not alter this property and outputs a number in the range from to. For the example in Figure 6 we get the -remainder of, which is. Other methods for finding H are possible and the reader is encouraged to develop thier own strategy. Reading the minutes. The Chinese Remainder Clock tells us the minutes, namely some number M from to 59. We can uniquely determine M as soon as we know its remainders after division by, by 4, and by 5. The -remainder M is either,, or and it is described by the position of the green sphere (the third circle). The 4-remainder M 4 is either,,, or and it is described

THE CHINESE REMAINDER CLOCK 7 by the position of the blue sphere (the fourth circle). The 5-remainder M 5 is either,,,, 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 7. 4 FIGURE 7. The -remainder is, the 4-remainder is, the 5-remainder is. First of all, the parity of M is the same as the parity of M 4 (because M M 4 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 M 5 or M 5 +5 (because M equals M 5 plus a multiple of 5). For the example in Figure 7 the last cipher of M is odd and it is either 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 and otherwise M is one of C C + C + 4, C + C + C + 5. The reason for this is that adding does not change the 4-remainder, while adding does. For the example in Figure 7 we have C = 7 and M 4 =, so M is one of 7,7, or 47: we select 7 because the -remainder must be. We could also use this formula: M is the remainder after division by 6 of M 4 + M 4 45 + M 5 6. Indeed this number is also of the form M + (M 9 + M 4 5 + M 5 ) = M 4 + 4 (M + M 4 + M 5 9) = M 5 + 5 (M 8 + M 4 9 + M 5 7)

8 ANTONELLA PERUCCA so it has the correct remainders after division by, 4, and 5. This does not change by taking the 6-remainder so we find a number M from to 59 as desired. For the example in Figure 7 we get the 6-remainder of 7, which is 7. There are several other recipes for determining M. Moreover, shortcuts are possible for special configurations, for example if two numbers between M, M 4 and M 5 are equal. Which strategy is the best is a matter of personal preference, and the reader is welcome to develop their own one! FIGURE 8. The displayed times are :, :, :58, and : respectively. QUESTIONS FOR THE READER About the Chinese Remainder Clock: () Looking at the dial, how can we quickly tell if M is even? How can we quickly tell if M is divisible by? () At what times are all five spheres on the vertical line passing through the center of the dial?

THE CHINESE REMAINDER CLOCK 9 () Suppose that M 4 and M 5 are equal. Which are the three possible values for M? (4) How does a given configuration on the dial change after 6 minutes? About possible variants of the Chinese Remainder Clock: (5) Identify all possible Chinese Remainder Clocks for H:M clocks. In the standard Chinese Remainder Clock we have factored = 4 and 6 = 4 5 but there are other factorisations that produce in the same way a good clock i.e. such that on the dial configurations occur for the hours and 6 for the minutes. (6) Now consider the previous question for a 4-hour clock, i.e. the hour H goes from to. What does this change about possible Chinese Remainder Clocks? Acknowledgements. Many thanks go to Keith Conrad for the wonderful idea of drawing circles on the dial, to Albrecht Beutelspacher for pointing out the interesting example of the Maya Calendar and to Tom Fiore and Ellen Eischen for several very helpful remarks that improved the clarity of the exposition. A special thank goes to to the nonmathematicians who had fun with the Chinese Remainder Clock and supported this project. Last but not least we sincerely thank the anonymous referee for the last two questions for the reader and for suggesting to expand the discussion about the Chinese Remainder Theorem. Summary: We present an analog clock with five hands that illustrates the Chinese Remainder Theorem, and which can be understood also by non-mathematicians. Moreover, we interpret that result in terms of rotations and prove it without equations. REFERENCES [] Chinese Remainder Theorem. In Encyclopædia Britannica. Retrieved April, 6, from http://www.britannica.com/topic/chinese-remainder-theorem [] H. Davenport, The Higher Arithmetic: An Introduction to the Theory of Numbers. Sixth edition. Cambridge University Press, 99. [] G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. Sixth edition. Oxford University Press, Oxford, 8. [4] K. Ireland and M. Rosen, A classical Introduction to Modern Number Theory. Second edition. Graduate Texts in Mathematics, 84. Springer-Verlag, New York, 99. [5] P. M. Rice, Maya Calendar Origins: Monuments, Mythistory, and the Materialization of Time. University of Texas Press, Austen, 7. [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