discrete ch 4

¡Supera tus tareas y exámenes ahora con Quizwiz!

Let a,b,c be integers where a isnt 0

(i) if a | b and a | c, then a | (b + c); (ii) if a | b, then a | bc for all integers c; (iii) if a | b and b | c, then a | c.

lcd

opposite of gcd

ISBN example

(a) The first nine digits of the ISBN-10 of the sixth edition of this book are 007288008. What is the check digit? (b) Is 084930149X a valid ISBN-10? Solution: (a) The check digit is determined by the congruence 10 i=1 ixi ≡0 (mod 11). Inserting the digits 007288008 gives x10 ≡1 · 0 + 2 · 0 + 3 · 7 + 4 · 2 + 5 · 8 + 6 · 8 + 7 · 0 + 8 · 0 + 9 · 8 (mod 11). This means that x10 ≡0 + 0 + 21 + 8 + 40 + 48 + 0 + 0 + 72 (mod 11), so x10 ≡189≡2 (mod 11). Hence, x10 = 2. (b) To see whether 084930149X is a valid ISBN-10, we see if 10 i=1 ixi ≡0 (mod 11). We see that 1 · 0 + 2 · 8 + 3 · 4 + 4 · 9 + 5 · 3 + 6 · 0 + 7 · 1 + 8 · 4 + 9 · 9 + 10 · 10 = 0 + 16 + 12 + 36 + 15 + 0 + 7 + 32 + 81 + 100 = 299≡2 ≡0 (mod 11). Hence, 084930149X is not a valid ISBN-10.

Chinese Remainder Theorem

Example: Solve the simultaneous congruences x ≡ 6 (mod 11), x ≡ 13 (mod 16), x ≡ 9 (mod 21), x ≡ 19 (mod 25). Solution: Since 11, 16, 21, and 25 are pairwise relatively prime, the Chinese Remainder Theorem tells us that there is a unique solution modulo m, where m = 11⋅16⋅21⋅25 = 92400.

modular congruence

For a positive integer n, two integers a and b are said to be _______ n (or a is ______ to b ____ n), if a and b have the same remainder when divided by n (or equivalently if a − b is divisible by n ). It can be expressed as a ≡ b mod n. n is called the modulus.

Let m be a positive integer. If a≡b (mod m) and c≡d (mod m), then

a + c≡b + d (mod m) and ac≡bd (mod m).

successive squaring

a^kmodp convert k to binary keep the 1 digits for every i, a^2 mod p ex: 3^2003 mod 99 2003 = 11111010011 i=0 a=3 a^2modp =3mod99 i=1 a=3 a^2modp =9mod99 i = 2 a=9 a^2modp =81mod99 etc

hexadecimal, octal,binary rep table

decimal:0 H:0 O:0 B:0 decimal:1 H:1 O:1 B:1 decimal:2 H:2 O:2 B:10 decimal:3 H:3 O:3 B:11 decimal:4 H:4 O:4 B:100 decimal:5 H:5 O:5 B:101 decimal:6 H:6 O:6 B:110 decimal:7 H:7 O:7 B:111 decimal:8 H:8 O:8 B:1000 decimal:9 H:9 O:9 B:1001 decimal:10 H:A O:10 B:1010 decimal:11 H:B O:11 B:1011 decimal:12 H:C O:12 B:1100 decimal:13 H:D O:13 B:1101 decimal:14 H:E O:14 B:1110 decimal:15 H:F O:15 B:1111

Let b be an integer greater than 1. Then if n is a positive integer, it can be expressed uniquely in the form/expansions

digit n1*base#1^k1+digit n2*base#2^k2+.....digit n*base#^k k= exponent ex: base 2:(1 0101 1111) 2 = 1 · 2^ 8 + 0 · 2 ^7 + 1 · 2^ 6 + 0 · 2^ 5 + 1 · 2 ^4 + 1 · 2 ^3 + 1 · 2 ^2 + 1 · 2 ^1 + 1 · 2^ 0 = 351.

inverse of modulos

euclidean alg The modular inverse of A mod C is the B value that makes A * B mod C = 1

linear congreunce modulo

ex: 3 What are the solutions of the linear congruence 3x≡4 (mod 7)? Solution: By Example 1 we know that−2 is an inverse of 3 modulo 7. Multiplying both sides of the congruence by−2 shows that −2 · 3x≡ −2 · 4 (mod 7). Because−6≡1 (mod 7) and−8≡6 (mod 7), it follows that if x is a solution, then x≡ −8≡ 6 (mod 7). We need to determine whether every x with x≡6 (mod 7) is a solution. Assume that x≡6 (mod 7). Then, by Theorem 5 of Section 4.1, it follows that 3x≡3 · 6 = 18≡4 (mod 7), which shows that all such x satisfy the congruence. We conclude that the solutions to the congruence are the integers x such that x≡6 (mod 7), namely, 6, 13, 20,... and−1,−8, −15,....

successively division

ex: Find the octal expansion of (12345) 10. Solution: First, divide 12345 by 8 to obtain 12345 = 8 · 1543 + 1. _______ quotients by 8 gives 1543 = 8 · 192 + 7, 192 = 8 · 24 + 0, 24 = 8 · 3 + 0, 3 = 8 · 0 + 3. The ____ r____s that we have found, 1, 7, 0, 0, and 3, are the digits from the right to the left of 12345 in base 8. Hence, (12345) 10 = (30071) 8.

gcd(a,b)

ex:Because the prime factorizations of 120 and 500 are 120 = 2^ 3 · 3 · 5 and 500 = 2^ 2 · 5 ^3 , the greatest common divisor is gcd(120, 500) = 2 ^min(3, 2)* 3^ min(1, 0)* 5^ min(1, 3) = 2^ 2* 3^ 0 *5^ 1 = 20.

successive division with base 10

ex:Find the binary expansion of (241) 10. Solution: First divide 241 by 2 to obtain 241 = 2 · 120 + 1. ______ quotients by 2 gives 120 = 2 · 60 + 0, 60 = 2 · 30 + 0, 30 = 2 · 15 + 0, 15 = 2 · 7 + 1, 7 = 2 · 3 + 1, 3 = 2 · 1 + 1, 1 = 2 · 0 + 1. The successive remainders that we have found, 1, 0, 0, 0, 1, 1, 1, 1, are the digits from the right to the left in the binary (base 2) expansion of (241) 10. Hence, (241) 10 = (1111 0001) 2.

Euclidean Algorithm

ex:Find the greatest common divisor of 414 and 662 using the Euclidean algorithm. Solution: Successive uses of the division algorithm give: 662 = 414 · 1 + 248 414 = 248 · 1 + 166 248 = 166 · 1 + 82 166 = 82 · 2 + 2 82 = 2 · 41. Hence, gcd(414, 662) = 2, because 2 is the last nonzero remainder.


Conjuntos de estudio relacionados

Professional Responsibilities - MPRE practice questions

View Set

Anatomy- Nervous System, Digestive System and Digestive disorders

View Set

ECON 2106: Principles of Microeconomics, Final Exam Study Guide

View Set

apex economics it's a small world

View Set

QUIZ 4 (Service Desk Processes and Procedures)

View Set

INTRO TO CLINICAL PHARM: Chapter 07: Drugs for Allergy and Respiratory Problems

View Set

Acid-Base Balance: Respiratory Acidosis/Alkalosis

View Set