took a unit Analytic Number Theory taught by Professor Clive Davis. I was at first disappointed when he told me that I was the only one to enrol, and assumed ...
Spreadsheet Investigations in Modular Arithmetic Steve Sugden, Bond University, Australia Abstract Modular arithmetic has sometimes been regarded as a bit of a curiosity, at least by those unfamiliar with its importance to both abstract algebra and number theory, and with its numerous applications. However, with the ubiquity of fast digital computers, and the need for reliable digital security systems such as RSA, knowledge of this important branch of mathematics is now considered almost essential for IT professionals. Indeed, computer arithmetic is, ipso facto, modular. This paper describes the use of a modern graphical spreadsheet (Microsoft’s Excel) to clearly illustrate the basics of modular arithmetic, and to solve certain classes of problems. Via conditional formatting and observation of patterns in Excel, students may gain structural insight, form and test conjectures, and solve problems. 1. Background 1.1. The practical utility of number theory In our society of the 21st century, it seems that even the most sublime of human pursuits may be called upon to justify its existence in terms of dollars contributed to some “practical” cause. Given such hard constraints, it can be difficult to defend certain esoteric branches of mathematics. But for the advances of information technology of the past few decades, a defence for number theory in terms of “pragmatics” may have been something of a challenge. Despite Hardy’s claim that “I have never done anything useful” [1], the “practical” utility of number theory nowadays is undeniable; its application to mathematical cryptography and cryptology alone being enough to stay the cries of the pragmatists. 1.2. The teaching of modular arithmetic In the Australian state of Queensland, modular arithmetic is currently out of vogue in the highschool curriculum, being relegated to an “optional” topic in Mathematics C. State-wide, this unit was taken by about 10% of seniors in 2006 [2]. Previously described as “clock-arithmetic”, at least at high-school level, modular arithmetic is often presented as something of a curiosity, with little practical application. Perhaps with the advent and dominance of digital timepieces, this terminology has faded. Created by Gauss in his Disquisitiones Arithmeticae [3] in 1801, modular arithmetic was indeed regarded as a curiosity at that time. The situation regarding coverage of modular arithmetic seems to be somewhat better at tertiary level, where the material may be treated from a slightly more mature standpoint, with a view to obvious applications. However, in the author’s experience, few IT graduates appreciate the fact that integer arithmetic (the only kind which is exact) on a digital computer is none other than modular arithmetic. This is so, since all integer operations are performed modulo some power of 2. This is the nature of a digital, binary CPU. To graduate with a degree in CS or IT and not know this seems incredible, at least to this writer. 1.3. “No maths please, and we don’t care much for programming either!” Increasingly, we see the watering-down of IT degrees: less programming, little or no low-level programming, and often no units on operating systems, compilers, theory of programming languages. There is nowadays considerable pressure, at least in the author’s own country (Australia), to accommodate fee-paying students who make no secret of their aversion not only to mathematics, but also to computer programming. This then begs the question: “Why are such 625
students enrolled in an IT degree?” To enrol in IT, but then eschew not only maths but programming sounds crazy to my ancient ears (and also to many of my ageing colleagues). Perhaps we are old fashioned in our belief that CS/IT is a scientific discipline, in which appropriate, and rigorous mathematics is a necessary part of the “toolkit” for a practitioner. 1.4. Early days I confess that I have always found number theory non-trivial. In the primary classroom, in the late 1950s and early 1960s, I learned of prime numbers, factorization of integers, highest common factor (nowadays called gcd – greatest common divisor), lowest common multiple, and other curiosities. I was educated in various schools in New South Wales, Australia. At Sydney Technical High School, in 1968, my last year of secondary school, I studied “theoretical arithmetic”, which, of course, is number theory by another name. From 1974-1978 I was enrolled part-time in a coursework program Master of Scientific Studies at the University of Queensland. I took a unit Analytic Number Theory taught by Professor Clive Davis. I was at first disappointed when he told me that I was the only one to enrol, and assumed that it would be cancelled. Not so, and he ran the whole thing as if the lecture room were full of students. I found it very interesting and we covered, among other topics, the Prime Number Theorem, the transcendence of e and π, plus lots of interesting material on the Riemann zeta function (actually first defined by Euler). Material on additive number theory (partitions of integers) was also covered. 1.5. Today These days, I am at Bond University, where unfortunately, there is very little mathematics: just a few units of statistics plus Business Mathematics and Analytical Toolkit (discrete mathematics plus some very basic statistics for IT students). Recently I wrote elsewhere about the difficulties encountered at Bond while trying to get across the basics of discrete mathematics to IT students. I also described my response to this problem: in a nutshell, it is the use of Excel to convey mathematical principles to students whose algebra is, in many cases, almost non-existent [4]. Several negative factors usually conspire to create a huge problem here, but the most significant component is always the very poor mathematical knowledge and skillset of a typical IT student at Bond. It is my impression that this problem is not confined to Bond, but essentially ubiquitous in Australia. Recent anecdotal evidence seems to indicate that the situation is perhaps even worse in the UK, USA and Canada. 1.6. Formalism is a problem From my perspective, there seems today to be an almost total lack of ability and/or experience on the part of many students to deal with formality in mathematics. I refer to formal definitions, formal manipulation of symbols, i.e., algebra, and formal or semi-formal reasoning using accepted principles of logic. Whatever their high-school mathematics curriculum was, the students appear to have emerged with very poor problem-solving skills, little facility for algebra, and not much appreciation of the wide applicability of mathematics to solve a range of problems. They even a lack of knowledge of “standard tricks”, such as quick checks for divisibility (sum of digits is a multiple of 3 or 9, or last digit is even). Is 127652761865675448 a prime? The calculator is quickly sought for “difficult” problems like 6 x 7, or even 6 + 7! How do we deal with such atrocious levels of mathematical understanding when students are enrolled at university for degrees where basic maths is required? I have written of the possibility of a partial, stopgap solution in [4].
626
2. Some applications of modular arithmetic to IT 2.1. Hashing Hashing, or scatter storage, is the process where a key (usually some text string) must be mapped to an array location (index or address). The usual approach is to use a fairly simple function of the key, modulo n, where n is prime. The function needs to be simple, or more precisely, efficiently computable, as the only advantage of using hash functions for record retrieval is speed; everything else is negative. 2.2.
Simultaneous linear congruences (SLCs) x ≡ 1( mod 3)
x ≡ 2 ( mod 5 )
x ≡ 5 ( mod 7 ) Solution of SLCs such as the set of three shown above may be viewed as computing the intersection of several arithmetic sequences, i.e., what set, or sequence is formed by the elements common to each sequence? Viewed from this perspective, the possibility of an empty sequence arises. For example, one cannot have x both congruent to 1 (mod 4) and to 0 (mod 2). Necessary and sufficient conditions for the existence of solutions are given by the Chinese Remainder Theorem, but I do not even mention this in class. I merely show how to find the general solution (or prove its non-existence) by algebra. This approach is complemented by one or two Excel models. The simple version of the Excel model merely lists the arithmetic sequences defined by the linear congruences. The intrinsic function COUNTIF is then used to identify solutions, which are highlighted by conditional formatting (CF). I require the students to be familiar with both algebraic and Excel methods. Where appropriate, this is my approach in general. 2.3. Modular inverse and modular exponentiation The RSA public key system of encryption [5] relies on, among other things, efficient computation of modular inverse and modular exponential (see next section). Briefly, the private and public keys are mutual inverses with respect to the system modulus, which is the product of two large, distinct primes. In the simplest application of RSA, these two keys are the encryption and decryption keys respectively. Suppose we wish to compute the inverse of 4 with respect to modulus 11. Denoting this quantity by x, it may be defined as the solution, or a solution of the equation 4x ≡ 1 (mod 11). The perennial questions of existence and uniqueness arise, plus of course, how to compute the inverse if it exists. I have found that many students miss even the entire concept of modular inverse, answering “0.25” to the question “compute 4-1 (mod 11) ". Thus, I go out of my way to avoid this misconception. I just use a table in Excel, so to “compute” mod inverse, we simply consult the table. It becomes clear via conditional formatting when the inverse does not exist. I then ask the students to contemplate why inverse does not always exist, but when it does, it is unique. For many more examples where CF patterns are used to illustrate principles or solve mathematical problems, see [9, 10].
627
11 1 2 3 4 5 6 7 8 9 10 1 1 2 3 4 5 6 7 8 9 10 2 2 4 6 8 10 1 3 5 7 9 3 3 6 9 1 4 7 10 2 5 8 4 4 8 1 5 9 2 6 10 3 7 5 5 10 4 9 3 8 2 7 1 6 6 6 1 7 2 8 3 9 4 10 5 7 7 3 10 6 2 9 5 1 8 4 8 8 5 2 10 7 4 1 9 6 3 9 9 7 5 3 1 10 8 6 4 2 10 10 9 8 7 6 5 4 3 2 1
Figure 1 Students can easily see that modular inverse is obtained by table lookup. They are also required to complete an assignment on RSA [6]. For this, they must write functions for modinv and modexp in VBA (Excel-hosted). Even though such functions are each 6 or 7 lines of code, they struggle. The algorithm for modinv is essentially linear search. Just like table lookup: start at 1, keep looking until you find a 1 in the row of interest, or see that it is not there (non-existence of inverse). To compute x n ( mod m ) is also an essential step of the RSA encryption (and decryption) process. Naive code for these is shown below; the code for modular inverse assumes its existence. Function modexp(x As Long, n As Long, m As Long) As Long modexp = 1 Do While n > 0 modexp = (modexp * x) Mod m n=n-1 Loop End Function Function modinv(t As Long, m As Long) As Long modinv = 0 Do modinv = modinv + 1 Loop Until modinv * t Mod m = 1 End Function 2.4.
Discovering properties of primes I use modular multiplication tables with CF in Excel to clearly show certain patterns. Two sliders (also known as scrollbars) are employed: one for the modulus and one to specify a value to highlight wherever it appears in the table. For example, we may highlight 1, thus clearly illustrating the concept of modular inverse. Also in the model is automatic counting of the frequency of each residue in the table, and that of the special value in each row. It then becomes obvious when modinv fails to exist, and when it is unique. If we search for 0, then some very interesting patterns occur. Why do such special arrangements of 0 occur for the numbers 14, 22, 26, 34, 38, 46?
628
34
22
14 1 2 3 4 5 6 7 8 9 10 11 12 13
Modu 1 1 2 3 4 5 6 7 8 9 10 11 12 13
2 2 4 6 8 10 12 0 2 4 6 8 10 12
3 3 6 9 12 1 4 7 10 13 2 5 8 11
4 4 8 12 2 6 10 0 4 8 12 2 6 10
5 5 10 1 6 11 2 7 12 3 8 13 4 9
6 6 12 4 10 2 8 0 6 12 4 10 2 8
7 7 0 7 0 7 0 7 0 7 0 7 0 7
8 8 2 10 4 12 6 0 8 2 10 4 12 6
9 9 4 13 8 3 12 7 2 11 6 1 10 5
10 10 6 2 12 8 4 0 10 6 2 12 8 4
11 11 8 5 2 13 10 7 4 1 12 9 6 3
12 12 10 8 6 4 2 0 12 10 8 6 4 2
13 13 12 11 10 9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Modulus 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
2 2 4 6 8 10 12 14 16 18 20 0 2 4 6 8 10 12 14 16 18 20
3 3 6 9 12 15 18 21 2 5 8 11 14 17 20 1 4 7 10 13 16 19
4 4 8 12 16 20 2 6 10 14 18 0 4 8 12 16 20 2 6 10 14 18
5 5 10 15 20 3 8 13 18 1 6 11 16 21 4 9 14 19 2 7 12 17
6 6 12 18 2 8 14 20 4 10 16 0 6 12 18 2 8 14 20 4 10 16
7 7 14 21 6 13 20 5 12 19 4 11 18 3 10 17 2 9 16 1 8 15
8 8 16 2 10 18 4 12 20 6 14 0 8 16 2 10 18 4 12 20 6 14
9 9 18 5 14 1 10 19 6 15 2 11 20 7 16 3 12 21 8 17 4 13
10 10 20 8 18 6 16 4 14 2 12 0 10 20 8 18 6 16 4 14 2 12
11 11 0 11 0 11 0 11 0 11 0 11 0 11 0 11 0 11 0 11 0 11
12 12 2 14 4 16 6 18 8 20 10 0 12 2 14 4 16 6 18 8 20 10
13 13 4 17 8 21 12 3 16 7 20 11 2 15 6 19 10 1 14 5 18 9
14 14 6 20 12 4 18 10 2 16 8 0 14 6 20 12 4 18 10 2 16 8
15 15 8 1 16 9 2 17 10 3 18 11 4 19 12 5 20 13 6 21 14 7
16 16 10 4 20 14 8 2 18 12 6 0 16 10 4 20 14 8 2 18 12 6
17 17 12 7 2 19 14 9 4 21 16 11 6 1 18 13 8 3 20 15 10 5
18 18 14 10 6 2 20 16 12 8 4 0 18 14 10 6 2 20 16 12 8 4
19 19 16 13 10 7 4 1 20 17 14 11 8 5 2 21 18 15 12 9 6 3
20 20 18 16 14 12 10 8 6 4 2 0 20 18 16 14 12 10 8 6 4 2
21 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Modulus 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
3 3 6 9 12 15 18 21 24 27 30 33 2 5 8 11 14 17 20 23 26 29 32 1 4 7 10 13 16 19 22 25 28 31
4 4 8 12 16 20 24 28 32 2 6 10 14 18 22 26 30 0 4 8 12 16 20 24 28 32 2 6 10 14 18 22 26 30
5 5 10 15 20 25 30 1 6 11 16 21 26 31 2 7 12 17 22 27 32 3 8 13 18 23 28 33 4 9 14 19 24 29
6 6 12 18 24 30 2 8 14 20 26 32 4 10 16 22 28 0 6 12 18 24 30 2 8 14 20 26 32 4 10 16 22 28
7 7 14 21 28 1 8 15 22 29 2 9 16 23 30 3 10 17 24 31 4 11 18 25 32 5 12 19 26 33 6 13 20 27
8 8 16 24 32 6 14 22 30 4 12 20 28 2 10 18 26 0 8 16 24 32 6 14 22 30 4 12 20 28 2 10 18 26
9 9 18 27 2 11 20 29 4 13 22 31 6 15 24 33 8 17 26 1 10 19 28 3 12 21 30 5 14 23 32 7 16 25
10 10 20 30 6 16 26 2 12 22 32 8 18 28 4 14 24 0 10 20 30 6 16 26 2 12 22 32 8 18 28 4 14 24
11 11 22 33 10 21 32 9 20 31 8 19 30 7 18 29 6 17 28 5 16 27 4 15 26 3 14 25 2 13 24 1 12 23
12 12 24 2 14 26 4 16 28 6 18 30 8 20 32 10 22 0 12 24 2 14 26 4 16 28 6 18 30 8 20 32 10 22
13 13 26 5 18 31 10 23 2 15 28 7 20 33 12 25 4 17 30 9 22 1 14 27 6 19 32 11 24 3 16 29 8 21
14 14 28 8 22 2 16 30 10 24 4 18 32 12 26 6 20 0 14 28 8 22 2 16 30 10 24 4 18 32 12 26 6 20
15 15 30 11 26 7 22 3 18 33 14 29 10 25 6 21 2 17 32 13 28 9 24 5 20 1 16 31 12 27 8 23 4 19
16 16 32 14 30 12 28 10 26 8 24 6 22 4 20 2 18 0 16 32 14 30 12 28 10 26 8 24 6 22 4 20 2 18
17 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17 0 17
18 18 2 20 4 22 6 24 8 26 10 28 12 30 14 32 16 0 18 2 20 4 22 6 24 8 26 10 28 12 30 14 32 16
19 19 4 23 8 27 12 31 16 1 20 5 24 9 28 13 32 17 2 21 6 25 10 29 14 33 18 3 22 7 26 11 30 15
20 20 6 26 12 32 18 4 24 10 30 16 2 22 8 28 14 0 20 6 26 12 32 18 4 24 10 30 16 2 22 8 28 14
21 21 8 29 16 3 24 11 32 19 6 27 14 1 22 9 30 17 4 25 12 33 20 7 28 15 2 23 10 31 18 5 26 13
22 22 10 32 20 8 30 18 6 28 16 4 26 14 2 24 12 0 22 10 32 20 8 30 18 6 28 16 4 26 14 2 24 12
0 23 23 12 1 24 13 2 25 14 3 26 15 4 27 16 5 28 17 6 29 18 7 30 19 8 31 20 9 32 21 10 33 22 11
24 24 14 4 28 18 8 32 22 12 2 26 16 6 30 20 10 0 24 14 4 28 18 8 32 22 12 2 26 16 6 30 20 10
25 25 16 7 32 23 14 5 30 21 12 3 28 19 10 1 26 17 8 33 24 15 6 31 22 13 4 29 20 11 2 27 18 9
26 26 18 10 2 28 20 12 4 30 22 14 6 32 24 16 8 0 26 18 10 2 28 20 12 4 30 22 14 6 32 24 16 8
27 27 20 13 6 33 26 19 12 5 32 25 18 11 4 31 24 17 10 3 30 23 16 9 2 29 22 15 8 1 28 21 14 7
28 28 22 16 10 4 32 26 20 14 8 2 30 24 18 12 6 0 28 22 16 10 4 32 26 20 14 8 2 30 24 18 12 6
29 29 24 19 14 9 4 33 28 23 18 13 8 3 32 27 22 17 12 7 2 31 26 21 16 11 6 1 30 25 20 15 10 5
30 30 26 22 18 14 10 6 2 32 28 24 20 16 12 8 4 0 30 26 22 18 14 10 6 2 32 28 24 20 16 12 8 4
31 31 28 25 22 19 16 13 10 7 4 1 32 29 26 23 20 17 14 11 8 5 2 33 30 27 24 21 18 15 12 9 6 3
32 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 0 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
33 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Figure 2 When and why does 0 appear in the table? Alternatively, “for which moduli do zeroes not appear in the table?” When does each row/column contain a 1? When does each row/column contain a full set of residues? Why is 1 sometimes absent from a row? Why does the “sparse parallel line” pattern of Figure 3 appear as it does? 36 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Modulus 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34
3 3 6 9 12 15 18 21 24 27 30 33 0 3 6 9 12 15 18 21 24 27 30 33 0 3 6 9 12 15 18 21 24 27 30 33
4 4 8 12 16 20 24 28 32 0 4 8 12 16 20 24 28 32 0 4 8 12 16 20 24 28 32 0 4 8 12 16 20 24 28 32
5 5 10 15 20 25 30 35 4 9 14 19 24 29 34 3 8 13 18 23 28 33 2 7 12 17 22 27 32 1 6 11 16 21 26 31
6 6 12 18 24 30 0 6 12 18 24 30 0 6 12 18 24 30 0 6 12 18 24 30 0 6 12 18 24 30 0 6 12 18 24 30
7 7 14 21 28 35 6 13 20 27 34 5 12 19 26 33 4 11 18 25 32 3 10 17 24 31 2 9 16 23 30 1 8 15 22 29
8 8 16 24 32 4 12 20 28 0 8 16 24 32 4 12 20 28 0 8 16 24 32 4 12 20 28 0 8 16 24 32 4 12 20 28
9 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27 0 9 18 27
10 10 20 30 4 14 24 34 8 18 28 2 12 22 32 6 16 26 0 10 20 30 4 14 24 34 8 18 28 2 12 22 32 6 16 26
11 11 22 33 8 19 30 5 16 27 2 13 24 35 10 21 32 7 18 29 4 15 26 1 12 23 34 9 20 31 6 17 28 3 14 25
12 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24 0 12 24
13 13 26 3 16 29 6 19 32 9 22 35 12 25 2 15 28 5 18 31 8 21 34 11 24 1 14 27 4 17 30 7 20 33 10 23
14 14 28 6 20 34 12 26 4 18 32 10 24 2 16 30 8 22 0 14 28 6 20 34 12 26 4 18 32 10 24 2 16 30 8 22
15 15 30 9 24 3 18 33 12 27 6 21 0 15 30 9 24 3 18 33 12 27 6 21 0 15 30 9 24 3 18 33 12 27 6 21
16 16 32 12 28 8 24 4 20 0 16 32 12 28 8 24 4 20 0 16 32 12 28 8 24 4 20 0 16 32 12 28 8 24 4 20
17 17 34 15 32 13 30 11 28 9 26 7 24 5 22 3 20 1 18 35 16 33 14 31 12 29 10 27 8 25 6 23 4 21 2 19
18 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18 0 18
19 19 2 21 4 23 6 25 8 27 10 29 12 31 14 33 16 35 18 1 20 3 22 5 24 7 26 9 28 11 30 13 32 15 34 17
20 20 4 24 8 28 12 32 16 0 20 4 24 8 28 12 32 16 0 20 4 24 8 28 12 32 16 0 20 4 24 8 28 12 32 16
21 21 6 27 12 33 18 3 24 9 30 15 0 21 6 27 12 33 18 3 24 9 30 15 0 21 6 27 12 33 18 3 24 9 30 15
22 22 8 30 16 2 24 10 32 18 4 26 12 34 20 6 28 14 0 22 8 30 16 2 24 10 32 18 4 26 12 34 20 6 28 14
31 23 23 10 33 20 7 30 17 4 27 14 1 24 11 34 21 8 31 18 5 28 15 2 25 12 35 22 9 32 19 6 29 16 3 26 13
24 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12 0 24 12
25 25 14 3 28 17 6 31 20 9 34 23 12 1 26 15 4 29 18 7 32 21 10 35 24 13 2 27 16 5 30 19 8 33 22 11
26 26 16 6 32 22 12 2 28 18 8 34 24 14 4 30 20 10 0 26 16 6 32 22 12 2 28 18 8 34 24 14 4 30 20 10
27 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9 0 27 18 9
28 28 20 12 4 32 24 16 8 0 28 20 12 4 32 24 16 8 0 28 20 12 4 32 24 16 8 0 28 20 12 4 32 24 16 8
29 29 22 15 8 1 30 23 16 9 2 31 24 17 10 3 32 25 18 11 4 33 26 19 12 5 34 27 20 13 6 35 28 21 14 7
30 30 24 18 12 6 0 30 24 18 12 6 0 30 24 18 12 6 0 30 24 18 12 6 0 30 24 18 12 6 0 30 24 18 12 6
31 31 26 21 16 11 6 1 32 27 22 17 12 7 2 33 28 23 18 13 8 3 34 29 24 19 14 9 4 35 30 25 20 15 10 5
32 32 28 24 20 16 12 8 4 0 32 28 24 20 16 12 8 4 0 32 28 24 20 16 12 8 4 0 32 28 24 20 16 12 8 4
33 33 30 27 24 21 18 15 12 9 6 3 0 33 30 27 24 21 18 15 12 9 6 3 0 33 30 27 24 21 18 15 12 9 6 3
34 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 0 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2
35 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
Figure 3 2.5. Terry Tao problem Fields Medal winner Terry Tao recently published a second edition of his little book on mathematical problem-solving [7]. It is a very interesting and useful little volume, giving much insight into problem-solving. In a very lucid and entertaining manner, the author shows how he develops successful chains of reasoning. Plausible but ultimately fruitless paths are tried but discarded as false steps along the way. Like Polya, he gives some general principles for mathematical problem-solving. For number-theoretical or Diophantine problems, one of the more useful tools in the toolkit is modular arithmetic. Exercise 2.3 on p24 of [7] is to show that x 4 + 131 = y 4 cannot have integer solutions. Ignoring Terry’s tacit advice to use modular arithmetic, at first I tried to prove this by a clever(?) rearrangement and factorization: x 2 − 4 x 2 + 4 = 3 y 2 − 7 y 2 − 7 . The LHS is congruent to
(
)(
) (
)(
)
0 or 4 (mod 5), whereas the RHS is always 0 or 3 (mod 5) . I was pretty pleased with myself, but soon realized that an even simpler proof is possible! This was inspired by simply tabulating the original problem in Excel, with a range of small moduli. Details can later be filled-in rigorously, by modular algebra. Here we have yet another use of Excel to produce a clearly-recognized pattern, forming the basis of a rigorous proof.
629
3. Conclusion I have very briefly outlined how the modern graphical spreadsheet may be used to create interesting and visually appealing lessons in the basics of modular arithmetic. There is much more that could be done, but in any case, the literature is clear: students learn mathematics in different ways. The traditional way of algebra has been successful for only a minority of students [8]. Spreadsheets offer the chance for students to leverage their powerful visual perceptive abilities in support of moving to the more formal mathematical language of algebra, and basic notions of proof [8]. Unfortunately, such opportunities are often routinely bypassed by math educators [4]. The topic of modular arithmetic is interesting mathematically, and has many applications. The modern spreadsheet environment offers a goldmine of possibilities for the mathematics teacher when modular arithmetic is investigated. For students whose algebraic background is modest, the spreadsheet still allows many concepts to be conveyed. Once these are seen graphically, the algebraic approach can then be used to establish theorems and solve problems. For a very brief summary of some of my other uses of Excel in math instruction, see [4]. For recent summaries of applications by others, see [11, 12]. Last year a mathematical colleague told me of a paper he recently had published in a prestigious international journal. The basic patterns that made up the “visual proof” were discovered by constructing an Excel model. This was omitted from the paper as the author had serious doubts concerning the paper’s acceptance if it were revealed that the theorems proved therein were discovered or motivated by using a spreadsheet. I believe it is time that mathematics educators stopped regarding the ubiquitous Microsoft Excel as merely an accounting tool and seriously examined its possibilities for the illustration of the many beautiful patterns of mathematics to their students. References 1. Hardy, GH (1940). A Mathematician's Apology, p150. 2. Stevens, W (2007). Private communication, Queensland Studies Authority. 3. Gauss, CF (1801). Disquisitiones Arithmeticae. 4. Sugden SJ (2007). Spreadsheets: an overlooked technology for mathematics education. The Australian Mathematical Society Gazette, 34(2): 68-74, invited paper. 5. Gilbert, GT and Hatcher, RL (1999). Mathematics Beyond the Numbers, Wiley, 526-531. 6. Sugden SJ (2003). Practical Number Theory in a Discrete Mathematics Class: The RSA Cryptosystem in Microsoft Excel and on the Web. Remarkable Delta 03 Communications, 252-258. Queenstown, NZ, November 2003. 7. Tao, T (2006). Solving mathematical problems, Oxford University Press. 8. Sutherland, R, and Rojano, T (1993). A Spreadsheet Approach to Solving Algebra Problems. Journal of Mathematical Behaviour 12(4): 351-383. 9. Sugden SJ (2005). Colour by Numbers: Solving Algebraic Equations without Algebra. Spreadsheets in Education, 2(1): 101-114. 10. Abramovich S, Sugden SJ (2003). Spreadsheet Conditional Formatting: An Untapped Resource for Mathematics Education. Spreadsheets in Education 1(2): 85-105. 11. Baker JE, Sugden SJ (2003). Spreadsheets in Education: The First 25 Years. Spreadsheets in Education, 1(1): 18-43. 12. Sugden SJ (2006). Spreadsheets in Education: A Peer-Reviewed Medium For Active Learning. ICTM3 Proceedings, Paper #112 (CD-ROM). Istanbul, Turkey, 30 June - 5 July 2006.
630