Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof. Harper Langston New York University

Similar documents
Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

The last three chapters introduced three major proof techniques: direct,

Homework until Test #2

Today s Topics. Primes & Greatest Common Divisors

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Section 4.2: The Division Algorithm and Greatest Common Divisors

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

MATH 289 PROBLEM SET 4: NUMBER THEORY

8 Primes and Modular Arithmetic

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

GREATEST COMMON DIVISOR

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

PROBLEM SET 6: POLYNOMIALS

Handout #1: Mathematical Reasoning

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

8 Divisibility and prime numbers

SECTION 10-2 Mathematical Induction

Solutions for Practice problems on proofs

Chapter 11 Number Theory

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Continued Fractions and the Euclidean Algorithm

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Integer roots of quadratic and cubic polynomials with integer coefficients

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

MACM 101 Discrete Mathematics I

Handout NUMBER THEORY

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

9. POLYNOMIALS. Example 1: The expression a(x) = x 3 4x 2 + 7x 11 is a polynomial in x. The coefficients of a(x) are the numbers 1, 4, 7, 11.

Number Theory: A Mathemythical Approach. Student Resources. Printed Version

11 Ideals Revisiting Z

Lecture 13 - Basic Number Theory.

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Factoring Algorithms

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

Chapter 3. if 2 a i then location: = i. Page 40

mod 10 = mod 10 = 49 mod 10 = 9.

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

5-1 NUMBER THEORY: DIVISIBILITY; PRIME & COMPOSITE NUMBERS 210 f8

Factoring & Primality

Elementary Number Theory

The Division Algorithm for Polynomials Handout Monday March 5, 2012

Lecture 13: Factoring Integers

Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

Basic Algorithms In Computer Algebra

Theorem3.1.1 Thedivisionalgorithm;theorem2.2.1insection2.2 If m, n Z and n is a positive

CONTINUED FRACTIONS AND FACTORING. Niels Lauritzen

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

Computer and Network Security

Integer Factorization using the Quadratic Sieve

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

Factoring Polynomials

Math Workshop October 2010 Fractions and Repeating Decimals

An Introductory Course in Elementary Number Theory. Wissam Raji

The Euclidean Algorithm

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

4.2 Euclid s Classification of Pythagorean Triples

March 29, S4.4 Theorems about Zeros of Polynomial Functions

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

Congruent Number Problem

Public Key Cryptography: RSA and Lots of Number Theory

MATH 537 (Number Theory) FALL 2016 TENTATIVE SYLLABUS

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov

Cryptography and Network Security Chapter 8

Properties of Real Numbers

Applications of Fermat s Little Theorem and Congruences

SOLUTIONS FOR PROBLEM SET 2

SUM OF TWO SQUARES JAHNAVI BHASKAR

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

k, then n = p2α 1 1 pα k

z 0 and y even had the form

TEXAS A&M UNIVERSITY. Prime Factorization. A History and Discussion. Jason R. Prince. April 4, 2011

An Innocent Investigation

RSA and Primality Testing

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

Introduction. Appendix D Mathematical Induction D1

Settling a Question about Pythagorean Triples

Grade 7/8 Math Circles Fall 2012 Factors and Primes

The Fundamental Theorem of Arithmetic

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

6.2 Permutations continued

MATH10040 Chapter 2: Prime and relatively prime numbers

Unique Factorization

Revised Version of Chapter 23. We learned long ago how to solve linear congruences. ax c (mod m)

Computing exponents modulo a number: Repeated squaring

s = s = s =

Math 3000 Section 003 Intro to Abstract Math Homework 2

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

5. Factoring by the QF method

Math 453: Elementary Number Theory Definitions and Theorems

On Generalized Fermat Numbers 3 2n +1

Not for resale. 4.1 Divisibility of Natural Numbers 4.2 Tests for Divisibility 4.3 Greatest Common Divisors and Least Common Multiples

I. Introduction. MPRI Cours Lecture IV: Integer factorization. What is the factorization of a random number? II. Smoothness testing. F.

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

Introduction to Modern Algebra

Transcription:

Discrete Mathematics Lecture 3 Elementary Number Theory and Methods of Proof Harper Langston New York University

Proof and Counterexample Discovery and proof Even and odd numbers number n from Z is called even if k Z, n = 2k number n from Z is called odd if k Z, n = 2k + 1 Prime and composite numbers number n from Z is called prime if r, s Z, n = r * s r = 1 s = 1 number n from Z is called composite if r, s Z, n = r * s r > 1 s > 1

Proving Statements Constructive proofs for existential statements Example: Show that there is a prime number that can be written as a sum of two perfect squares Universal statements: method of exhaustion and generalized proof Direct Proof: Express the statement in the form: x D, P(x) Q(x) Take an arbitrary x from D so that P(x) is true Show that Q(x) is true based on previous axioms, theorems, P(x) and rules of valid reasoning

Proof Show that if the sum of any two integers is even, then so is their difference Common mistakes in a proof Arguing from example Using the same symbol for different variables Jumping to a conclusion Begging the question

Counterexample To show that the statement in the form x D, P(x) Q(x) is not true one needs to show that the negation, which has a form x D, P(x) ~Q(x) is true. x is called a counterexample. Famous conjectures: Fermat big theorem: there are no non-zero integers x, y, z such that x n + y n = z n, for n > 2 Goldbach conjecture: any even integer can be represented as a sum of two prime numbers Euler s conjecture: no three perfect fourth powers add up to another perfect fourth power

Exercises Any product of four consecutive integers is one less than a perfect square To check that an integer is a prime it is sufficient to check that n is not divisible by any prime less than or equal to n If p is a prime, is 2 p 1 a prime too? Does 15x 3 + 7x 2 8x 27 have an integer zero?

Rational Numbers Real number r is called rational if p,q Z, r = p / q All real numbers which are not rational are called irrational Is 0.121212 a rational number Every integer is a rational number Sum of any two rational numbers is a rational number

Divisibility Integer n is a divisible by an integer d, when k Z, n = d * k Notation: d n Synonymous statements: n is a multiple of d d is a factor of n d is a divisor of n d divides n

Divisibility Divisibility is transitive: for all integers a, b, c, if a divides b and b divides c, then a divides c Any integer greater than 1 is divisible by a prime number If a b and b a, does it mean a = b? Any integer can be uniquely represented in the standard factored form: n = p 1 e 1 * p 2 e 2 * * p k e k, p 1 < p 2 < < p k, p i is a prime number

Exercises Prove or provide counterexample: For integers a, b, c: (a b) (a bc) For integers a, b, c: (a (b + c)) (a b a c) If 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * m = 151 * 150 * 149 * 148 * 147 * 146 * 145 * 144 * 143, does 151 m? Show that an integer is divisible by 9 iff the sum of its digits is divisible by 9. Prove the same for divisibility by 3. Show that an integer is divisible by 11 iff the alternate sum of its digits is divisible by 11

Quotient and Remainder Given any integer n and positive integer d, there exist unique integers q and r, such that n = d * q + r and 0 r < d Operations: div quotient, mod remainder Parity of an integer refers to the property of an integer to be even or odd Any two consecutive integers have opposite parity The square of an odd integer has reminder 1 when divided by 8 (read in book)

Exercises Show that a product of any four consecutive integers is divisible by 8 Show that the sum of any four consecutive integers is never divisible by 4 Show that any prime number greater than 3 has remainder 1 or 5 when divided by 6

Floor and Ceiling For any real number x, the floor of x, written x, is the unique integer n such that n x < n + 1. It is the max of all ints x. For any real number x, the ceiling of x, written x, is the unique integer n such that n 1 < x n. What is n? If x is an integer, what are x and x + 1/2? Is x + y = x + y? For all real numbers x and all integers m, x + m = x + m For any integer n, n/2 is n/2 for even n and (n 1)/2 for odd n For positive integers n and d, n = d * q + r, where d = n / d and r = n d * n / d with 0 r < d

Exercises Is it true that for all real numbers x and y: x y = x - y x 1 = x - 1 x + y = x + y x + 1 = x + 1 Show that for all real x, x/2 /2 = x/4

Contradiction Proof by contradiction Suppose the statement to be proved is false Show that this supposition leads logically to a contradiction Conclude that the statement to be proved is true The sum of any rational number and any irrational number is irrational

Contraposition Proof by contraposition Prepare the statement in the form: x D, P(x) Q(x) Rewrite this statement in the form: x D, ~Q(x) ~P(x) Prove the contrapositive by a direct proof For any integer, if n 2 is even then n is even Close relationship between proofs by contradiction and contraposition

Exercise Show that for integers n, if n 2 is odd then n is odd Show that for all integers n and all prime numbers p, if n 2 is divisible by p, then n is divisible by p For all integers m and n, if m+n is even then m and n are both even or m and n are both odd The product of any non-zero rational number and any irrational number is irrational If a, b, and c are integers and a 2 +b 2 =c 2, must at least one of a and b be even? Can you find two irrational numbers so that one raised to the power of another would produce a rational number?

Classic Number Theory Results Square root of 2 is irrational For any integer a and any integer k > 1, if k a, then k does not divide (a + 1) The set of prime numbers is infinite

Exercises Show that a square of 3 is irrational for any integer a, 4 does not divide (a 2 2) if n is not a perfect square then its square is irrational 2 + 3 is irrational log 2 (3) is irrational every integer greater than 11 is a sum of two composite numbers if p 1, p 2,, p n are distinct prime numbers with p 1 = 2, then p 1 p 2 p n + 1 has remainder 3 when divided by 4 for all integers n, if n > 2, then there exists prime number p, such that n < p < n!

Algorithms Algorithm is step-by-step method for performing some action Cost of statements execution Simple statements Conditional statements Iterative statements

Division Algorithm Input: integers a and d Output: quotient q and remainder r Body: r = a; q = 0; while (r >= d) r = r d; q = q + 1; end while

Greatest Common Divisor The greatest common divisor of two integers a and b is another integer d with the following two properties: d a and d b if c a and c b, then c d Lemma 1: gcd(r, 0) = r Lemma 2: if a = b * q + r, then gcd(a, b) = gcd(b, r)

Euclidean Algorithm Input: integers a and b Output: greatest common divisor gcd Body: r = b; while (b > 0) r = a mod b; a = b; b = r; end while gcd = a;

Exercise Least common multiple: lcm Prove that for all positive integers a and b, gcd(a, b) = lcm(a, b) iff a = b