Part IA Numbers and Sets

Similar documents
Part IA Numbers and Sets

Chapter 1 : The language of mathematics.

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

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

Name (please print) Mathematics Final Examination December 14, 2005 I. (4)

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

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

2 More on Congruences

Number Theory and Algebra: A Brief Introduction

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

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

The Chinese Remainder Theorem

Math 109 September 1, 2016

Notation Index. gcd(a, b) (greatest common divisor) NT-16

Introduction to Number Theory

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Lecture 4: Number theory

Number Theory and Group Theoryfor Public-Key Cryptography

Part IA. Numbers and Sets. Year

CPSC 467b: Cryptography and Computer Security

Lecture notes: Algorithms for integers, polynomials (Thorsten Theobald)

7. Prime Numbers Part VI of PJE

CPSC 467b: Cryptography and Computer Security

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

MATH 363: Discrete Mathematics

Elementary Number Theory Review. Franz Luef

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

Discrete Mathematics. Dr. J. Saxl. Michælmas These notes are maintained by Paul Metcalfe. Comments and corrections to

Basic elements of number theory

Basic elements of number theory

In N we can do addition, but in order to do subtraction we need to extend N to the integers

a = mq + r where 0 r m 1.

1 Overview and revision

5 Set Operations, Functions, and Counting

Theory of RSA. Hiroshi Toyoizumi 1. December 8,

Encryption: The RSA Public Key Cipher

MATH 2200 Final Review

Lemma 1.2. (1) If p is prime, then ϕ(p) = p 1. (2) If p q are two primes, then ϕ(pq) = (p 1)(q 1).

ECE596C: Handout #11

10 Modular Arithmetic and Cryptography

A Guide to Arithmetic

Summary Slides for MATH 342 June 25, 2018

Public Key Cryptography

Foundations Revision Notes

LECTURE 5: APPLICATIONS TO CRYPTOGRAPHY AND COMPUTATIONS

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

Elementary Number Theory MARUCO. Summer, 2018

Carmen s Core Concepts (Math 135)

Mathematical Foundations of Public-Key Cryptography

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

In N we can do addition, but in order to do subtraction we need to extend N to the integers

CONTINUED FRACTIONS, PELL S EQUATION, AND TRANSCENDENTAL NUMBERS

CPSC 467: Cryptography and Computer Security

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

Elementary Number Theory and Cryptography, 2014

PREPARATION NOTES FOR NUMBER THEORY PRACTICE WED. OCT. 3,2012

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

Congruence Classes. Number Theory Essentials. Modular Arithmetic Systems

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

CRYPTOGRAPHY AND NUMBER THEORY

University of Toronto Faculty of Arts and Science Solutions to Final Examination, April 2017 MAT246H1S - Concepts in Abstract Mathematics

Number Theory. Henry Liu, 6 July 2007

MATH 145 Algebra, Solutions to Assignment 4

7.2 Applications of Euler s and Fermat s Theorem.

Foundations and Analysis Questions. Collated and compiled by Keegan Kang MORSE Society A Year 1 Christmas Present

CHAPTER 3. Congruences. Congruence: definitions and properties

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

Contribution of Problems

Solutions to Practice Final 3

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

Number Theory. Modular Arithmetic

PRIME NUMBERS YANKI LEKILI

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

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

basics of security/cryptography

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

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

Fundamentals of Pure Mathematics - Problem Sheet

Discrete Mathematics GCD, LCM, RSA Algorithm

CIS 551 / TCOM 401 Computer and Network Security

MATH 361: NUMBER THEORY FOURTH LECTURE

Know the Well-ordering principle: Any set of positive integers which has at least one element contains a smallest element.

MATH 2200 Final LC Review

The Real Number System

CS483 Design and Analysis of Algorithms

Number Theory A focused introduction

1 Take-home exam and final exam study guide

Postulate 2 [Order Axioms] in WRW the usual rules for inequalities

Basic Proof Examples

Powers in Modular Arithmetic, and RSA Public Key Cryptography

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

Math 118: Advanced Number Theory. Samit Dasgupta and Gary Kirby

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

RSA. Ramki Thurimella

* 8 Groups, with Appendix containing Rings and Fields.

Number Theory Homework.

A SURVEY OF PRIMALITY TESTS

Wilson s Theorem and Fermat s Little Theorem

Transcription:

Part IA Numbers and Sets Theorems Based on lectures by A. G. Thomason Notes taken by Dexter Chua Michaelmas 2014 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after lectures. They are nowhere near accurate representations of what was actually lectured, and in particular, all errors are almost surely mine. Introduction to number systems and logic Overview of the natural numbers, integers, real numbers, rational and irrational numbers, algebraic and transcendental numbers. Brief discussion of complex numbers; statement of the Fundamental Theorem of Algebra. Ideas of axiomatic systems and proof within mathematics; the need for proof; the role of counter-examples in mathematics. Elementary logic; implication and negation; examples of negation of compound statements. Proof by contradiction. [2] Sets, relations and functions Union, intersection and equality of sets. Indicator (characteristic) functions; their use in establishing set identities. Functions; injections, surjections and bijections. Relations, and equivalence relations. Counting the combinations or permutations of a set. The Inclusion-Exclusion Principle. [4] The integers The natural numbers: mathematical induction and the well-ordering principle. Examples, including the Binomial Theorem. [2] Elementary number theory Prime numbers: existence and uniqueness of prime factorisation into primes; highest common factors and least common multiples. Euclid s proof of the infinity of primes. Euclid s algorithm. Solution in integers of ax + by = c. Modular arithmetic (congruences). Units modulo n. Chinese Remainder Theorem. Wilson s Theorem; the Fermat-Euler Theorem. Public key cryptography and the RSA algorithm. [8] The real numbers Least upper bounds; simple examples. Least upper bound axiom. Sequences and series; convergence of bounded monotonic sequences. Irrationality of 2 and e. Decimal expansions. Construction of a transcendental number. [4] Countability and uncountability Definitions of finite, infinite, countable and uncountable sets. A countable union of countable sets is countable. Uncountability of R. Non-existence of a bijection from a set to its power set. Indirect proof of existence of transcendental numbers. [4] 1

Contents IA Numbers and Sets (Theorems) Contents 0 Introduction 3 1 Proofs and logic 4 1.1 Proofs................................. 4 1.2 Examples of proofs.......................... 4 1.3 Logic.................................. 4 2 Sets, functions and relations 5 2.1 Sets.................................. 5 2.2 Functions............................... 5 2.3 Relations............................... 5 3 Division 6 3.1 Euclid s Algorithm.......................... 6 3.2 Primes................................. 6 4 Counting and integers 7 4.1 Basic counting............................ 7 4.2 Combinations............................. 7 4.3 Well-ordering and induction..................... 8 5 Modular arithmetic 10 5.1 Modular arithmetic.......................... 10 5.2 Multiple moduli............................ 10 5.3 Prime moduli............................. 10 5.4 Public-key (asymmetric) cryptography............... 11 6 Real numbers 12 6.1 Construction of numbers....................... 12 6.2 Sequences............................... 12 6.3 Series................................. 12 6.4 Irrational numbers.......................... 12 6.5 Euler s number............................ 12 6.6 Algebraic numbers.......................... 13 7 Countability 14 2

0 Introduction IA Numbers and Sets (Theorems) 0 Introduction 3

1 Proofs and logic IA Numbers and Sets (Theorems) 1 Proofs and logic 1.1 Proofs 1.2 Examples of proofs Proposition. For all natural numbers n, n 3 n is a multiple of 3. Proposition. If n 2 is even, then so is n. Proposition. The solutions to x 2 5x + 6 = 0 are x = 2 and x = 3. Proposition. Every positive number is 1. 1.3 Logic 4

2 Sets, functions and relations IA Numbers and Sets (Theorems) 2 Sets, functions and relations 2.1 Sets Theorem. (A = B) (A B and B A) Proposition. (A B) C = A (B C) (A B) C = A (B C) A (B C) = (A B) (A C) 2.2 Functions Theorem. The left inverse of f exists iff f is injective. Theorem. The right inverse of f exists iff f is surjective. 2.3 Relations Theorem. If is an equivalence relation on A, then the equivalence classes of form a partition of A. 5

3 Division IA Numbers and Sets (Theorems) 3 Division 3.1 Euclid s Algorithm Theorem (Division Algorithm). Given a, b Z, b 0, there are unique q, r Z with a = qb + r and 0 r < b. Proposition. If c a and c b, c (ua + vb) for all u, v Z. Theorem. Let a, b N. Then (a, b) exists. Corollary. (from the proof) Let d = (a, b), then d is the smallest positive linear combination of a and b. Corollary (Bézout s identity). Let a, b N and c Z. u, v Z with c = ua + vb iff (a, b) c. Then there exists Proposition (Euclid s Algorithm). If we continuously break down a and b by the following procedure: a = q 1 b + r 1 b = q 2 r 1 + r 2 r 1 = q 3 r 2 + r 3. r n 2 = q n r n 1 then the highest common factor is r n 1. 3.2 Primes Theorem. Every number can be written as a product of primes. Theorem. There are infinitely many primes. Theorem. If a bc and (a, b) = 1, then a c. Corollary. If p is a prime and p ab, then p a or p b. (True for all p, a, b) Corollary. If p is a prime and p n 1 n 2 n i, then p n i for some i. Theorem (Fundamental Theorem of Arithmetic). Every natural number is expressible as a product of primes in exactly one way. In particular, if p 1 p 2 p k = q 1 q 2 q l, where p i, q i are primes but not necessarily distinct, then k = l. q 1, q l are p 1, p k in some order. Corollary. If a = p i1 1 pi2 2 pir r and b = p j1 1 pj2 2 pjr r, where p i are distinct primes (exponents can be zero). Then (a, b) = p min{i k,j k } k. Likewise, lcm(a, b) = max{i p k,j k } k. We have hcf(a, b) lcm(a, b) = ab. 6

4 Counting and integers IA Numbers and Sets (Theorems) 4 Counting and integers 4.1 Basic counting Theorem (Pigeonhole Principle). If we put mn + 1 pigeons into n pigeonholes, then some pigeonhole has at least m + 1 pigeons. Proposition. (i) i A = i B A = B (ii) i A B = i A i B (iii) i Ā = 1 i A (iv) i A B = 1 i A B = 1 i Ā B = 1 i Ā i B = 1 (1 i A )(1 i B ) = i A + i B i A B. (v) i A\B = i A B = i A i B = i A (1 i B ) = i A i A B Proposition. A B = A + B A B Theorem (Inclusion-Exclusion Principle). Let A i be subsets of a finite set X, for 1 i n. Then Ā1 Ān = X i A i + i<j A i A j + ( 1) n A 1 A n. Equivalently, A 1 A n = i A i i<j A i A j + + ( 1) n 1 A 1 A n. The two forms are equivalent since A 1 A n = X Ā1 Ān. 4.2 Combinations Proposition. By definition, ( ) n + 0 ( ) n + + 1 ( ) n = 2 n n Theorem (Binomial theorem). For n N with a, b R, we have ( ) ( ) ( ) ( ) n n n n (a + b) n = a n b 0 + a n 1 b 1 + + a n r b r + + a 0 b n 0 1 r n Proposition. ( ) ( ) n n (i) =. This is because choosing r things to keep is the same as r n r choosing n r things to throw away. 7

4 Counting and integers IA Numbers and Sets (Theorems) (ii) ( ) ( ) ( ) n n n + 1 + = (Pascal s identity) The RHS counts the number r 1 r r of ways to choose a team of r players from n + 1 available players, one of whom is Pietersen. If Pietersen is chosen, there are ( n r 1) ways to choose the remaining players. Otherwise, there are ( n r) ways. The total number of ways is thus ( ( n r 1) + n r). Now given that ( n 0) = ( n n) = 1, since there is only one way to choose nothing or everything, we can construct Pascal s triangle: 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 where each number is the sum of the two numbers above it, and the rth item of the nth row is ( n r) (first row is row 0). ( )( ) ( )( ) n k n n r (iii) =. We are counting the number of pairs of sets k r r k r (Y, Z) with Y = k and Z = r with Z Y. In the LHS, we first choose Y then choose Z Y. The RHS chooses Z first and then choose the remaining Y \ Z from {1, 2, n} \ Z. ( )( ) ( )( ) ( )( ) ( )( ) ( ) a b a b a b a b a + b (iv) + + + + = r 0 r 1 1 r k k 0 r r (Vandermonde s convolution) Suppose we have a men and b women, and we need to choose a committee of r people. The right hand side is the total number of choices. The left hand side breaks the choices up according to the number of men vs women. ( ) n n! Proposition. = r (n r)!r!. 4.3 Well-ordering and induction Theorem (Weak Principle of Induction). Let P (n) be a statement about the natural number n. Suppose that (i) P (1) is true (ii) ( n) P (n) P (n + 1) Then P (n) is true for all n 1. Theorem. Inclusion-exclusion principle. Theorem (Strong principle of induction). Let P (n) be a statement about n N. Suppose that (i) P (1) is true (ii) n N, if P (k) is true k < n then P (n) is true. 8

4 Counting and integers IA Numbers and Sets (Theorems) Then P (n) is true for all n N. Theorem. The strong principle of induction is equivalent to the weak principle of induction. Theorem (Well-ordering principle). N is well-ordered under the usual order, i.e. every non-empty subset of N has a minimal element. Theorem. The well-ordering principle is equivalent to the strong principle of induction. 9

5 Modular arithmetic IA Numbers and Sets (Theorems) 5 Modular arithmetic 5.1 Modular arithmetic Proposition. If a b (mod m), and d m, then a b (mod d). Proposition. If a b (mod m) and u v (mod m), then a + u b + v (mod m) and au bv (mod m). Theorem. There are infinitely many primes that are 1 (mod 4). Theorem. u is a unit modulo m if and only if (u, m) = 1. Corollary. If (a, m) = 1, then the congruence ax b (mod m) has a unique solution (mod m). Proposition. There is a solution to ax b (mod m) if and only if (a, m) b. If d = (a, m) b, then the solution is the unique solution to a d x b d x (mod m d ) 5.2 Multiple moduli Theorem (Chinese remainder theorem). Let (m, n) = 1 and a, b Z. Then there is a unique solution (modulo mn) to the simultaneous congruences { x a (mod m), x b (mod n) i.e. x satisfying both and every other solution is x (mod mn). Proposition. Given any (m, n) = 1, c is a unit mod mn iff c is a unit both mod m and mod n. Proposition. (i) φ(mn) = φ(m)φ(n) if (m, n) = 1, i.e. φ is multiplicative. (ii) If p is a prime, φ(p) = p 1 (iii) If p is a prime, φ(p k ) = p k p k 1 = p k (1 1/p) (iv) φ(m) = m p m (1 1/p). 5.3 Prime moduli Theorem (Wilson s theorem). (p 1)! 1 (mod p) if p is a prime. Theorem (Fermat s little theorem). Let p be a prime. Then a p a (mod p) for all a Z. Equivalently, a p 1 1 (mod p) if a 0 (mod p). Theorem (Fermat-Euler Theorem). Let a, m be coprime. Then a φ(m) 1 (mod m). Proposition. If p is an odd prime, then 1 is a quadratic residue if and only if p 1 (mod 4). 10

5 Modular arithmetic IA Numbers and Sets (Theorems) Proposition. (Unproven) A prime p is the sum of two squares if and only if p 1 (mod 4). Proposition. There are infinitely many primes 1 (mod 4). Proposition. Let p = 4k + 3 be a prime. Then if a is a quadratic residue, i.e. a z 2 (mod p) for some z, then z = ±a k+1. 5.4 Public-key (asymmetric) cryptography Theorem (RSA Encryption). We want people to be able to send a message to Bob without Eve eavesdropping. So the message must be encrypted. We want an algorithm that allows anyone to encrypt, but only Bob to decrypt (e.g. many parties sending passwords with the bank). Let us first agree to write messages as sequences of numbers, e.g. in ASCII or UTF-8. After encoding, the encryption part is often done with RSA encryption (Rivest, Shamier, Adleman). Bob thinks of two large primes p, q. Let n = pq and pick e coprime to φ(n) = (p 1)(q 1). Then work out d with de 1 (mod φ(n)) (i.e. de = kφ(n) + 1). Bob then publishes the pair (n, e). For Alice to encrypt a message, Alice splits the message into numbers M < n. Alice sends M e (mod n) to Bob. Bob then computes (M e ) d = M kφ(n)+1 M (mod n) by Fermat-Euler theorem. How can Eve find M? We can, of course, factorize n, find e efficiently, and be in the same position as Bob. However, it is currently assumed that this is hard. Is there any other way? Currently we do not know if RSA can be broken without factorizing (cf. RSA problem). 11

6 Real numbers IA Numbers and Sets (Theorems) 6 Real numbers 6.1 Construction of numbers Proposition. Q is a totally ordered-field. Proposition. Q is densely ordered, i.e. for any p, q Q, if p < q, then there is some r Q such that p < r < q. Proposition. There is no rational q Q with q 2 = 2. Axiom (Least upper bound axiom). Every non-empty set of the real numbers that has an upper bound has a least upper bound. Corollary. Every non-empty set of the real numbers bounded below has an infimum. Theorem (Axiom of Archimedes). Given r R, there exists n N with n > r. Proposition. inf{ 1 n : n N} = 0. Theorem. Q is dense in R, i.e. given r, s R, with r < s, q Q with r < q < s. Theorem. There exists x R with x 2 = 2. 6.2 Sequences Theorem. Every bounded monotonic sequence converges. Theorem. Every sequence has a monotonic subsequence. Theorem. (i) If a n a and a n b, then a = b (i.e. limits are unique) (ii) If a n a and b n = a n for all but finitely many n, then b n a. (iii) If a n = a for all n, then a n a. (iv) If a n a and b n b, then a n + b n a + b (v) If a n a and b n b, then a n b n ab (vi) If a n a 0, and n(a n 0). Then 1/a n 1/a. (vii) If a n a and b n a, and n(a n c n b n ), then c n a. (Sandwich theorem) 6.3 Series 6.4 Irrational numbers Proposition. A number is periodic iff it is rational. 6.5 Euler s number Proposition. e is irrational. 12

6 Real numbers IA Numbers and Sets (Theorems) 6.6 Algebraic numbers Proposition. All rational numbers are algebraic. Theorem. (Liouville 1851; Non-examinable) L is transcendental, where L = n=1 with 1s in the factorial positions. 1 = 0.11000100 10n! Theorem. (Hermite 1873) e is transcendental. Theorem. (Lindermann 1882) π is transcendental. 13

7 Countability IA Numbers and Sets (Theorems) 7 Countability Lemma. If f : [n] [n] is injective, then f is bijective. Corollary. If A is a set and f : A [n] and g : A [m] are both bijections, then m = n. Lemma. Let S N. Then either S is finite or there is a bijection g : N S. Theorem. The following are equivalent: (i) A is countable (ii) There is an injection from A N (iii) A = or there is a surjection from N A Proposition. The integers Z are countable. Proposition. N N is countable. Proposition. If A B is injective and B is countable, then A is countable (since we can inject B N). Proposition. Z k is countable for all k N Theorem. A countable union of countable sets is countable. Proposition. Q is countable. Theorem. The set of algebraic numbers is countable. Theorem. The set of real numbers R is uncountable. Corollary. There are uncountable many transcendental numbers. Theorem. Let A be a set. Then there is no surjection from A P(A). Theorem (Cantor-Schröder-Bernstein theorem). Suppose there are injections A B and B A. Then there s a bijection A B. 14