CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston

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

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.
Number Theory and Cryptography
CSE115/ENGR160 Discrete Mathematics 03/15/11
Chapter II. THE INTEGERS
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
BY MISS FARAH ADIBAH ADNAN IMK
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
CSCI 1900 Discrete Structures
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 2): The Fundamentals: Algorithms, the.
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.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
CSE 504 Discrete Mathematics & Foundations of Computer Science
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 3): The Fundamentals: Algorithms, the.
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
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
Chapter The Integers and Division Division
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Chapter Integers and Algorithms Representations of integers
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)
Foundations of Discrete Mathematics Chapter 4 By Dr. Dalia M. Gil, Ph.D.
Chapter 4 With Question/Answer Animations. Section 4.1.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Greatest Common Divisors & Least Common Multiples  Definition 4 Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is.
Ref: Pfleeger96, Ch.31 Properties of Arithmetic Reference: Pfleeger, Charles P., Security in Computing, 2nd Edition, Prentice Hall, 1996.
Discrete Mathematics
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
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.
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
The Euclidean Algorithm
CS 210 Discrete Mathematics The Integers and Division (Section 3.4)
CSE15 Discrete Mathematics 03/15/17
COT 3100, Spring 2001 Applications of Discrete Structures
Integers and Division Section 3.4.
CMSC Discrete Structures
CSE 504 Discrete Mathematics & Foundations of Computer Science
Number Theory and Cryptography
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 3: Algorithms
Applied Discrete Mathematics Week 4: Number Theory
Applied Discrete Mathematics Week 4: Number Theory
Number Theory.
Foundations of Discrete Mathematics
Enough Mathematical Appetizers!
Week #5 – 23/25/27 September 2002 Prof. Marie desJardins
Copyright © Zeph Grunschlag,
Divisibility and Modular Arithmetic
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
Number Theory.
Number Theory and Cryptography
Presentation transcript:

CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston mgasto1@cs.umbc.edu http://www.csee.umbc.edu/~mgasto1/203

Integers Ch. 2.4-2.5

Division Let a and b be integers with a  0. Then a divides b if there is an integer c such that b = ac. When a divides b, a is called a factor of b and b is called a multiple of a. The notation a | b denotes a divides b.

Primes A positive integer p > 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 Theorem of Arithmetic Theorem: Every positive 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.

The Division Algorithm Theorem: 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. In the equality given in the above theorem, a is called the dividend,d is called the divisor, 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.

Greatest Common Divisor Let a and b be integers, but not both 0. The largest integer d such that d | a and d | b is called the greatest common divisor of a and b. [ gcd(a,b) ]

Least Common Multiple Let a and b be positive integers. The largest integer d such that a | d and b | d is called the least common multiple of a and b. [ lcm(a,b) ]

Modular Arithmetic If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m | (a – b). [ a  b (mod m) ]

Congruence Theorems Theorem: Let m be a positive integer. Then a  b (mod m) if and only if a mod m = b mod m. Theorem: Let m be a positive integer. Then a  b (mod m) if and only if there is an integer k such that a = b + km. Theorem: 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).

Base b Expansions Theorem: Let b be a positive integer greater than 1. Then if n is a positive integer, it can be expressed uniquely in the form n = akbk + ak-1bk-1 + . . . + a1b + a0, where k is a nonnegative integer, a0 , a1 , . . . , ak are Nonnegative integers less than b.

Constructing Base b Expansions procedure base b expansion (n:positive integer) q := n k := 0 while (q  0) begin ak := q mod b q :=  q / b  k := k + 1 end {the base b expansion of n is (ak-1 ak-2 . . . a1 a0 )b }

Addition of Integers procedure add (a,b:positive integers) c := 0 for j := 0 to n - 1 begin d :=  (aj + bj + c) / 2  sj := aj + bj + c - 2d c := d end sj := c {the binary expansion of the sum is (sn sn-1 . . . s0 )2 }

Multiplying Integers procedure multiply (a,b:positive integers) c := 0 for j := 0 to n - 1 begin if bj then cj := a shifted j places else cj := 0 end p := 0 for j := 0 to n – 1 p := p + cj {p is the value of ab }

Euclidean Algorithm Lemma: Let a = bq + r, where a, b, q, and r are integers. Then gcd(a, b) = gcd(b, r) procedure procedure (a,b:positive integers) x := a y := b while y  0 begin r := x mod y x := y y := r end { gcd(a, b) is x }