Math 2151 Relations and Functions-13
Math 2151 Relations and Functions-13
Relations are similar to sets in some sense, for example, they are
equal if they have the same ordered pairs.
Theorem
Two relations R1 , R2 are equal if and only if
∀ x∀ y(( x, y) ∈ R1 ↔ ( x, y) ∈ R2 )
Definition
A relation R ⊆ A × A is said to be symmetric if for all a, b ∈ A
( a, b) ∈ R → (b, a) ∈ R.
( x, y) ∈ R ∧ ( y, z) ∈ R → ( x, z) ∈ R.
Definition
Let R ⊆ A × A be a partial order. Two elements a, b ∈ A are
comparable if
( a, b) ∈ R ∨ (b, a) ∈ R
We say that R ⊆ A × A is a total order if in adition to being a
partial order, every two elements in A are comparable. That is,
∀ a ∈ A∀b ∈ A(( a, b) ∈ R ∨ (b, a) ∈ R)
Definition
A Hesse diagram of a partial order R ⊆ A × A consists of:
a vertex (a node which might join lines) for each element of
A.
if aRb, then b is position higher than a.
if aRb and there is not a c different from a and b s.t. aRc and
cRb, then a line conects a and b.
{ a, b, c}
{ a, b} { a, c} {b, c}
{ a} {b} {c}
c f
d b e
a h
Definition
Let ( P, ≤) be a partially ordered set. Let A be a subset of P. An
upper bound of A is an element u ∈ A s.t.
a≤u
∀ a ∈ A( a ≤ u′ )) → u ≤ u′
l≤a
∀ a ∈ A(u′ ≤ a)) → u′ ≤ u
(u′ lower bound implies u′ ≤ u). When it exists, the greatest lower
bound of A is unique and we call it glb( A). glb( A) may not exist.
For a, b ∈ A, the glb({ a, b}) is called a ∧ b.
Math 2151: Discrete Math for Engineering Relations and Functions
Example: finding some lub’s in
Consider the previous Hesse diagram
k
c f
d b e
a h
g
We have the following: lub{b, e} = b ∨ e = c, but also
lub{ a, h} = a ∨ h = c (c is the only upper bound of {e, h}).
Somme lub’s that don’t exist are lub{c, f } (there are no upper
bounds of {c, f })
Math 2151: Discrete Math for Engineering Relations and Functions
More examples of lub’s
f g
d e
a b c
In this partially ordered set lub{ a, b} = a ∨ b doesn’t exist. The
upper bounds of { a, b} are d, e. But the set {d, e} doesn’t have a
minimum since d and e are not comparable.
Now, lub{b, c} = e. Let’s see why. {b, c} has upper bounds e, f , g.
And the minimum of the upper bounds is e.
[ a] = {b ∈ A : aRb}.
A/ R = {[ a] : a ∈ A}
and
kZ, kZ + 1, kZ + 2, . . . , kZ + (k − 1)
Let’s say we want the sets on the right hand side to be the
equivalence classes. That is, we want all elements in [0, 1) to be
equivalent, and all elements in [1, 2) to be equivalent as well. We
can declare that a ∼ b if and only if
a, b ∈ [0, 1) ∨ a, b ∈ [1, 2) .
Lemma
Let ∼⊆ A × A be an equivalence relation. Then:
If a ∈ A, then [ x] = [ a] if and only if x ∼ a.
a ∈ [ a] (the union of all equivalence classes is A)
If a, b ∈ A, and [ a] ∩ [b] ̸= ∅, then [ a] = [b]. (The
equivalence classes are mutually disjoint)
Definition
Let A be a set. A partition is a set P ⊆ P ( A) s.t.
For every a ∈ A there is a p ∈ P s.t. a ∈ p. (The union of the
elements of P is the whole A)
For a, b ∈ P, if a ∩ b ̸= ∅, then a = b. (The elements of P are
mutually disjoint).
a ∼ p b ⇔ ∃ p ∈ P( a ∈ p ∧ b ∈ p)
Definition
Let A, B be sets. A function f : A → B is f ⊆ A × B such that
∀ a ∈ A∃!b ∈ B(( a, b) ∈ f ).
f = {( x, x2 − 1) ∈ R × R : x ∈ R},
and
g = {( x, ln( x)) ∈ R × R : x ∈ R}
f ( x) = f ( y) → x = y,
ran( f ) = { f ( a) : a ∈ A}
− · · · + (−1)n+1 | A1 ∩ · · · ∩ An |
| A ∪ B ∪ C | = | A| + | B| + |C | − | A ∩ B| − | A ∩ C | − | B ∩ C | + | A ∩ B ∩ C |
Fi = { f : {1, 2, 3, 4} → {1, 2, 3} : i ∈
/ ran f }
We have that
| F | = | F1 ∪ F2 ∪ F3 | = | F1 | + | F2 | + | F3 | − | F1 ∩ F2 | − | F1 ∩ F3 |
− | F2 ∩ F3 | + | F1 ∩ F2 ∩ F3 |
= 3 × 24 − 3 + 0
+ (−1n−1 ) | F1 ∩ · · · ∩ Fn |
n m n
= (n − 1) − (n − 2)m + · · · +
n−1 n−2
n−1 n
(−1) (n − n)m
0
Math 2151: Discrete Math for Engineering Relations and Functions
Keep on!
Definition
The number of ways m DISTINCT objects can be distributed into
n INDISTINGUISHABLE boxes with no box left empty is
1 n
k n
S(m, n) = (−1) (n − k )m
n! k∑
=0
k
2x + 2 = 2y + 1
2x = 2y
x=y
x2 − 2x + 4 = y2 − 2y + 4
x2 − y2 = 2x − 2y
( x − y)( x + y) = 2( x − y)
Definition
A function f : A → B is said to be invertible when the set of pairs
{(b, a) : ( a, b) ∈ f }
f −1 ( b ) = a ⇔ f ( a ) = b
f −1 ( y ) = x ⇔ f ( x ) = y
⇔ 2x − 1 = y
⇔ 2x = y + 1
y+1
⇔x=
2
y+1
Altogether this says that f −1 ( y) = 2 .
Remark:
Notice that this is similar to what you have to do to show
that f is surjective. Given y, we find x s.t. f ( x) = y in terms
of y. Since f is injective this x is unique and we call it f −1 ( x)
g ◦ f ( a) = g( f ( a))
Definition
Let A be a set. There is a function 1 A : A → A called the identity
of A s.t. 1 A ( a) = a for all a ∈ A.
f ◦ 1 A = f , and 1 A ◦ g = g
Lemma
Composition is associative. That is, if f : A → B, g : B → C, and
h : C → D, then
h ◦ ( g ◦ f ) = (h ◦ g) ◦ f
f ◦ g( x) = f ( g( x)) = f ( x2 − 1) = 2( x2 − 1) + 1 = 2x2 − 1
g ◦ f ( x) = g( f ( x)) = g(2x + 1) = (2x + 1)2 − 1 = 4x2 + 4x
g ◦ f = 1 A , and f ◦ g = 1 B
2x + 1
f ( x) =
2x − 1
Prove that f is a bijective function by finding
g : R \ {1} → R \ {0} s.t. g ◦ f and f ◦ g are identities (and
proving it!).
Is bijective.
I’ll just explain this one without giving a precise formula. But
there is a bijective function f : N → N × N. To give a
bijection from N to N × N is the same as puting the elements
of N × N in a line without repeating any elements. f (0)
would be the first element in line, f (1) the second element in
line f (2) the third element in line, and so on. Now look at
the picture in the next page
f (0) = (0, 0), f (1) = (1, 0), f (2) = (0, 1), f (3) = (0, 2) and so
on.
Math 2151: Discrete Math for Engineering Relations and Functions
Some uncountable sets
Proof:
Suppose that there is a function f : N → (0, 1) that was bijective.
We prove that this is impossible by constructing an element
d ∈ (0, 1) which is not any of the f (n)’s. We will write each f (n)
in decimal form as f (n) = 0.an,0 an,1 an,2 an,3 . . .
In general all intervals in the real line are of the same size (and
thus, uncountable) if they contain more than one element.
For example if a < b are real numbers, the function
f : (0, 1) → ( a, b) given by f ( x) = (b − a) x + a gives a
bijection between (0, 1) and ( a, b). Can you construct an
inverse to f ?
Even the interval (−∞, ∞) = R has the same number of
elements as, for example, the interval (− π2 , π2 ) as can be seen
from the function tan : (− π2 , π2 ) → R whose inverse is
arctan : R → (− π2 , π2 ).