0% found this document useful (0 votes)
15 views12 pages

Discrete Class 23-24

The document discusses relations in discrete mathematics, defining various types such as reflexive, symmetric, antisymmetric, and transitive, along with their properties and representations using matrices and digraphs. It also covers the concept of closure for relations, including reflexive and symmetric closures, with examples illustrating how to derive these closures. Additionally, the document provides visual representations of relations through directed graphs and outlines operations such as union, intersection, and composition of relations.

Uploaded by

saishivam2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views12 pages

Discrete Class 23-24

The document discusses relations in discrete mathematics, defining various types such as reflexive, symmetric, antisymmetric, and transitive, along with their properties and representations using matrices and digraphs. It also covers the concept of closure for relations, including reflexive and symmetric closures, with examples illustrating how to derive these closures. Additionally, the document provides visual representations of relations through directed graphs and outlines operations such as union, intersection, and composition of relations.

Uploaded by

saishivam2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Discrete Mathematics

3. Relations
Class – 23-24
Relations Problem: Set Relations
Let A = {1, 2, 3}. Consider the following relations on the power set of A (the set of all subsets of A):
R1: {(X, Y) | X ⊆ Y} (X is a subset of Y)
R2: {(X, Y) | X ∩ Y ≠ ∅} (X and Y have a non-empty intersection)
R3: {(X, Y) | |X| = |Y|} (X and Y have the same cardinality/number of elements)
Determine which of these relations are reflexive, symmetric, antisymmetric, and transitive.
Sol:
Relation Reflexive Symmetric Antisymmetric Transitive
({1} ⊆ {1, 2}, but
(If X ⊆ Y and Y (If X ⊆ Y and Y
R1: X ⊆ Y (X ⊆ X) {1, 2} is not a subset
⊆ X, then X = Y) ⊆ Z, then X ⊆ Z)
of {1})

(X ∩ X = X,
({1} ∩ {2} = ∅,
which is non-empty ({1} ∩ {2} = ∅,
R2: X ∩ Y ≠ ∅ (X ∩ Y = Y ∩ X) {2} ∩ {3} = ∅, but
unless X is the empty {2} ∩ {1} = ∅, 1 != 2)
{1} ∩ {3} = ∅)
set)

Two sets can have If |X| = |Y| and


R3: {(X, Y) | |X| = If |X| = |Y|, then
|X| = |X| the same cardinality |Y| = |Z|, then |X| =
|Y|} |Y| = |X|
without being equal |Z|
Relations
Quantifier Definitions:

Property Quantifier Definition Intuitive Explanation

Every element in A is related to


Reflexive ∀a ∈ A, (a, a) ∈ R
itself.

If a is related to b, then b is related


Symmetric ∀a, b ∈ A, (a, b) ∈ R → (b, a) ∈ R
to a.

If a is related to b and b is related to


Antisymmetric ∀a, b ∈ A, ((a, b) ∈ R ∧ (b, a) ∈ R) → a = b a, then a and b must be the same
element.

Transitive ∀a, b, c ∈ A, ((a, b) ∈ R ∧ (b, c) ∈ R) → (a, c) ∈ R If a is related to b, and b is related


to c, then a is related to c.
Representing Relations Using Matrices

Zero–one matrix:
A relation between finite sets can be represented using a zero–one matrix. Suppose that R is a relation
from A = {a1, a2,…, am} to B = {b1, b2,…, bn}. (Here the elements of the sets A and B have been listed in b1 b2 b3
a particular, but arbitrary, order. Furthermore, when A = B we use the same ordering for A and B.) The a1 1 0 0
relation R can be represented by the matrix a2 0 0 1
MR = [mij], where mij = 1 if (ai, bj) ∈ R,
0 if (ai, bj) ∉ R.
Representing Relations Using Matrices * indicates 0 or 1
Property Matrix Characteristic Explanation Example
Every element is related b1 b2 b3
Reflexive All diagonal entries are 1
to itself. a1 1 * *
a2 * 1 *
a3 * * 1
If (a, b) is in the relation,
Matrix is equal to its transpose b1 b2 b3
Symmetric then (b, a) is also in the
(M = Mᵀ) a1 * 0 0
relation.
a2 0 * 1
a3 0 1 *

If (a, b) and (b, a) are in the b1 b2 b3


If M[i, j] = 1 and M[j, i] = 1, then
Antisymmetric relation, then a and b must a1 * 1 0
i=j
be the same element. a2 0 * 1
a3 1 0 *

If (a, b) and (b, c) are in the b1 b2 b3 Always


If M[i, j] = 1 and M[j, k] = 1, then a1 1 1 1 triangular?
Transitive relation, then (a, c) must
M[i, k] must be 1 a2 0 1 1
also be in the relation.
a3 0 0 1
Representing Relations Using Matrices
Representing Relations Using Matrices

The union, intersection and composition of two relations:


Operation Matrix Representation Explanation Example

MR₁ = 1 0 ; MR₂ = 0 1
MR₁∪R₂ = MR₁∨ MR₂ The resulting matrix has a 1
Union 0 1 1 1
(element-wise logical where either MR₁ or MR₂ (or
(R₁ ∪ R₂) MR₁∪R₂ = 1 1
OR) both) have a 1.
1 1

MR₁ = 1 0 ; MR₂ = 0 1
MR₁∩R₂ = MR₁ ∧ MR₂ The resulting matrix has a 1
Intersection 0 1 1 1
(element-wise logical only where both MR₁ and MR₂
(R₁ ∩ R₂) MR₁∩R₂ = 0 0
AND) have a 1.
0 1

The resulting matrix MR₂∘R₁ MR₁ = 1 0 ; MR₂ = 0 1


has a 1 in the (i, j) position if 0 1, 1 1
MR₂∘R₁ = MR₁ * MR₂
Composition there exists a k such that MR₁ MR₂∘R₁ = MR₁*MR₂
(Boolean matrix
(R₂ ∘ R₁) [i, k] = 1 AND MR₂ [k, j] = 1. = 0 0
multiplication)
Note the order: R₂∘R₁ means R₁ 1 1
is applied first, then R₂.
Representing Relations Using Matrices

Important note:
Representing Relations Using Digraphs: A Visual Journey
Relations, those intricate connections between elements of a set, can be brought to life in more ways than one. We’ve
already explored how to represent them as a list of ordered pairs or as a zero–one matrix. But now, let’s step into the
world of visual storytelling—where relations are transformed into directed graphs, or digraphs, a vivid and intuitive
way to depict connections.
The Art of Digraphs
Imagine a canvas where each element of a set is a point (or a vertex), and every ordered pair is an arc (or edge)—a
directed arrow flowing from one point to another. This is the essence of a digraph: a pictorial representation that
breathes life into abstract relations.
❖ Vertices (Nodes): Each element of the set is a vertex, a dot on the canvas.
❖ Edges (Arcs): Each ordered pair (a, b) is an edge, an arrow pointing from a to b.
❖ Loop: When a and b are the same, the edge becomes a loop—a circular arrow that
starts and ends at the same vertex, symbolizing a relation of an element to itself.
The Anatomy of Digraphs
Let’s break it down:
1.Vertices (V): The set of points representing the elements of the set.
2.Edges (E): The set of ordered pairs (a,b), where:
1. a is the initial vertex (the starting point of the arrow).
2. b is the terminal vertex (the endpoint of the arrow).
A loop, an edge of the form (a, a), is a self-referential arc that curls back to its origin, adding a touch of symmetry to the
graph.
Representing Relations Using Digraphs: A Visual Journey
EXAMPLE Draw the directed graph of the relation R1 = {(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (4, 1)} on
the set {1, 2, 3, 4}.
EXAMPLE What are the ordered pairs in the relation R2 represented by the directed graph shown in Figure 5?
Solution: The ordered pairs (x, y) in the relation are
R2 = {(1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (3, 1), (3, 3), (4, 1), (4, 3)}.
Each of these pairs corresponds to an edge of the directed graph, with (2, 2) and (3, 3) corresponding to loops.
EXAMPLE Determine whether the relations for the directed graphs shown in Figure 6 are reflexive, symmetric,
antisymmetric, and/or transitive.
Solution: S1: Reflexive (loops at all vertices), neither symmetric nor antisymmetric (edge a→b but not b→a, and
bidirectional edges between b and c), and not transitive (no edge a→c despite a→b and b→c).
S2: Not reflexive (missing loops), symmetric (edges between distinct vertices are bidirectional), not
antisymmetric, and not transitive ((c,a) and (a,b) exist, but (c,b) does not).

Figure 5 The directed


Figure 4 The directed graph of R1 graph of R2 Figure 6 The directed graph of S1 & S2
Closure of a Relation:

Def: If R is a relation on a set A, then the closure of R with respect to P, if it exists, is the relation S on A with
property P that contains R and is a subset of every subset of A × A containing R with property P.

Uniqueness of a closure: If a relation S with property P is a subset of every relation containing R with property P,
then S is unique. This means there's only one “smallest” relation that satisfies the criteria.
Thus, closure of a relation is always unique.

Reflexive Closure
❖ Consider the set A: {1, 2, 3} and
❖ Consider the relation R: {(1, 1), (1, 2), (2, 1), (3, 2)} (Not reflexive because 2 and 3 are not related to themselves)
❖ Reflexive Property: For every a in A, (a, a) must be in the relation.
❖ Reflexive Closure: Add (2, 2) and (3, 3).
❖ Resulting Relation (S): {(1, 1), (1, 2), (2, 1), (3, 2), (2, 2), (3, 3)}
❖ General Rule: The reflexive closure of R is R ∪ Δ, where Δ = {(a, a) | a ∈ A} (the diagonal relation).

EXAMPLE (reflexive closure) What is the reflexive closure of the relation R = {(a, b) ∣ a < b} on the set of integers?
Solution: The reflexive closure of R is
R∪Δ = {(a, b) ∣ a < b} ∪ {(a, a) ∣ a ∈ Z} = {(a, b) ∣ a ≤ b}.
Closure of a Relation:

Symmetric Closure
❖ Consider the set A: {1, 2, 3} and
❖ Consider the relation R: {(1, 1), (1, 2), (2, 3), (3, 1)} (Not symmetric because (1,2) exists but (2,1) doesn't exist,
similarly (2,3) exists but (3,2) doesn't exist)
❖ Symmetric Property: If (a,b) is in the relation then (b, a) must be in the relation.
❖ Symmetric Closure: Add (2, 1) and (3, 2).
❖ Resulting Relation (S): {(1, 1), (1, 2), (2, 1), (3, 2), (2, 3), (3, 1)}
❖ General Rule: The symmetric closure of R is R ∪ R⁻¹, where R⁻¹ = {(b, a) | (a, b) ∈ R} (the inverse relation).

EXAMPLE (symmetric closure) What is the symmetric closure of the relation R = {(a, b) ∣ a > b} on the set of
positive integers?

Solution: The symmetric closure of R is the relation


R ∪ R−1 = {(a, b) ∣ a > b} ∪ {(b, a) ∣ a > b} = {(a, b) ∣ a ≠ b}.
This last equality follows because R contains all ordered pairs of positive integers, where the first element is
greater than the second element, and R−1 contains all ordered pairs of positive integers, where the first element
is less than the second.

What about transitive closure???

You might also like