NumberTheory (HKUST) Lecture1 5
NumberTheory (HKUST) Lecture1 5
1 Sets
1.1 Sets and Subsets
A set is a collection of distinct objects satisfying certain properties. The
objects in the collection are called elements or members.
Given a set A; we write “x ∈ A” to say that x is an element of A or x
belongs to A; and write “x 6∈ A” to say that x is not an element of A or
x does not belong to A. Sets are usually denoted by uppercase letters such
that A, B, C, . . .; elements of sets are usually denoted by lowercase letters
such that a, b, c, . . . .
There are two ways to express a set. One is to list all elements of the set;
the other one is to point out the attributes for the elements of the set. For
instance,
A = {1, −1}; B = {x | x real number, x2 = 1}.
A set A is called a subset of a set B, written A ⊆ B, if every element
of A is an element of B. Two sets A and B are said to be equal, written
A = B, if A ⊆ B and B ⊆ A.
The set without any element is call the empty set, denoted ∅. The empty
set may be exhibit as ∅ = { }. There is only one empty set. The empty set
∅ is a subset of any set.
We constantly use subsets of the following sets in the course.
P: = the set of all positive integers.
N: = the set of all nonnegative integers.
Z: = the set of all integers.
Q: = the set of all rational numbers.
R: = the set of all real numbers.
C: = the set of all complex numbers.
1
The intersection and union of finite number of sets A1 , A2 , . . . , An are defined
respectively as follows:
n
\
A 1 ∩ A 2 ∩ · · · ∩ An = Ai ,
i=1
n
[
A 1 ∪ A 2 ∪ · · · ∪ An = Ai .
i=1
Similarly, for infinitely many sets A1 , A2 , . . ., their intersection and uion are
defined as ∞
\
Ai = {x | x ∈ Ai for all i},
i=1
∞
[
Ai = {x | x ∈ Ai for some i}.
i=1
1.3 Difference
Let A and B be two sets. The difference from A to B is the set
A − B := {x | x ∈ A and x 6∈ B};
A − B = {x | x ∈ R, 0 ≤ x < 1} ∪ {x | x ∈ R, 2 ≤ x ≤ 3}.
2
2 Power Set
The power set P(A) of a set A is the set of all subsets of A, that is,
P(A) := {S | S ⊆ A}.
If A = ∅, then P(A) = {∅}, which is not empty and contains exactly one
element; this unique element is the empty set ∅. If A = {a}, then P(A) =
{∅, {a}}. If A = {a, b}, then P(A) = {∅, {a}, {b}, {a, b}}. If A = {a, b, c},
then © ª
P(A) = ∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} .
3 Product
The Cartesian product (or just product) of two sets A and B is the set
A1 × A2 × · · · × An := {(a1 , a2 , . . . , an ) | a1 ∈ A1 , a2 ∈ A2 , . . . , an ∈ An }.
4 Finite Sets
Proposition 1. If A and B are finite sets, then
A = {x1 , . . . , xk , a1 , . . . , al },
B = {x1 , . . . , xk , b1 , . . . , xm }.
Then |A| = k + l, |B| = k + m, and
A ∪ B = {x1 , . . . , xk , a1 , . . . , al , b1 , . . . , bm }.
3
Thus
|A ∪ B| = k + l + m
= (k + l) + (k + m) − k
= |A| + |B| − |A ∩ B|.
4
Lecture 2
5 Proofs
5.1 Statements and Implication
A statement is a sentence that is either true or false, but not both.
(1) The squares of odd integer is odd.
(2) No real number has square equal to −1.
(3) Every positive integer is equal to a sum of two integer squares.
The sentence such as “How are you?” is not a statement.
Let P and Q be two statements. We say that P implies Q, written
P ⇒ Q, if whenever P is true then Q is also true. The statement “P ⇒ Q”
can be stated in three ways: If P then Q; Q if P ; P only if Q.
Example 1. Let P : x = 2; Q : x2 < 6. Then “x = 2 ⇒ x2 < 6” can be
stated in the following three ways.
If P then Q: If x = 2 then x2 < 6.
Q if P : x2 < 6 if x = 2.
P only if Q: x = 2 only if x2 < 6.
Example 2. Let P : It is raining; Q : The sky is cloudy. Then “It is raining
⇒ The sky is cloudy” can be stated in three ways.
If P then Q: If it is raining then the sky is cloudy.
Q if P : The sky is cloudy if it is raining.
P only if Q: It is raining only if the sky is cloudy.
Implication: “It is raining ⇒ The sky is cloudy.”
Assumption Deduction
It is raining The sky is cloudy
It is not raining No deduction possible
The sky is cloudy No deduction possible
The sky is not cloudy It is not raining
5
5.2 P ⇒ Q via Q̄ ⇒ P̄
The negation of a statement P is the opposite statement, “not P ,” written
as P̄ . We demonstrate that P ⇒ Q is equivalent to Q̄ ⇒ P̄ , which is called
the contrapositive form of P ⇒ Q.
Example 3. Let P : x = 2; Q : x2 < 6. We have
P ⇒ Q : x = 2 ⇒ x2 < 6.
Q̄ ⇒ P̄ : x2 ≥ 6 ⇒ x 6= 2.
Example 4. Let P : It is raining; Q : The sky is cloudy. Then
P ⇒ Q: If it is raining then the sky is cloudy.
Q̄ ⇒ P̄ : If the sky is sunshine then it is not raining.
5.3 Deduction
Example 5. (a) I am admitted to HKUST only if I am smart; (b) If I am
smart then I do not need to work; (c) I have to work.
Answer. We write
H : I am admitted to HKUST.
S : I am smart.
W : I have to work.
6
5.5 Proof by Contradiction
Suppose we wish to prove a statement P . We first assume that P is false,
that is, P̄ , then deduce a statement Q that is palpably false.
Example 7. Let n be an integer such that n2 is a multiple of 3. Then n is
also a multiple of 3.
Proof. Suppose n is not a multiple of 3. Then n = 3k + 1 or n = 3k + 2 for
some integer k. In the case n = 3k + 1, we have
Lecture 3
An example of non-proof:
√ √ √
Example 8. Show 2 + 6 < 15.
Wrong proof:
√ √ √ √ √
2+ 6<( 2 + 6)2 < 15
15 ⇒
√
8 + 2 12 < 15
⇒
√
2 12 < 7 ⇒
48 < 49. ⇒
√ √ √ √ √ √
Proof. Suppose 2 + 6 < 15 is not true, i.e., 2 + 6 ≥ 15. Then
√ √ √ √ √
2 + 6 ≥ 15 ⇒ ( 2 + 6)2 ≥ 15
√
⇒ 8 + 2 12 ≥ 15
√
⇒ 2 12 ≥ 7
⇒ 48 ≥ 49.
7
5.6 Disprove by Counterexample
Proving a statement to be false is called disproving.
Example 9. Every positive integer is a sum of two integer squares.
Answer: This is not true because 3 can not be written as a sum of two
integer squares.
8
|A0 ∩ A8 ∩ A9 | = 7 · 7 · 7 · 7 = 2401.
Thus
9
Lecture 4
6 Counting
6.1 Permutation and Combination
Let A1 , A2 , . . . , Ak be finite sets. If |A1 | = n1 , |A2 | = n2 , . . ., |Ak | = nk , it is
easy to see the Multiplication Rule
|A1 × A2 × · · · × Ak | = n1 n2 · · · nk .
In particular, if A1 = A2 = · · · = Ak = A and |A| = n, we have
|Ak | = nk .
A word of length k over A is an element of the form
a1 a2 . . . ak ,
where a1 , a2 , . . . , ak ∈ A. A word of length k is also called a k-arrangement
or k-permutation of A if the elements in the word are distinct. An n-
permutation of A is just called a permutation of A.
Proposition 3. Let A be a finite set with |A| = n. Then the number of
k-permutations of A, denoted by P (n, k), is given by
P (n, k) = n(n − 1) · · · (n − k + 1).
Proof. To form an arbitrary k-permutation a1 a2 · · · ak of A, there are n choices
for the 1st element a1 , n−1 choices for the 2nd element a2 , . . ., and n−(k −1)
choices for the kth (also last) element ak . Hence, by the Multiplication Rule,
the total number of possibilities is n(n − 1) · · · (n − k + 1).
Corollary 4. Let A be a finite set with |A| = n. Let
P (A, k) = {(a1 , a2 , . . . , ak ) ∈ Ak | all a1 , a2 , . . . , ak are distinct}.
Then
|P (A, k)| = n(n − 1) · · · (n − k + 1).
Let A be a finite set with |A| = n. The number of permutations of A is
n(n − 1) · · · 2 · 1. Since this number is constantly used in mathematics, n! is
the standard symbol for this number; i.e.,
n! = n(n − 1) · · · 2 · 1.
An r-subset of A is a subset with r elements. An r-subset of A is also called
¡ann ¢r-combination of A. The number of r-combinations of A is denoted by
k , read “n choose r.”
10
Proposition 5. For non-negative integers n, k with n ≥ k,
³n´ n!
= .
k k!(n − k)!
¡ ¢
Proof. There are nk k-subsets of A. For each k-subset K of A, there are k!
ways to arrangement the elements of S. Thus
³n´
P (n, k) = k!.
k
n!
Note that P (n, r) = (n−k)! . It follows that
³n´ P (n, r) n!
= = .
r r! k!(n − k)!
¡ ¢ ¡ n ¢
Proposition 6. (a) nr = n−r .
¡ ¢ ¡ ¢ ¡ n−1 ¢
(b) nr = n−1
r + r−1 .
Let A = {1, 2, . . . , n}. We think of A as arry of boxes as follows
1 2 ··· n
1 2 3 4 5 6 7 8
0 1 1 0 1 0 1 1
Corollary 7. The number ¡of ¢words of 0 and 1 of length n with exactly r 1’s
and (n − r) 0’s is equal to nr .
Lecture 5
11
Proof. Since (a+b)n = (a + b)(a + b) · · · (a + b), the expansion of the product
| {z }
r
is a sum of all ‘words’ of a and b with length n. The sum can be sorted into
a sum from 0 to n by collecting the like terms with exaxtly the same number
a’s and the same number of b’s. That is,
X
(a + b)n = {words of a and b with length n}
n
X
= {words of a and b with exactly r a’s and exactly (n − r) b’s}
r=0
n ³
X n ´ r n−r
= ab .
r=0
r
Theorem 11. µ ¶
n n!
= .
r1 , r 2 , . . . , r k r1 !r2 ! · · · rk !
12
Proof. Let S be a set with |S| = n. For each ordered partition S1 , S2 , . . . , Sk
of S with |S1 | = r1 , |S2 | = r2 , . . ., |Sk | = rk , the 1st subset S1 has r1 !
permutations, the 2nd subset S2 has r2 ! permutations, . . ., and the kth subset
Sk has rk ! permutations; each permutation of S can be obtained in this way.
Hence µ ¶
n
r1 !r2 ! · · · rk ! = n!.
r1 , r 2 , . . . , r k
13
6.4 Multinomial Theorem
Theorem 13 (Multinomial Theorem). Let n be a positive integer, and let
x1 , x2 , . . . , xn be real numbers. Then
X µ ¶
n
(x1 + x2 + · · · + xk )n = xr11 x2r2 · · · xrkk .
r1 +r2 +···+r =n
r1 , r 2 , . . . , r k
k
r1 ,r2 ,...,rk ≥0
Proof.
X³ ´
n
(x1 + x2 + · · · + xk ) = words of length n over {x1 , x2 , . . . , xk }
X µ words of length n over {x1 , . . . , xk } ¶
=
r1 +···+rk =n
with exactly r1 x1 ’s, . . ., rk xk ’s
X µ ¶
n
= xr11 xr22 · · · xrkk .
r1 +r2 +···+r =n
r1 , r 2 , . . . , r k
k
r1 ,r2 ,...,rk ≥0
14