Professional Documents
Culture Documents
Product Sets
Definition: An ordered pair 𝑎𝑎, 𝑏𝑏 is a listing of the
objects/items 𝑎𝑎 and 𝑏𝑏 in a prescribed order: 𝑎𝑎 is the first
and 𝑏𝑏 is the second. (a sequence of length 2)
Definition: The ordered pairs 𝑎𝑎1 , 𝑏𝑏1 and 𝑎𝑎2 , 𝑏𝑏2 are
equal iff 𝑎𝑎1 = 𝑎𝑎2 and 𝑏𝑏1 = 𝑏𝑏2 .
𝐴𝐴 × 𝐵𝐵 =
𝐵𝐵 × 𝐴𝐴 =
Then 𝑅𝑅 =
Then 𝑅𝑅 =
© S. Turaev, CSC 1700 Discrete Mathematics 7
Relations & Digraphs
Definition: Let 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation from 𝐴𝐴 to 𝐵𝐵.
The domain of 𝑅𝑅, denoted by Dom 𝑅𝑅 , is the set of
elements in 𝐴𝐴 that are related to some element in
𝐵𝐵.
The range of 𝑅𝑅, denoted by Ran 𝑅𝑅 , is the set of
elements in 𝐵𝐵 that are second elements of pairs in
𝑅𝑅.
Dom R =
Ran R =
© S. Turaev, CSC 1700 Discrete Mathematics 9
The Matrix of a Relation
Definition: Let 𝐴𝐴 = 𝑎𝑎1 , 𝑎𝑎2 , … , 𝑎𝑎𝑚𝑚 , 𝐵𝐵 = 𝑏𝑏1 , 𝑏𝑏2 , … , 𝑏𝑏𝑛𝑛
and 𝑅𝑅 ⊆ 𝐴𝐴 × 𝐵𝐵 be a relation. We represent 𝑅𝑅 by the 𝑚𝑚 ×
𝑛𝑛 matrix 𝐌𝐌𝑅𝑅 = [𝑚𝑚𝑖𝑖𝑖𝑖 ], which is defined by
1, 𝑎𝑎𝑖𝑖 , 𝑏𝑏𝑗𝑗 ∈ 𝑅𝑅
𝑚𝑚𝑖𝑖𝑖𝑖 = �
0, 𝑎𝑎𝑖𝑖 , 𝑏𝑏𝑗𝑗 ∉ 𝑅𝑅
1 3
4
Find the relation 𝑅𝑅:
© S. Turaev, CSC 1700 Discrete Mathematics 12
The Digraph of a Relation
Definition: If 𝑅𝑅 is a relation on a set 𝐴𝐴 and 𝑎𝑎 ∈ 𝐴𝐴, then
the in-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such that
𝑏𝑏, 𝑎𝑎 ∈ 𝑅𝑅;
the out-degree of 𝑎𝑎 is the number of 𝑏𝑏 ∈ 𝐴𝐴 such
that 𝑎𝑎, 𝑏𝑏 ∈ 𝑅𝑅.
2
Example: Consider the digraph:
1 3
1 4
1 2
3 4
1 1 0 0 0
0 0 1 0 0
𝐌𝐌𝑅𝑅 = 0 0 0 1 1
0 0 0 0 1
0 0 0 0 0
Compute 𝐌𝐌𝑅𝑅2 .
Symmetry:
Asymmetry:
Antisymmetry:
Is 𝑅𝑅 transitive?
Is 𝑅𝑅 transitive?
© S. Turaev, CSC 1700 Discrete Mathematics 27
Transitive Relations
Exercise: Let 𝐴𝐴 = 1,2,3 and 𝑅𝑅 be the relation on 𝐴𝐴
whose matrix is
1 1 1
𝐌𝐌𝑅𝑅 = 0 0 1
0 0 1
2
Show that 𝑅𝑅 is transitive. (Hint: Check if 𝐌𝐌𝑅𝑅 ⊙ = 𝐌𝐌𝑅𝑅 )