Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.

Slides:



Advertisements
Similar presentations
CS 202 Epp section ?? Aaron Bloomfield
Advertisements

1 Section 2.4 The Integers and Division. 2 Number Theory Branch of mathematics that includes (among other things): –divisibility –greatest common divisor.
CSE 311 Foundations of Computing I Lecture 13 Number Theory Autumn 2012 CSE
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.
The Fundamental Theorem of Arithmetic (2/12) Definition (which we all already know). A number greater than 1 is called prime if its only divisors are 1.
Quotient-Remainder Theory, Div and Mod
NUMBER THEORY Chapter 1: The Integers. The Well-Ordering Property.
Basic properties of the integers
Algebraic Structures DEFINITIONS: PROPERTIES OF BINARY OPERATIONS Let S be a set and let  denote a binary operation on S. (Here  does not necessarily.
Elementary Number Theory and Methods of Proof. Basic Definitions An integer n is an even number if there exists an integer k such that n = 2k. An integer.
Announcements: Homework 1 returned. Comments from Kevin? Homework 1 returned. Comments from Kevin? Matlab: tutorial available at
Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU.
Chapter II. THE INTEGERS
Set, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
Proofs, Recursion, and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2001 Lecture 7 Tuesday, 11/6/01 Number-Theoretic Algorithms Chapter.
1 Integers and Division CS/APMA 202 Rosen section 2.4 Aaron Bloomfield.
Set, Combinatorics, Probability & Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Set,
Properties of the Integers: Mathematical Induction
CSE 311 Foundations of Computing I Lecture 12 Primes, GCD, Modular Inverse Spring
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
CS555Spring 2012/Topic 61 Cryptography CS 555 Topic 6: Number Theory Basics.
Chapter Number Theory 4 4 Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
BY MISS FARAH ADIBAH ADNAN IMK
The Integers and Division
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.
Great Theoretical Ideas in Computer Science.
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.
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
1 Introduction to Abstract Mathematics Chapter 3: Elementary Number Theory and Methods of Proofs Instructor: Hayk Melikya Direct.
The Integers. The Division Algorithms A high-school question: Compute 58/17. We can write 58 as 58 = 3 (17) + 7 This forms illustrates the answer: “3.
Cyclic Groups (9/25) Definition. A group G is called cyclic if there exists an element a in G such that G =  a . That is, every element of G can be written.
CompSci 102 Discrete Math for Computer Science
MAT 320 Spring 2008 Section 1.2.  Start with two integers for which you want to find the GCD. Apply the division algorithm, dividing the smaller number.
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Chapter 2 (Part 1): The Fundamentals: Algorithms, the Integers & Matrices The Integers and Division (Section 2.4)
CSE 311: Foundations of Computing Fall 2014 Lecture 12: Primes, GCD.
Chapter 4 With Question/Answer Animations. Section 4.1.
MA/CSSE 473 Day 08 Extended Euclid's Algorithm Modular Division Fermat's little theorem.
Tuesday’s lecture: Today’s lecture: One-way permutations (OWPs)
Direct Proof and Counterexample III
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
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,
By: Katrina Carlsen and Melissa Sparow.  For every integer n ≥ 2, n is a prime number or can be written uniquely (ignoring ordering) as a product of.
Chapter 4 With Question/Answer Animations 1. Chapter Summary Divisibility and Modular Arithmetic - Sec 4.1 – Lecture 16 Integer Representations and 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.
CS480 Cryptography and Information Security
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
MA/CSSE 473 Day 07 Extended Euclid's Algorithm Modular Division Fermat's little theorem intro.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
CS 210 Discrete Mathematics The Integers and Division (Section 3.4)
Copyright © 2016, 2013, and 2010, Pearson Education, Inc.
Thinking Critically 4.1 Divisibility Of Natural Numbers
Greatest Common Divisor
CSE 311 Foundations of Computing I
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Applied Discrete Mathematics Week 4: Number Theory
Proofs, Recursion and Analysis of Algorithms
The Extended Euclidean Algorithm (2/10)
Direct Proof and Counterexample III
Copyright © 2013, 2010, and 2007, Pearson Education, Inc.
Applied Discrete Mathematics Week 10: Introduction to Counting
Number Theory.
From the last time: gcd(a, b) can be characterized in two different ways: It is the least positive value of ax + by where x and y range over integers.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Probability

Section 3.7Number Theory1 Fundamental Theorem of Arithmetic FUNDAMENTAL THEOREM OF ARITHMETIC For every integer n  2, n is a prime number or can be written uniquely (ignoring ordering) as a product of prime numbers. We ignore the order in which we write the factors: 2(3)(3) = 3(2)(3) If a and b are positive integers, then gcd(a,b) can always be written as a linear combination of a and b, that is, gcd(a,b) = ia + jb for some integers i and j. gcd(420,66) = 6 = 3(420)  19(66)

Section 3.7Number Theory2 Fundamental Theorem of Arithmetic The values 3 and 19 in gcd(420,66) = 3(420)  19(66) are derived from the successive divisions done by the Euclidean algorithm: 420 = 6 * = 2 * = 1 * = 3 * Rewriting the first three equations from the bottom up: 6 = 24 * = 66 * = 420 * Now we use these equations in a series of substitutions: 6 = 24  1 * 18 = 24  1 * (66  2 * 24) (substituting for 18) = 3 * 24  66 = 3 * (420  6 * 66)  66 (substituting for 24) = 3 * 420  19 * 66

Section 3.7Number Theory3 Fundamental Theorem of Arithmetic THEOREM ON gcd(a, b) Given positive integers a and b, gcd(a,b) is the linear combination of a and b that has the smallest positive value. From the theorem on gcd(a,b), it follows that a and b are relatively prime if and only if there exist integers i and j such that: ia + jb = 1 DEFINITION: RELATIVELY PRIME Two integers a and b are relatively prime if gcd(a,b) 1.

Section 3.7Number Theory4 Fundamental Theorem of Arithmetic THEOREM ON DIVISION BY PRIME NUMBERS Let p be a prime number such that p  ab, where a and b are integers. Then, either p  a or p  b. To find the unique factorization of 825 as a product of primes, we can start by simply dividing 825 by successively larger primes: 825 = 3 * 275 = 3 * 5 * 55 = 3 * 5 * 5 * 11 = 3 * 5 2 * 11 Doing the same on 455: 455 = 5 * 7 * 13 From these factorizations, we can see that gcd(825, 455) = 5.

Section 3.7Number Theory5 More on Prime Numbers THEOREM ON SIZE OF PRIME FACTORS If n is a composite number, then it has a prime factor less than or equal to (n) 1/2. Given n = 1021, let’s find the prime factors of n or determine that n is prime. The value of (1021) 1/2 is just less than 32. So the primes we need to test are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31. None divides 1021, so 1021 is prime.

Section 3.7Number Theory6 More on Prime Numbers THEOREM ON INFINITY OF PRIMES (EUCLID) There is an infinite number of prime numbers. Assume that there is a finite number of primes. Let the value of s = the sum of all primes + 1. Therefore, s is not prime. Thus, s is composite and by the fundamental theorem of arithmetic, s can be factored as a product of (some of) the prime numbers. Suppose that p j is one of the prime factors of s, that is, s = p j (m) for some integer m. Then: 1 = s – p 1 p 2 … p k = p j (m)  p 1 p 2 … p k = p j (m  p 1 … p j  1 p j + 1 …p k ) Therefore, p j  1, which is a contradiction.

Section 3.7Number Theory7 Euler Phi Function DEFINITION: EULER PHI FUNCTION For n an integer, n  2, the Euler (pronounced “oiler”) phi function of n,  (n), is the number of positive integers less than or equal to n and relatively prime to n. (  (n) is pronounced “fee” of n.) For example:  (2) = 1 (the number 1)  (3) = 2 (the numbers 1, 2)  (4) = 2 (the numbers 1, 3)  (5) = 4 (the numbers 1, 2, 3, 4)  (6) = 2 (the numbers 1, 5)  (7) = 6 (the numbers 1, 2, 3, 4, 5, 6)