Beruflich Dokumente
Kultur Dokumente
An Introduction to Numbers
We started today by getting to know the policies and expectations in the course. All of this is available already on the syllabus, but if you have any questions don't be shy about emailing Andy. We also spent some time introducing ourselves briefly; this will be continued as you post your own profiles for Homework 0. Afterwards, we started talking about the basics in number theory, starting with the axioms. We finished by introducing the notion of divisibility for the integers.
(1)
The basic operations we have on the integers are addition, subtraction and multiplication. We've avoided division since division doesn't behave very well on the integers: the quotient of two integers is frequently not another integer. We also have basic tools for comparing integers, namely equality and inequality. With the fundamental objects, operations and comparisons in place, we can start writing down the basic rules they all satisfy. Here's the list that we were able to come up with in class:
, the sum
for any
, the product
for any for any for any for any for any for any class]; for any in class]; , , , ,
, , ,
(associativity of addition); (associativity of multiplication); (distributivity); (commutativity of addition); (commutativity of multiplication); (additive identity) [note: we didn't mention this in (multiplicative identity) [note: we didn't mention this
multiplication); for any for any for any , , implies if and only if
(1)
cancellation of addition); , exactly one of the following is true (Trichotomy law); for any for any for any if , if , if , if then and and , then , then ; ; ; and has a least element (Well
ordering principle). The last axiom the well ordering principle probably sticks out as the ugly duckling of the bunch, and it certainly isn't one which most people think of when rattling off basic properties of the integers. It is, however, essential to what we'll be doing in class, as it is logically equivalent to mathematical induction a tool that we'll be using with some frequency in this course.
In class, we sketched a proof of the following result Theorem: For any nonzero , if satisfies , then
Proof: We started by noting that we could assume a is either greater than or less than 0; by trichotomy we know that one of (1) we had or , since (2) or (3) is true, and if then we'd be done with the theorem. By a similar token we know that is ruled out by assumption. So we broke things into 4 or and whether or .
In this case, one of our axioms on inequality tells us that , and so we know this case is impossible.
One could proceed with analyzing the other cases, each time you would find a contradiction to the given equality This leaves only , the desired result. . At the end, one concludes that all the nor are possible. possibilities lead to a contradiction, and hence neither
Though working through axiomatic proofs is good exercise for building your proofmuscles, in practice we won't be quite so explicit in our use of these familiar axioms during class. This won't present any real problems since you are more accustomed to manipulating these axioms then perhaps you realize.
An example
This definition should agree with your own intuitive notion of divisibility in the integers, so hopefully it isn't too surprising. To see an example in action, notice that since we can find an integer q to solve the equation
(2)
A non-example
Let's try to prove that q satisfying the equation . For this, we need to show that we cannot find an integer
(3)
we have
(a
(4)
we get
(5)
Since all integers fall into one of the categories we have described, we conlude that for any integer q, and so .
Lecture 2 Summary
Introducing Divisibility
Today we continued our discussion of divisibility and its basic properties. We saw some examples of how to put these properties into practice to prove exciting new results which might otherwise be quite difficult. Today's lecture culminated in the statement and proof of the division algorithm, one of the foundational results in number theory.
Divisibility Continued
Last class previous we defined the notion of divisibility in the integers as follows:
Definition: An integer d is said to divide an integer a if there exists some integer q satisfying the equation .
Some Examples
We already saw proofs of and in class on Wednesday. Most divisibility statements will seem pretty obvious to you just by inspection, but the one exception might be divisibility statements involving 0. Below we provide a few examples.
since the equation doesn't have any solution; any value you plug in for q will still make the right hand side 0. since the equation true for all q!). since is true for some integer-value of q (in fact, it's
You might also be used to thinking of even integers as those numbers a which satisfy a = 2k for some integer k. Indeed, we have the following Lemma: An integer a is even if and only if there exists so that .
Our proof of this result will require us to simply recall the definitions of divisiblity and evenness. Proof: We know that an integer a is even if and only if evenness. We also know that ; this is just the definition of
(1)
as desired. You'll extend this problem in your homework when you show that all odd numbers can be written in the form .
Properties of Divisibility
There are a handful of properties of divisibility which are handy to remember; basically, these are good tools to use when you want to try to divide one integer into another. You can also think of these lemmas as good exercise for the definitions we've encountered in the class: none of the proofs require much more than writing down definitions, so they are a good chance for you to get used to the new terminology we've covered. Lemma: For Proof: We're told that have , if and and then .
(using the first divisibility condition), and (using the second divisibility condition).
(2)
Since de is an integer, this equation tells us that Lemma: For , if and , then
as desired. .
Proof: Again, we start by just writing down the definitions. In this case, we're told that and , which means we have (using the first divisibility condition), and (using the second divisibility condition).
Hence we have
(3)
There was another basic property of division we mentioned that allowed us to compare the size of a divisor to the size of the integer it is dividing. The statement of this result is
Lemma: If
A Neat Trick
One of the examples of divisibility we gave in class was a rule for determining when an integer is divisible by 17. You can think of this as a cousin of the old "casting our nines" rule that you use to determine whether a given integer is divisible by 9. This new rule says Theorem: An integer Proof: First, assume that is divisible by 17 if and only if . Since is divisible by 17.
(4)
In the other direction, assume that we are told that prove . Now since we know that
(5)
Example
To see this result in practice, notice that we have 221 = 22(10)+1. Since , we can conclude that .
Proof: We proved this result by induction, starting with the base case case it's easy to see that the statement is true: .
For the inductive step, we'll assume we know that to prove that expression
. In order to do this, we'll try to simplify the into something more user friendly; we decided the bast , which gives us
(6)
Since
by induction and
(7)
and we claim that S has at least one non-negative element. To back up this claim, notice that
if
otherwise
Now since d is positive by assumption we know that product is either a positive number (if
is a non-negative element of S.
In either case we see that S contains a non-negative element, and hence the well ordering principle tells us that S contains a least non-negative element. We'll call this element r, and notice that r takes the form
(8)
Hence we get
. To show this satisfies the conditions of the division . The condition . is satisfied
since r is chosen to be non-negative, so we only need to verify To see that , assume to the contrary that
(9)
Since
by assumption we have
than r. This is a contradiction to the selection of r as the smallest non-negative element of S, so we must conclude that Part 2: Uniqueness To finish the proof we need to show that the q and r we found in the previous part of the theorem are, indeed, unique. Hence suppose we have
(10)
This tells us that , and therefore that by our conditions into namely, . With this in hand, we see that the equation then becomes . . This tells us that we must have . But since we also have , we are in the , and hence
scenario where the divisor d has larger absolute value than the number it is dividing
Lecture 3
by describing some properties that greatest common divisors enjoy, including the (surprisingly powerful) result that the gcd of two integers a and b can be expressed as an integral linear combination of a and b.
(1)
then one can say that "d divides a," that " d is a divisor of a," that ''dq is a factorization of a," or that "a is a multiple of d." All of these expressions capture the same equation above, and they should be pretty familiar vocabulary to all of you. It is also worth pointing out the division algorithm gives us a way to measure the success or failure of one integer dividing another. What we mean by this is the following. In the case that the case that , we have an equation which is satisfied. In
we can write down. The division algorithm, however, let's use write an equation of the form (with ) regardless of the divisibility of d and a. In fact, the or the case .
remainder term tells us precisely whether we're in the case circumstances, as you'll find in this week's assignment.
Being able to write down such an equation winds up being critically important in many
which is less than or equal to a. Hence if we choose q as 10, then we get the equation
(2)
10
Certainly common divisors exist for any pair of integers a and b, since we know that 1 always divides any integer. We also know that common divisors can't get too big since divisors can't be any larger than the number they are dividing; hence a common divisor d of a and b must have as motivation, we have the following Definition: The greatest common divisor of two integers a and b, written largest integer d so that integers written and , is the and , so that . With all this
, then the greatest common divisor of the collection , is the largest integer d so that for every i.
The largest number which is a member of both of these sets and hence the greatest common divisor of 12 and 9 is therefore 3. So we have shown (12,9) = 3.
11
Of particular interest in number theory are integers which do not share a common divisor, and because of their importance they get their own special name. Definition: Two integers a and b are said to be relatively prime if and b share no common non-trivial divisors. A collection if . A collection whenever . = 1; i.e., if a is relatively prime
In the examples above, we see that 21 and 10 are relatively prime, and that the collection is relatively prime. Notice in this last example that the
collection is relatively prime even though each pair of integers from the collection is not relatively prime. (As a general rule of thumb, you'll care more about whether a collection is pairwise relatively prime than whether it's relatively prime).
Lemma: For any pair of integers a and b, we have Proof: Since and , there exist integers so that
(3)
Our goal, then, is to show that common divisor satisfying of both and
. For this, suppose that there were some . This would imply that there exist integers
(4)
12
Putting this together with the previous equation, we'd then have
(5)
(a,b). This is a contradiction to the definition of greatest common divisor, and hence we are left to conclude that
(6)
You might be tempted to think that the integers a and the temptation! In general, it is not true that
, and we'll
show that it is in fact the greatest common divisor. Toward this end, we'll start by showing that d is a common divisor of both a and b, then we'll show that all other common divisors divide d (and so all other divisors are no bigger than d). To show that d is a divisor of a, we'll start by using the Division Algorithm to find integers q and r with that satisfy . Using the fact that
(7)
But since d is chosen as the minimum positive integral linear combination of a and b, we therefore have , and so . Hence , and a similar proof shows that
. So d is a common divisor.
13
Now we show that any other common divisor k of a and b is also a divisor of d, from which we conclude that as claimed. To show that ; this ensures that d is the greatest common divisor, , we note that since and , then we have k
(8)
Corollary: Two integers a and b are relatively prime if and only if 1 can be written as an integral linear combination of a and b. Another interesting property which the gcd of two integers has is that all other common divisors of a and b will divide (a,b). We actually proved this in the midst of the proof of the last theorem, so we can write is as a Corollary: For any pair of integers a and b, a common divisor d has .
As a final corollary, we note that since the gcd of two numbers is their smallest positive integral linear combination, any positive number smaller than their gcd cannot be expressed as an integral linear combination. Corollary: If k is a positive integer which is smaller than integers x and y so that the equation holds. , then there are no
. In general, though, this is false (can you find a counterexample?). When you have some ''nice'' property involving relatively prime integers, however, you can call on a result such as this. Lemma: If and , then .
I won't prove this for you now, since this is one of your homework exercises.
14
Prime Numbers
Summary
Although we introduced the concept of greatest common divisors in class last time, we didn't come up with a very effective way of computing GCDs. We remedy this with the Euclidean Algorithm, and we show how this algorithm can also be used to express the GCD of two numbers a and b as an explicit linear combination of a and b. Afterwards we introduced prime numbers and started proving some results about them.
Proof: This is really not a hard proof. Suppose that d is a common divisor of a and b. Then since , we have that d is a divisor of r as well (using our "divisibility
of integral linear combinations" result). Likewise, if d is a common divisor of b and r, then since also a divisor of a. Hence all common divisors of a and b are also common divisors of b and r, and vice versa, proving that the greatest elements amongst these common divisors are the same. We can apply this idea iteratively to give a computationally effective way to compute GCDs. we have that d is
15
Suppose you're interested in computing (1921,493). Using the previous result, since
(1)
we know that this GCD is the same as (493,442). In fact, we can keep using this result over and over again, provided we keep using the division algorithm every time we get a non-zero remainder. These applications of the division algorithm are:
(2)
Hence we have
(3)
(4)
The previous application of the division algorithm, though, showed us that , and hence we can substitute this into our expression for 17:
(5)
(6)
(7)
16
Prime Numbers
The stars of number theory are the prime numbers. A number number exist is said to be prime if the only positive divisors of p are 1 and itself. A is said to be composite if it is not prime; i.e., n is composite if there so that .
The reason that prime numbers are so exciting is that, despite their foundational role in the multiplicative structure of the integers, they are very elusive. When I say that they are foundational in the multiplicative structure of the integers, I mean that any factorization of an integer n involves prime numbers as the atomic pieces in the same way that any physical substance we encounter is built out of elements from the periodic table. This is made precise by the Fundamental Theorem of Arithmetic, a topic we'll start discussing tomorrow. And when I say elusive, I mean just that: the damn things are hard to pin down and understand. We'll talk more about both of these ideas as well as some cool applications of primality throughout the remainder of the course. For now, though, we'll take a step in the first direction: showing that prime numbers are the building blocks of integers. For this, we begin with a nice lemma that says that any number is divisible by at least 1 prime number. Lemma: For any integer , there exists some prime number p which divides n.
Proof: We'll prove this result by contradiction: assuming the opposite of what we want to prove, manipulating this assumption until it reaches a contradiction, and then concluding that our assumption must be false and hence our desired conclusion is true. So suppose that not every integer n has a prime factor. This means that the set
(8)
is non-empty. As a non-empty set of positive integers, S must have a least element. We'll call this least element N. Now N is an element of S, and hence has no prime divisor. Since N is a divisor of itself , after all this means in particular that N cannot be prime. Therefore N is so that N = ab. Being positive
integers less than N, both a and b must live outside of S, and hence each has a prime
17
factor: say
and
. But then
and
, so that
, contrary to the
defining property of N. Having reached a contradiction, we conclude that S must, indeed, be empty, and so every integer greater than 1 has a prime factor. This result gives us a method for finding prime numbers using a sieve technique. Before we get there, we need to first make the following Observation: If such that . is a composite number, then there exists a prime divisor p of n
Proof: If n is composite, then there exist integers a and b so that n = ab. Now one of a or b must be less than , since otherwise their product would be greater than n. . Now a has a prime factor p and , we further have
Without loss of generality, we can assume that from the previous lemma, and so , giving the desired result. . Since
A Sieve Example
The idea behind a sieve is to find prime numbers by eliminating multiples of known prime numbers. The magic, though, is that one has to use relatively few primes to sieve out larger ones. Suppose, for instance, that you wanted to find all prime numbers less than 60. The previous observation says that any composite number factor which is smaller than must have a prime
than 60 must be divisible by one of the primes which is smaller than 8 namely one of 2, 3, 5, or 7. Hence if we listed all the numbers between 2 and 60 and crossed out the multiples of the primes listed above, the remaining numbers would all have to be prime. Let's try it out:
2 11 21 31 41 12 22 32 42
3 13 23 33 43
4 14 24 34 44
5 15 25 35 45
6 16 26 36 46
7 17 27 37 47
8 18 28 38 48
9 19 29 39 49
10 20 30 40 50
18
51
52
53
54
55
56
57
58
59
60
After crossing out all multiples of 2, 3, 5, and 7, we see that the primes less than 60 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 21, 37, 41, 43, 47, 53, and 59. In the same way that knowing the primes less than generate the list of primes less than gave us a method for finding
the primes less than 60, knowing the list of primes less than n gives us a way to . While this is a great way to conclusively generate prime numbers, the downside is that this technique takes a LONG times to implement. Hence it is an effective but impractical method for finding really big prime numbers.
how many primes are there? for instance, is the number of primes finite? if the number of primes isn't finite, do we at least have a reasonable guess as to how many primes there are of a given magnitude? do we know how "spread out" the prime numbers are? do they come in clusters, or should we expect that they are always far apart from each other? is there a formula which allows us to quickly generate prime numbers?
These are all good questions, and some of them have nice, easy answers. Alternatively, some of these questions are exceedingly difficult to investigate. We'll cover a sampling in class tomorrow.
19
conjectures about other behaviors about prime numbers. In the last half of the class we started a proof of the Fundamental Theorem of Arithmetic.
how many primes are there? for instance, is the number of primes finite? if the number of primes isn't finite, do we at least have a reasonable guess as to how many primes there are of a given magnitude? do we know how "spread out" the prime numbers are? do they come in clusters, or should we expect that they are always far apart from each other? is there a formula which allows us to quickly generate prime numbers? do prime numbers obey any special properties? for instance, are there more primes which leave remainder 1 after division by 4 than there are primes which leave remainder 3 after division by 1?
what can you say about how the primes behave under addition?
These are all good questions, and some of them have nice, easy answers. Alternatively, some of these questions are exceedingly difficult to investigate. We'll cover a sampling now.
(1)
20
But we know that N has to have at least 1 prime factor p. Since this prime number isn't one of the primes in our list, we conclude that the list of primes we started off with was incomplete.
(2)
are all composite, since the first is divisible by 2, the second by 3, etc. On the other hand, empirical evidence suggests that there are also lots of primes which are quite close to each other. The most famous result in this vein is The Twin Prime Conjecture: There are infinitely many primes p such that p+2 is also prime. For those who are interested, the record largest twin primes to date can be found at The Largest Known Primes Page; as of this morning, the largest twin primes were
(3)
21
less than or equal to a given number x. (So, for instance, we have primes less than or equal to 11 are .
as
This says that for large values of x, the number of primes less than or equal to x is about .
Mersenne Primes
The largest primes found these days all happen to take a particular form: they can be expressed as for a prime number p. These are the so-called Mersenne Primes. There was a recent development (i.e., early last semester), when the Great Internet Mersenne Prime Search (GIMPS) came across the new largest prime number. This number is
and has around 13 million digits. If you want, you can use your computer to help GIMPS out; maybe it will be your computer which finds the next largest prime!
22
not expect that they really have a lot of interesting additive structure. It seems, however, that they have a very rich additive structure. For instance, here's a longstanding conjecture about how the primes behave under addition: Goldbach's Conjecture: Every even integer at least 4 can be expressed as the sum of two prime numbers. Though plenty of smart people have been thinking about this problem for a couple of hundred years, and although it has been verified for "lots" of even numbers (can someone post to the Wiki how many even integers have been verified to satisfy this condition?), no one has yet been able to prove that it is true.
the only divisors of p are 1 and itself, and we already know that p isn't a divisor of a. Applying 44a from your homework gives the desired result.
23
We only had time in class to cover the first statement; we'll prove the second in class on Monday. Existence: Suppose that there were integers greater than 1 which couldn't be factored into a product of primes. This would mean that there is a smallest such integer (by the well-ordering principle), and we'll call this smallest element n. Now n can't be prime since otherwise n is already an expression of itself as a product of primes. Hence for some . Since both a and b are smaller than n, this
means that they must be elements which do have prime factorizations (since n was selected as the smallest positive integer which didn't have this property). Therefore and for appropriate primes . But then we have
(4)
a prime factorization of n. Since this contradicts the selection of n as the least element without a prime factorization, we must conclude that every integer greater than 1 can be factored as a product of primes.
24
We had already shown that every integer has a factorization into primes, but we had left to show that this factorization was unique. That's what we'll do now. To show that any integer n has only one prime factorization, suppose we're given two factorizations of an integer n:
(1)
This expression just means that each of the corresponding exponents are positive. We aim to show that the list of primes
and
same, and moreover that the corresponding exponents match up as well. For this, we start by noting that for each , the term clearly divides
the first expression of n as a product of primes. For this reason we must also have , and the supped up version of Euclid's Lemma says that some j. But since is prime, this means that in fact for
for the first factorization is a subset of the list of primes for the second factorization. Running the same argument for a given prime in the second factorization, we have that the list of primes for the second factorization is a subset of the list of primes for the first. Hence the list of primes are, in fact, identical. And not just identical as sets, but by virtue of our increasing ordering of the and . . For this, and we must in fact have
Now that the lists of primes are identical, we just need to show that suppose that . Then we have
(2)
Now clearly
), whereas it cannot is
divide the second expression (since contradiction, and so we must have impossible, and so we have .
25
cousin (LCMs, or least common multiples). This second term has yet to be mentioned in this class, so we give a definition Definition: For two positive integers a and b, the least common multiple of a and b written either and . or sometimes is the smallest number m so that
Example: Computing
In order to compute the least common multiple of 10 and 6, we should write down all common multiples of these two numbers:
(3)
Notice that the first number common to both lists is 30, and so that means that 30 is the least common multiple of 10 and 6. Notice that in this case the least common multiple of a and b was *not* simply ab; there was a smaller common multiple than the "obvious" common multiple. Instead of writing out a list of common multiples, it would be nice if we had a uniform way to computer LCMs. In fact, there is a connection between GCDs and LCMs that makes one easy to compute whenever you have the other. This is given by the following Theorem: For any integers a and b, one has .
One can prove this result from the definition of GCDs and LCMs, but it because quite cumbersome. Instead, one can prove it by taking advantage of the following result that's borne from the Fundamental Theorem.
and
and .
26
We won't prove this result in class, but we'll use it to prove the theorem relating the GCD and LCM of two numbers above. //Proof that // :
and
as in the theorem above. This then lets us substitute in the values of and in the product :
(4)
Now we just notice that for any integers x and y we have . Hence the product above becomes
(5)
(6)
27
Taking
Now we're ready to prove our theorem above Proof of Theorem: Suppose, to the contrary, that there are only finitely many such primes. We'll list these primes out in order: prime denoted . We claim that the integer , with the largest such contains a prime
divisor not on our list. To see this, note first that N is an odd number, so its prime factorization contains only odd primes. If all these primes were of the form , then so too would N be of this form (using induction on our previous lemma). Hence there exists at least one prime divisor p of N for which for some integer n. . By our
We claim that p is not included in our list of primes. Suppose first that result on divisibility of integral linear combinations, this implies that . Hence Euclid's Lemma implies that either doesn't) or so we must have
(which it
Since we have a complete list of primes which have remainder 3 after division by 4, this means that for some . But then we have for any of the in
another clear contradiction. We're left to conclude that our supposed complete list of primes of the form have been incomplete. .
Though an awfully nice result, we can't adapt this technique to show that there are infinitely many primes of the form we would need a result that says the again takes that form, but this is
NOT true. Hence we have to be more clever if we want to prove such a result. Indeed, studying problems such as these makes us wonder how many primes there are of the form or or plenty of other possible prime types. Though the proof goes beyond the means we have in this class, there is a big result which tells us about primes of that form Dirichlet's Theorem on Primes in an Arithmetic Progression: For any integers a and b with , the sequence
28
(7)
diverges. Crazy!
We'll see that this definition provides a relation that has a lot of the properties of our "usual" equality. What is truly powerful, though, is when one realizes that this new version of "equality" admits arithmetic operations (addition and multiplication) just like our usual notion of equality.
Lecture 7 Summary
Modular Arithmetic
Today in class we introduced the notion of modular congruence and saw that it can be used to give an equivalence relation to the integers. Not only does this provide us with a way to split the integers up into distinct subgroups (a so-called "partition"), but it also behaves well with respect to addition and multiplication. We started to explore how we can use these arithmetic properties of congruences to prove results about integers.
Congruence
The key idea in this chapter centers around the following
29
Definition: Two integers a and b are said to be congruence (or equivalent) module an integer m written if .
One of the benefits of modular congruence is that it behaves an awful lot like the regular "equals" you're used to playing with. In fact, modular congruence is an equivalence relation, which means it has the following properties 1. Reflexive: for any integer a and any modulus m, we have 2. Symmetric: for any integers a and b and any modulus m, if then and . , then . just means that we 3. Transitive: for any integers a,b and c, and any modulus m, if .
divides 0, so this statement is valid. To prove symmetry, we need to show that implies . If ,
, though, the definition of modular congruence tells us that so that . But then we have , and so
. By the definition of modular congruence, we therefore have . Finally, for transitivity we are supposed to assume that , and somehow conclude that note that the first two congruence conditions tells us that and . To prove this result, we and .
Our result on divisibility of integral linear combinations, then, tells us that . Hence the definition of modular congruence tells us that .
The benefit of showing that modular congruence is an equivalence relation is that this tells us that congruence class partition the integers into distinct sets. For instance, when the modulus is 3, we know that every integer fits into one of the three collections
(1)
30
We know this has to be true because the division algorithm tells us that any number has remainder either 0,1 or 2 after trying to divide by 3.
(2)
With this observation in mind, one might be curious to know all the different ways of writing representatives for the congruence classes of a given modulus. This leads to the following Definition: A collection of integers is called a complete residue system for modulus m if every integer is congruent modulo m to exactly one element from the collection.
is not a complete residue system, since it has a repeated congruence class; specifically, . On the other hand, the set fails to be a
complete residue system because not every integer is congruence to either 1 or 2. In particular, The fact that and . comes from the
following more general result Lemma: For any integer m, the set modulo m. This complete residue system is so important that it gets its own name: it is called the least non-negative residue system for m. is a complete residue system
31
This result is important because it tells us that when we're doing arithmetic computations module m, we can do our computations by choosing any integers which sit in the given congruence classes module m. We'll see an example of this after we prove the theorem. Proof: We're given that and and , and these statements . By our result on
(3)
This divisibility statement, in turn, tells us that second statement, we'll choose a different integral linear combination:
. To verify the
(4)
+ 0 1 2 3
0 0 1 2 3
1 1 2 3 4
2 2 3 4 5
3 3 4 5 0
4 4 5 0 1
5 5 0 1 2
32
4 5 x 0 1 2 3 4 5
4 5 0 0 0 0 0 0 0
5 0 1 0 1 2 3 4 5
0 1 2 0 2 4 0 2 4
1 2 3 0 3 0 3 0 3
2 3 4 0 4 2 0 4 2
3 4 5 0 5 4 3 2 1
An important thing to notice about this table is that it gives us examples where does not imply a and b so that , and yet . For example, notice that we can find . Canceling coefficients is
something you're probably really used to, so you need to be wary when doing modular arithmetic that you aren't carelessly "dividing" by constants. The following lemma tells us exactly what relationship such a,b have to each other.
Lemma:
is equivalent to
Though we didn't get to prove this lemma in class, I'll give a sketch of part of the proof below. Proof: We'll only prove the direction, leaving the other direction for the , then this translates to
33
(5)
Now since this is an equation of integers, we can cancel out the d on both sides, and we're left with the div
(6)
. We know that
also know that this relative primality result together with our divisibility condition
(7)
as desired.
. Then n is divisible by 11 if and only if the alternating sum of its digits is divisible by 11.
Proof: To see that this is true, we'll take the equation what it gives us modulo 11. On the left hand side we just get right hand side we get . Notice that
plays nicely with addition and multiplication, this means that Hence this means that our equation becomes
(8)
34
In particular,
if and only if
, meaning that n
is divisible by 11 if and only if the alternating sum of its digits is divisible by 11.
(9)
(10)
Lecture 8 Summary
Today we started by reviewing how one can go about "canceling" common factors in congruence equations. Afterwards we introduced the notion of a linear congruence equation, giving a theorem which told us exactly when such an equation has solutions (and, indeed, how many solutions exist).
35
Proposition:
is equivalent to
This result will play a central role in today's lecture, so we'll start by giving a full proof. Proof: We'll use the notation to make our exposition easier to read.
. Multiplying this equation by c then gives we can rewrite the left hand side as
(1)
Since the left hand side is a multiple of m, we conclude that Now we'll prove the direction. Since we're told that
. , this
equation of integers
(2)
Now since this is an equation of integers, we can cancel out the d on both sides, and we're left with the div
(3)
. We know that
also know that this relative primality result together with our divisibility condition
(4)
36
as desired.
Linear Congruences
Now that we've played around a bit with modular arithmetic, it's time that we take one of our favorite problems in mathematics and give it a modular spin: solving equations. We'll start off at the beginning, dealing with linear equations. Definition: For integers a,b and m, the equation congruence. The goal, of course, is to find all integers x which solve this equation. Given that the equation is really a statement about modular congruence, though, you won't be surprised to hear that we're actually most interested in knowing solutions to the system modulo m; that is to say, we want to know which congruence classes modulo m solve the given equation. is called a linear
(5)
So we see that our linear congruences can have either no solutions, 1 solution, or several solutions (where by "solutions" we mean more precisely "distinct solutions modulo m"). The question, then, is how to distinguish when an equation does have a solution from when it doesn't. And if it does have a solution, how can we produce all solutions? How many solutions will there be? Big Theorem on Linear Congruences: The congruence solutions if and only if solutions take the form solutions modulo m is given by . If has integer
is such a solution, then all other integral , where when . A complete list of the distinct .
37
Proof: For notational convenience, we'll write d for the gcd of a and m. Now we'll proceed with the proof in steps:
(1)
(2)
show that other solutions can be expressed in terms of one fixed solution; to prove this last part in class today.) Step 1: First, suppose that a solution implies that exists to the equation
determine when two integer solutions are congruent modulo m. (Note: we didn't get
. This .
(6)
and
(7)
. . We start by
Now we'll prove the converse, showing that a solution exists when noting that there exists integers r and s such that
(8)
this follows because the gcd of two integers can be expressed as an integral combination of the two integers. Now using the fact that that , we find an integer e so
(9)
Taking this equation modulo m, we therefore have is an integer solution to the equation .
, and hence
Step 2: Now suppose we are given two solutions to the equation, wish to show that
and
, and we
(10)
38
or, if
we turn this divisibility statement into an equation, there exists some integer k so that . We'll divide this equation on both sides by d a legal move . This
since d is a common divisor of a and m and we find that is equivalent to the divisibility condition . Notice, however, that
, and hence homework problem 44a tells us that same as saying that , so that
Step 3: (Note: we didn't get to discuss this proof in class, but I'm including it in the notes for people interested in seeing the full proof.) To find the distinct solutions (modulo m), suppose we pick up two solutions m. Since and which are the same modulo
(11)
that is common to both sides, we turn this divisibility condition . Hence we have
(12)
and after canceling the m's on both sides of the equation (a legal move since this is an equation in integers, not a congruence equation) we're left with i.e., that . and are distinct if and only if are given as
Example: Solving
Suppose you want to solve the equation and 15 is 3, and that has no solutions. . Notice that the gcd of 6
Example: Solving
Let's put these ideas in practice to try to solve . To start, we need to
decide whether this congruence will have solutions or not. For this, we just notice that
39
, and that
that there should be 2 distinct solutions modulo 14. To find one such solution, we need to do two things: 1. we need to express 2 as a linear combination of 4 and 4, and 2. we need to express 6 as a multiple of 2. Toward the first goal, we know that we can to use the Euclidean Algorithm. The algorithm runs like so:
(13)
(14)
Now for the second goal, it isn't too hard to see that
. Finding a solution,
(15)
(16)
and hence
for
. Doing so shows that the distinct solutions modulo 14 are given by . Notice that if we had been interested in least non-negative solutions, we would write 5 in place of -9 (since ). ) and 12 in place of -2 (since
40
Lecture 9
Summary
We started off today by talking about a special class of linear congruence equations, namely those of the form . These led to multiplicative inverses, which we saw were useful in solving certain congruence equations. We drove this point home when we used multiplicative inverses to prove the Chinese Remainder Theorem, a tool that is used to solve simultaneous linear congruence equations.
Multiplicative Inverses
Last time we talked about solving linear congruence equations. Let's do another example of this kind of problem.
know there are solutions. In fact, we know that there is exactly 1 solution mod 67. To compute it, we first need to write Euclidean Algorithm. This gives as a linear combination. We'll use the
(1)
(2)
Taking this equation modulo 67 shows that multiplicative inverse of 5 modulo 67. This example leads to the following Definition: A solution to the linear congruence multiplicative inverse for a modulo m.
, and so 27 is the
is called a
41
is the only way this divisibility can hold. Hence a and m must be
relatively prime if a is going to have a multiplicative inverse mod m. When a solution does exist, our theorem on solving linear congruences says that the number of distinct solutions modulo m is given by the gcd of a and m. We've already seen that a solution exists if and only if one solution modulo m. , and so in this case there is only
Example: Solving
Suppose we wish to solve . We could proceed as we have before
finding a gcd, writing that gcd as a linear combination, etc. Alternatively, we can use the fact that we've already computed the multiplicative inverse of 5 as 27. To take this latter route, notice that we have
(3)
(Notice: we're allowed to multiply by 27 on both sides of the expression without disturbing the solution set because says that Using the fact that solution is . if and only if , and you'll recall our theorem which ).
42
(4)
We don't have a really good way for doing this systematically right now, but you can try out some small numbers to see if you can find a solution. For instance, we know that we can't have but notice that since this fails the second congruence; we also can't have and , does satisfy both of these equations. A little more works too, and the particularly diligent student . since this fails the first congruence. We can similarly rule out experimentation shows that
This example shows us that we "experimentally" solve these simultaneous congruences, but they don't provide a very systematic (or efficient) way of computing solutions. For this, we turn to The Chinese Remainder Theorem: If integers, then the congruence equations unique solution modulo . are pairwise relatively prime for each have a
Proof: We'll break the proof into two pieces: first we'll construct a simultaneous solution to the given congruences, and then we'll show this solution is unique in the given modulus.
we'll write
for
are pairwise relatively prime, you showed in your homework (in the . Hence for every i, there exists an .
course of #43(c) in chapter 1) that integer With the which satisfies so constructed, we claim that
(5)
43
. To see this is true, fix an integer . Notice that for every we have ,
in particular,
shows up in
(6)
Hence we've constructed a solution. To show that all solutions are equivalent modulo , notice that if then we have every i, and so are two solutions to the congruence equations, for every i/. It follows that . By homework 43(c) in Chapter 1, since the . are for
(7)
Our proof of the CRT says that we need to start by computing this case are given as for each i. To solve solve , notice that , and these numbers in hand, we now need to solve the congruence equations
, which in . With
Algorithm to express the gcd of 10 and 3 as a linear combination of the two, but since the modulus is so small, we can just use "guess and check" to find this inverse. For this, notice that To solve really trying to solve . , and that . Hence we have . , we're
44
. Since
Now that we've computed all the appropriate terms, our desired solution modulo is therefore
(8)
You can expand that out and see what its least non-negative residue is, but you don't need to if you don't want. The Chinese Remainder Theorem is a really powerful tool for solving simultaneous congruences, but it only tells us how to solve problems where the given moduli are pairwise relatively prime. There are plenty of "real life" scenarios in which the moduli for your system of congruences won't be so nice, though, in which case it's handy to know this stronger version of the CRT: Strengthened Chinese Remainder Theorem: For arbitrary integers congruence equations only if for every . and
, there exists a simultaneous solution if and . When a solution exists, it is unique modulo
We won't worry about proving this for now, but it is good to have in mind.
(9)
and since
(10)
45
, there will be a solution to this equation (and the ). To find this solution, we note that the . This
(11)
congruence in the variable e. We can use the methodology we've already developed to solve this equation, and doing so will show that are the solutions mod
15. Plugging these values back into our initial expression for x, we see that . Notice that all these values of x are congruence mod all give the same solution to our equation (mod ). , so they
46