Introduction to Sets and Logic (MATH 1190)

Similar documents
With Question/Answer Animations. Chapter 4

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

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

COMP239: Mathematics for Computer Science II. Prof. Chadi Assi EV7.635

Proofs. Methods of Proof Divisibility Floor and Ceiling Contradiction & Contrapositive Euclidean Algorithm. Reading (Epp s textbook)

Number theory. Myrto Arapinis School of Informatics University of Edinburgh. October 9, /29

Integers and Division

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

Ch 4.2 Divisibility Properties

Introduction Integers. Discrete Mathematics Andrei Bulatov

CSE 20 DISCRETE MATH. Winter

4 Number Theory and Cryptography

3 The fundamentals: Algorithms, the integers, and matrices

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

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

Exercises Exercises. 2. Determine whether each of these integers is prime. a) 21. b) 29. c) 71. d) 97. e) 111. f) 143. a) 19. b) 27. c) 93.

Ma/CS 6a Class 2: Congruences

Section Summary. Division Division Algorithm Modular Arithmetic

Notes on Systems of Linear Congruences

Number Theory and Cryptography

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?

NOTES ON SIMPLE NUMBER THEORY

Number Theory Proof Portfolio

8 Primes and Modular Arithmetic

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

M381 Number Theory 2004 Page 1

An Algorithm for Prime Factorization

Chapter 3 Basic Number Theory

4 Powers of an Element; Cyclic Groups

4.3 - Primes and Greatest Common Divisors

Small gaps between prime numbers

CISC-102 Fall 2017 Week 6

Algorithmic number theory. Questions/Complaints About Homework? The division algorithm. Division

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

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?

Direct Proof MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Direct Proof Fall / 24

a the relation arb is defined if and only if = 2 k, k

1 Overview and revision

Mat Week 8. Week 8. gcd() Mat Bases. Integers & Computers. Linear Combos. Week 8. Induction Proofs. Fall 2013

Discrete Structures Lecture Primes and Greatest Common Divisor

Student Responsibilities Week 8. Mat Section 3.6 Integers and Algorithms. Algorithm to Find gcd()

1. multiplication is commutative and associative;

Applied Cryptography and Computer Security CSE 664 Spring 2017

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

Number Theory and Group Theoryfor Public-Key Cryptography

Lecture 4: Number theory

Chapter 2. Divisibility. 2.1 Common Divisors

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

Sets. We discuss an informal (naive) set theory as needed in Computer Science. It was introduced by G. Cantor in the second half of the nineteenth

4.4 Solving Congruences using Inverses

Part V. Chapter 19. Congruence of integers

Chapter V. Theory of the Integers. Mathematics is the queen of the sciences and number theory is the queen of mathematics. Carl Friedrich Gauss

Introduction to Number Theory. The study of the integers

Chapter 5. Number Theory. 5.1 Base b representations

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

Ma/CS 6a Class 2: Congruences

NOTES ON INTEGERS. 1. Integers

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

CS March 17, 2009

3 The Fundamentals:Algorithms, the Integers, and Matrices

Number theory (Chapter 4)

Elementary Number Theory

A Readable Introduction to Real Mathematics

CMPUT 403: Number Theory

11 Division Mod n, Linear Integer Equations, Random Numbers, The Fundamental Theorem of Arithmetic

Introduction to Cryptography CS 355 Lecture 3

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

The following is an informal description of Euclid s algorithm for finding the greatest common divisor of a pair of numbers:

Elementary Number Theory

LECTURE 1: DIVISIBILITY. 1. Introduction Number theory concerns itself with studying the multiplicative and additive structure of the natural numbers

Summary Slides for MATH 342 June 25, 2018

ECE 646 Lecture 5. Mathematical Background: Modular Arithmetic

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Introduction to Number Theory

Math 131 notes. Jason Riedy. 6 October, Linear Diophantine equations : Likely delayed 6

An integer p is prime if p > 1 and p has exactly two positive divisors, 1 and p.

Beautiful Mathematics

Lecture 2. The Euclidean Algorithm and Numbers in Other Bases

2 Elementary number theory

Math Circle Beginners Group February 28, 2016 Euclid and Prime Numbers Solutions

Number Theory Solutions Packet

5: The Integers (An introduction to Number Theory)

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

PROBLEMS ON CONGRUENCES AND DIVISIBILITY

Lecture Notes. Advanced Discrete Structures COT S

4. Number Theory (Part 2)

Number Theory. Henry Liu, 6 July 2007

18 Divisibility. and 0 r < d. Lemma Let n,d Z with d 0. If n = qd+r = q d+r with 0 r,r < d, then q = q and r = r.

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Number Theory. Zachary Friggstad. Programming Club Meeting

Wilson s Theorem and Fermat s Little Theorem

Elementary Algebra Chinese Remainder Theorem Euclidean Algorithm

Homework #2 solutions Due: June 15, 2012

MATH 145 Algebra, Solutions to Assignment 4

PMATH 340 Lecture Notes on Elementary Number Theory. Anton Mosunov Department of Pure Mathematics University of Waterloo

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

Number Theory Basics Z = {..., 2, 1, 0, 1, 2,...} For, b Z, we say that divides b if z = b for some. Notation: b Fact: for all, b, c Z:

Algorithms CMSC Basic algorithms in Number Theory: Euclid s algorithm and multiplicative inverse

Direct Proof Divisibility

cse547, math547 DISCRETE MATHEMATICS Professor Anita Wasilewska

Transcription:

Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Nov 13, 2014

Quiz announcement The second quiz will be held on Thursday, Nov 20, 9-10 pm in class. The contents in our lecture notes from Oct 9 to Nov 13 will be covered. Relevant material in textbook is: Section 2.1-2.5 (70%), Section 4.1 and 4.3 (30%). Tips for quiz preparation: focus on lecture notes and recommended exercises. All the rules are the same as Quiz 1. Please check the lecture note on Oct 9 for details.

Number theory Number theory is a branch of pure mathematics devoted primarily to the study of the integers. The basic notions of this chapter are divisibility and prime numbers. Number theory is known as The Queen of Mathematics because of its foundational place and and its wealth of open problems.

Outline 1 2 3

Division Definition Let a and b be integers with a 0. If c Z(b = ac), then we say a divides b, or a is a factor of b, or a is a divisor of b, or b is divisible by a, or b is a multiple of a, and denote it by a b. We write a b if a does not divide b. As a simple example, 3 12 but 3 7.

Properties of divisibility Theorem Let a, b, c be integers and a 0. (i) If a b and a c, then a (b + c). (ii) If a b, then a bc for all integers c. (iii) If a b and b c, then a c.

Properties of divisibility Proof. (i) If a b and a c, then there are integers s and t with b = as and c = at. Thus b + c = as + at = a(s + t), and it follows that a (b + c). (ii) If a b, then there is an integer s with b = as. For any integer c, by bc = asc = a(sc) we have a bc.

Properties of divisibility (iii) If a b and b c, then there are integers s and t with b = as and c = bt. Thus and consequently a c. c = bt = ast = a(st),

Properties of divisibility Corollary Let a, b, c be integers and a 0. If a b and a c, then a (mb + nc) for all integers m, n.

Properties of divisibility Proof. If a b and a c, then for all integers m, n, a mb and a nc. It follows that a (mb + nc).

The division algorithm The following theorem can be proved using the well-ordering property of nonnegative integers introduced in Section 5.2. Theorem (The division algorithm) 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 this case, d is called the divisor; a is called the dividend; q is called the quotient; r is called the remainder.

The division algorithm Example When 101 is divided by 11, the quotient is 9 and the remainder is 2, i.e., 101 = 11 9 + 2. When 11 is divided by 3, the quotient is 4 and the remainder is 1, i.e., 11 = 3( 4) + 1.

The division algorithm Remark The remainder cannot be negative. Although 11 = 3( 3) 2, we cannot say the quotient when 11 is divided by 3 is 4 with the remainder 2. d a if and only if the remainder is zero when a is divided by d.

Congruence relation Definition If a and b are integers and m is a positive integer, then a is congruent to b modulo m, denoted by a b (mod m), if m (a b). a b (mod m) is a congruence and m is its modulus (plural moduli). a b (mod m) if and only if they have the same remainder when divided by m. We write a b (mod m) if a is not congruent to b modulo m. As a simple example, 17 5 (mod 6) but 24 14 (mod 6).

Properties of congruence relations 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.

Properties of congruence relations Proof. : If a b (mod m), then m (a b), and thus there is some integer k such that a b = km, i.e., a = b + km. : If a = b + km for some integer k, then km = a b, and it follows that m (a b), which means a b (mod m).

Properties of congruence relations 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).

Properties of congruence relations Proof. Since a b (mod m) and c d (mod m), there are integers s and t with b = a + sm and d = c + tm. It follows that b + d = (a + sm) + (c + tm) = (a + c) + m(s + t) and bd = (a + sm)(c + tm) = ac + m(at + cs + stm). The conclusion thus follows.

Examples of congruence relations Example From 7 2 (mod 5) and 11 1 (mod 5) we have 18 3 (mod 5) and 77 2 (mod 5).

Examples of congruence relations Remark It follows immediately from the above theorem that a b (mod m) implies ac bc (mod m) for any integer c. However, ac bc (mod m) does not imply a b (mod m). For example, 4 8 (mod 4) but 2 4 (mod 4). a b (mod m) and c d (mod m) does not imply a c b d (mod m). For example, 3 3 (mod 5), 1 6 (mod 5), but 3 1 3 6 (mod 5).

Outline 1 2 3

Definition A positive integer p greater than 1 is called prime if the only positive factors of p are 1 and p. Otherwise, p is called composite.

The fundamental theorem of arithmetic We present the following important fundamental theorem of arithmetic, also called the unique factorization theorem. It can be proved using strong induction introduced in Section 5.2. Theorem (The fundamental theorem of arithmetic) 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. In other words, every positive integer greater than 1 has a unique prime factorization.

The fundamental theorem of arithmetic Example The prime factorizations of some integers are shown below. 100 = 2 2 5 2. 641 = 641. 999 = 3 3 37. 1024 = 2 10.

Trial Division Theorem If n is a composite integer, then n has a prime divisor less than or equal to n.

Trial Division Proof. Suppose that n = ab for some 1 < a < n, then either a n or b n; otherwise, one would have ab > n n = n, which is a contradiction. Since both a and b divide n, n must have a prime divisor less than or equal to n.

Trial Division Example 167 is a prime. Since the only primes not exceeding 167 are 2, 3, 5, 7, 11 (because 13 2 = 169 > 167), and none of them is a divisor of 167, it follows that 167 is a prime.

The infinitude of primes Theorem There are infinitely many primes.

The infinitude of primes Proof. Assume that there are only finitely many primes p 1, p 2,..., p n. Let Q = p 1 p 2... p n + 1, then none of the prime numbers p 1, p 2,..., p n divides Q. Therefore, either Q is a prime number or there is another prime number q that divides Q. Both cases contradict to the assumption that all the prime numbers are in the list p 1, p 2,..., p n.

Conjectures about primes Number theory may be the only branch in modern mathematics that allows ordinary people understand what the hell are the mathematicians doing? There is a list of well-known unsolved problems in mathematics on wikipedia: http://en.wikipedia.org/wiki/list_of_ unsolved_problems_in_mathematics You would be a genius if you understand the meaning of a problem in any section except Number theory.

Conjectures about primes Example (Arbitrarily long arithmetic progressions of primes) For every positive integer n, there is an arithmetic progression of length n made up entirely of primes. For example, 3, 7, 11 is such an arithmetic progression of length 3, and 5, 11, 17, 23, 29 is such an arithmetic progression of length 5. This conjecture is solved by Ben Green and Terence Tao in a joint paper The primes contain arbitrarily long arithmetic progressions in 2004, and is now known as the Green-Tao theorem. Tao was awarded a fields medal in 2006.

Conjectures about primes Example (Goldbach s Conjecture) Every even integer greater than 2 is the sum of two primes. For example, 6 = 3 + 3, 20 = 3 + 17, 100 = 17 + 83, and so on.

Conjectures about primes In the 20th century, in order to solve this conjecture, the number theorists studied the m + n problem: to prove that every even integer greater than 2 can be written as the sum of two integers, one of which is the product of at most m primes, and the other is the product of at most n primes. Then the Goldbach s conjecture is exactly 1 + 1. In 1966, Jingrun Chen proved 1 + 2 : every even integer greater than 2 can be written as the sum of a prime and the product of at most two primes. However, 1 + 1 remains an open problem until now.

Conjectures about primes Example (The Twin Prime Conjecture) There are infinitely many twin primes, i.e., pairs of primes of the form (n, n + 2). For example, 3 and 5, 11 and 13, 4967 and 4969.

Conjectures about primes A prime gap is the difference between two successive prime numbers. The n-th prime gap, denoted by g n, is the difference between the (n + 1)-th prime and the n-th prime, i.e., g n = p n+1 p n. The twin prime conjecture asserts exactly that g n = 2 for infinitely many integers n.

Conjectures about primes The strongest result proved concerning twin primes is that there exists a finite bound for prime gaps. This is proved by Yitang Zhang in his paper in 2013, who showed that Bounded gaps between primes There are infinitely many g n s that do not exceed 70 million. The bound 70 million has been reduced to 246 by refining Zhang s method in April 2014. Note: In Example 9 on Page 264 of the textbook, the strongest result proved concerning twin primes is that... is an out-of-date information, since this book was published in 2011, two years before the publication of Zhang s work.

Outline 1 2 3

common divisors Definition Let a and b be integers, not both zero. The largest integer d such that d a and d b is called the greatest common divisor of a and b, denoted by gcd(a, b). a and b are called relatively prime if gcd(a, b) = 1.

Examples of greatest common divisors Example Since 120 = 2 3 3 5 and 500 = 2 2 5 3, gcd(120, 500) = 2 2 5 = 20. 17 and 22 are relatively prime.

Least common multiples Definition The least common multiple of two positive integers a and b is the smallest positive integer that is divisible by both a and b, and is denoted by lcm(a, b).

Examples of least common multiples Example Since 120 = 2 3 3 5 and 500 = 2 2 5 3, lcm(120, 500) = 2 3 3 5 3 = 3000.

Least common multiples Theorem For positive integers a and b, ab = gcd(a, b) lcm(a, b).

Least common multiples Proof. Let p 1, p 2,..., p n be the list of prime divisors of a and b, written in the order of nondecreasing size. Then a = p a 1 1 pa 2 2... pan n, b = p b 1 1 pb 2 2... pbn n, where a 1, a 2,..., a n and b 1, b 2,..., b n are nonnegative integers. It follows that gcd(a, b) = p min(a 1,b 1 ) 1 p min(a 2,b 2 ) 2... p min(an,bn) n, lcm(a, b) = p max(a 1,b 1 ) 1 p max(a 2,b 2 ) 2... p max(an,bn) n.

Least common multiples Therefore, gcd(a, b) lcm(a, b) = p min(a 1,b 1 )+max(a 1,b 1 ) 1 p min(a 2,b 2 )+max(a 2,b 2 ) 2... p min(an,bn)+max(an,bn) n = p a 1+b 1 1 p a 2+b 2 2... pn an+bn = p a 1 1 pa 2 2... pan n p b 1 1 pb 2 2... pbn n = ab.

The Euclidean Algorithm Lemma Let a = bq + r, where a, b, q, r are integers. Then gcd(a, b) = gcd(b, r).

The Euclidean Algorithm Proof. It suffices prove d divides both a and b if and only if d divides both b and r. : If d a and d b, then d (a bq), i.e., d r. : If d b and d r, then d (bq + r), i.e., d a.

greatest common divisors as linear combinations We present the following theorem without a proof (which can be proved using the knowledge of Section 5.2): Theorem (Bézout) If a and b are positive integers, then there exist integers s and t such that gcd(a, b) = sa + tb. Here sa + tb is called a linear combination of a and b.

Examples of greatest common divisors Example (i) Find the greatest common divisor gcd(108, 300). (ii) Express gcd(108, 300) as a linear combination of 108 and 300.

Examples of greatest common divisors Solution. (i) We use the Euclidean algorithm to find gcd(108, 300): 300 = 108 2 + 84, 108 = 84 1 + 24, 84 = 24 3 + 12, 24 = 12 2. Therefore, gcd(108, 300) = 12.

Examples of greatest common divisors (ii) 12 = 84 24 3 = 84 (108 84) 3 = 84 4 108 3 = (300 108 2) 4 108 3 = 300 4 108 11.

Examples of greatest common divisors The solution of (i) in this example can be written in a more intuitive way: Solution. (i) We use the Euclidean algorithm to find gcd(108, 300): 2 300 108 1 216 84 3 84 24 2 72 24 12 0 Therefore, gcd(108, 300) = 12.

Recommended exercises Section 4.1: 3, 4, 6, 8, 24, 26, 38, 40. Section 4.3: 3(bcd), 24, 26, 32(c), 33(ab), 40(cdf).