Number Theory and Techniques of Proof Basic definitions
Number Theory and Techniques of Proof
Basic definitions: Parity • An integer n is called even if, and only if, there exists an integer k such that n = 2*k. • An integer n is called odd if, and only if, it is not even. • Corollary: An integer n is called odd if, and only if, there exists an integer k such that n = 2*k + 1 • The property of an integer as being either odd or even is known as its parity.
Arguing the positive: Universal Statements • Let’s consider the following statement: “The sum of an odd an even integer is odd. ”
Arguing the positive: Universal Statements • Let’s consider the following statement: “The sum of an odd an even integer is odd. ” • Do you believe this statement? Yes No
Arguing the positive: Universal Statements • Let’s consider the following statement: “The sum of an odd an even integer is odd. ” • Do you believe this statement? Yes No • If you believe it, you have to try to prove that it’s true (argue the positive/affirmative)
Proof, take 1 •
Proof, take 1 • WHOOPS! What does this proof actually prove?
Proof, take 1 • WHOOPS! What does this proof actually prove? It proves that two consecutive integers sum to an odd number!
Proof, take 2 •
Statements of claims / theorems • Mathematical claims and theorems can be stated in various different ways! “The sum of an odd an even integer is odd. ” “Any two integers of opposite parity sum to an odd number” “Every pair of integers of opposite parity sums to an odd number”
Statements of claims / theorems • Mathematical claims and theorems can be stated in various different ways! “The sum of an odd an even integer is odd. ” “Any two integers of opposite parity sum to an odd number” “Every pair of integers of opposite parity sums to an odd number” Other ideas?
Your turn, class! •
Arguing the affirmative of existential statements • Two methods: 1. Constructive 2. Non-Constructive • In “constructive” proofs we either explicitly show or construct an element of the domain that answers our query. • In non-constructive proofs (very rare in this class) we prove that it is a logical necessity for such an element to exist! • But we neither explicitly, nor implicitly, show or construct such an element!
Our first constructive proof • Claim: There exists a natural number that you cannot write as a sum of three squares of natural numbers.
Constructive proofs in Number Theory (and one nonconstructive one)
Our first constructive proof •
Proof •
Your turn, class! •
Your turn, class! • How is the 3 rd proof different from the others?
Our first (and last? ) non-constructive proof •
Divisibility •
Pop Quizzes 1. 3 | 6 Yes No
Pop Quizzes 1. 3 | 6 Y 2. 6 | 3 Yes No
Pop Quizzes 1. 3 | 6 Y 2. 6 | 3 N 3. 10 | 10 Yes No
Pop Quizzes • Yes No
Pop Quizzes • Yes No
Pop Quizzes • Yes No
Pop Quizzes • Yes No
Pop Quizzes • Yes No
Pop Quizzes • Yes No
Universal claims with divisibility •
Universal claims with divisibility •
Proof by contradiction •
Proofs by contradiction in Number Theory
First proof by contradiction •
First proof by contradiction •
Infinitude of primes •
Infinitude of primes •
Infinitude of primes •
Modular Arithmetic
Modular Arithmetic •
Properties of equivalence •
Properties of equivalence •
Properties of equivalence •
Properties of equivalence •
First proof revisited •
Proof with modular arithmetic •
More proofs •
More proofs •
Advantages of this notation •
Advantages of this notation •
Advantages of this notation •
Advantages of this notation •
Proofs by contrapositive in Number Theory
Proof by contraposition •
Proof by contraposition •
Examples •
Examples •
Another example •
Another example •
A historical proof by contradiction
Using the Unique Factorization Theorem
Unique Factorization: examples •
Unique Factorization: examples •
Statement of Theorem •
What is “uniqueness”? •
Speed of Computations in Number Theory
Basic assumptions •
First problem •
First problem • Good Bad Ugly
First problem • Good Bad Ugly Because: • Jason: Numbers can get above 32 bits, and that’s a storage and computation problem. • Bill: Numbers get “too freaking large”.
First problem, second approach •
First problem, second approach • Yes No Something Else
First problem, second approach • Yes No Something Else
First problem • Something Else
First problem • Something Else
Example •
Example •
Good news, bad news •
Example •
Example (contd. ) •
The key step •
Second problem: Greatest Common Divisor (GCD) •
Second problem: Greatest Common Divisor (GCD) •
Second problem: Greatest Common Divisor (GCD) •
Second problem: Greatest Common Divisor (GCD) •
Second problem: Greatest Common Divisor (GCD) •
Second problem: Greatest Common Divisor (GCD) •
Euclid’s GCD algorithm •
Greatest Common Divisor (GCD) • Yes (why) No (Why) Something Else (What)
Greatest Common Divisor (GCD) • Tail recursion Yes (why) No (Why) Something Else (What) left = a; right = b; while(left != right){ if(left > right) left = left – right; else right = right - left; } print "GCD is: " left; // Or right
GCD example • GCD(18, 100) = GCD(18, 100 – 18) = GCD(18, 82)= GCD(18, 82 – 18 = GCD(18, 64) = GCD(18, 64 – 18) = GCD(18, 46 – 18) = GCD(18, 28 – 18) = GCD(18, 10) = GCD(18 - 10, 10) = GCD(8, 10)= GCD(8, 10 - 8)= GCD(8, 2) = GCD(8 - 2, 2) = GCD(6 - 2, 2) = GCD(4 - 2, 2) = GCD(2, 2) = 2
GCD example • GCD(18, 100) = GCD(18, 100 – 18) = GCD(18, 82)= GCD(18, 82 – 18 = GCD(18, 64) = GCD(18, 64 – 18) = GCD(18, 46 – 18) = GCD(18, 28 – 18) = GCD(18, 10) = GCD(18 - 10, 10) = GCD(8, 10)= GCD(8, 10 - 8)= GCD(8, 2) = GCD(8 - 2, 2) = GCD(6 - 2, 2) = GCD(4 - 2, 2) = GCD(2, 2) = 2 a steps b steps a-b steps Something Else
GCD example • GCD(18, 100) = GCD(18, 100 – 18) = GCD(18, 82)= GCD(18, 82 – 18 = GCD(18, 64) = GCD(18, 64 – 18) = GCD(18, 46 – 18) = GCD(18, 28 – 18) = GCD(18, 10) = GCD(18 - 10, 10) = GCD(8, 10)= GCD(8, 10 - 8)= GCD(8, 2) = GCD(8 - 2, 2) = GCD(6 - 2, 2) = GCD(4 - 2, 2) = GCD(2, 2) = 2 a steps b steps a-b steps Something Else
Can we do better? • GCD(18, 100) = GCD(18, 100 – 18) = GCD(18, 82)= GCD(18, 82 – 18 = GCD(18, 64) = GCD(18, 64 – 18) = GCD(18, 46 – 18) = GCD(18, 28 – 18) = GCD(18, 10) = GCD(18 - 10, 10) = GCD(8, 10)= GCD(8, 10 - 8)= GCD(8, 2) = GCD(8 - 2, 2) = GCD(6 - 2, 2) = GCD(4 - 2, 2) = GCD(2, 2) = 2 Yes No Something Else
Can we do better? • GCD(18, 100) = Yes No Something Else GCD(18, 100 – 18) = GCD(18, 82)= GCD(18, 82 – 18 = GCD(18, 64) = GCD(18, 64 – 18) = GCD(18, 46) = GCD(18, 100 – 5 x 18) GCD(18, 46 – 18) = GCD(18, 28 – 18) = GCD(18, 100) = GCD(18, 100 – 5 x 18) = GCD(18, 10) = GCD(18 - 10, 10) = GCD(8, 10)= GCD(18 – 10, 10) = GCD(8, 10 - 8)= GCD(8, 2) = GCD(8, 10 - 8) = GCD(8, 2) = GCD(8 - 2, 2) = GCD(6, 2) = GCD(8 – 3 x 2, 2) = GCD(2, 2) = 2 GCD(8 – 3 x 2, 2) GCD(6 - 2, 2) = GCD(4 - 2, 2) = GCD(2, 2) = 2 From 10 to 4 steps!
How fast is this new algorithm? • loga Something Else
How fast is this new algorithm? • loga Something Else
- Slides: 110