Solhw 1
Solhw 1
267
268 CHAPTER 12. SOLUTIONS TO THE EXERCISES
√ √ m
Solution. 1. Suppose by contradiction that 2 is rational, that is 2 = n
,
for m and n integers with no common factor. Then
m2
2=
n2
and thus m2 = 2n2 , showing that m2 is even, that is, using Exercise 2,
m has to be even, say m = 2k for k some integer.
2. Now m2 = (2k)2 = 4k 2 . This tells us, combining with the first step of
the exercise, that
m2 = 4k 2 = 2n2
which implies that 2k 2 = n2 , that is n2 is even and by again by Exercise
2, it must be that n is even. This is a contradiction, since we assumed
that m and n have no commun factor.
Exercise 4. Let n be an integer greater than 1. Suppose that a mod n = a0
and b mod n = b0 . Show that
1. (a + b) mod n ≡ (a0 + b0 ) mod n,
2. (a · b) mod n ≡ (a0 · b0 ) mod n.
Solution. 1. Since (a mod n) = a0 , then a = qn+a0 , and since (b mod n) =
b , then similarly b = rn + b0 , for some integers q, r. Then
0
2. Similarly
(a·b) mod n ≡ (qn+a0 )(rn+b0 ) ≡ qrn2 +qnb0 +a0 rn+a0 b0 mod n ≡ (a0 b0 ) mod n.
Exercise 5. Compute the addition table and the multiplication tables for
integers modulo 4.
Solution. We represent integers modulo 4 by the set of integers {0, 1, 2, 3}.
Then
+ 0 1 2 3
0 0 1 2 3
1 1 2 3 0
2 2 3 0 1
3 3 0 1 2
269
Similarly
* 0 1 2 3
0 0 0 0 0
1 0 1 2 3
2 0 2 0 2
3 0 3 2 1
Note that these tables are great to observe the closure property! Elements
computed in these tables are the same as those given as input.
m(m+1)
Exercise 6. Show that 2
≡ 0 (mod m) for m an odd number.
m(m + 1)
= mk ≡ 0 (mod m).
2
You may also observe that it is not always true for even numbers. If for
example m = 2, this does not work, indeed 2 · 3/2 = 3 which is not 0
mod 2.
m m0
Solution. • Take two rational numbers n
and n0
. Then
m m0 mm0
n n0
= nn0
• The subtraction of two natural numbers does not always give a number
natural, for example,
5 − 10 = −5.
• The addition of two irrational numbers does not always give an irra-
tional number, for example,
√ √
(2 + 2) + (2 − 2)) = 4