wuct121 discrete mathematics numbers tutorial exercises
TRANSCRIPT
WUCT121 Numbers Tutorial Exercises Solutions 1
WUCT121
Discrete Mathematics
Numbers
Tutorial Exercises Solutions
1. Natural Numbers
2. Integers and Real Numbers
3. The Principle of Mathematical Induction
4. Elementary Number Theory
5. Congruence Arithmetic
WUCT121 Numbers Tutorial Exercises Solutions 2
Section 1: Natural Numbers
Question1 A closed operation is a rule for combining any two elements of a set which
always produces another element in the same set.
Question2 Addition, multiplication.
Question3 Multiplication, identity is 1.
Question4 Multiplicative inverse for 1 is 1. No other elements have inverses.
Question5
(a) ∈+=+ baabba ,, . Commutativity of addition
(b) ∈+=+ yxyxyx ,,44)(4 . Distributivity
(c) 603203)45()34(5 =×=××=×× . Associativity of multiplication
Question6
addition2323itydistibutiv23)158(
itycommutativ23158addition15238
vitydistributi15)158(8ityassociativ15)158(8
itycommutativ)1515()88(vitydistributi)1515()88(
15)()(8
yxyxyxxxyx
xyxxyyxxyyx
xyyxxyyx
+=++=++=++=
+++=+++=+++=+++=
+++
.
Question7 The Law of Trichotomy: If ∈ba, , then one and only one of the following
relationships hold: ba < , ba = , or ba > .
Question8 We know 251312 =+ and 13=p is a natural number. So 2512 =+ p , which
means 12 < 25.
Question9 Transitivity:
If ∈cba ,, . Then: cacbba <⇒<∧< )( , cacbba =⇒=∧= )( ,
cacbba >⇒>∧> )( .
WUCT121 Numbers Tutorial Exercises Solutions 3
Question10 Show if ∈<< cbabcacba ,,wherethen, .
ba < means there is a natural number p, )1(Kbpa =+
Multiplying (1) by c, we have cbcpca =+ , using Distributive Laws
We know cpr = is a natural number, by closure of multiplication.
So we have cbrca =+ .
Therefore, cbca <
Question11 The well-ordering property for Õ:
If A is any non-empty subset of Õ, then A has a least element.
WUCT121 Numbers Tutorial Exercises Solutions 4
Section 2: Integers and Real Numbers
Question1 Addition, subtraction, multiplication.
Question2 Addition, identity is 0. Multiplication, identity is 1.
Question3 Additive inverses, the inverse of a is –a.
Multiplicative inverse of 1 is 1, and of –1 is –1.
Question4 Not well-ordered. Consider },6,4,4,2,0,2,4,6,{ KK −−−=E , that is, the even
integers. It is a non-empty subset of Ÿ which does not have a least element. Thus the set Ÿ is
not well-ordered
Question5 1)34(267 +−×=− and ∈− 34 , therefore –67 is odd
Question6 Prime number: An integer 1>n is defined to be prime if and only if for all
positive integers r and s, if srn ×= , then 1=r or 1=s
Question7 Composite number: An integer 1>n is defined to be composite if and only if
there exist positive integers r and s, so that if srn ×= , then 1≠r and 1≠s .
Question8 Rational number: The Rational numbers are real numbers which can be written in
the form 0,,, ≠∈ bbaba
Question9 Addition, subtraction, multiplication.
Question10 Addition, identity is 0. Multiplication, identity is 1.
Question11 Additive inverses, the inverse of a is –a.
Multiplicative inverse of a, 0≠a is a1 .
Question12 No. Consider )1,0( , that is, the open interval between 0 and 1. It is a non-empty
subset of which does not have a least element. Thus the set is not well-ordered.
WUCT121 Numbers Tutorial Exercises Solutions 5
Section 3: The Principle of Mathematical Induction
Use Mathematical Induction to prove the following:
Question1 For all ∈n , nn 2)!1( ≥+
Let Claim(n) be: nn 2)!1( ≥+
Step 1: Claim(1) is: 12)!11( ×≥+
trueis)1(ClaimHence,RHSLHS212RHS;2!2)!11(LHS
=∴=×===+=
Step 2: Assume Claim(k), that is )1(for2)!1( ∈≥+ kkk
Prove Claim(k + 1) is true, that is )1(2)!11( +≥++ kk
RHS2
1as22)1(by2)2(
)!1()2()!2(
)!11(LHS
1 ==
≥×≥×+≥
+×+=+=
++=
+k
kkkkkk
kk
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
Question2 For all ∈n , x
xxxxxn
nn
sin2
2sin2cos4cos2coscos 1 =×××× −L
Let Claim(n) be: x
xxxxxn
nn
sin2
2sin2cos4cos2coscos 1 =×××× −L
Step 1: Claim(1) is: xxx
sin22sincos =
trueis)1(ClaimHence,RHSLHS
cossin2
cossin2sin2
2sinRHS;cosLHS
=∴
==== xx
xxxxx
Step 2: Assume Claim(k), that is
)1(forsin2
2sin2cos4cos2coscos 1 ∈=×××× − kx
xxxxxk
kkL
Prove Claim(k + 1) is true, that is xxxxxx k
kk
sin22sin2cos4cos2coscos 1
111
+
+−+ =×××× L
WUCT121 Numbers Tutorial Exercises Solutions 6
RHSsin2
2sinsin2
)22sin(sin22
2cos2sin2
)1(by2cossin2
2sin
2cos4cos2coscosLHS
1
1
1
==
×=
×=
×=
××××=
+
+
+
x
xx
xx
xx
xx
x
xxxx
k
k
k
k
k
kk
kk
k
kL
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
Question3 ( )( )6
12121, 222 ++=+++∈∀
nnnnn L
Let Claim(n) be: ( )( )
612121 222 ++
=+++nnnnL
Step 1: Claim(1) is: ( )( )
611211112 +×+
=
( )( )
trueis)1(ClaimHence,RHSLHS
16
112111RHS;11LHS 2
=∴
=+×+
===
Step 2: Assume Claim(k), that is
( )( ) )1(for6
12121 222 ∈++
=+++ kkkkkL
Prove Claim(k + 1) is true, that is ( )( )
61)1(211)1(
)1(21 222 +++++=++++
kkkkL
WUCT121 Numbers Tutorial Exercises Solutions 7
( )( )
( )( )
( )( )
( ) ( )
( )
( )( )
( )( )RHS
61)1(211)1(
6322)1(
6)672(1
6)]1(612[1
6)1(6121
)1(by)1(6
121)1(21
61)1(211)1()1(21LHS
2
2
2
2222
222
=+++++
=
+++=
+++=
++++=
++++=
++++
=
+++++=
+++++=++++=
kkk
kkk
kkk
kkkk
kkkk
kkkkkk
kkkk
L
L
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
Question4 zzn n 314:, =−∈∃∈∀
Let Claim(n) be: zz n 314: =−∈∃
Step 1: Claim(1) is: zz 314: 1 =−∈∃
trueis)1(ClaimHence
1and13314LHS 1 ∈×==−=
Step 2: Assume Claim(k), that is )1(for314: ∈=−∈∃ kpp k
Prove Claim(k + 1) is true, that is qq k 314: 1 =−∈∃ +
RHS14where3
)14(3)1(by334
3)14(4
3444
14LHS1
1
=∈+==
+×=+×=
+−×=
+−×=
−=+
+
pqqp
p
k
k
k
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
WUCT121 Numbers Tutorial Exercises Solutions 8
Question5 45, 3 −≥∈∀ nnn
Let Claim(n) be: 453 −≥ nn
Step 1: Claim(1) is: 41513 −×≥
trueis)1(ClaimHence,RHSLHS
1415RHS;11LHS 3
≥∴=−×===
Step 2: Assume Claim(k), that is )1(for453 ∈−≥ kkk
Prove Claim(k + 1) is true, that is 4)1(5)1( 3 −+≥+ kk
RHS4)1(557as4551as745
)1(by13345
133
4)1(5)1(LHS
2
23
3
=−+=≥−+≥≥+−≥
+++−≥
+++=
−+≥+=
kk
kkkkk
kkk
kk
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
Question6 Prove that for every real number x and each nxxn n +≥+∈ 1)1(, .
Let Claim(n) be: ∈+≥+ xnxx n where1)1(
Step 1: Claim(1) is: xx +≥+ 1)1( 1
trueis)1(ClaimHence,RHSLHS
1RHS;1)1(LHS 1
≥∴+=+=+= xxx
Step 2: Assume Claim(k), that is )1(for1)1( ∈+≥+ kkxx k
Prove Claim(k + 1) is true, that is xkx k )1(1)1( 1 ++≥+ +
RHS0and1as)1(1
)1(1
)1(by)1)(1()1)(1(
)1(1)1(LHS
2
2
1
=≥≥++≥
+++=
++≥++=
++≥+= +
xkxk
kxxk
kxxxx
xkxk
k
Thus Claim(k + 1) is true.
Thus by the Principle of Mathematical Induction Claim(n) is true For all ∈n
WUCT121 Numbers Tutorial Exercises Solutions 9
Question7 Prove that 22)24(1062 nn =−++++ K for all ∈n .
The proof for Step 2:
( ) ( )( )( )
( )( )
RHS12
122
thesis by hypo2442
214241062LHS
2
2
2
=+=
++=
−++=
−++−++++=
k
kk
kk
kkK
Question8 Prove that nn 27 − is divisible by 5 for all ∈n .
The proof for Step 2:
( ) ( )( ) ( ) ( )( ) ( )( ) ( )( )
11
11
27|5
RHS5
275
thesis by hypo5275
27275
227275
2277
27LHS
++
++
−∴
==
+=
+=
−+=
−+=
−=
−=
kk
k
k
kkk
kkk
kk
kk
ql
l
Question9 The problem arises in Step 2. Both Claim(k) and Claim( 1+k ) are wrong. They
should be:
Claim(k): ( )( )
612121 222 ++
=+++kkkkK
Claim( 1+k ): ( ) ( )( ) ( )( )6
11221121 222 ++++=++++
kkkkK
Question10 Claim(1) hasn’t even been considered!! As a matter of fact, Claim(1) is false.
WUCT121 Numbers Tutorial Exercises Solutions 10
Question11 Let Claim(n) be the statement “ 112 ++ nn is a prime number”.
(a) Claim(1) is: 1311112 =++ , 13 is prime thus Claim(1) is true
Claim(2) is: 1711222 =++ , 17 is prime thus Claim(2) is true
Claim(3) is: 2311332 =++ , 23 is prime thus Claim(3) is true
Claim(4) is: 3111442 =++ , 31 is prime thus Claim(4) is true
Claim(5) is: 4111552 =++ , 41 is prime thus Claim(5) is true
Claim(6) is: 5311662 =++ , 53 is prime thus Claim(6) is true
Claim(7) is: 9711772 =++ , 97 is prime thus Claim(7) is true
Claim(8) is: 8311882 =++ , 83 is prime thus Claim(8) is true
Claim(9) is: 10111992 =++ , 101 is prime thus Claim(9) is true.
(b) No. Check Claim(10) is 11111211110102 ×==++ , 121 is not prime. No amount
of ‘examples’ will ever prove an infinite number of Claims such as these.
Question12
(a) Step 2 of the proof can go nowhere.
1
1
212
21
21
41
211LHS
+
+
+<
+++++=
k
kkK
Now what? You can’t drop the second term as the inequality goes the wrong way.
(b) The proof in Step 2 includes:
RHS2
12
2
122
hypothesisby2
1
2
12
2
1
2
141
211LHS
1
1
1
1
=
−=
−−=
+−=
+++++=
+
+
+
+
k
k
kk
kkK
WUCT121 Numbers Tutorial Exercises Solutions 11
Question13 Prove that 111211
111 +=⎟
⎠⎞
⎜⎝⎛ +××⎟
⎠⎞
⎜⎝⎛ +⎟⎠⎞
⎜⎝⎛ + n
nK for all ∈n .
The proof for Step 2:
RHS1)1(
thesis by hypo1
11)1(
111
211
111LHS
=++=
⎟⎠⎞
⎜⎝⎛
++×+=
⎟⎠⎞
⎜⎝⎛
++××⎟
⎠⎞
⎜⎝⎛ +⎟⎠⎞
⎜⎝⎛ +=
kk
k
kK
Question14 Prove )12(221
−=∑=
nn
i
i
The proof for Step 2:
RHS)12(2
222
2)12(2
)1(sisby hypothe2)12(2
22
2LHS
1
11
1
1
1
1
11
1
1
=−=
+−=
+−=
∑+−=
∑+∑=
∑=
+
++
+
+
+=
+
+==
+
=
k
kk
kk
k
ki
ik
k
ki
ik
i
i
k
i
i
WUCT121 Numbers Tutorial Exercises Solutions 12
Question15 Prove 14)14)(34(
11 +
=∑+−= n
nii
n
i
The proof for Step 2:
RHS54
1)54)(14(
)1)(14()54)(14(
1)54()54)(14(
114
)1(hypothesisby]1)1(4][3)1(4[
114
)14)(34(1
)14)(34(1
)14)(34(1LHS
1
11
1
1
=++
=
++++
=
++++
=
+++
+=
++−++
+=
∑+−
+∑+−
=
∑+−
=
+
+==
+
=
kk
kkkkkk
kkkkk
kkkk
kiiii
iik
ki
k
i
k
i
Question16 Prove 643 +− nn is divisible by 3 for all ∈n
The proof for Step 2:
RHS13
)1(3
(1)sisby hypothe3333
33364
644133
6)1(4)1(LHS
3
3
3
33
33
3
=∈−++==
−++=
−++=
−+++−=
+−−+++=
++−+=
kkqpp
kkq
kkq
kkkk
kkkk
kk
WUCT121 Numbers Tutorial Exercises Solutions 13
Question17 Use the identity 2
)1(
1
+=∑
=
nnin
i to prove that
2
11
3⎟⎟⎠
⎞⎜⎜⎝
⎛∑=∑==
n
i
n
iii
The Proof for Step 2:
RHS
2)2)(1(
4)44()1(
4)1(4
2)1(
identity)by ()1(2
)1(
(1))sisby hypothe()1(
LHS
21
1
2
22
32
32
32
1
1
1
3
1
3
1
1
3
=⎟⎟⎠
⎞⎜⎜⎝
⎛∑=
⎟⎠⎞
⎜⎝⎛ ++
=
+++=
++⎟
⎠⎞
⎜⎝⎛ +
=
++⎟⎠⎞
⎜⎝⎛ +
=
++⎟⎟⎠
⎞⎜⎜⎝
⎛∑=
∑+∑=
∑=
+
=
=
+
+==
+
=
k
i
k
i
k
ki
k
i
k
i
i
kk
kkk
kkk
kkk
ki
ii
i
WUCT121 Numbers Tutorial Exercises Solutions 14
Question18 Prove ∑+−
=−=
n
i
nnni1
23
)12)(12()12(
The Proof for Step 2:
RHS3
]1)1(2][1)1(2)[1(3
)32)(1)(12(3
)352)(12(3
)]12(3)12()[12(3
]1)1(2[3)12)(12(
(1)sisby hypothe]1)1(2[3
)12)(12(
)12()12(
)12(LHS
2
2
2
1
1
2
1
2
1
1
2
=++−++
=
+++=
+++=
++−+=
−+++−=
−+++−
=
∑ −+∑ −=
∑ −=
+
+==
+
=
kkk
kkk
kkk
kkkk
kkkk
kkkk
ii
i
k
ki
k
i
k
i
Question19 Prove ∑++
=+=
n
i
nnnii1 6
)72)(1()2(
The Proof for Step 2:
RHS6
]7)1(2][1)1)[(1(6
)92)(2)(1(6
)18132)(1(6
)]3(6)72()[1(6
)21)(1(6)72)(1(
(1)sisby hypothe)21)(1(6
)72)(1(
)2()2(
)2(LHS
2
1
11
1
1
=
+++++=
+++=
+++=
++++=
++++++=
++++++
=
∑ ++∑ +=
∑ +=
+
+==
+
=
kkk
kkk
kkk
kkkk
kkkkk
kkkkk
iiii
ii
k
ki
k
i
k
i
WUCT121 Numbers Tutorial Exercises Solutions 15
Question20 Prove ( ) 21231 nn =−+++ K for all ∈n .
The Proof for Step 2:
( )
RHS)1(
(1)sisby hypothe12
1)1(231LHS
2
2
=+=
++=
−++++=
k
kk
kK
Question21 If 3,2,3 11 =≥= − bnbb nn . Prove nnb 3= for all ∈n .
We are given: )2(3)1(,2,3 11 KK =≥= − bnbb nn
Let Claim(n) be : nnb 3=
Step 1: Claim (1) is 11 3=b
trueis)1(ClaimRHSLHS
33RHS
)2(by3LHS11
∴=∴
==
== b
Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k .
That is, )3(3,3,3 11
11 KK === −− bbb k
kk
k
Prove Claim( 1+k ) is true; that is prove that 11 3 ++ = k
kb .
RHS3
(3)by 33
(1)by 3LHS
1k
1
==
×=
==
+
+
kk
kb
b
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is
true for all .∈n
Question22 If 0,2,1 11 =≥−+= − unnuu nn Prove .,2
)1(∈∀
−= nnnun
We are given: )2(0),1(2,1 11 KK =≥−+= − unnuu nn
Let Claim(n) be : .2
)1( −=
nnun
Step 1: Claim (1) is .2
)11(11
−=u
WUCT121 Numbers Tutorial Exercises Solutions 16
trueis)1(ClaimRHSLHS
02
)11(1RHS
)2(by0LHS 1
∴=∴
=−
=
== u
Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k .
That is,
)3(2
)11(1,,
2)11)(1(
,2
)1(11 KK
−=
−−−=
−= − u
kku
kku kk
Prove Claim( 1+k ) is true; that is prove that 2
)1(.2
)11)(1(1
+=
−++=+
kkkkuk .
RHS2
)1(2
2)1(
(3)by 2
)1((1)by 11
LHS 1
=+
=
+−=
+−
=
−++== +
kk
kkk
kkkku
u
k
k
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is
true for all .∈n
Question23 If .1,2,12 11 =≥+= − unuu nn Prove .12 ∈∀−= nu nn
Proof for Claim ( 1+k ):
RHS12
sisby hypothe1)12(2
givenby 12LHS
1
1
=−=
+−×=
+==
+
+
k
kk
ku
u
Question24 If 1,2,)( 11 −=≥−= − snsns nn . Prove .,)1( ! ∈∀−= ns nnn
Proof for Claim ( 1+k ):
RHS)!1()1(
sisby hypothe!)1()1(
givenby )1(LHS
1
1
=+−=
−×+−=
×+−==
+
+
k
kk
sks
k
kk
k
WUCT121 Numbers Tutorial Exercises Solutions 17
Question25 If 4,2,3,65 2121 ==≥−= −− uunuuu nnn . Prove .,2 ∈∀= nu nn
We are given: )2(4,2)1(3,65 2121 KK ==≥−= −− uunuuu nnn
Let Claim(n) be : .2nnu =
Step 1: Claim (1) is .211 =u
trueis)1(ClaimRHSLHS
22RHS
)2(by2LHS11
∴=∴
==
== u
Claim (2) is .222 =u
trueis)1(ClaimRHSLHS
42RHS
)2(by4LHS22
∴=∴
==
== u
Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k .
That is,
)3(2,,2,2 11
11 KK === −− uuu k
kk
k
Prove Claim( 1+k ) is true; that is prove that 11 2 ++ = k
ku .
RHS2
22
2325
(3)by 2625
(1)by 65LHS
1
11
1
==
×=
×−×=
×−×=
−==
+
−−
+
k
k
kk
kkkk
kuu
u
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is
true for all .∈n
Question26 If 5,1,3,65 2121 ==≥−= −− uunuuu nnn . Prove .,23 ∈∀−= nu nnn
The proof for Step 2:
Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k .
That is,
)3(23,,23,23 111
111 KK −=−=−= −−− uuu kk
kkk
k
WUCT121 Numbers Tutorial Exercises Solutions 18
Prove Claim( 1+k ) is true; that is prove that 111 23 +++ −= kk
ku .
RHS23
2233
2332)23(5
esisby hypoth)23(6)23(5
givenby 65LHS
11
111
1
=−=
×−×=
×−×−−×=
−×−−×=
−==
++
−−−
+
kk
kk
kkkk
kkkkkk
kuu
u
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is
true for all .∈n
Question27 Let ...,...,, 21 nuuu be real numbers such that 2,2,3,32 2121 ==≥+−= −− uunuuu nnn . Prove that 2=nu for all ∈n .
The proof for Step 2: Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k . That is,
)3(2,,2,2 11 KK === − uuu kk Prove Claim( 1+k ) is true; that is prove that 21 =+ku .
RHS264
esisby hypoth2322givenby 32
LHS
1
1
==+−=
×+×−=+−=
=
−
+
kk
kuu
u
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is true for all .∈n
Question28 If .4,3,3,2 2121 ==≥−= −− aanaaa nnn Prove .,2 ∈∀+= nnan .
The proof for Step 2:
Step 2: Assume Claim(k), Claim( 1−k ), …,Claim(1) are all true, for some 1≥k .
That is,
)3(1,,1,2 11 KK +=+=+= − kakaka kk
Prove Claim( 1+k ) is true; that is prove that 3211 +=++=+ kkak .
RHS3 esisby hypoth)1()2(2
givenby 2LHS
1
1
=+=+−+×=
−==
−
+
kkk
aaa
kk
k
So Claim( 1+k ) is true. Thus by the Strong Principle of Mathematical Induction, Claim(n) is
true for all .∈n
WUCT121 Numbers Tutorial Exercises Solutions 19
Section 4: Elementary Number Theory
Question1
(a) Yes. )43(286 nmnm +=+ and ∈+ nm 43 .
(b) Yes. ( ) 11232346 22 +++=++ srsr , and ∈++ 123 2sr .
(c) No. Let 3=u and 2=v . 54922 =−=− vu , which is prime.
Note: ( )( )vuvuvu +−=− 22 , which will be prime whenever 1=− vu and vu +
is prime
Question2 Divisibility: If n and d are integers and 0≠d , then n is divisible by d if
and only if kdn ×= for some ∈k .
Question3
(a) Yes. 41352 ×=
(b) Yes. ( )( )( ) ( )( )( )[ ]123133332313 +++=+++ kkkkkk and
( )( )( ) .12313 ∈+++ kkk
(c) No. 2847 =× and 3557 =× . There is no integer k so that k734 = .
(d) Yes. ( )abba 154106 =× and .15 ∈ab
Question4 The Quotient Remainder Theorem: If n and 0>d are both integers, then
there exist unique integers q and r such that rdqn += and dr <≤0 .
Question5 The Fundamental Theorem of Arithmetic: If 1and >∈ aa then a can
be factorised in a unique way in the form
kkppppa αααα ...321 321=
where kppp ,,2,1 K are each prime numbers and ∈iα for each ki ,,2,1 K= .
WUCT121 Numbers Tutorial Exercises Solutions 20
Question6 ⎣ ⎦ 17300 = . Eliminate multiples of 2, 3, 5, 7, 11, 13, 17.
201 202 203 204 205 206 207 208 209 210
211 212 213 214 215 216 217 218 219 220
221 222 223 224 225 226 227 228 229 230
231 232 233 234 235 236 237 238 239 240
241 242 243 244 245 246 247 248 249 250
251 252 253 254 255 256 257 258 259 260
261 262 263 264 265 266 267 268 269 270
271 272 273 274 275 276 277 278 279 280
281 282 283 284 285 286 287 288 289 290
291 292 293 294 295 296 297 298 299 300
Primes are: 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283,
293.
Question7 227, 229; 239, 241; 269, 271; 281, 283.
WUCT121 Numbers Tutorial Exercises Solutions 21
Question8 Find the prime factorization, gcd and lcm for the following pairs of
numbers:
(a) 368, 8619
10601374117133)369,8619(lcm
3)369,8619gcd(413369
171338619
22
2
2
=×××=−
=−×=
××=
(b) 936, 7623
7927921311732)7623,936(lcm
93)7623,936gcd(
11737623
1332936
223
2
22
23
=××××=
==
××=
××=
(c) 1375, 605
15125115)605,1375(lcm
55115)605,1375gcd(115605
1151375
23
2
3
=×=
=×=×=
×=
(d) 4968, 9000
62100023532)9000,4968(lcm
7232)9000,4968gcd(
5329000
23324968
333
23
323
33
=×××=
=×=
××=
××=
Question9 Use the Euclidean Algorithm to find the ),gcd( ba for the following pairs
of numbers. Find values ., ∈nm such that bnamba +=),gcd(
(a) a = 72, b = 63.
nmnm
63729)63,72gcd(1,1
)1(6372163729)1(
9)0,9gcd()9,63gcd()63,72gcd()1(
07963916372
+==−==∴
−×+=×−=⇒
===
+×=+×= K
WUCT121 Numbers Tutorial Exercises Solutions 22
(b) a = 2104, b = 21.
nmnm
2121041)21,2104gcd(501,5
)4()3(
50121)5(21045)100212104(211
100212104454211
)3(into)4()1()2(
4)1,4gcd(
)4,21gcd()21,2104gcd()2()1(
154214100212104
+===−=∴
×+−×=××−−=
×−=×−=
⇒⇒
===
+×=+×=
K
K
K
K
(c) a = 15, b = 10
1,1).1(101155
.5)10,15gcd(
−==∴−×+×=
=
nm
(d) a = 5, b = 9
2,125)1(91
.1)5,9gcd(
=−=∴×+−×=
=
nm
(e) a = 63, b = 24
8,3824)3(633
.12)24,63gcd(
=−=∴×+−×=
=
nm
(f) a = 336, b = 60.
11,2)11(60233612
.12)60,336gcd(
−==∴−×+×=
=
nm
(g) a = 7684, b = 4148.
50,27)50(414827768468
.68)4148,7684gcd(
−==∴−×+×=
=
nm
WUCT121 Numbers Tutorial Exercises Solutions 23
(h) a = 90, b = –54
2,1)2()54()1(9018
.18)54,90gcd(
−=−=∴−×−+−×=
=−
nm
Question10 Give three pairs of numbers that are relatively prime
9 and 5; 2104 and 21; 17 and 9.
Question11 Fermat Primes are given by the formula ∈+= nnFn
for,12)( 2 .
(a) Write down the first three Fermat Primes. Are they all prime?
prime25712)3(
prime1712)2(
prime512)1(
3
2
1
2
2
2
=+=
=+=
=+=
F
F
F
(b) Find F(4) and F(5). Are they prime?
not prime67004176414294967297
12)5(
prime6553712)4(
5
4
2
2
×==
+=
=+=
F
F
Question12 Mersenne Primes are given by the formula ∈−= nng n for,12)( .
T7Q11,12
WUCT121 Numbers Tutorial Exercises Solutions 24
(a) Find g(n) for 2, 3, 4, 5, 6, 7, 8, 9.
primenot51112)9(
prime12712)7(
prime3112)5(
prime712)3(
primenot25512)8(
primenot6312)6(
primenot1512)4(
prime312)2(
9
7
5
3
8
6
4
2
=−=
=−=
=−=
=−=
=−=
=−=
=−=
=−=
g
g
g
g
g
g
g
g
(b) Which of the values for g(n) found in part (a) are prime?
( ) ( ) ( ) ( )7,5,3,2 gggg are all prime.
(c) For what values of n do you suggest that g(n) will give a prime number?
The suggestion is that when n is prime, then ( )ng will also be prime.
(d) Find g(11). How does this compare with your opinion for part (c)?
( ) 892320471211 11 ×==−=g .
New conjecture: If ( )ng is prime, then n is prime, but if n is prime, ( )ng is not
necessarily prime.
(e) Prove that whenever n is composite, then g(n) is also composite. [Hint: Let
∈= qppqn , somefor , , and factorise g(n).]
Let 2,,4 ≥≥= qppqn
( )
1)2(
12
12
−=
−=
−=
qp
pq
nng
Let pX 2=
( ))1)(1(
121 ++++−=
−=−− XXXX
Xngqq
q
K
Now 2>X thus 11>−X and 11321 >+++++ −−− XXXX qqq K as 2≥q .
Therefore, ( ) stng = where 1≠s and 1≠t .
Hence, ( )ng is composite
WUCT121 Numbers Tutorial Exercises Solutions 25
Question13
(a) What can you say about ∈− nn for,13 ? Will this produce prime numbers?
Why or why not?
( )( )( )1332
133313131
21
+++=
++++−=−−
−−
K
K
n
nnn
Therefore, 13 −n is NOT prime, and never will be.
Question14 There are 367 people (pigeons, n). Including February 29 there are 366
possible birthdays (pigeonholes, k). Since n > k, by the Pigeonhole Principle, at least
two people must share the same birthday.
It does not work with 366 people, since 366 u 366.
Question15 There are seven integers (pigeons n), there are 6 even numbers from 1 to
12 inclusive (pigeonholes k). Since n > k, by the Pigeonhole Principle, at least two
numbers must be the same. However since the numbers are all different we cannot
have two the same, this means at least one must be odd.
Question16 There are 4 possible pairings which sum to 10: 64;73;82;91 ++++
The number 5 is not in any pair but every other number is in exactly one pair. This
gives 5 categories (pigeonholes k). Choosing 5 numbers (pigeons n) there could be
one from each category, e.g. 1, 2, 3, 4, 5. No pair of these adds to 10. Since n u k, we
cannot guarantee there will be two numbers whose sum is 10.To guarantee that two of
our chosen numbers sum to 10 we must choose at least 6. In this case 6 numbers
(pigeons n) from 5 categories (pigeonholes k), and n > k.
Question17 500 lines of computer code (pigeons n) in 17 days (pigeonholes k).
Now 2917500 ×> . Therefore by the generalised Pigeonhole Principle, on at least
one of the days he writes at least 30129 =+ lines of code.
[ or 3017500
=⎥⎥⎤
⎢⎢⎡ lines of code.]
WUCT121 Numbers Tutorial Exercises Solutions 26
Question18 Solution 1:
A person at the party can have 0 up to 9 friends at the party.
If someone has 0 friends at the party, however, then no one at the party has 9 friends.
Likewise, if someone has 9 friends at the party, then no one at the party has 0 friends.
Hence the number of possibilities for the number of friends the 10 people at the party
can have is at most 9 ( 0, 1, 2, 3, 4, 5, 6, 7, 8 or 1, 2, 3, 4, 5, 6, 7, 8, 9).
We have 10 people (pigeons n) to go into 9 friendship possibilities (pigeonholes k).
Since n > k, by the Pigeonhole Principle, at least two people at the party must have
the same number of friends.
Solution 2:
Let P be a person with the most friends, say m friends. If one of P’s friends has m
friends at the party, then we are done.
If none of P’s friends has m friends at the party, each of P’s m friends has fewer than
m friends at the party (at most, 1−m friends).
We have m friends (pigeons n) to go into 1−m friendship possibilities (pigeonholes
k).
Since n > k, by the Pigeonhole Principle, some two of P’s friends have the same
number of friends at the party.
To help you with this solution, let 5=m . Then each of P’s 5 friends has fewer than 5
friends at the party (at most, 4 friends).
WUCT121 Numbers Tutorial Exercises Solutions 27
Section 5: Congruence Arithmetic
Question1
(a)
( )( )( )11mod112
11mod112
11mod112
9
2
≡⇒
≡⇒
≡
.
(b) ( )
( )( )( )( )13mod93
13mod33
13mod13
13mod1273
13mod33
11
10
9
3
≡⇒
≡⇒
≡⇒
≡=
≡
.
(c) ( ) 1174 so ,1174 =−−=+ which is divisible by 11.
Therefore, ( )11mod74 −≡
Question2 Use the definition of congruence modulo to prove the following properties
for congruence modulo 3.
(a) Prove ( )3mod, aaa ≡∈∀ .
That is, we need to prove that ( )aa −|3 .
Now, 0=− aa and ( )aa −⇒ |30|3 .
Therefore, by definition, ( )3modaa ≡ .
(b) Prove ( ) ( )3mod3mod,, abbaba ≡⇒≡∈∀ .
KNOW: ( ) ( )baba −⇒≡ |33mod by definition.
PROVE: ( ) ( )abab −≡ |3 that prove is,That .3mod
( ) ( )( )
( )
)3(mod)(|33
33,|3
abab
kkabkba
bakba
≡∴−∴
∈−−=−⇒−=−−⇒
=−∈∃⇒−
WUCT121 Numbers Tutorial Exercises Solutions 28
(c) Prove ( ) ( ) ( )3mod3mod3mod,,, cacbbacba ≡⇒≡∧≡∈∀
KNOW: ( ) ( )baba −⇒≡ |33mod
( ) ( )cbcb −⇒≡ |33mod , by definition.
PROVE: ( )3modca ≡ . That is, prove that ( )ca −|3 .
( ) ( )( ) ( )23,|3
13,|3K
K
lcblcbkbakba
=−∈∃⇒−=−∈∃⇒−
Adding equations (1) and (2), we have
( )( )( )3mod
|33
3333
caca
lklkcalkca
lkcbba
≡∴−∴
∈++=−⇒+=−⇒
+=−+−
Question3 Let 7=n .
(a) [ ] ( )7in m is a set of numbers. ( 7 is a set of sets.)
(b) [ ] { }KK ,23,16,9,2,5,12,19,26,2 −−−−= ,
[ ] { }KK ,26,19,12,5,2,9,16,23,5 −−−−= ,
[ ] [ ] { }KK ,28,21,14,7,0,7,14,21,28,07 −−−−==
[ ] [ ] [ ] [ ] [ ] [ ] [ ]{ }6,5,4,3,2,1,07 =
(c)
(i) True. ( )7mod29 ≡ .
(ii) False. [ ]5 is a SET, so it can’t be equal to ( )7mod5 .
(iii)True. ( )7mod519 ≡ , so [ ] [ ]519 = , and [ ]55∈ .
(iv) False. 7 is a set of SETS. 3 is not a SET
(v) True. [ ] [ ] 7310 ∈= .
(vi) False. [ ]a and [ ]b are both sets of numbers. [ ]a can’t be in [ ]b .
WUCT121 Numbers Tutorial Exercises Solutions 29
Question4 Write out the addition and multiplication tables for 5 , 6 and 1 . [ ] [ ] [ ] [ ] [ ]{ }4,3,2,1,05 = .
+ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
[ ]0 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
[ ]1 [ ]1 [ ]2 [ ]3 [ ]4 [ ]0
[ ]2 [ ]2 [ ]3 [ ]4 [ ]0 [ ]1
[ ]3 [ ]3 [ ]4 [ ]0 [ ]1 [ ]2
[ ]4 [ ]4 [ ]0 [ ]1 [ ]2 [ ]3
¥ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
[ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0
[ ]1 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
[ ]2 [ ]0 [ ]2 [ ]4 [ ]1 [ ]3
[ ]3 [ ]0 [ ]3 [ ]1 [ ]4 [ ]2
[ ]4 [ ]0 [ ]4 [ ]3 [ ]2 [ ]1
[ ] [ ] [ ] [ ] [ ] [ ]{ }5,4,3,2,1,06 =
+ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5
[ ]0 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5
[ ]1 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]0
[ ]2 [ ]2 [ ]3 [ ]4 [ ]5 [ ]0 [ ]1
[ ]3 [ ]3 [ ]4 [ ]5 [ ]0 [ ]1 [ ]2
[ ]4 [ ]4 [ ]5 [ ]0 [ ]1 [ ]2 [ ]3
[ ]5 [ ]5 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
¥ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5
[ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0
[ ]1 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5
[ ]2 [ ]0 [ ]2 [ ]4 [ ]0 [ ]2 [ ]4
[ ]3 [ ]0 [ ]3 [ ]0 [ ]3 [ ]0 [ ]3
[ ]4 [ ]0 [ ]4 [ ]2 [ ]0 [ ]4 [ ]2
[ ]5 [ ]0 [ ]5 [ ]4 [ ]3 [ ]2 [ ]1
[ ]{ }01 = .
+ [ ]0 ¥ [ ]0
[ ]0 [ ]0 [ ]0 [ ]0
(a) The element [ ]0 is the only element in 5 that doesn’t have a multiplicative
inverse
(b) The elements [ ] [ ] [ ] [ ]4,3,2,0 don’t have multiplicative inverses in 6 .
(c) If [ ] 6∈m does have an inverse under multiplication, then 1)6,gcd( =m .
WUCT121 Numbers Tutorial Exercises Solutions 30
Question5 Let .∈n Prove that ( )nbaba mod][][ ≡⇔=
To prove that [ ] [ ] ( )nbababa mod,, ≡⇔=∈∀ , there are two things to prove:
1. [ ] [ ] ( )nbababa mod,, ≡⇒=∈∀
2. ( ) [ ] [ ]banbaba =⇒≡∈∀ mod,,
Proof of 1.KNOW: [ ] [ ] )1(Kba = .
PROVE: ( )nba mod≡ .
Let [ ]ax∈ .
Then ( )nax mod≡ , by definition of [ ]a .
Since [ ] [ ]ba = , [ ]bx∈ also. Then ( )nbx mod≡ .
Now, ( ) ( )nxanax modmod ≡⇒≡ by the symmetric property.
Also, ( )nbx mod≡ .
Therefore, by the transitive property ( )nba mod≡ .
Proof of 2. ( ) [ ] [ ]banbaba =⇒≡∈∀ mod,, ,there are two things to prove:
i. [ ] [ ]ba ⊆
ii. [ ] [ ]ab ⊆
Proof of i:
KNOW ( ) )1(mod Knba ≡
PROVE: [ ] [ ]ba ⊆ .
Let [ ] ( )naxax mod≡⇒∈ by definition
( )nbx mod≡⇒ by transitivity (and (1))
[ ]bx∈⇒
Therefore, [ ] [ ]ba ⊆ by a typical element argument.
Proof of ii:
KNOW: ( ) ( )nabnba modmod ≡⇒≡ by symmetry
PROVE: [ ] [ ]ab ⊆ .
Let [ ] ( )nbxbx mod≡⇒∈ by definition
( )nax mod≡⇒ by transitivity
[ ]ax∈⇒
Therefore, [ ] [ ]ab ⊆ by a typical element argument
WUCT121 Numbers Tutorial Exercises Solutions 31
Question6
(a)
( )( ) ( )( ) ( )( )( )11mod44
11mod14
11mod111mod454
11mod911mod204
11mod5164
11
10
5
3
2
≡⇒
≡⇒
≡≡⇒
≡≡⇒
≡=
Therefore [ ]1410 ∈ and [ ]4411∈ , where [ ] [ ] 114,1 ∈
(b)
( )( ) ( )( ) ( )( )( )11mod33
11mod13
11mod111mod453
11mod511mod273
11mod593
11
10
5
3
2
≡⇒
≡⇒
≡≡⇒
≡≡⇒
≡=
Therefore [ ]1310 ∈ and [ ]3311 ∈ , where [ ] [ ] 113,1 ∈ .
(c) Conjecture: Let 110, <<∈ xx .
( )11mod110 ≡x and ( )11mod11 xx ≡ .
As a matter of fact, this result is true for all values of x, where ( ) 111,gcd =x .
WUCT121 Numbers Tutorial Exercises Solutions 32
Question7
(a) [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ][ ]{ }8,7,6,5,4,3,2,1,09 =
+ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8
[ ]0 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8
[ ]1 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8 [ ]0
[ ]2 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8 [ ]0 [ ]1
[ ]3 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8 [ ]0 [ ]1 [ ]2
[ ]4 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8 [ ]0 [ ]1 [ ]2 [ ]3
[ ]5 [ ]5 [ ]6 [ ]7 [ ]8 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4
[ ]6 [ ]6 [ ]7 [ ]8 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5
[ ]7 [ ]7 [ ]8 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6
[ ]8 [ ]8 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7
¥ [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8
[ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0 [ ]0
[ ]1 [ ]0 [ ]1 [ ]2 [ ]3 [ ]4 [ ]5 [ ]6 [ ]7 [ ]8
[ ]2 [ ]0 [ ]2 [ ]4 [ ]6 [ ]8 [ ]1 [ ]3 [ ]5 [ ]7
[ ]3 [ ]0 [ ]3 [ ]6 [ ]0 [ ]3 [ ]6 [ ]0 [ ]3 [ ]6
[ ]4 [ ]0 [ ]4 [ ]8 [ ]3 [ ]7 [ ]2 [ ]6 [ ]1 [ ]5
[ ]5 [ ]0 [ ]5 [ ]1 [ ]6 [ ]2 [ ]7 [ ]3 [ ]8 [ ]4
[ ]6 [ ]0 [ ]6 [ ]3 [ ]0 [ ]6 [ ]3 [ ]0 [ ]6 [ ]3
[ ]7 [ ]0 [ ]7 [ ]5 [ ]3 [ ]1 [ ]8 [ ]6 [ ]4 [ ]2
[ ]8 [ ]0 [ ]8 [ ]7 [ ]6 [ ]5 [ ]4 [ ]3 [ ]2 [ ]1
WUCT121 Numbers Tutorial Exercises Solutions 33
(b) All of the statements are False.
(i) In [ ] [ ]513,9 =− since, ( )9mod513 ≡− , [ ] [ ]53 ≠ , so [ ] [ ]133 −≠ .
(ii) ( )9mod09 ≡− , so [ ]09∈− (in 9 ); ( )9mod119 ≡ , so
[ ] [ ]119 ≡ in 9 . ]19[9∉−∴
(iii) 9 is a set of sets NOT a set of numbers, so 92 ∉
(iv) ( )5mod94 ≡ is true, but [ ]54∈ (in 9 ) is false as [ ]44∈ (in 9 ).
We therefore have ‘ FT ⇒ ’, which is always False
(v) The identity of 9 under addition is [ ]0 .
[ ]1 is the identity under multiplication
(vi) There are three elements of 9 that do not have multiplicative inverses: [ ]0 ,
[ ]3 and [ ]6 ..
Question8 Every natural number m can be written in the form
0121
1 101001010 dddddm kk
kk +×+×++×+×= −
− K , where .∈id is the digit
in the th10i position of m.
Examples : 61021005100077526 +×+×+×=
210010041000710000557402 +×+×+×+×=
(a) Let 206257 =+++=S .
(i) ( )9mod77 ≡ , ( ) ( )9mod7100079mod11000 ≡×⇒≡
(ii) ( )9mod55 ≡ , ( ) ( )9mod510059mod1100 ≡×⇒≡
(iii) ( )9mod22 ≡ , ( ) ( )9mod21029mod110 ≡×⇒≡
(iv) Now, ( )9mod66 ≡ .
Thus, ( ) ( )( )9mod62576102100510007 +++≡+×+×+×
Therefore, ( )9mod207526 ≡ .
WUCT121 Numbers Tutorial Exercises Solutions 34
(b) 1820475 =++++=S . ( )3mod0≡S .
210041000710000557402 +×+×+×= .
Now,
( )3mod25 ≡ , ( ) ( )3mod21000053mod110000 ≡×⇒≡
( )3mod17 ≡ , ( ) ( )3mod1100073mod11000 ≡×⇒≡
( )3mod14 ≡ , ( ) ( )3mod110043mod1100 ≡×⇒≡
( )3mod22 ≡ .
So,
( )( )( )( )( )( )3mod0
3mod63mod2112
3mod210041000710000557402
≡≡
+++≡+×+×+×≡
Therefore, ( )3mod57402 S≡ .
(c) Let ∈m . Then m can be written in the form
0121
1 101001010 dddddm kk
kk +×+×++×+×= −
− K
where ∈id is the digit in the th10i position of m.
Let S be the sum of the digits of m. That is, 0121 dddddS kk +++++= − K .
Consider ( )3mod10iid × , where ki ≤≤0 .
At best, we know ( )3modii dd ≡ by the reflexive property.
Also, we know ( )3mod110 ≡i . Therefore, ( )3mod110 ×≡× ii
i dd .
That is, ( ) kidd ii
i ≤≤≡× 0for 3mod10 .
Thus, we have
( )( )( )( )( )3mod
3mod3mod101001010
0121
0121
1
Sddddd
dddddm
kk
kk
kk
≡+++++≡
+×+×++×+×≡
−
−−K
K
The proof for ( )9modSm ≡ is similar.
(d) We have just shown that any number is divisible by 3 if the sum of its digits is
also divisible by 3.
Similarly, any number is divisible by 9 if the sum of its digits is also divisible by
9.