MATH1081 Topic1 LectureNotes
MATH1081 Topic1 LectureNotes
(Why? )
Exercise. For A = {0, 1, {0, 1}}, are the following statements true or false?
1.
2.
3.
4.
5.
A
A
P (A)
P (A)
0A
6.
7.
8.
9.
10.
0A
{0, 1} A
{0, 1} P (A)
{{0, 1}} A
{{0, 1}} A
B
B
{} B
{} P (B)
{0} P (B)
6.
7.
8.
9.
10.
{{0}} P (B)
1B
{1} B
{1} P (B)
{{1}} P (B)
U
A
A B = A \ B = {x U | x A and x 6 B}
complement (c ,
) - not
Ac = A = U \ A = {x U | x
/ A}
union () - or
A B = {x U | x A or x B}
intersection () - and
A B = {x U | x A and x B}
Two sets A and B are disjoint if A B = .
A B = {1}
A B = {1, 2, 3, 5}
A B = {3, 5} .
0
9
21
VB
C++
19
22
17
Java
x = 100 (17 + 22 + 9 + 2 + 19 + 21 + 0) = 10
5
|B| = 89,
|A C| = 26,
|C| = 71,
|B C| = 43,
AB =BA
AB =BA
A (B C) = (A B) C
A (B C) = (A B) C
A (B C) = (A B) (A C)
A (B C) = (A B) (A C)
A (A B) = A
A (A B) = A
AU =U A=A
A=A=A
AA=A
AA=A
(Ac )c = A
A B = A Bc
(A B)c = Ac B c
U
A=A=
AU =U A=U
A Ac = Ac A =
A Ac = Ac A = U
(A B)c = Ac B c
U
For a set expression involving only unions, intersections and complements, its
dual is obtained by replacing with , with , with U , and U with .
The laws of set algebra mostly come in dual pairs.
Example. Proof of De Morgans law (A B)c = Ac B c :
(i) Suppose that x (A B)c . Then we have x
/ A B, so x
/ A and x
/ B.
c
c
c
c
Thus, x A and x B , so x A B .
This proves that (A B)c Ac B c .
(ii) Suppose now that x AcB c . Then x Ac and x B c , so x
/ A and x
/ B.
c
Thus, x
/ A B, so x (A B) .
This proves that Ac B c (A B)c .
Combining (i) and (ii), we conclude that (A B)c = Ac B c .
8
Example. We can use the laws of set algebra to simplify (Ac B)c B:
(Ac B)c B =
=
=
=
=
((Ac )c B c ) B
(A B c ) B
A (B c B)
AU
U
De Morgans law
Double complement law
Associative law
Union with complement
Domination
i=1
Ai = A1 A2 An
and
n
\
i=1
Ai = A1 A2 An
k=1
3
\
k=1
Ak
k=2
6
\
Ak
k=3
10
ii) If S
/ S, then the definition of S implies that S S, also a contradiction.
Hence neither S S nor S
/ S. This is Russells paradox.
Why does this paradox occur?
Example. (The Barber Puzzle) In a certain town there is a barber who
shaves all those men, and only those, who do not shave themselves.
Does the barber shave himself?
A B = {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3)} .
When X and Y are small finite sets, we can use an arrow diagram to represent
a subset S of X Y : we list the elements of X and the elements of Y , and
then we draw an arrow from x to y for each pair (x, y) S.
Example. Let X = {a, b, c}, Y = {1, 2, 3, 4}, and S = {(a, 2), (a, 3), (c, 1)}.
The arrow diagram for S is
1
2
3
4
a
b
c
12
Y is the codomain of f .
For any x X, there is a unique y Y for which (x, y) belongs to f .
We write f (x) = y or f : x 7 y.
We call y the image of x under f or the value of f at x.
f
1
2
3
4
or
f : x 7 x2 .
3 =
3 =
3 =
3 =
Exercise. What are the ranges of the floor and ceiling functions?
Plot the graphs of the floor and the ceiling functions.
14
f : R R, f (x) = x
g : R R, g(x) =
1
x
h : R R, h(x) = x2 2x 1 .
1
2
3
4
The image of the set {a, b, e} under f is f ({a, b, e}) = {2, 3}.
The inverse image of the set {1, 2, 4} under f is f 1 ({1, 2, 4}) = {b, c, d}.
Exercise. Let f : R R be given by f (x) = x2 . Find
15
function
injective
one-to-one
surjective
onto
bijective
16
a
b
c
a
b
c
a
b
c
f1
1
2
3
4
a
b
c
f4
1
2
3
4
a
b
c
1
2
f7
f1
a
b
c
f2
f2
f5
a
b
c
1
2
3
a
b
c
a
b
c
1
2
f8
f3
1
2
3
4
f4
f5
function
injective
surjective
bijective
17
a
b
c
1
2
f9
f6
f7
f3
1
2
3
4
f6
1
2
3
4
1
f10
f8
f9
f10
f9 : R R,
f9 (x) = x
f10 : R R,
f10 (x) = x2 + 1
f1
f2
f3
f4
f5
f6
f7
f8
f9
function
injective
surjective
bijective
Plot the graph in each case and give reasons for your answers.
18
f10
19
and
g : Z Z, g(y) = 2y .
x+1
2
and
g : R R, g(y) =
20
y 2 + 1.
x=
y+5
2
y+5
.
2
Exercise. For each of the following functions, find its inverse if it is invertible.
f : R Z,
g : (R {1}) (R {0}),
f (x) = x
g(x) = x32+1
21
22
23
k=m
ak = am + am+1 + am+2 + + an .
Properties of summation:
n
X
(ak + bk ) =
k=m
but
n
X
k=m
n
X
k=m
ak +
n
X
bk
n
X
and
k=m
ak bk 6=
( ak ) =
k=m
n
X
k=m
ak
n
X
k=m
bk
n
X
ak ,
k=m
Example. The sum of the first n+1 terms of the arithmetic progression {a+kd}
is
n
X
(2a+nd)(n+1)
(a+kd) = a + (a+d) + (a+2d) + + (a+nd) =
.
2
k=0
Why?
1
k=0
Why?
24
n(n + 1)
k =
2
k=1
and
n
X
k=1
k2 =
n(n + 1)(2n + 1)
,
6
evaluate
10
X
(k 3)(k + 2)
k=1
(3k + 2)2
k=11
25
k+2
7
X
1
1
=
.
k+2
k
k=3
More generally, for any sequence {ak } and any integer d we have
n
X
n+d
X
ak =
k=m
akd .
k=m+d
For example,
a1 + a2 + a3 =
3
X
k=1
ak =
4
X
k=2
Exercise. Simplify
n+1
X
k=2
k2
n1
X
k=1
x +
n1
X
xk+1
k=0
26
ak1 =
2
X
k=0
ak+1 = .
k(k
+
3)
k
k+3
k=1
k=1
1
1 1
1 1
1 1
1
1
= 1
+
+ +
.
4
2 5
3 6
4 7
n n+3
X
This is an example of a telescoping sum:
ak , where ak = bk bk+d .
By changing the summation index, we see that
n
X
k=1
n
n
n
n+3
X
X
3
1 X 1
1 X1
=
k(k + 3)
k
k
+
3
k
k
k=1
k=1
k=1
k=4
3
X
1
k=1
= 1+
Exercise. Use the identity
k=1
k=4
n
X
1
k=4
n+3
X
1
+
k k=n+1 k
1 1
1
1
1
+
.
2 3 n+1 n+2 n+3
2
1
2
1
=
+
for k 1
k(k + 1)(k + 2)
k
k+1 k+2
to simplify
n
X
n
X
1
2
k(k + 1)(k + 2)
27
k=m
Properties of product:
!
n
n
Y
Y
ak bk =
ak
k=m
k=m
ak = am am+1 am+2 an .
n
Y
k=m
bk
but
n
Y
(ak + bk ) 6=
k=m
Exercise. Simplify
n
Y
k
k+3
k=1
28
n
Y
k=m
ak +
n
Y
k=m
bk .