assignment 3 solutions

advertisement
Assignment 3
COMP2130 Winter 2014.
Out of 65
Obey all instructions given in the ROASS document. You are not allowed to use a calculator or computer on
this assignment.
Q1)[6] Prove that the sum of any two odd integers is even. Is it true that the sum of any two even integers is a
multiple of 4? Prove your answer.
Proof: Let the two odd integers be n and m. Then n= 2k+1, kZ and m=2j+1, jZ. {def of odd}[1]
Then n+m = 2k+1+2j+1 {subst}[1]
= 2k+2j+2 {algebra}
= 2(k+j +1) . {algebra} [1]
Since k,j,1 Z then so is k+j+1Z [.5]{closure} so n+m is even by the definition of even.[.5]
It is not true.[1] Now 4 and 6 are even but their sum, 10, is not a multiple of 4.[]
Q2) [5] Prove that a number is divisible by 25 only if the last two digits (treated as a two digit number) is
divisible by 25.
Proof: Let n be any number divisible by 25. [.5] Now
n = ad10d + ad-110d-1+ + a2102 + a110 +a0 {def. of decimal notation}[1]
= 100(ad10d-2 + ad-110d-3+ + a2) + a110 +a0 {algebra}[1]
Since 25|n {given} and since 25|(100(ad10d-2 + ad-110d-3+ + a2)) then 25| (n-100(ad10d-2 + ad-110d-3+ + a2)).
{previous thm}. So 25|(10a1+a0) {substitution}. [2] So 25 divides the last two digits of n treating the last two
digits of n as a two digit decimal number. [.5]
Q3) [4] Is 123456789002 a prime? Is 444480654321 a prime? Justify your answers.
The first number is divisible by 2 as the last digit is divisible by 2,[1] {lecture notes}, so it is not prime.{def}[1]
The sum of the digits of the second number is 0 mod 11, so the last number is divisible by 11.[1] {lecture notes}
So the last number is not prime.{def}[1]
Q4) [4] How many 0’s does 21! end in. Show your work.
If a number ends in 0 then in its unique factorization it must have a 5 and a 2. [1] The index of 2 is larger than
the index of 5 in the unique factorization of n! [1] So I must figure out the index of 5 for n!’s unique
factorization. This is easy as every fifth number in the product will be divisible by 5. So for 21! the index of 5
is 4.[1] So 21! ends in 4 0’s[1].
Q5) [5] My mistake, I gave you the wrong question. This one is too easy.
Let m,n,a,b,d  Z with d > 1. If m  n(mod d) and ab (mod d), is m+a n+b (mod d). Prove it.
Since m  n(mod d), m-n = td, where tZ and m=td+n,[.5] Since ab (mod d), a-b = sd, where s Z and
a=sd+b. [.5]
So m+a-(n+b) =(td+n)+sd+b-n-b {subst} [1]
= td +sd{algebra}
= d(t+d). {algebra}[1]
Since t,s,d,b Z so is (t+d)Z[1]. Then m+an+b (mod d) by definition of congruence. [1]
Here is the question I really wanted you to do.
[5] Let m,n,a,b,d  Z with d > 0. If m  n(mod d) and ab (mod d), is ma nb (mod d). Prove it.
Since m  n(mod d), m-n = td, where tZ and m=td+n,[.5] Since ab (mod d), a-b = sd, where s Z and
a=sd+b. [.5]
So ma-nb =(td+n)(sd+b)- nb {subst} [1]
= tdsd +nsd+tbd {algebra}
= d(tsd +ns+tb). {algebra}[1]
Since t,s,d,b Z so is (tsd +ns+tb)Z[1]. Then manb (mod d) by definition of congruence. [1]
Q6) [6]What are the last two digits of 2999.
Answer
21988 (mod 100),[1] 220  76 (mod 100)[1], 762  76 (mod 100), 76i 76(mod 100)[1] and 999 = 20(49)+19[1]
So 2999 = 220(49)+19
= (220)49219 [1]
 (76)4988 (mod 100)
 76(88) (mod 100)
88 (mod 100)[1].
Therefore the last 2 digits are 88.[1]
Q7) [6] Prove that n2+3n +5 is never divisible by 121 for any n  Z+. Hint: See which of 11 cases needs to be
investigated further.
Answer
If n2+3n +5 is divisible by 121 then it is divisible by 11. [1] Let us see which n congruent to 11 works.
n
0 1 2 3 4 5 6 7 8 9 10
2
(n +3n +5) mod 11 5 9 4 1 0 1 4 9 5 3 3
[1]
So only n 4 mod 11 could work. [1] So let n= 11k+4, k Z.[1]
Then n2+3n +5 = (11k+4)2 +3(11k+4) + 5
= 121k2+121k+33k {algebra}
= 121(k2+k) +33.[1]
2
Since 121|(k +k) and 121 does not divide 33 so 121 does not divide n2+3n +5 {previous thm}is never divisible
by 121 for any n  Z+.[1]
Q8)[5] Solve. Make sure your answer is in the modulus the question started with.
a) [2] 3x+5  12 (mod 5)
b)[3] 2x+3  -1 (mod 10)
a) Answer
3x+5 12 (mod 5) which implies
3x 12 (mod 5) which implies [1]
x 4 mod 5.[2]
b) answer
2x+3  -1 (mod 10)
2x  6 (mod 10) which implies [1]
x3 ( mod 5) which implies [1]
x 3 or 8 (mod 10), [1]
 7x2  4x  6
Q9)[5] Simplify 
 where xR and x > 6 . Show steps.
2
 2x  x 
Answer
7x2+4x-6 = 3(2x2+x)+ (x2+x-6). [1] Since x > 6 , then x2 > 6, so 2x2+x > (x2+x-6).{algebra} [1]
Further, since x2 > 6, x2+x-6 > 0. {algebra}[1] So (x2+x-6) is the positive remainder when 7x2+4x-6 is divide by
 7x2  4x  6
2x2 +x [1], hence 
 =3{def. of floor}.[1]
2
 2x  x 
Q10) [6] Show that (2 + 5 )/3 is irrational. Hint: see Example 4.7.1 in the book. You may assume that
irrational.
5 is
Proof: (indirect proof) Assume that (2 + 5 )/3 is rational. [1] Then (2 + 5 )/3 = a/b where a,bZ and b0.[1]
Then 2 + 5 = 3a/b which implies
5 = 3a/b-2
= (3a-2b)/b. [1]
Since (3a-2b)Z {closure}, bZ with b  0 then 5 is rational{def}. [1] But this contradicts that 5 is
irrational[1], so (2 + 5 )/3 is irrational also.[1]
Q11) [6] Prove that there are an infinite number of primes that are congruent to 3 (mod 4). Instead of using the
equation Q=p12*p22*…*pn2 +2, you must use Q=4p1*p2*…*pk+3.
Proof: Assume (iotgac) that there are a finite number of primes  3 (mod 4). [1] Let them be p1,p2,…,pk but not
including 3.[1] Consider the following: Q = 4p1*p2*…*pk+3 3 (mod 4). [1] By a previous theorem, P is
divisible by a prime 3 mod 4, say pj.[1] Then pj|Q and pj|(4p1*p2*…*pk) so pj|3 {previous thm}. So pj=3.[1]
This contradicts that 3 is in the list. So there are an infinite number of primes 3 mod 4. [1]
Q12) [7] What is the gcd(17,99)? Find an integer solution to the equation 17n +99 m = 2.
What is the multiplicative inverse of 17 modulo 99. Use the most efficient algorithms; i.e. the Extended
Euclidean Algorithm
99 = 5(17)+14
17 = 1(14)+ 3
14 = 4(3)+2
3 = 1(2) + 1
2 = 2(1)+0 [2] So the gcd(17,99)= 1.[1]
Solving for 17n +99 m = 1
i
q1
ri
ti
0
0
1
1
5
1
0
2
1
-5
1
3
4
6
-1
4
1
-29
5
5
2
35
6 [2]
so n=2(35)=70 and m=2(-6)= -12 is an integer solution to 17n +99 m = 2. [1]
The multiplicative inverse of 17 modulo 99 is 35. [1]
Download