Quizzes Solution With Examples

5
7/24/2019 Quizzes Solution With Examples http://slidepdf.com/reader/full/quizzes-solution-with-examples 1/5 Theorem 2.1 (Pythagorean Triples Theorem). We will get every primitive Pythagorean triple (a,b,c) with a odd and b even by using the formulas a = st, b = (s^2 - t^2)/2, c = (s^2+ t^2)/2 where s > t >= 1 are chosen to be any odd integerse with no common factors. Pf. 3 consecutive odd integers must have one at least divisble by 3. i) n = 3k where x is an integer. then 3 | n ii) n=3x+1 then n+2 = (3x+1)+2 = 3(x+1) -> 3 | n+2 iii) n=3x+2 then n+4 = (3x+2)+4 = 3(x+2) -> 3 | n+4 Pf. Prove that for all triangular numbers, there is a PPT with a,b,c where b = 4 Tn Let a Tn be defined as Tn = 1 + 2 + 3 + ... + n = n(n+1)/2 c=b+1 -> s^2+t^2/2 = s^2-t^2/2 + 1 -> s^2 + t^2 = s^2 - t^2 + 2 t^2 = 1 -> t = 1 somce t >=1 Then, b = (2n+1)^2-1(^2)/2 = 4n^2+4n/2 = 2n^2 + 2n = 4*n(n+1)/2 = 4Tn Pf. Find a PPT a,b,c having c = a + 2 and c > 1000. Use Theorem 2.1 c + a+2 -> s^2 + t^2/2 = st+2 by thm 2.1 s^2-tst+t2=4 (s-t)^2=4 s-t=2 since s>t c = s^2+t^2/2 = (t+2)^2+t^2/2 = t^2 + 2t + 2 > 1000 --> t >= 31 Say t = 31, then say s = 33, to find the PPT. USING THE EUCLIDIAN ALGORITHM (EA) TO FIND THE GCD compute gcd(123456,789100) 789100 = 6 * 123456 + 48364 123456 = 2 * 48354 + 26728 ... shift down until the remainder is 0. The one before it is the GCCD. USING THE EA TO DESCRIBE ALL INTEGER SOLUTIONS OF EQUATIONS. 54321x + 9876y = gcd(54321,9876) 54321 = 5 * 9876 + 4941 (1) 9876 = 1 * 4941 + 4935 (2) 4941 = 1 * 4935 + 6 (3) 4935 = 822 * 6 + 3 (4)  6 = 2 * 3 + 0 (5) Say a = 54321, b = 9876. Apply this definition in reverse. (1) 4941 =a - 5b (2) 4935 = b - 4941 = -a + 6b (3) 6 = 2a - 11b (4) 3 = -1645a + 9048b So, -1645(54321) + 9048(9876) = 3 x1 = -1645, y1 = 9048 General solution: x = x1 + 9876/3k = -1645 + 3292k y = y1 - 54321/3k = 9048 - 19107k Where k is any integer.

Transcript of Quizzes Solution With Examples

Page 1: Quizzes Solution With Examples

7/24/2019 Quizzes Solution With Examples

http://slidepdf.com/reader/full/quizzes-solution-with-examples 1/5

Theorem 2.1 (Pythagorean Triples Theorem).We will get every primitive Pythagorean triple (a,b,c) with a odd and b even byusing the formulasa = st, b = (s^2 - t^2)/2, c = (s^2+ t^2)/2where s > t >= 1 are chosen to be any odd integerse with no common factors.

Pf. 3 consecutive odd integers must have one at least divisble by 3.i) n = 3k where x is an integer. then 3 | nii) n=3x+1 then n+2 = (3x+1)+2 = 3(x+1) -> 3 | n+2iii) n=3x+2 then n+4 = (3x+2)+4 = 3(x+2) -> 3 | n+4

Pf. Prove that for all triangular numbers, there is a PPT with a,b,c where b = 4TnLet a Tn be defined as Tn = 1 + 2 + 3 + ... + n = n(n+1)/2

c=b+1 -> s^2+t^2/2 = s^2-t^2/2 + 1-> s^2 + t^2 = s^2 - t^2 + 2t^2 = 1 -> t = 1 somce t >=1

Then, b = (2n+1)^2-1(^2)/2 = 4n^2+4n/2 = 2n^2 + 2n = 4*n(n+1)/2 = 4Tn

Pf. Find a PPT a,b,c having c = a + 2 and c > 1000. Use Theorem 2.1c + a+2 -> s^2 + t^2/2 = st+2 by thm 2.1s^2-tst+t2=4

(s-t)^2=4s-t=2 since s>t

c = s^2+t^2/2 = (t+2)^2+t^2/2 = t^2 + 2t + 2 > 1000 --> t >= 31

Say t = 31, then say s = 33, to find the PPT.

USING THE EUCLIDIAN ALGORITHM (EA) TO FIND THE GCDcompute gcd(123456,789100)789100 = 6 * 123456 + 48364123456 = 2 * 48354 + 26728... shift down until the remainder is 0. The one before it is the GCCD.

USING THE EA TO DESCRIBE ALL INTEGER SOLUTIONS OF EQUATIONS.54321x + 9876y = gcd(54321,9876)

54321 = 5 * 9876 + 4941 (1)9876 = 1 * 4941 + 4935 (2)4941 = 1 * 4935 + 6 (3)4935 = 822 * 6 + 3 (4)  6 = 2 * 3 + 0 (5)

Say a = 54321, b = 9876. Apply this definition in reverse.(1) 4941 =a - 5b(2) 4935 = b - 4941 = -a + 6b(3) 6 = 2a - 11b

(4) 3 = -1645a + 9048b

So, -1645(54321) + 9048(9876) = 3x1 = -1645, y1 = 9048

General solution:x = x1 + 9876/3k = -1645 + 3292ky = y1 - 54321/3k = 9048 - 19107kWhere k is any integer.

Page 2: Quizzes Solution With Examples

7/24/2019 Quizzes Solution With Examples

http://slidepdf.com/reader/full/quizzes-solution-with-examples 2/5

TWO PROOFS ON GCD PRODUCTS AND DIVISIBILITYPf. Suppose that gcd(a,b) = 1, and suppose further that a|bc. Show that a must divide c.Since gcd(a,b)=1, there is an integer solution x,y for ax+by=1.Multiply by c and then acx+bcy=c.Since a|bc and ac, acx+bcy i.e. a|c.

Pf. Suppose that gcd(a,b) = 1, and suppose further that a|c and b|c. Show that ab must divide c.Since gcd(a,b)-1, there is an integer solutionx,y of ax+by = 1Multilpy by c and then acx + bcy = cSince a|c and b|c, there are integers k & l with c=ak, c=bl.acx+bcy = ca * blx + b*aky =cab(lx+ky) = cab|c.

PROOF BY INDUCTION EXAMPLEPf. That 1*2 + 2*3 + 3*4 + ... + (n-1)n = n^3-n / 3i)n=1, LHS = 1*2, RHS = 2^3-2/3 = 2,LHS = RHSii)Suppose * is true for all n <=N

Then [1*2 + 2*3 + 3*4 + ... + (N-1)N]*N(N+1) = N^3-N/3 + N(N+1)by the hypothesis of induction.by simplification,N^3-N/3 + 3N(N+1)/3 = (N+1)(N^2+2N+1-1)/3(N+1)((N+1)^2-1)/3 = (N+1)^3 - (N+1)/3So(*) is true for N+1.By induction, (*) is true for all n.

PROOFS USING MODULULAR ARITHMETICSuppose that a cong. b (mod m) and x cong y (mod m). Verify that ax cong by (mod m)Pf.a = mk+b, x = ml + y for some integers k,l.

ax-by = (mk+b)(ml+y)-by = m^2kl+mky+mbl+by-by= m(mkl+ky+bl) --> m|ax-by i.e. ax cong by (modm)

Is ac cong bc (mod mc) where c dne 0 imply that a cong b(mod m) is true?Pf.ac = bc + mck for some integer k.--> a=b+mk i.e. m|a-b i.e. a cong b (modm)c dne 0

If p is a prime, a^p cong b^p (mod p), a,p are relatively prime and b,p are relatively prime. Then show that a cong b (mod p).Pf.Since gcd(a,p) = gcd(b,p) = 1, a notcong. 0 (mod p), b notcong. 0 (mod p).

Then by FLT,a^(p-1) cong. 1 (mod p), b^(p-1) cong. 1 (mod p)a^p cong. b^pa^(p-1)*b cong. b^p-1*b <--> a cong. b (mod p).

FIND ALL THE SOLUTIONS OF THE CONGRUENCE12x cong. 9 (mod 33), in the integers (0,33).gcd(12,33)=3, 3|9. Therefore 12x-33y=9 has solutions.33=2*12+9 --> 9=33-2*1212=1*9 +3 --> 3=12-9=12-(33-2*12)=3*12-33.

Page 3: Quizzes Solution With Examples

7/24/2019 Quizzes Solution With Examples

http://slidepdf.com/reader/full/quizzes-solution-with-examples 3/5

i.e. 12(3)-33(1)=3.--> 12*9-33*3=9x_0 = 9x cong. 9+ k*33/3 cong. {9,20,31}(mod 33)

SHOWING THAT A CONGRUENCE HAS NO SOLUTIONSYou use iteration.For x^63 cong. 5(mod 7),x^5 cong. 1 (mod 7) by FLTx^63=(x^6)^10*x^3 cong. x^3 cong. 5 (mod 7)1 2 3 4 5 6 x1 8 27 64 125 216 x^31 1 6 1 6 6 mod 7no solutions.

FIND A NUMBER a THAT HAS THE FOLLOWING THREE PROPERTIES.a cong. 5^868 (mod 1512)1 <= a <= 3000a is not divisible by 5

1512 = 2^3*3^3*7phi(1512) = phi(2^3*3^3*7)=(2^3-2^2)(3^3-3^2)(7-1)=432

i)

a cong 5^868 cong. 5^432^2 * 5^4. by Euler's formula,cong. 1 * 5^4 cong. 625 (mod 1512)5^phi(1512)cong. 1 (mod 1512)since gcd(5,1512)=1.ii)a could be 625,2137 since a cong. 625 (mod 1512).iii)5|/ a but 5|625 --> a=2137.

FIND AN X THAT SOLVES THE SIMULTANEOUS CONGRUENCE.x cong. -4(mod 17) and x cong. 3(mod 23)x cong 13 mod17 -> x=17y+13 for some integer y.Plug into the 2nd congruence

-> 17y + 13 cong. 3 (mod 23)i.e. 17y cong. -10 cong. 13 mod23i.e. 17y = 23z + 13 for some integer z. i.e. 17y-23z=13

find u,v with17u-23v=123=1*17-6...6=23-1717=2*6+5....5=17-2(23-17)=3*17-2*236=1*5+1.....1=(23-17)=(3*17-2*23)5=5*1+0.....0=3*23-4*1717(-4)-23(-3)=117(-52)-23(-39)=13

y=-52 or y cong-52(mod23), cong. 17(mod23)

y=17+23k for int k.x=17(17+23k)+13=302+17*23kx cong. 302 mod(17*23k)(So any # cong 302 mod 17*23 could be the answer.)

FINDING PRIMES SATISFYING A CONGRUENCE.Find p cong 718 mod 5. Are there infinitely many?There are infinitely many by Dirichlet's thm.

Page 4: Quizzes Solution With Examples

7/24/2019 Quizzes Solution With Examples

http://slidepdf.com/reader/full/quizzes-solution-with-examples 4/5

Since gcd(718,5)=1,718=143*5+35=1*3+23=1*2+[1]2=2*1+0

PROOFS FOR INFINITELY MANY PRIMES CONGRUENT TO X MOD Y.Show that there are infinitemly many primes that are congruent to 3 mod 4.Start with the list of primes cong. 3 mod 4 assuming 3 isn't in the list.{p1,p2,pr}Let A=4p1p2...p4+3If A is prime, since A cong. 3 (mod4) & A>pi i s.t i {1,r}A is the new prime.

If A isn't prime, there are primes q1...qs with A=q1...qs.Claims:1) At least one qj is cong. to 3 mod 4.2) This qj is the new prime, qj =/ pi for all i s.t i {1,r}

1) If all qj notcong.3 mod 4, then qj cong 1 mod 4. Then A=q1...qs cong. 1...1=1 mod 4IMPOSSIBRU.

2) If there is a pi with qj - pi then

pi|q1...qs=A & pi|4p1p2...pr -> pi|3Since we assume 3 is not in this list, pi=/3, and pi=/1.IMPOSSIBRU!

BBy 1 2, qj is the new prime cong. 3 mod 4.If we repeat, every time we can find new prime cong. 3 mod 4,Therefore, there are infinitely many primes cong. 3 mod 4.

RSA DECRYPTIONDecode 180 sent using m=391 and k=3 (the exponent)Find a s.t. a^k cong. 180 (391)(1)phi(391)=phi(17*23)=16*22=352(2)Find u for 3u-352v=1

352=117*3+1 -> 1 = 352-3*117 --> u=-117, v=-1u=-117 + 352 = 235(3) a cong. 180^235(391)Use binary expansion and then180^1,2,4,8,16... mod 391, etc.

a cong. 180^128... cong 20 then decode.

KORSELT'S CRITERION / CARMICHAEL NUMBERS2465?5*17*294,16,28|24645^2,17^2,29^2|/2465

2465 is Carmichael Number.

14125 = 113*5^35^2|14125 -> not a C#

IS 7393 PRIME IF 7^7392 cong. 1 (7393)?Yes, check sqrt, but FLT not in reverse!

ASSORTED MODULO PROOFS INVOLVING PHILet b,k, and m be integers that satisfy gcd(b,m)=1 and gcd(k,phi(m))=1.

Page 5: Quizzes Solution With Examples

7/24/2019 Quizzes Solution With Examples

http://slidepdf.com/reader/full/quizzes-solution-with-examples 5/5

Show that b has exactly one kth root mod m.

Suppose that a and A are both kth roots of b mod m,since gcd kphim =1 we can find u and v such that ku+phim=v=1.a=a^ku+phimv=a^k^u * a^phim^v cong. A^k^u * A^phim^v = A^ku+phimv =ASince a^k cong. A^k cong. b, and a^phim cong. A^phim cong 1 modm by Euler's formula.

If m is a product of distinct primes and gcd(k,phim)=1, show that x cong. b^u modm is always a sol. to x^k cong. b modm.Show that b^u^k cong. b (modm), that m|b^u^k - b*akyFactor m as m=p1p2pr where allp's are different so check that pi|b^u^k - b for all i [1,r]If pi|b, then pi|b^u^k -bIf not, pi-1|phi(m) since phi(m)=(p1-1)(p2-1)...uk= 1+ phimv = 1+(pi-1)lv for any int l.b^u^k = b*(b^pi-1)^lv cong. by FLT to b*1 cong b. mod pi.

Half of 1,2...p-1 are QRs and the rest are NRs mod p.Therefore, A + B, where A and B are sums of all between 1 and p of QR/NR mod p,is 1+2+3...+p-1 = (p-1)p/2.

DETERMINING WHETHER CONGRUENCES HAVE SOLUTIONS.x^2+6x+2 cong. 0 (29)(x+3)^2 cong. 7 (29)

(7/29)=(29/27)=(1/7)=17cong3(4)29cong1(4)therefore, there's an int a, s.t. a^2 cong. 7 (29) and it has a solution.

Or use the quadratic formula and see that x gets -3 +/- sqrt(7)(7/29)=1 and there's a s.t. a^2cong.7(29)x cong. -3 +/- sqrt(a^2) is a soln. mod 27.

RABIN-MILLER WITNESSa=1, show 161 is composite.n-1=160=2^5*5 k=5 q=5