Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Similar documents
Math.3336: Discrete Mathematics. Primes and Greatest Common Divisors

Math.3336: Discrete Mathematics. Mathematical Induction

Math.3336: Discrete Mathematics. Cardinality of Sets

Math.3336: Discrete Mathematics. Chapter 9 Relations

Math.3336: Discrete Mathematics. Propositional Equivalences

Math.3336: Discrete Mathematics. Combinatorics: Basics of Counting

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Math.3336: Discrete Mathematics. Proof Methods and Strategy

Math.3336: Discrete Mathematics. Advanced Counting Techniques

Math.3336: Discrete Mathematics. Nested Quantifiers

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

MATH 433 Applied Algebra Lecture 4: Modular arithmetic (continued). Linear congruences.

Integers and Division

4 Number Theory and Cryptography

3 The fundamentals: Algorithms, the integers, and matrices

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

COMP Intro to Logic for Computer Scientists. Lecture 15

Review. CS311H: Discrete Mathematics. Number Theory. Computing GCDs. Insight Behind Euclid s Algorithm. Using this Theorem. Euclidian Algorithm

Introduction to Sets and Logic (MATH 1190)

This exam contains 5 pages (including this cover page) and 4 questions. The total number of points is 100. Grade Table

Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

MATH 501 Discrete Mathematics. Lecture 6: Number theory. German University Cairo, Department of Media Engineering and Technology.

Ma/CS 6a Class 2: Congruences

COT 3100 Applications of Discrete Structures Dr. Michael P. Frank

Ma/CS 6a Class 1. Course Details

CS March 17, 2009

Introduction Integers. Discrete Mathematics Andrei Bulatov

NOTES ON SIMPLE NUMBER THEORY

Introduction to Number Theory. The study of the integers

For your quiz in recitation this week, refer to these exercise generators:

MATH 361: NUMBER THEORY FOURTH LECTURE

A Readable Introduction to Real Mathematics

Number Theory. Modular Arithmetic

Notes on Systems of Linear Congruences

CSE 311: Foundations of Computing. Lecture 10: Set Operations & Representation, Modular Arithmetic

Public Key Cryptography

ECE 646 Lecture 5. Motivation: Mathematical Background: Modular Arithmetic. Public-key ciphers. RSA keys. RSA as a trap-door one-way function

Ma/CS 6a Class 3: The RSA Algorithm

CS 5319 Advanced Discrete Structure. Lecture 9: Introduction to Number Theory II

CSE 311 Lecture 11: Modular Arithmetic. Emina Torlak and Kevin Zatloukal

Ma/CS 6a Class 2: Congruences

MONOALPHABETIC CIPHERS AND THEIR MATHEMATICS. CIS 400/628 Spring 2005 Introduction to Cryptography

Introduction to Cryptography CS 355 Lecture 3

Lecture 5: Arithmetic Modulo m, Primes and Greatest Common Divisors Lecturer: Lale Özkahya

basics of security/cryptography

Number Theory. CSS322: Security and Cryptography. Sirindhorn International Institute of Technology Thammasat University CSS322. Number Theory.

Topics in Cryptography. Lecture 5: Basic Number Theory

CS483 Design and Analysis of Algorithms

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

NET 311D INFORMATION SECURITY

MAT246H1S - Concepts In Abstract Mathematics. Solutions to Term Test 1 - February 1, 2018

Lecture 3.1: Public Key Cryptography I

Discrete Mathematics GCD, LCM, RSA Algorithm

CSE 311 Lecture 13: Primes and GCD. Emina Torlak and Kevin Zatloukal

CPSC 467: Cryptography and Computer Security

Wednesday, February 21. Today we will begin Course Notes Chapter 5 (Number Theory).

Basic elements of number theory

Basic elements of number theory

Course 2BA1: Trinity 2006 Section 9: Introduction to Number Theory and Cryptography

Introduction to Cryptography. Lecture 6

The set of integers will be denoted by Z = {, -3, -2, -1, 0, 1, 2, 3, 4, }

CPSC 467b: Cryptography and Computer Security

CIS 6930/4930 Computer and Network Security. Topic 5.1 Basic Number Theory -- Foundation of Public Key Cryptography

Elementary Number Theory MARUCO. Summer, 2018

MTH 310, Section 001 Abstract Algebra I and Number Theory. Sample Midterm 1

WORKSHEET MATH 215, FALL 15, WHYTE. We begin our course with the natural numbers:

CISC-102 Fall 2017 Week 6

INTEGERS. In this section we aim to show the following: Goal. Every natural number can be written uniquely as a product of primes.

Wilson s Theorem and Fermat s Little Theorem

CSE 20 DISCRETE MATH. Winter

Ch 4.2 Divisibility Properties

Number Theory Notes Spring 2011

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

With Question/Answer Animations. Chapter 4

Course MA2C02, Hilary Term 2013 Section 9: Introduction to Number Theory and Cryptography

CSE 311: Foundations of Computing. Lecture 10: Set Operations & Representation, Modular Arithmetic

Senior Math Circles Cryptography and Number Theory Week 2

The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and )

Final Exam Math 105: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 30 April :30 11:00 a.m.

Outline. Some Review: Divisors. Common Divisors. Primes and Factors. b divides a (or b is a divisor of a) if a = mb for some m

Outline. AIT 682: Network and Systems Security. GCD and Euclid s Algorithm Modulo Arithmetic Modular Exponentiation Discrete Logarithms

Discrete mathematics I - Number theory

MATH 2112/CSCI 2112, Discrete Structures I Winter 2007 Toby Kenney Homework Sheet 5 Hints & Model Solutions

Number Theory and Group Theoryfor Public-Key Cryptography

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

Carmen s Core Concepts (Math 135)

2x 1 7. A linear congruence in modular arithmetic is an equation of the form. Why is the solution a set of integers rather than a unique integer?

Proof 1: Using only ch. 6 results. Since gcd(a, b) = 1, we have

Chapter 3 Basic Number Theory

Encryption: The RSA Public Key Cipher

MATH 215 Final. M4. For all a, b in Z, a b = b a.

Part IA Numbers and Sets

CPSC 467b: Cryptography and Computer Security

Fundamentals of Mathematics (MATH 1510)

MATH 2200 Final Review

Notes. Number Theory: Applications. Notes. Number Theory: Applications. Notes. Hash Functions I

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

Elementary Number Theory Review. Franz Luef

ECE596C: Handout #11

Transcription:

Math.3336: Discrete Mathematics Primes and Greatest Common Divisors Instructor: Dr. Blerina Xhabli Department of Mathematics, University of Houston https://www.math.uh.edu/ blerina Email: blerina@math.uh.edu Fall 2018 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 1/16

Assignments to work on Homework #5 due Wednesday, 10/03, 11:59pm Homework #6 due Friday, 10/12, 11:59pm No credit unless turned in by 11:59pm on due date Late submissions not allowed, but lowest homework score dropped when calculating grades Homework will be submitted online in your CASA accounts. You can find the instructions on how to upload your homework in our class webpage. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 2/16

Chapter 4 Introduction Number theory is the branch of mathematics that deals with integers and their properties Number theory has a number of applications in computer science, esp. in modern cryptography This lecture: Important results in number theory Next lecture: Continue discussion of number theory, look at applications of number theory in cryptography Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 3/16

Chapter 4 Number Theory and Cryptography Chapter 4 Overview Divisibility and Modular Arithmetic Section 4.1 Integer Representations and Algorithms Section 4.2 Primes and Greatest Common Divisors Section 4.3 Solving Congruences Section 4.4 Applications of Congruences Section 4.5 (we skip it) Cryptography Section 4.6 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 4/16

A review on Divisibility and Congruence Modulo Given two integers a and b where a 0, we say a divides b if there is an integer c such that b = ac If a divides b, we write a b; otherwise, a b If a b, a is called a factor of b and b is called a multiple of a. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 5/16

Properties of Divisibility Theorem 1: If a b and a c, then a (b + c) Theorem 2: If a b, then a bc for all integers c Theorem 3: If a b and b c, then a c Theorem 4 If a b and a c, then a (mb + nc) Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 6/16

The Division Theorem Division theorem: Let a be an integer, and d a positive integer. Then, there are unique integers q, r with 0 r < d such that a = dq + r Here, d is called divisor, and a is called dividend q is the quotient, and r is the remainder. We use the r = a mod d notation to express the remainder The notation q = a div d expresses the quotient Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 7/16

Congruence Modulo a and b are congruent modulo m, a b (mod m) if and only if m (a b) Theorem: a b (mod m) iff a mod m = b mod m If a b (mod m) and c d (mod m) and k Z, then a + c b + d (mod m) a c b d (mod m) ac bd (mod m) a + k b + k (mod m) ak bk (mod m) Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 8/16

Shift Ciphers (a glimpse from Section 4.6) First, let s number letters A-Z with 0 25 Represent message with sequence of numbers Example: The sequence 25 0 2 represents ZAC To encrypt, apply encryption function f defined as: f (x) = (x + k) mod 26 Because f is bijective, its inverse yields decryption function: f 1 (x) = (x k) mod 26 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 9/16

Ciphers and Congruence Modulo Shift cipher is a very primitive and insecure cipher because very easy to infer what k is But contains some useful ideas: Encoding words as sequence of numbers Use of modulo operator Modern encryption schemes much more sophisticated, but also share these principles More on this next lecture! Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 10/16

Section 4.3 Prime Numbers A positive integer p that is greater than 1 and divisible only by 1 and itself is called a prime number. First few primes: 2, 3, 5, 7, 11,... A positive integer that is greater than 1 and that is not prime is called a composite number Example: 4, 6, 8, 9,... Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 11/16

Fundamental Theorem of Arithmetic Fundamental Thm: Every positive integer greater than 1 is either prime or can be written uniquely as a product of primes. This unique product of prime numbers for x is called the prime factorization of x Examples: 12 = 2 2 3 21 = 3 7 99 = 3 3 11 Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 12/16

Determining Prime-ness In many applications, such as crypto, important to determine if a number is prime following thm is useful for this: Theorem: If n is composite, then it has a prime divisor less than or equal to n Proof: Since n is composite, it can be written as n = ab where a > 1 and b > 1. For contradiction, suppose neither a nor b are n, i.e., a > n, b > n Then, n = ab > n 2 = n, a contradiction. Hence, either a n, or b n, and by the Fundamental Thm, is either itself a prime or has a factor less than itself. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 13/16

Consequence of This Theorem Theorem: If n is composite, then it has a prime divisor n Corollary: If n does not have a prime divisor n, then n is prime. Thus, to determine if n is prime, only need to check if it is divisible by primes n Example: Show that 101 is prime Since 101 < 11, only need to check if it is divisible by 2, 3, 5, 7. Since it is not divisible by any of these, we know it is prime. Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 14/16

Infinitely Many Primes Theorem: There are infinitely many prime numbers. Proof: (by contradiction) Suppose there are finitely many primes: p 1, p 2,..., p n Now consider the number Q = p 1 p 2... p n + 1. Q is either prime or composite Case 1: Q is prime. We get a contradiction, because we assumed only prime numbers are p 1,..., p n Case 2: Q is composite. In this case, Q can be written as product of primes. But Q is not divisible by any of p 1, p 2,..., p n Hence, by Fundamental Thm, not composite Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 15/16

A Word about Prime Numbers and Cryptography Prime numbers play a key role in modern cryptography Modern cryptography techniques rely on prime numbers to encrypt messages Security of encryption relies on prime factorization being intractable for sufficiently large numbers Instructor: Dr. Blerina Xhabli, University of Houston Math.3336: Discrete Mathematics Primes and Greatest Common Divisors 16/16