MAT246H1S - Concepts In Abstract Mathematics SOLUTIONS to

MAT246H1S - Concepts In Abstract Mathematics
SOLUTIONS to Term Test 1 - February 10, 2017
Time allotted: 110 minutes.
Aids permitted: None.
General Comments:
1. Statements of theorems should be well-constructed sentences, not just formulas plopped down.
2.
Breakdown of Results: 322 students wrote this test. The marks ranged from 18.5% to 98%, and the
average was 61.2%. Some statistics on grade distributions are in the table on the left, and a histogram of
the marks (by decade) is on the right.
Grade
%
Decade
%
90-100%
4.0%
A
12.4%
80-89%
8.4%
B
20.5%
70-79%
20.5%
C
20.5%
60-69%
20.5%
D
22.4%
50-59%
22.4%
F
24.2%
40-49%
14.9%
30-39%
7.4%
20-29%
1.6%
10-19%
0.3%
0-9%
0.0%
1. [20 marks] Divisibility and Induction.
(a) [6 marks; 2 for each part] Assume a, b, p and m are natural numbers. Define the following:
(i) a | b
Solution: a | b, or a divides b, if there is a natural number k such that b = k · a.
(ii) p is a prime number
Solution: a natural number p greater than 1 is a prime number if the only natural number
divisors of p are 1 and itself. (Symbolically: p > 1 and a | p ⇒ a = 1 or a = p)
(iii) m is a composite number
Solution: a natural number m greater than 1 is a composite number if it is not a prime
number. (That’s the definition in the book.)
Or: a natural number m greater than 1 is a composite number if there are natural numbers
a, b with 1 < a, b < m and m = a · b.
(b) [4 marks] Determine if 227 is prime.
Solution: we only need to check factors that are less than
√
227. So check if any of the primes
2, 3, 5, 7, 11 or 13 divide 227 :
• 2 does not divide 227, since it is odd.
• 3 does not divide 227, since the sum of the digits 227 is not divisible by 3; or, 227 = 3·75+2.
• 5 does not divide 227, since the last digit of 227 is not 0 or 5; or, 227 = 5 · 45 + 2.
• 7 does not divide 227, since 227 = 7 · 32 + 3.
• 11 does not divide 227, since 227 = 11 · 20 + 7.
• 13 does not divide 227, since 227 = 13 · 17 + 6.
So 227 is a prime number.
2
(c) [4 marks] State the Generalized Principle of Complete Mathematical Induction.
Solution: If S is any set of natural numbers with the properties that
• m is in S, and
• k + 1 is in S whenever k is a natural number and all the natural numbers from m through
k are in S,
then S = {n ∈ N | n ≥ m}.
(d) [6 marks] Use the Generalized Principle of Complete Mathematical Induction to prove that any
natural number n > 1 must have a prime divisor.
Solution: let S be the set of natural numbers greater than 1 that have a prime divisor.
• 2 ∈ S, since 2 is a itself a prime, and 2 | 2.
• Let k > 2 and suppose that all natural numbers from 2 through k have a prime divisor,
that is all the numbers from 2 through k are in S. Consider the number k + 1.
1. If k + 1 is prime, then it is a divisor of itself, so k + 1 ∈ S.
2. If k+1 is composite then there are numbers a, b such that 1 < a, b < k+1 and k+1 = a·b.
Since 2 ≤ a, b ≤ k, the inductive hypothesis implies that both a and b have a prime
divisor. Suppose in particular that p | a, for some prime p. Then for some number x,
k + 1 = a · b = p · x · b,
which implies that k + 1 has a prime divisor. Hence k + 1 ∈ S.
By the Generalized Principle of Complete Mathematical Induction, S = {n ∈ N | n ≥ 2.}
2. [20 marks] Modular Arithmetic.
(a) [3 marks] Define a ≡ b (mod m), where a and b are integers and m is an integer greater than 1.
Solution: a ≡ b (mod m) if m | (a − b).
Alternately: a ≡ b (mod m) if there is an integer k such that a − b = k · m.
(b) [7 marks] Prove: If a ≡ r1 (mod m) and a ≡ r2 (mod m) for r1 , r2 ∈ {0, 1, . . . , m − 1} then
r 1 = r2 .
Solution: a ≡ r1 (mod m) and a ≡ r2 (mod m) together imply
r1 ≡ r2 (mod m),
which means r1 = r2 + t m, for some integer t.
If t ≥ 1, then r1 = r2 + t m ≥ m, which contradicts r1 ∈ {0, 1, . . . , m − 1}.
If t ≤ −1, then r2 = r1 − t m ≥ m, which contradicts r2 ∈ {0, 1, . . . , m − 1}.
So t = 0 is the only possibility, and r1 = r2 .
(c) [10 marks] Show that the equation x4 + y 4 + z 4 = 3009 has no integer solutions. (Hint: use
modular arithmetic, mod a small number.)
Solution: take m = 5. Then 3009 ≡ 4 (mod 5). We claim that, mod 5, x4 + y 4 + z 4 can never
be congruent to 4, so that there can be no integer solution to x4 + y 4 + z 4 = 3009. Consider x :
x ≡ 0 (mod 5) ⇒ x4 ≡ 0 (mod 5),
x ≡ 1 (mod 5) ⇒ x4 ≡ 1 (mod 5),
x ≡ 2 (mod 5) ⇒ x4 ≡ 24 (mod 5) ≡ 16 (mod 5) ≡ 1 (mod 5),
x ≡ 3 (mod 5) ⇒ x4 ≡ 34 (mod 5) ≡ 81 (mod 5) ≡ 1 (mod 5),
x ≡ 4 (mod 5) ⇒ x4 ≡ 44 (mod 5) ≡ 256 (mod 5) ≡ 1 (mod 5).
Thus x4 ≡ 0 or 1 (mod 5). Similarly, y 4 ≡ 0 or 1 (mod 5) and z 4 ≡ 0 or 1 (mod 5). Hence, for
any integers x, y, z the possibilities for x4 + y 4 + z 4 , mod 5, are:
(0 or 1) + (0 or 1) + (0 or 1) = 0, 1, 2 or 3,
none of which is 4.
Alternate Solution: using Fermat’s Theorem. If x ≡ 0 (mod 5) ⇒ x4 ≡ 0 (mod 5). Otherwise, Fermat’s Theorem implies x4 ≡ 1 (mod 5). Then proceed as before.
Note: taking m = 2, 3 or 4 is not useful:
x, y, z
x4 , y 4 , z 4
x4 + y 4 + z 4
3009
m
mod m
mod m
mod m
mod m
x4 + y 4 + z 4 ≡ 3009 (mod m)
2
0 or 1
0 or 1
0 or 1
1
not obviously impossible
3
0, 1 or 2
0 or 1
0, 1 or 2
0
not obviously impossible
4
0, 1, 2 or 3
0 or 1
0, 1, 2 or 3
1
not obviously impossible
3. [20 marks] The Well Ordering Principle and the Division Algorithm.
(a) [3 marks] State the Well Ordering Principle.
Solution: every non-empty set of natural numbers contains a least element.
Alternately: if T ⊆ N and T 6= ∅, then there is an r ∈ T such that r ≤ n for all n ∈ T.
(b) [7 marks] Use the Well Ordering Principle to prove that for positive integers a and m there are
non-negative integers q and r, with r ∈ {0, 1, 2, . . . , m − 1}, such that a = q m + r.
Solution: if a < m take q = 0 and r = a; if a = k m for k ∈ N, take q = k and r = 0. Now
assume m < a but m does not divide a. Let
T = {a − q · m | q ∈ N and a − q · m > 0}.
Since a > m, the number a − m = a − 1 · m > 0, so a − m is in T, and T 6= ∅. By the well-ordering
principle, T has a least element, call it r. Then r > 0, because it is in T, and there is a number
q ∈ N such that
a − q m = r ⇔ a = q m + r.
We claim r < m. We shall show r ≥ m is impossible:
• If r = m, then a = q m + m = (q + 1) m. Then m | a, contradicting our assumption.
• If r > m, then a = q m + r > q m + m = (q + 1)m, and so a − (q + 1)m > 0, which means
a − (q + 1)m is in T. Since a − (q + 1)m < r, this is a contradiction. That is,
0 < m ⇒ qm < qm + m ⇒ a − (q + 1)m < a − qm = r.
(c) [4 marks] Show that 25 ≡ 1 (mod 31) and 33 ≡ −4 (mod 31).
Solution: 25 = 32 ≡ 1 (mod 31) and 33 = 27 ≡ −4 (mod 31).
(d) [6 marks] Making use of part (c), find the remainder when 2837259739 + 323456 is divided by 31.
Solution: use 837259739 = 5 · q + 4. (The actual value of q is 167451947, but that is not needed;
the remainder is the important thing.) Then
2837259739 = 25q+4 = (25 )q · 24 ≡ 1q · 16 (mod31) ≡ 16 (mod 31).
Similarly, use 23456 = 3 · 7818 + 2 to calculate the power of 3.
323456 = 33·7818+2 = (33 )7818 · 9 ≡ (−4)7818 · 9 (mod 31) ≡ 47818 · 9 (mod 31).
Since
47818 = 22·7818 = 25·3127+1 ,
we have
47818 · 9 ≡ (25 )3127 · 2 · 9 (mod31) ≡ (1)3127 · 18 (mod31) ≡ 18 (mod 31).
Therefore
2837259739 + 323456 ≡ (16 + 18) (mod 31) ≡ 34 (mod 31) ≡ 3 (mod 31);
that is, the remainder when 2837259739 + 323456 is divided by 31 is 3.
Alternate Calculation: using Fermat’s Theorem. Since 3 does not divide 31, which is prime,
Fermat’s Theorem implies 330 ≡ 1 (mod 31), and 315 ≡ −1 (mod 31). Thus
323456 = (330 )781 · 326 ≡ 1 · 326 (mod 31).
Then you can simplify 326 by using 26 = 15 + 11, so that
326 = 315 · 311 = 315 · (33 )3 · 32 ≡ (−1)(−4)3 · 9 (mod 31) ≡ 64 · 9 (mod 31) ≡ 2 · 9 (mod 31),
and you again end up with
323456 ≡ 18 (mod 31).
4. [15 marks] The Fundamental Theorem of Arithmetic.
(a) [3 marks] State The Fundamental Theorem of Arithmetic.
Solution: every natural number greater than 1 can be written as a product of primes, and the
expression of a number as a product of primes is unique except for the order of the factors.
(b) [4 marks] Define the canonical factorization of a natural number greater than 1 into a product
of primes.
Solution: if n > 1 then the canonical factorization of n is
n = pα1 1 · pα2 2 · · · pαr r ,
where each pi is a prime, pi < pi+1 , and αi is a natural number.
(c) [4 marks] Determine the canonical factorization of the number 2520 into a product of primes.
Solution: 2520 = 8 · 315 = 8 · 9 · 35 = 8 · 9 · 5 · 7. Thus the canonical factorization of 2520 is
2520 = 23 · 32 · 5 · 7.
(d) [4 marks] Recall Euclid’s Prime Divisibility Lemma:
If a and b are natural numbers and p is a prime such that p | ab, then p | a or p | b.
Use this lemma to prove the cancellation law mod p :
If b and c are two integers, p is a prime, a is any integer such that p does not divide a,
and ab ≡ ac (mod p), then b ≡ c (mod p).
Solution: ab ≡ ac (modp) means that p | (ab − ac). Factoring gives
p | a (b − c).
Since p is prime, the Lemma implies that p | a or p | b − c. But we are given that p does not
divide a, so we must have p | b − c, which means
b ≡ c (mod p).
5. [25 marks] Fermat’s Theorem and Wilson’s Theorem.
(a) [3 marks] State Fermat’s Theorem.
Solution: if p is a prime number and a is any natural number not divisible by p, then
ap−1 ≡ 1 (modp).
(b) [3 marks] Use Fermat’s Theorem to find the remainder when 18463 is divided by 43.
Solution: p = 43 is a prime and 18 is not divisible by 43, so we can use Fermat’s Theorem.
Write: 463 = 42 · 11 + 1. Thus
18463 = 1842·11+1 = (1842 )11 · 18 ≡ 111 · 18 (mod 43) ≡ 18 (mod 43).
So the remainder when 18463 is divided by 43 is 18.
OR: write 463 = 11 · 42 + 1, so that
1843 = (1811 )42 · 18 ≡ 1 · 18 (mod 43),
since 1811 is not divisible by 43.
(c) [6 marks] Determine if there is a solution to the congruence x6 + 5x2 ≡ 2 (mod 7).
Solution: observe that if x ≡ 0 (mod 7), then x cannot satisfy the congruence, since in this
case
x6 + 5x2 ≡ 0 (mod 7).
So assume x is not divisible by 7. Then x6 ≡ 1 (mod 7), by Fermat’s Theorem, and the
congruence becomes
1 + 5x2 ≡ 2 (mod 7) ⇔ 5x2 ≡ 1 (mod 7).
Consider the possibilities for 5x2 , mod 7:
x ≡ 1 (mod 7) ⇒ x2 ≡ 1 (mod 7) ⇒ 5x2 ≡ 5 (mod 7);
x ≡ 2 (mod 7) ⇒ x2 ≡ 4 (mod 7) ⇒ 5x2 ≡ 6 (mod 7);
x ≡ 3 (mod 7) ⇒ x2 ≡ 2 (mod 7) ⇒ 5x2 ≡ 3 (mod 7);
x ≡ 4 (mod 7) ⇒ x2 ≡ 2 (mod 7) ⇒ 5x2 ≡ 3 (mod 7);
x ≡ 5 (mod 7) ⇒ x2 ≡ 4 (mod 7) ⇒ 5x2 ≡ 6 (mod 7);
x ≡ 6 (mod 7) ⇒ x2 ≡ 1 (mod 7) ⇒ 5x2 ≡ 5 (mod 7).
None of these values is congruent to 1 mod 7, so there is no x for which x6 + 5x2 ≡ 2 (mod 7).
(d) [4 marks] Find the multiplicative inverse of 514 , mod 17. Give your answer as a number in the
set {0, 1, 2, . . . , 16}.
Solution: by Fermat’s Theorem 516 ≡ 1 (mod 17). Thus
52 · 514 ≡ 1 (mod 17)
and the multiplicative inverse of 514 , mod 17, is
52 = 25 ≡ 8 (mod 17).
So the answer is 8.
.
(e) [3 marks] State Wilson’s Theorem.
Solution: if p is prime then (p − 1)! + 1 ≡ 0 (mod p).
(f) [3 marks] Find the remainder when 42! + 4444 is divided by 43.
Solution: since p = 43 is prime, Wilson’s Theorem implies 42! ≡ −1 (mod 43).
And 44 ≡ 1 (mod 43). Thus
42! + 4444 ≡ (−1 + 144 )(mod 43) ≡ (−1 + 1)(mod 43) ≡ 0 (mod 43).
(g) [3 marks] Find the remainder when 99! + 99 is divided by 100.
Solution: use the fact (proved in class) that if m is a composite number greater than 4,
(m − 1)! ≡ 0 (mod m). Thus
99! ≡ 0 (mod 100),
and
99! + 99 ≡ (0 + 99)(mod 100) ≡ 99 (mod 100),
meaning that the remainder when 99! + 99 is divided by 100 is 99.
OR: you can show 99! ≡ 0 (mod 100) directly:
99! = 1 · 2 · 3 · · · · 49 · 50 · 51 · · · 98 · 99,
from which you can see that 100 = 2 · 50 divides 99!
This page is for rough work or for extra space to finish a previous problem. It will not be marked unless
you have indicated in a previous question to look at this page.
This page is for rough work or for extra space to finish a previous problem. It will not be marked unless
you have indicated in a previous question to look at this page.
This page is for rough work or for extra space to finish a previous problem. It will not be marked unless
you have indicated in a previous question to look at this page.