1 CMSC 250 Chapter 3, Number Theory
Jan 19, 2018
1CMSC 250
Chapter 3, Number Theory
2CMSC 250
Introductory number theory
A good proof should have:– a statement of what is to be proven– "Proof:" to indicate where the proof starts– a clear indication of flow– a clear indication of the reason for each step– careful notation, completeness and order– a clear indication of the conclusion
3CMSC 250
Some definitions Z is the integers Q is the rational numbers (quotients of integers)
r Q (a,b Z) [(r = a / b) (b 0)] Irrational numbers are those which are not rational R is the real numbers A superscript of + indicates the positive portion only of
one of these sets of numbers A superscript of – indicates the negative portion only of
one of these sets of numbers Other superscripts can be used, such as Zeven, Zodd , Q>5
We can define the closure of these sets for an operationZ is closed under what operations?
4CMSC 250
Integer definitions An even integer
n Zeven (k Z) [n = 2k] An odd integer
n Zodd (k Z) [n = 2k + 1] A prime integer (Z>1)
n Zprime (r,s Z+) [ (n = r s) (r = 1) (s = 1)] A composite integer (Z>1)
n Zcomposite (r,s Z+) [(n = r s) (r 1) (s 1)]
5CMSC 250
Constructive proof of existence
How can we prove the following?
]srnqp n
s q r q spr p s r q [p )Zsr,q,p,Z,n(
3333
6CMSC 250
Discrete StructuresCMSC 250Lecture 13
February 25, 2008
7CMSC 250
Methods of proving universally quantified statements
Method of exhaustion– prove the statement is true for each and every member of the
domain– (r Z+)[23 < r < 29 ( p,q Z+) [(r = p q) (p q)]]
Generalizing from the generic particular– suppose that x is a particular but arbitrarily-chosen element of
the domain– show that x satisfies the property– then the result holds for every element of the domain– example: (r Z) [r Zeven r2 Zeven ]
8CMSC 250
Examples of generalizing from the generic particular
The product of any two odd integers is also odd.– (m,n Z) [(m Zodd n Zodd) m n Zodd ]
The product of any two rationals is also rational.– (m,n Q) [m n Q]
9CMSC 250
Discrete StructuresCMSC 250Lecture 14
February 27, 2008
10CMSC 250
Disproof by counterexample
( r Z) [r2 Z+ r Z+]– counterexample: r2 = 9 r = –3
• r2 Z+ since 9 Z+ so the antecedent is true• but r Z+ since –3 Z+ so the consequent is false• this means the implication is false for r = –3, so this is a valid
counterexample When you give a counterexample you must justify that it
is a valid counterexample, by showing the algebra (or other interpretation needed) to support your claim
11CMSC 250
Divisibility
Definition: d | n (k Z)[n = d × k]– n is divisible by d– n is a multiple of d– d is a divisor of n– d divides n
Results involving divisibility:(a, b Z>1)[a | b→ a | (b + 1)](x Z>1)(p Zprime)[p | x]– note another proof method would be used here, proof by
division into cases
12CMSC 250
Proof by contrapositive
For all positive integers n, if n does not divide a number of which d is a factor, then n can not divide d.
(n,d,c Z+) [n | dc n | d](n,d,c Z+) [n | d n | dc]
13CMSC 250
Discrete StructuresCMSC 250Lecture 15
February 29, 2008
14CMSC 250
Proof by contradiction
The number of primes is infinite Assume this is false, that there is some largest prime
number, so there are only n different prime numbers Consider the number
1)pp...p(pk n1n21
15CMSC 250
Prime factored form The Unique Factorization Theorem (Theorem 3.3.3)
Given any integer n > 1,(kZ)(p1,p2,…pkZprime)(e1,e2,…ekZ+)[n = p1
e1 × p2e2 × p3
e3 × …× pkek]
where the p’s are distinct and any other expression of n is identical to this except maybe in the order of the factors.
Standard factored formn = p1
e1 × p2e2 × p3
e3 × … × pkek
pi < pi+1
(mZ)[8×7×6×5×4×3×2×m = 17×16×15×14×13×12×11×10]– does 17 | m ??
16CMSC 250
More integer definitions div and mod operators
n div d- integer quotient forn mod d- integer remainder for(n div d = q) ^ (n mod d = r) n = d × q + r
where n Z0, d Z+, r Z, q Z, 0 r < d Relating “mod” to “divides”:
d | n 0 = n mod d
0 d n
Definition of equivalence in a mod:x d y d | (x–y) (note: their remainders are equal)sometimes written as x y mod d, meaning (x y) mod d
dn
dn
17CMSC 250
Discrete StructuresCMSC 250Lecture 16
March 3, 2008
18CMSC 250
Modular arithmetic (Theorem 10.4.3)
Let a, b, c, d, n Z, and n > 1. Suppose a c (mod n) and b d (mod n). Then:
1. (a + b) (c + d) (mod n)2. (a – b) (c – d) (mod n)3. ab cd (mod n)4. am cm (mod n) for all integers m
Proof using this definition:(m Z+)(a,b Z)[a m
b (k Z) [a = b + km]]
19CMSC 250
Discrete StructuresCMSC 250Lecture 18
March 7, 2008
20CMSC 250
Floor and ceiling
Definitions:– n is the floor of x where x R n Z
x = n n x < n+1– n is the ceiling of x where x R n Z
x = n n–1 < x n Proofs using floor and ceiling:
(x,y R) [ x+y = x + y ](x R)(y Z)[ x+y = x + y ]
21CMSC 250
More proof by division into cases
The floor of (n/2) is eithera) n/2 when n is even
or b) (n–1)/2 when n is odd
22CMSC 250
Discrete StructuresCMSC 250Lecture 19
March 10, 2008
23CMSC 250
The quotient remainder theorem
(n Z)(d Z+)(q,r Z)[(n = dq + r) (0 r < d)]
Proving definition of equivalence in a mod using the quotient remainder theorem
This means prove that if [m d
n], then [d | (n-m)]where m,n Z and d Z+
24CMSC 250
Proof by division into cases again
(n Z) [3 | n n2 3 1]or, alternatively, (n Z) [3 | n n2 1 (mod 3)]
25CMSC 250
Steps toward proving the unique factorization theorem
Every integer greater than or equal to 2 has at least one prime that divides it
For all integers greater than 1, if a | b, then a | (b+1)
There are an infinite number of primes
26CMSC 250
Discrete StructuresCMSC 250Lecture 20
March 12, 2008
27CMSC 250
Using the unique factorization theorem
Prove that (a Z+)(q Zprime) [q | a2 q | a]
Prove that Q3
28CMSC 250
Discrete StructuresCMSC 250Lecture 21
March 14, 2008
29CMSC 250
Summary of proof methods
Constructive proof of existence Proof by exhaustion Proof by generalizing from the generic particular Proof by contraposition Proof by contradiction Proof by division into cases
30CMSC 250
Errors in proofs
Arguing from example for universal proof Misuse of variables Jumping to the conclusion (missing steps) Begging the question Using "if" about something that is known