Integers and Division Section 3.4.

Slides:



Advertisements
Similar presentations
The Integers and Division. Outline Division: Factors, multiples Exercise 2.3 Primes: The Fundamental Theorem of Arithmetic. The Division Algorithm Greatest.
Advertisements

5.1 Number Theory. The study of numbers and their properties. The numbers we use to count are called the Natural Numbers or Counting Numbers.
1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
Chapter Primes and Greatest Common Divisors ‒Primes ‒Greatest common divisors and least common multiples 1.
February 19, 2015Applied Discrete Mathematics Week 4: Number Theory 1 The Growth of Functions Question: If f(x) is O(x 2 ), is it also O(x 3 )? Yes. x.
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
CSE115/ENGR160 Discrete Mathematics 03/15/11
Chapter II. THE INTEGERS
1 Integers and Division CS/APMA 202 Rosen section 2.4 Aaron Bloomfield.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
The Integers and Division
Divisibility October 8, Divisibility If a and b are integers and a  0, then the statement that a divides b means that there is an integer c such.
Integers Number Theory = Properties of Integers
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 2): The Fundamentals: Algorithms, the.
Chapter 2 The Fundamentals: Algorithms, the Integers, and Matrices
1 Properties of Integers Objectives At the end of this unit, students should be able to: State the division algorithm Apply the division algorithm Find.
7.1 CompSci 102© Michael Frank Today’s topics Integers & Number TheoryIntegers & Number Theory – –Integers – –Division, GCD – –Euclidean Alg – –Mod! Reading:
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Module #8: Basic Number Theory
CSE 504 Discrete Mathematics & Foundations of Computer Science
Mathematics of Cryptography Part I: Modular Arithmetic
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
3.4/3.5 The Integers and Division/ Primes and Greatest Common Divisors Let each of a and b be integers. We say that a divides b, in symbols a | b, provided.
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
The Integers & Division. a divides b if a is not zero there is a m such that a.m = b “a is a factor of b” “b is a multiple of a” a|b Division.
Prep Math Competition, Lec. 1Peter Burkhardt1 Number Theory Lecture 1 Divisibility and Modular Arithmetic (Congruences)
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
Chapter The Integers and Division Division
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/37 Module.
Number Theory 이재원 School of Information Technology Sungshin W. University.
Chapter 2 (Part 1): The Fundamentals: Algorithms, the Integers & Matrices The Integers and Division (Section 2.4)
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Discrete Mathematics
Divisibility and Modular Arithmetic
AF2. Turn off your phones Primes, gcd, some examples, reading.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Ch04-Number Theory and Cryptography 1. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic.
Number Theory: Prime and Composite Numbers
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
Number-Theoretic Algorithms
COT 3100, Spring 2001 Applications of Discrete Structures
CS 210 Discrete Mathematics The Integers and Division (Section 3.4)
Introduction to Cryptography
COT 3100, Spring 2001 Applications of Discrete Structures
CMSC Discrete Structures
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Chapter 3, Section 3.1 Algorithms
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Module #8: Basic Number Theory
Number Theory.
Topic 6: Number Theory Basics
Enough Mathematical Appetizers!
刘振 上海交通大学 计算机科学与工程系 电信群楼3-509
Discrete Mathematics and its Applications
Module #8: Basic Number Theory
The Integers & Division
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Copyright © Zeph Grunschlag,
Divisibility and Modular Arithmetic
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
Module #9: Basic Number Theory
Presentation transcript:

Integers and Division Section 3.4

Division a|b: If a and b are integers with a  0, we say that a divides b (or a|b) if there is an integer c such that b = ac. a is a factor of b b is a multiple of a If a, b, and c are integers: if a|b and a|c, then a|(b+c) if a|b, then a|bc for all integers c if a|b and b|c, then a|c

Division Algorithm Let a and d be integers with d positive. Then there are unique integers q and r with 0r<d such that a = dq + r d is the divisor q is the quotient r is the remainder (has to be positive) Example: What are the quotient and remainder when 11 is divided by 3?

Modular Arithmetic If a is an integer and m a positive integer, a mod m is the remainder when a is divided by m. If a = qm + r and 0  r < m, then a mod m = r Example: Find 17 mod 5. Example: Find 133 mod 9.

Modular Arithmetic (Cont ..) Let a and b be integers and m be a positive integer. a is congruent to b modulo m if (a-b) is divisible by m. Notation: a  b (mod m) a  b (mod m) iff (a mod m)=(b mod m) Let m be a positive integer. a  b (mod m) iff there is an integer k such that a = b + km.

Modular Arithmetic (Cont ..) Is 17 congruent to 5 modulo 6 i.e., is 17  5 (mod 6)? Is 24 congruent to 14 modulo 6 i.e., is 24  14 (mod 6)?

Modular Arithmetic (Cont ..) Let m be a positive integer. If a  b (mod m) and c  d (mod m), then a + c  b + d (mod m) ac  bd (mod m) 7  2 (mod 5) and 11  1 (mod 5) (7+11)  (2+1) (mod 5) i.e., 18  3 (mod 5) (7  11)  (2  1) (mod 5) i.e., 77  2 (mod 5)

Applications of Modular Arithmetic Hashing functions Pseudorandom number generation Cryptography

Primes and Great Common Divisors Section 3.5

Primes A positive integer p is called prime if the only positive factors of p are 1 and p. Otherwise p is called a composite. Is 7 prime? Is 9 prime?

Prime factorization Every positive integer can be written uniquely as the product of primes, with the prime factors written in increasing order. Example - Find the prime factorization of these integers: 100, 641, 999, 1024

Prime factorization (Cont ..) If n is a composite integer, then n has a prime factor less than or equal to n. Example - Show that 101 is prime.

Greatest Common Divisor Let a and b be integers, not both zero. The greatest common divisor (gcd) of a and b is the largest integer d such that d|a and d|b. Notation: gcd(a,b) = d Example: What is the gcd of 45 and 60?

Greatest Common Divisor (Cont ..) gcd(a,b) can be computed using the prime factorizations of a and b. a  p1a1 p2a2 … pnan b  p1b1 p2b2 … pnbn gcd(a,b) = p1min(a1,b1) p2min(a2,b2) … pnmin(an,bn)

Greatest Common Divisor (Cont ..) Example: Find gcd(120,500).

Greatest Common Divisor (Cont ..) The integers a and b are relatively prime if their greatest common divisor is 1 i.e., gcd(a,b) = 1. Are 17 and 22 are relatively prime?

Greatest Common Divisor (Cont ..) A set of integers a1, a2, …, an are pairwise relatively prime if the gcd of every possible pair is 1. Are 10, 17, 21 pairwise relatively prime? Are 10, 19, 24 pairwise relatively prime?

Least Common Multiple The least common multiple (lcm) of the positive integers a and b is the smallest positive integer m such that a|m and b|m. Notation: lcm(a,b) = m Example: What is the lcm of 6 and 15?

Least Common Multiple (Cont ..) lcm(a,b) can be computed using the prime factorizations of a and b. a  p1a1 p2a2 … pnan b  p1b1 p2b2 … pnbn lcm(a,b) = p1max(a1,b1) p2max(a2,b2) … pnmax(an,bn)

Least Common Multiple (Cont ..) Example: Find lcm(120,500).

Relationship between gcd and lcm If a and b are positive integers, then ab = gcd(a,b)  lcm(a,b) Example gcd(120,500)  lcm(120,500) = 20 * 3000 = 60000 = 120  500