# relations and diagraphs

Document Sample

```					                               Module ECSC301
Elements of Discrete and Continuous Mathematics

Lecture 6
Relations and Digraphs

Product Sets

• Ordered Pair
o An ordered pair (a, b) is a listing of the objects a and b in a prescribed order,
with ‘a’ appearing first and ‘b’ appearing second
o Generally, (a, b) is not equal to (b, a)

• Product Set or Cartesian Product
o We define the Product Set or Cartesian Product A x B as the set of all ordered
pairs (a, b) with a ∈ A and b ∈ B. Thus
A x B = {(a, b) | a ∈ A and b ∈ B}

Theorem 1       For any two finite, non–empty sets A and B, |A x B| = |A| x |B|

• Partition or Quotient Set
o A Partition or Quotient Set of a non–empty set A is a collection P of non–empty
subsets of A such that
1. Each element of A belongs to one of the sets in P (i.e. P = A)
2. If A1 and A2 are distinct elements of P (i.e. A1 ∈ P, A2 ∈ P, A1 ≠ A2),
then A1 ∩ A2 = ∅. The sets in P are called the blocks or cells of the partition

Relations and Diagraphs

• Relation
o Relations are common in Mathematics
o In propositional logic, we saw that one proposition could be equivalent to
another, e.g. p ↔ q is equivalent to (p → q) (q → p)
o In everyday life, we have all sorts of relation, e.g. John is studying Biology,
Alice is studying Computer Science, etc.
o So we have a set A = {John, Alice, Bob, ...} and another set B = {Biology,
Computer Science, Geography, ...}
o In set terminology, we often refer to the relation of a set as being a subset of
another set
o For our purposes, we will only be studying a binary relation, i.e. the relation
between one element of a set to an element of the same or different set
o Let A and B are non–empty sets. A relation R from A to B is subset of A x B
o If R ⊆ A x B and (a, b) ∈ R, we say that a is related to b by R which is written
as aRb
o R is a statement about ordered pairs (a, b) belonging to A x B, i.e. it will tell us
whether a is related to b or a is not related to b
o Such statement is either true or false
o Frequently, A and B are equal. In this case, we often say that R ⊆ A x A is a
relation on A instead of a relation from A to A
o In such cases, we often say that R ⊆ A x A is a relation on A instead of a
relation from A to A and we write it as aRa

• Domain and Range of Relations
o Let R ⊆ A x B be a relation from A to B. We now define various important and
useful sets related to R
o The domain of R, denoted by Dom(R), is the set of elements in A which are
related to some element in B. In other words, Dom(R), a subset of A, is the set
of all first elements in the pairs that make up R
o We define the range of R, denoted by Ran(R), to be the set of elements in B
which are second elements of pairs in R, that is, all elements in B which are
related to some element in A

Theorem 2        Let
R be a relation from A to B
A1 and A2 be subsets of A
Then
If A1⊆ A2, then R(A1) ⊆ R(A2)
R(A1 ∪ A2) = R(A1) ∪ R(A2)
R(A1 ∩ A2) ⊆ R(A1) ∩ R(A2)

• Matrix of a Relation
o If A = {a1, a2, …, am} and B = {b1, b2,…, bn} are finite sets, containing m and n
elements respectively and R is a relation from A to B, we can represent R by
the m x n matrix MR = [mij], which is defined as follows:
o mij = 1 if (ai, bj) ∈ R
o mij = 0 if (ai, bj) ∉ R
o The matrix MR is called the matrix of R

• Diagraphs
o If A is a finite set and R is a relation on A, we can represent R pictorially as
follows (see fig. 6)
o Draw a small circle for each element of A and label the circle with the
corresponding element of A
o These circles are called vertices
o Draw a directed line, called an edge, from vertex ai to vertex aj if and only if
aiRaj (aiRaj denotes (ai, aj) ∈ R). The resulting pictorial representation of R is
called a directed graph or diagraph of R

Fig. 6 Drawing a Digraph
• Paths in Relations and Digraphs
o Suppose that R is a relation on a set A
o A path of length n in R from a to b is a finite sequence π:a, x1, x2,…, xn-1, b,
beginning with a and ending with b, such that aRx1, x1Rx2,…, xn-1Rb
b
xn-1

x3
a

x1

x2

Fig. 6 Path from a to b

Properties of Relations

• Reflexive Relation
o A relation R on a set A is reflexive if (a, a) ∈ R for every a ∈ A (i.e. if aRa for all
a ∈ A), i.e. a reflexive relation on a set is one for which every element is
related to itself, see fig. 7
o The “less than or equal to” relation is a reflexive relation defined on a set of
integers
o The relation “ the product of x and y is even” is reflexive on a set of even
numbers

Fig. 7 Reflexive Relation                 Fig. 8 Ir–reflexive Relation

• Ir–reflexive Relation
o An ir–reflexive relation is opposite to a reflexive relation
o In an ir–reflexive relation, no element is related to itself
/
o A relation R on a set A is ir–reflexive if aRa for every a ∈ A (i.e. for all a ∈ A,
(a, a) ∉ R), see fig. 8
o An example of an ir–reflexive relation is x < y
• Symmetric Relation
o A relation R on a set A is symmetric if whenever aRb, then bRa, i.e. the relation
R is symmetric when aRb if and only if bRa (remember that aRb means a is
relation to b by R where R ⊆ A x B), see fig. 9
o Thus, whenever a is related to b, b is related to a
o It then follows that R is not symmetric if we have some a and b ∈ A with aRb,
but bRa/

Fig. 9 Symmetric Relation             Fig. 10 Asymmetric Relation

• Asymmetric Relation
/
o A relation R on a set A is asymmetric if whenever aRb, then bRa. It then
follows that R is not asymmetric if we have some a and b ∈ A with both aRb
/
and bRa, see fig. 10

• Anti–symmetric Relation
o A relation R on a set A is anti–symmetric if whenever aRb and bRa, then a = b
/
o R is anti–symmetric if whenever a ≠ b, we have aRb but bRa, or aRb but bRa  /
o It follows that R is not anti–symmetric if we have a and b in A and both aRb
and bRa

• Transitive Relation
o A relation R on a set A is transitive if whenever aRb and bRc, then aRc, i.e.
whenever a is related to b and b is related to c, then a is related to c
o A relation R on A is not transitive if there exist a, b and c in A so that aRb and
/
bRc, but aRc. If such a, b and c do not exist, then R is transitive

Fig. 11 Transitive Relation

Theorem 3       A relation R is transitive if and only if it satisfies the following
property: If there is a path of length greater than 1 from vertex a to
vertex b, there is a path of length 1 from a to b (i.e. a is related to b).
Algebraically stated, R is transitive if and only if Rn ⊆ R for all n ≥ 1
An Example
The relation R defined over {a, b, c} by the digraph shown in fig. 12 is not reflexive
(e.g. (a, a ) ∉ R), not ir–reflexive (e.g. (c, c ) ∈ R), not symmetric (e.g. (a, c ) ∈ R,
but (c, a ) ∉ R), not anti-symmetric (e.g. (a, b) ∈ R and (b, a) ∈ R, but a ≠ b), not
transitive (e.g. (a, b) ∈ R and (b, a) ∈ R, but (a, a ) ∉ R).

a

b                      c

Fig. 12 An Example of Relations

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 75 posted: 6/25/2011 language: English pages: 5
Description: Relations and diagraphs basics in network security