Relation
Relation
Relation
Relations
Dr. Hyunyoung Lee
1
Rabbits
2
Rabbits
Let
A = { Albert, Bertram, Chris }
be the set of rabbits.
3
Binary Relations
4
Examples
C = { (a,b) in ZxZ | a = b or a = -b }
5
Notation
6
Example
Let A be the set of city names of the USA. Let B be the set
of states. Define the relation C
C = { (a,b) in A x B | a is a city of b }
Then
(College Station, Texas)
(Austin, Texas)
(San Francisco, California)
all belong to the relation C.
7
Remark
8
Plan
9
Basic Properties of Relations
10
Reflexivity
11
Test Yourself...
12
Symmetry
13
Test Yourself...
14
Antisymmetry
15
Test Yourself...
16
Warning
17
Transitive
18
Test Yourself...
19
Equivalence Relations
20
Equivalence Relation
21
Example: Equality
22
Example: Congruence mod m
23
Example: Congruence mod m
24
Equivalence Classes
25
Example
26
Theorem
27
= + by Induction Hypothesis
2 2
2n + 2 + n2 + n n2 + 3n + 2
= =
Proof
2 2
(n + 1)(n + 2)
=
2
Therefore, the claim follows by induction on n.
Let A(n) be the claimed equality.
Suppose that
Induction Step: We aRb
need toholds.
show thatWe 8n are going
1 : [A(n) to show
! A(n + 1)] that
[a] ✓ [b] holds.
As induction hypothesis,Let c 2that[a].
suppose A(n)This means that aRc
holds. Then,
holds. Since
n+1
X R is symmetric,
X n aRb implies that bRa.
fk = fn+1 + fk
By transitivity,
k=1
bRa and
k=1
aRc imply that bRc holds.
Hence, c 2 [b]. = fTherefore,
n+1 + fn+2 1 weby have
Inductionshown that [a] ✓
Hypothesis
[b]. The proof = fthat
n+3 1[b]by✓ [a] is similar. Hence, we
definition
have shown
Therefore, that
the claim statement
follows by inductiona) onimplies
n. statement b).
We will show now that b) implies c). Since a 2 [a],
we know that the equivalence class of a is not empty.
As [a] = [b] 6= ;, we have [a] \ [b] 6= ;.
28
Proof (continued)
29
Partial Order Relations
30
Partial Orders
31
Example 1
32
Example 2
33
Test Yourself ...
34
Comparable Elements
35
Total Orders
36
Lexicographic Ordering
37
Example
38
Hasse Diagram
39
Examples
40
Maximal and Minimal Elements
41
Example
12 20
Determine the maximal elements of the set
{2,4,5,10,12,20,25}, 4 10 25
42
Least and Greatest Element
43
Test Yourself...
44
Lattices
45
Upper and Lower Bounds
46
Example
4 10 25
2 5
The subset A = {4,10} has 20 as an upper bound, and 2 as a
lower bound.
The subset A = {12} has 12 as an upper bound, and 2, 4 and 12
as lower bounds.
47
Least Upper Bounds
48
Greatest Lower Bounds
49
Example
Consider the poset (S={2, 4, 6, 9, 12, 18, 27, 36, 48, 60, 72}, | ).
Draw the Hasse diagram: 72
60 48
36
12 18 27
4 6
2 9
What are the upper bounds of the subset A={2, 9} ?
What are the lower bounds of the subset B={60, 72} ?
50
Lattices
51
Example
52