You are on page 1of 41

Definition: Let A and B be sets.

A binary relation from A to B is a subset of


A × B.
EXAMPLE: Let A be the set of cities in India, and let B be the set of the
states in India. Define the relation R by specifying that (a, b) belongs to R
if a city with name ‘a’ is in the state with name ‘b’.
EXAMPLE: Let A = {0, 1, 2} and B = {a, b}. Then R = {(0, a), (0, b), (1, a), (2,
b)} is a relation from A to B.

Definition: A relation on a set A is a relation from A to A.


EXAMPLE: Let A be the set {1, 2, 3, 4}. Which ordered pairs are in the
relation R = {(a, b) ∣ a divides b}?

Example:
EXAMPLE: How many relations are there on a set with ‘n’ elements?
Definition: A relation R on a set A is called reflexive if (a, a) ∈ R for every
element a ∈ A.
Remark: Using quantifiers we see that the relation R on the set A is
reflexive if ∀a((a, a) ∈ R), where the universe of discourse is the set of all
elements in A.

R3 and R5 are ref.


Q. Which of the given relations is reflexive?
(a) R (b) R
1 2 (c) R (d) R
6 5

R1, R3 and R4 are ref.

EXAMPLE: Is the “divides” relation on the set of positive integers


reflexive?
Definition: A relation R on the set A is irreflexive if for every a ∈ A, (a, a)
∉ R. That is, R is irreflexive if no element in A is related to itself.
Definitio
n: A relation R on a set A is called symmetric if (b, a) ∈ R whenever (a, b)
∈ R, for all a, b ∈ A.
Remark: Using quantifiers, we see that the relation R on the set A is
symmetric if ∀a∀b((a, b) ∈ R → (b, a) ∈ R).

R2 and R3 are sym.


Q. Which of the given relations is symmetric?
(a) R (b) R
1 2 (c) R (d) R
6 5

R3, R4 and R6 are sym.


EXAMPLE: Is the “divides” relation on the set of positive integers
symmetric?

Definition: A relation R is called asymmetric if (a, b) ∈ R implies that (b, a)


∉ R.
Definitio
n: A relation R on a set A is called transitive if whenever (a, b) ∈ R and (b,
c) ∈ R, then (a, c) ∈ R, for all a, b, c ∈ A.
Remark: Using quantifiers we see that the relation R on a set A is
transitive if we have ∀a∀b∀c(((a, b) ∈ R ∧ (b, c) ∈ R) → (a, c) ∈ R).

R4,R5 and R6 are tran.


Q. Which of the given relations is not transitive?
(a) R (b) R
1 2 (c) R (d) R
3 5

R1,R2, R3 and R4 are tran.

EXAMPLE: Is the “divides” relation on the set of positive integers


transitive?
Definition: A relation R on a set A such that for all a, b ∈ A, if (a, b) ∈ R
and (b, a) ∈ R, then a = b is called antisymmetric.
Or contra positively if a ≠ b then both ordered pairs (a , b) and (b , a) should not
belong to the relation ' R .
'

Remark: Using quantifiers, we see that the relation R on the set A is


antisymmetric if ∀a∀b(((a, b) ∈ R ∧ (b, a) ∈ R) → (a = b)).
R4,R5 and R6 are antisym.

Q. Which of the given relations is not anti-symmetric?


(a) R (b) R
1 2 (c) R (d) R
6 5

R1,R2, R4 and R5 are antisym.

EXAMPLE: Is the “divides” relation on the set of positive integers


antisymmetric?

EXAMPLE: How many reflexive relations are there on a set with ‘n’
elements?
EXAMPLE: How many symmetric relations are there on a set with ‘n’
elements?
EXAMPLE: How many antisymmetric relations are there on a set with ‘n’
elements?
EXAMPLE: How many relations are there on a set with ‘n’ elements are
reflexive and symmetric?
EXAMPLE: How many transitive relations are there on a set with ‘n’
elements?

2
n ( n +1) n ( n−1) n ( n−1 )
2n −n n
2 2
2 3 2
2 2

Q. Find the error in the “proof” of the following “theorem.”


“Theorem”: Let R be a relation on a set A that is symmetric and transitive.
Then R is reflexive.
“Proof”: Let a ∈ A. Take an element b ∈ A such that (a, b) ∈ R. Because R
is symmetric, we also have (b, a) ∈ R. Now using the transitive property,
we can conclude that (a, a) ∈ R because (a, b) ∈ R and (b, a) ∈ R.
EXAMPLE:

Definition:

EXAMPLE:
EXAMPLE:
EXAMPLE:

EXAMPLE:

Definition: A relation on a set A is called an equivalence relation if it is


reflexive, symmetric, and transitive.
EXAMPLE: Let R be the relation on the set of real numbers such that aRb
if and only if a − b is an integer. Is R an equivalence relation?

EXAMPLE: Let R be the relation on the set of real numbers such that xRy
if and only if x and y are real numbers that differ by less than 1, that is,
|x − y| < 1. Is R an equivalence relation?
EXAMPLE:

Theroem:
Theorem:

Definition: A relation R on a set S is called a partial ordering or partial


order if it is reflexive, antisymmetric, and transitive. A set S together with
a partial ordering R is called a partially ordered set, or poset, and is
denoted by (S, R). Members of S are called elements of the poset.

EXAMPLE: Show that the greater than or equal to relation (≥) is a partial
ordering on the set of integers.

EXAMPLE:The divisibility relation ∣ is a partial ordering on the set of


positive integers, because it is reflexive, antisymmetric, and transitive.
We see that ¿ is a poset. Recall that ( Z denotes the set of positive
+¿ ¿

integers.)
EXAMPLE: Show that the inclusion relation ⊆ is a partial ordering on the
power set of a set S.
EXAMPLE: Let R be the relation on the set of people such that xRy if x and
y are people and x is older than y. Then R is…………………..?
(a) not a partial ordering.
(b) a partial ordering.
Definition:

EXAMPLE: The poset (Z , ≤) is totally ordered, because a ≤ b or b ≤ a


whenever a and b are integers.
EXAMPLE: The poset ¿ is not totally ordered because it contains elements
that are incomparable, such as 5 and 7.
EXAMPLE: Power set of A along with inclusion relation (is a subset of)
is……………?
(a) Totally ordered (b) Not Totally ordered

Remark.
(1) The smallest relation on a set A is ϕ
(2) The largest relation on a set A is A × A .

Definition: Let R be a relation from a set A to a set B and S a relation from


B to a set C. The composite of R and S is the relation consisting of ordered
pairs (a, c), where a ∈ A, c ∈ C, and for which there exists an element b ∈
B such that (a, b) ∈ R and (b, c) ∈ S. We denote the composite of R and S
by S ◦R.

EXAMPLE: What is the composite of the relations R and S, where R is the


relation from {1, 2, 3} to {1, 2, 3, 4} with R = {(1, 1), (1, 4), (2, 3), (3, 1), (3,
4)} and S is the relation from {1, 2, 3, 4} to {0, 1, 2} with S = {(1, 0), (2, 0),
(3, 1), (3, 2), (4, 1)}?

S ◦ R = {(1, 0), (1, 1), (2, 1), (2, 2), (3, 0), (3, 1)}.
Remark: Let A={1,2,3} and ‘R’ be the relation {(1,1),(2,2),(3,3)} defined on
A. Then this relation is reflexive, symmetric, antisymmetric and transitive.
So this relation is an equivalence relation and a partial order relation.

Representing Relations

Representing Relations Using Matrices


Suppose that ' R is a relation from
'
A={ a1 , a2 , … , am } ¿ B={ b 1 , b2 , … , bn }. The relation
‘R’ R ij
1
can be represented by the matrix M =[ m ] , where m = 0 ij
{ if ( a i , b j ) ∈ R ,
if (a i , b j)∉ R . In other
words, the zero–one matrix representing ‘ R ’ has a ' 1’ as its (i, j) entry
when a is related tob , and a ' 0 ' in this position if a is not related to b .
i j i j

EXAMPLE: Suppose that A={1 , 2, 3 }∧B={1 , 2 }. Let R be the relation from A to B


containing (a , b) if a ∈ A , b ∈ B ,∧a>b . What is the matrix representing R if
a 1=1 ,a 2=2 ,∧a 3=3 ,∧b1=1∧b2=2 ?
Not antisym.
Representing Relations Using Digraphs

Definition: A directed graph, or digraph, consists of a set ‘V’ of vertices


(or nodes) together with a set ‘E’ of ordered pairs of elements of V called
edges (or arcs). The vertex ‘a’ is called the initial vertex of the edge (a, b),
and the vertex ‘b’ is called the terminal vertex of this edge.
An edge of the form (a, a) is represented using an arc from the vertex a
back to itself. Such an edge is called a loop.
EXAMPLE: Draw the directed graph of the relation R = {(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 R represented by


the directed graph shown in the given Figure?
Solution: The ordered pairs (x, y) in the relation are R = {(1, 3), (1, 4), (2,
1), (2, 2), (2, 3), (3, 1), (3, 3), (4, 1), (4, 3)}
EXAMPLE: Determine whether the relations for the directed graphs
shown in Figure 6 are reflexive, symmetric, antisymmetric, and/or
transitive.

Solution: Because there are loops at every vertex of the directed graph of
S1, it is reflexive. The relation S1 is neither symmetric nor antisymmetric
because there is an edge from a to b but not one from b to a, but there
are edges in both directions connecting b and c. Finally, S1 is not
transitive because there is an edge from a to b and an edge from b to c,
but no edge from a to c. Because loops are not present at all the vertices
of the directed graph of S2, this relation is not reflexive. It is symmetric
and not antisymmetric, because every edge between distinct vertices is
accompanied by an edge in the opposite direction. It is also not hard to
see from the directed graph that S2 is not transitive, because (c, a) and (a,
b) belong to S2, but (c, b) does not belong to S2.
Rectification: If element ‘10’ is added to the poset {1,2,3,4,6,8,12} along
with “division” then in the Hasse diagram of the new poset, rather than
the edge from ‘1’ to ‘10’ there will be an edge from ‘2’ to ‘10’. The edge
from ‘1’ to ‘10’ is not required in the Hasse diagram due to transitivity
(i.e.’1’ divides ‘2’ and ‘2’ divides ‘10’).

Example:

Example: Construct/Draw the Hasse diagram for ({1, 2, 3, 4}, ≤)


Example: Draw the Hasse Diagram for the poset: ¿
Definition:
Example: Write the minimal and maximal elements for the poset (P ( S ) ,⊆)
where S= { a , b , c } .

Definition: Sometimes there is an element in a poset that is greater than


every other element. Such an element is called the greatest element. That
is, ‘a’ is the greatest element of the poset ( S , ≼) if b ≼a for all b ∈ S. The
greatest element is unique when it exists. Likewise, an element is called
the least element if it is less than all the other elements in the poset. That
is, ‘a’ is the least element of ( S , ≼) if a ≼ b for all b ∈ S. The least element is
unique when it exists.
Example: Write the greatest and the least elements for the poset (P ( S ) ,⊆)
where S= { a , b , c } .
Example: Write the greatest and the least elements for the poset:
{2,4,5,10,12,20,25 ,∨}.
Example: What is the greatest and the least element in the poset
{2,4,8,16,32 ,∨}?
Definition:
In the previous example if A={2,9,18 }⊆ S then what is the upper bound of A?
Example: If A=S then what is the upper bound and the lower bound of A?
Definition: The element ‘ x ’ is called the least upper bound of the subset
‘A’ if ' x ' is an upper bound that is less than every other upper bound of A.
Because there is only one such element, if it exists, it makes sense to call
this element the least upper bound. That is, ‘ x ’ is the least upper bound
of A if a ≼ x whenever a ∈ A, and x ≼ z whenever z is an upper bound of A.
Similarly, the element ‘ y ’ is called the greatest lower bound of A if ‘ y ’ is a
lower bound of A and z ≼ y whenever z is a lower bound of A. The greatest
lower bound of A is unique if it exists. The greatest lower bound and least
upper bound of a subset A are denoted by glb(A) and lub(A), respectively.
Example:
Example:
Example:

Example:

Question: Which of the following is (are) the upper bound(s) of the


subset A={a , b , c }⊆ S where S={a , b , c , d , e , f , g , h , j }
(a) d (b) g (c) e (d) all of these.

Definition: A partially ordered set in which every pair of elements has


both a least upper bound and a greatest lower bound is called a lattice.
Example:

Example:
Example:

Ex
ample:

Example:
Example:

If n=3 Then If n=7 Then


remainder remainder
1 1 1 1
11 2 11 4
111 0 111 6
1111 1 1111 5
11111 2
111111 0
1111111 1
11111111 4
 
 

 
Example:

 
A standard deck of 52 cards has 13 kinds of cards, with four cards of
each of kind, one in each of the four suits, hearts, diamonds, spades,
and clubs.

 
Example:

 
 

Example:

 
 Example:

Example:
A total of 1232 students have taken a course in Spanish, 879 have taken a
course in French, and 114 have taken a course in Russian. Further, 103
have taken courses in both Spanish and French, 23 have taken courses in
both Spanish and Russian, and 14 have taken courses in both French and
Russian. If 2092 students have taken at least one of Spanish, French, and
Russian, how many students have taken a course in all three languages?

You might also like