ECOM 2311- Discrete Mathematics10mm

Total Page:16

File Type:pdf, Size:1020Kb

ECOM 2311- Discrete Mathematics10mm ECOM 2311- Discrete Mathematics Chapter # 4 : Number Theory and Cryptography Fall, 2013/2014 ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 1/9 Outline 1 Divisibility and Modular Arithmetic 2 Greatest Common Divisors and Least Common Multiples ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 2/9 Divisibility and Modular Arithmetic Division Number Theory The part of mathematics devoted to the study of the set of integers and their properties Division If a and b are integers with a > 0, we say that a divides b if there is an integer c such that b = ac. The notation ajb denotes that a divides b. We write a 6 jb when a does not divide b. THEOREM Let a, b, and c be integers, where a 6= 0. Then (i) if ajb and ajc, then aj(b + c); (ii) if ajb, then ajbc for all integers c; (iii) if ajb and bjc, then ajc. ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 3/9 Divisibility and Modular Arithmetic The Division Algorithm The Division Algorithm Let a be an integer and d a positive integer. Then there are unique integers q and r, with 0 ≤ r < d, such that a = dq + r. DEFINITION In the equality given in the division algorithm, d is called the divisor, a is called the dividend, q is called the quotient, and r is called the remainder. This notation is used to express the quotient and remainder: q = a div d, r = a mod d. Example: What are the quotient and remainder when 101 is divided by 11 and when -11 is divided by 3? 101 = 11 · 9 + 2 ) q = 9 and r = 2. 1 − 11 = 3(−4) + 1 ) q = −4 and r = 1. Note that the remainder cannot be negative. Consequently, the remainder is not −2, even though −11 = 3(−3) − 2. ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 4/9 Divisibility and Modular Arithmetic Modular Arithmetic Modular Arithmetic If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m divides a − b. The notation a ≡ b( mod m) used to indicate that a is congruent to b modulo m [This notation is used indicates that two integers have the same remainder when they are divided by the positive integer m]. Example: Determine whether 17 is congruent to 5 modulo 6 and whether 24 is congruent to 14 modulo 6. Because 6 divides 17 − 5 = 12, we see that 17 ≡ 5( mod 6). Because 24 − 14 = 10 is not divisible by 6, we see that 24 6≡ 14( mod 6). A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite. ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 5/9 Primes and Greatest Common Divisors Primes Fundamental theorem of arithmetic Every positive integer can be written as a prime or as a product of p primes. If n is composite, it has a prime divisor ≤ n. Example: Show that 101 is prime. p The only primes not exceeding 101 are 2, 3, 5, and 7. Because 101 is not divisible by 2, 3, 5, or 7, it follows that 101 is prime. Example: Find the prime factorization of 7007. The prime factorization of 7007 is 7 × 7 × 11 × 13 = 72 × 11 × 13. A number is divisible by 7 if the difference is divisible by 7 [Drop the unit digit from the original number and subtract the double of the unit]. ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 6/9 Greatest Common Divisors and Least Common Multiples Greatest Common Divisor Let a and b be integers, not both zero. The largest integer d such that dja and djb is called the greatest common divisor(gcd) of a and b. The greatest common divisor of a and b is denoted by gcd(a; b). Finding gcd(a; b) Express a, b as powers of products of primes. The products of lowest powers of all distinct primes is gcd(a; b) = intersection. Example: What is the greatest common divisor of 24 and 36?. The positive common divisors of 24 and 36 are 1, 2, 3, 4, 6, and 12. Hence, gcd(24; 36) = 12. The integers a and b are relatively prime if their greatest common divisor is 1. ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 7/9 Greatest Common Divisors and Least Common Multiples Least Common Multiple Least Common Multiple of the positive integers a and b is the smallest positive integer that is divisible by both a and b. The least common multiple of a and b is denoted by lcm(a; b). Finding lcm(a; b) Express a, b as powers of products of primes. The products of the highest powers of all distinct primes is lcm(a; b) = union. Example: What is the least common multiple of 233572 and 2433?. lcm(233572; 2433) = 243572. Let a and b be positive integers. Then ab = gcd(a; b) × lcm(a; b). Let a = bq + r, where a; b; q, and r are integers. Then gcd(a; b) = gcd(b; r). ECOM 2311- Discrete Mathematics - Ch.4 Dr. Musbah Shaat 8/9 A very good class as a whole. I enjoyed having you in my class. Good luck to all of you. End of The Course.
Recommended publications
  • Black Hills State University
    Black Hills State University MATH 341 Concepts addressed: Mathematics Number sense and numeration: meaning and use of numbers; the standard algorithms of the four basic operations; appropriate computation strategies and reasonableness of results; methods of mathematical investigation; number patterns; place value; equivalence; factors and multiples; ratio, proportion, percent; representations; calculator strategies; and number lines Students will be able to demonstrate proficiency in utilizing the traditional algorithms for the four basic operations and to analyze non-traditional student-generated algorithms to perform these calculations. Students will be able to use non-decimal bases and a variety of numeration systems, such as Mayan, Roman, etc, to perform routine calculations. Students will be able to identify prime and composite numbers, compute the prime factorization of a composite number, determine whether a given number is prime or composite, and classify the counting numbers from 1 to 200 into prime or composite using the Sieve of Eratosthenes. A prime number is a number with exactly two factors. For example, 13 is a prime number because its only factors are 1 and itself. A composite number has more than two factors. For example, the number 6 is composite because its factors are 1,2,3, and 6. To determine if a larger number is prime, try all prime numbers less than the square root of the number. If any of those primes divide the original number, then the number is prime; otherwise, the number is composite. The number 1 is neither prime nor composite. It is not prime because it does not have two factors. It is not composite because, otherwise, it would nullify the Fundamental Theorem of Arithmetic, which states that every composite number has a unique prime factorization.
    [Show full text]
  • The Least Common Multiple of a Quadratic Sequence
    The least common multiple of a quadratic sequence Javier Cilleruelo Abstract For any irreducible quadratic polynomial f(x) in Z[x] we obtain the estimate log l.c.m. (f(1); : : : ; f(n)) = n log n + Bn + o(n) where B is a constant depending on f. 1. Introduction The problem of estimating the least common multiple of the ¯rstPn positive integers was ¯rst investigated by Chebyshev [Che52] when he introduced the function ª(n) = pm6n log p = log l.c.m.(1; : : : ; n) in his study on the distribution of prime numbers. The prime number theorem asserts that ª(n) » n, so the asymptotic estimate log l.c.m.(1; : : : ; n) » n is equivalent to the prime number theorem. The analogous asymptotic estimate for any linear polynomial f(x) = ax + b is also known [Bat02] and it is a consequence of the prime number theorem for arithmetic progressions: q X 1 log l.c.m.(f(1); : : : ; f(n)) » n ; (1) Á(q) k 16k6q (k;q)=1 where q = a=(a; b). We address here the problem of estimating log l.c.m.(f(1); : : : ; f(n)) when f is an irreducible quadratic polynomial in Z[x]. When f is a reducible quadratic polynomial the asymptotic estimate is similar to that we obtain for linear polynomials. This case is studied in section x4 with considerably less e®ort than the irreducible case. We state our main theorem. Theorem 1. For any irreducible quadratic polynomial f(x) = ax2 + bx + c in Z[x] we have log l.c.m.
    [Show full text]
  • Eureka Math™ Tips for Parents Module 2
    Grade 6 Eureka Math™ Tips for Parents Module 2 The chart below shows the relationships between various fractions and may be a great Key Words tool for your child throughout this module. Greatest Common Factor In this 19-lesson module, students complete The greatest common factor of two whole numbers (not both zero) is the their understanding of the four operations as they study division of whole numbers, division greatest whole number that is a by a fraction, division of decimals and factor of each number. For operations on multi-digit decimals. This example, the GCF of 24 and 36 is 12 expanded understanding serves to complete because when all of the factors of their study of the four operations with positive 24 and 36 are listed, the largest rational numbers, preparing students for factor they share is 12. understanding, locating, and ordering negative rational numbers and working with algebraic Least Common Multiple expressions. The least common multiple of two whole numbers is the least whole number greater than zero that is a What Came Before this Module: multiple of each number. For Below is an example of how a fraction bar model can be used to represent the Students added, subtracted, and example, the LCM of 4 and 6 is 12 quotient in a division problem. multiplied fractions and decimals (to because when the multiples of 4 and the hundredths place). They divided a 6 are listed, the smallest or first unit fraction by a non-zero whole multiple they share is 12. number as well as divided a whole number by a unit fraction.
    [Show full text]
  • Fundamental Arithmetic
    FUNDAMENTAL ARITHMETIC Prime Numbers Prime numbers are any whole numbers greater than 1 that can only be divided by 1 and itself. Below is the list of all prime numbers between 1 and 100: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 Prime Factorization Prime factorization is the process of changing non-prime (composite) numbers into a product of prime numbers. Below is the prime factorization of all numbers between 1 and 20. 1 is unique 6 = 2 ∙ 3 11 is prime 16 = 2 ∙ 2 ∙ 2 ∙ 2 2 is prime 7 is prime 12 = 2 ∙ 2 ∙ 3 17 is prime 3 is prime 8 = 2 ∙ 2 ∙ 2 13 is prime 18 = 2 ∙ 3 ∙ 3 4 = 2 ∙ 2 9 = 3 ∙ 3 14 = 2 ∙ 7 19 is prime 5 is prime 10 = 2 ∙ 5 15 = 3 ∙ 5 20 = 2 ∙ 2 ∙ 5 Divisibility By using these divisibility rules, you can easily test if one number can be evenly divided by another. A Number is Divisible By: If: Examples 2 The last digit is 5836 divisible by two 583 ퟔ ퟔ ÷ 2 = 3, Yes 3 The sum of the digits is 1725 divisible by three 1 + 7 + 2 + 5 = ퟏퟓ ퟏퟓ ÷ 3 = 5, Yes 5 The last digit ends 885 in a five or zero 88 ퟓ The last digit ends in a five, Yes 10 The last digit ends 7390 in a zero 739 ퟎ The last digit ends in a zero, Yes Exponents An exponent of a number says how many times to multiply the base number to itself.
    [Show full text]
  • 3Understanding Addition and Subtraction
    Understanding Addition 3 and Subtraction Copyright © Cengage Learning. All rights reserved. SECTION Understanding Addition and 3.3 Subtraction of Fractions Copyright © Cengage Learning. All rights reserved. What do you think? • Why do we need a common denominator to add (or subtract) two fractions ? • What pictorial representations can we use for addition and subtraction with fractions? 3 Understanding Addition and Subtraction of Fractions There are many algorithms that enable us to manipulate fractions quickly : I is simply not enough for an elementary teacher to know how to compute. It is crucial that the teacher also know the whys behind the hows and can use a variety of representations to explain them. 4 Investigation 3.3a – Using Fraction Models to Understand Addition of Fractions Using the area model, the length model, or the set model, determine the sum of and then explain why we need to find a common denominator in order to add fractions. 5 Investigation 3.3a – Discussion This is an excellent place to demonstrate the role of manipulatives. Using pattern blocks How might you use pattern blocks to add and (see Figure 3.8)? Figure 3.8 6 Investigation 3.3a – Discussion continued If we let the hexagon represent 1, then the trapezoid is the parallelogram is and the triangle is Using the notion of addition as combining, we can combine the two, and we have We could be humorous and say that parallelogram + trapezoid = baby carriage! The key question , though, is to determine the value of this amount . The solution lies in realizing that to name an amount with a fraction, we must have equal - size parts.
    [Show full text]
  • Greatest Common Divisor and Least Common Multiple
    Greatest Common Divisor and Least Common Multiple Document #: WG21 N3845 Date: 2014-01-01 Revises: None Project: JTC1.22.32 Programming Language C++ Reply to: Walter E. Brown <[email protected]> Contents 1 Introduction ............. 1 4 Acknowledgments .......... 3 2 Implementation ........... 2 5 Bibliography ............. 4 3 Proposed wording .......... 3 6 Document history .......... 4 Abstract This paper proposes two frequently-used classical numeric algorithms, gcd and lcm, for header <cstdlib>. The former calculates the greatest common divisor of two integer values, while the latter calculates their least common multiple. Both functions are already typically provided in behind-the-scenes support of the standard library’s <ratio> and <chrono> headers. Die ganze Zahl schuf der liebe Gott, alles Übrige ist Menschenwerk. (Integers are dear God’s achievement; all else is work of mankind.) —LEOPOLD KRONECKER 1 Introduction 1.1 Greatest common divisor The greatest common divisor of two (or more) integers is also known as the greatest or highest common factor. It is defined as the largest of those positive factors1 shared by (common to) each of the given integers. When all given integers are zero, the greatest common divisor is typically not defined. Algorithms for calculating the gcd have been known since at least the time of Euclid.2 Some version of a gcd algorithm is typically taught to schoolchildren when they learn fractions. However, the algorithm has considerably wider applicability. For example, Wikipedia states that gcd “is a key element of the RSA algorithm, a public-key encryption method widely used in electronic commerce.”3 Note that the standard library’s <ratio> header already requires gcd’s use behind the scenes; see [ratio.ratio]: Copyright c 2014 by Walter E.
    [Show full text]
  • New Results on the Least Common Multiple of Consecutive Integers
    New results on the least common multiple of consecutive integers Bakir FARHI and Daniel KANE Département de Mathématiques, Université du Maine, Avenue Olivier Messiaen, 72085 Le Mans Cedex 9, France. [email protected] Harvard University, Department of Mathematics 1 Oxford Street, Cambridge MA 02139, USA. [email protected] Abstract When studying the least common multiple of some nite sequences of integers, the rst author introduced the interesting arithmetic functions , dened by n(n+1):::(n+k) . He gk (k 2 N) gk(n) := lcm(n;n+1;:::;n+k) (8n 2 N n f0g) proved that is periodic and is a period of . He raised gk (k 2 N) k! gk the open problem consisting to determine the smallest positive period Pk of gk. Very recently, S. Hong and Y. Yang have improved the period k! of gk to lcm(1; 2; : : : ; k). In addition, they have conjectured that Pk is always a multiple of the positive integer lcm(1;2;:::;k;k+1) . An immediate k+1 consequence of this conjecture states that if (k+1) is prime then the exact period of gk is precisely equal to lcm(1; 2; : : : ; k). In this paper, we rst prove the conjecture of S. Hong and Y. Yang and then we give the exact value of . We deduce, as a corollary, Pk (k 2 N) that Pk is equal to the part of lcm(1; 2; : : : ; k) not divisible by some prime. MSC: 11A05 Keywords: Least common multiple; arithmetic function; exact period. 1 Introduction Throughout this paper, we let N∗ denote the set N n f0g of positive integers.
    [Show full text]
  • Exploring Least Common Multiples and Divisibility Through Visual Art
    Bridges 2019 Conference Proceedings Divisible Skylines: Exploring Least Common Multiples and Divisibility through Visual Art Saara Lehto1, Anne-Maria Ernvall-Hytönen2, and Tommi Sottinen3 1Dept. of Mathematics and Statistics, University of Helsinki, Finland; saara.lehto@helsinki.fi 2Mathematics and Statistics, Åbo Akademi University, Finland; aernvall@abo.fi 3School of Technology and Innovations, University of Vaasa, Finland; tommi.sottinen@iki.fi Abstract We present an alternative way to consider number theoretic concepts through visual art. Our visualization method, Divisible Skylines, is an artistically motivated study of least common multiples. It demonstrates how beauty and mathematical understanding can join hands in the study of divisibility. We present original artwork based on our method, examine mathematical properties of Divisible Skylines through the artwork, and point out several artisti- cally interesting visual aspects. Our method opens possibilities for developing playful and creative ways to teach divisibility and number theory. Divisible Skylines offer interest for artists, educators and students alike. Introduction The basis of this paper is the artwork Divisible Dreams by Saara Lehto (Figure1). The creative process behind this work entwines mathematics and visual art in a natural and intriguing way. Divisibility has previously been embodied with rhythms [3], but not many visual representations can be found. We present a visualization method that is both mathematically illustrative and artistically pleasing. Figure 1: Divisible Dreams by Saara Lehto, 2019 335 Lehto, Ernvall-Hytönen, and Sottinen In the heart of Divisible Dreams is a visualization method designed for finding least common multiples. In this paper we will explain this method and discover how number theoretic concepts and artistically interesting questions intertwine in the exploration of the artwork.
    [Show full text]
  • (3) Greatest Common Divisor
    (3) Greatest common divisor In mathematics, the greatest common divisor (gcd), also known as the greatest common factor (gcf), or highest common factor (hcf), of two or more non-zero integers, is the largest positive integer that divides the numbers without a remainder. For example, the GCD of 8 and 12 is 4. This notion can be extended to polynomials, see greatest common divisor of two polynomials. Overview Example The number 54 can be expressed as a product of two other integers in several different ways: Thus the divisors of 54 are: Similarly the divisors of 24 are: The numbers that these two lists share in common are the common divisors of 54 and 24: The greatest of these is 6. That is the greatest common divisor of 54 and 24. One writes: Reducing fractions The greatest common divisor of a and b is written as gcd(a, b), or sometimes simply as (a, b). For example, gcd(12, 18) = 6, gcd(−4, 14) = 2. 1 Two numbers are called relatively prime, or coprime if their greatest common divisor equals 1. For example, 9 and 28 are relatively prime. Calculation Using Euclid's algorithm A much more efficient method is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference. To compute gcd(48,18), divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get a remainder of 0, which means that 6 is the gcd.
    [Show full text]
  • Finite Mathematics Review 2 1. for the Numbers 360 and 1035 Find
    Finite Mathematics Review 2 1. For the numbers 360 and 1035 find a. Prime factorizations. Using these prime factorizations find next b. The greatest common factor. c. The least common multiple. Solution. a. 3602180229022245222335;=× =×× =××× =××××× 1035=× 3 345 =×× 3 3 115 =××× 3 3 5 23. The prime factorizations are 360=×× 232 3 5 and 1035 =×× 32 5 23. b. To find the greatest common factor we take each prime factor from factorizations of 360 and 1035 with the smaller of two exponents. Thus GCF(360,1035)=×= 32 5 45. c. To find the least common multiple we take each prime factor from factorizations of 360 and 1035 with the larger of two exponents. Thus LCM (360,1035)=×××= 232 3 5 23 8280. 2. Find the greatest common factor of the numbers 3464 and 5084 using the Euclidean algorithm. Solution. The following table shows the sequence of operations. Dividend Divisor Quotient Remainder 5084 3464 1 1620 3464 1620 2 224 1620 224 7 52 224 52 4 16 52 16 3 4 16 4 4 0 Thus the greatest common factor of 5084 and 3464 is 4. 3. Determine which one of the two infinite decimal fractions 0.12123123412345... and 0.473121121121.... represents a rational number. Find the irreducible fraction which corresponds to this rational number. Solution. The first infinite decimal though has a pattern but it is not a periodic pattern, no group of digits repeats in this pattern. Thus this infinite decimal represents an irrational number. In the second decimal we have a repeating group of digits – 121 and therefore this decimal represents a rational number.
    [Show full text]
  • 4.3 Primes and Greatest Common Divisors
    ICS 141: Discrete Mathematics I (Fall 2014) 4.3 Primes and Greatest Common Divisors Primes An integer p greater than 1 is called prime if the only positive factors of p are 1 and p. A positive integer that is greater than 1 and is not prime is called composite. The Fundamental Theory of Arithmetic Every integer greater than 1 can be written uniquely as a prime or as the product of two or more primes where the prime factors are written in order of nondecreasing size. Theorem 2 p If n is a composite integer, then n has a prime divisor less than or equal to n. Greatest Common Divisor Let a and b be integers, not both zero. The largest integer d such that d j a and d j b is called the greatest common divisor of a and b. The greatest common divisor of a and b is denoted by gcd(a; b). Finding the Greatest Common Divisor using Prime Factorization Suppose the prime factorizations of a and b are: a1 a2 an a = p1 p2 ··· pn b1 b2 bn b = p1 p2 ··· pn where each exponent is a nonnegative integer, and where all primes occurring in either prime factorization are included in both, with zero exponents if necessary. Then: min(a1;b1) min(a2;b2) min(an;bn) gcd(a; b) = p1 p2 ··· pn Relatively Prime The integers a and b are relatively prime if their greatest common divisor is 1. Least Common Multiple The least common multiple of the positive integers a and b is the smallest positive integer that is divisible by both a and b.
    [Show full text]
  • The Integers
    Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization The Integers Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing March 20-21, 2018 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization 1 Euclid's Algorithm for GCD Mathematical Foundations The Algorithm 2 The Least Common Multiple 3 Prime numbers 4 Prime Factorization Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor The greatest common divisor (gcd) of two integers, a; b, is the largest integer that divides both. Formally, the gcd(a; b) is the greatest integer d such that d j a and d j b. Examples: gcd(1; x) = 1 gcd(10; 2) = 2 gcd(2; 10) = 2 gcd(2; 15) = 1 gcd(14; 10) = 2 gcd(13; 13) = 13 Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Lemma 1: For x 2 Z +, gcd(x; 0) = x Proof: 0 divided by anything is 0 with no remainder. (Arithmetic.) Therefore, any integer, x, divides 0. (Definition of \divides".) Any integer, x, divides itself. (x=x = 1; with remainder 0, and definition of divides.) x is the largest integer that divides x. (Definition of divides.) gcd(x; 0) = x. (Definition of gcd.) Outline Euclid's Algorithm for GCD The Least Common Multiple Prime numbers Prime Factorization Greatest Common Divisor Lemma 2: For a; b; q; r 2 Z and either a 6= 0 or b 6= 0. if a = bq + r then gcd(a; b) = gcd(b; r) Proof by division into parts: Part 1a.
    [Show full text]