Top Banner
Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i ,b j ) and assign the values 1 or 0 according the following rule The mxn matrix formed by m ij ’s is called the matrix of the relation R, or the relation matrix R, and is denoted by M R or M(R). Since M(R) contains only 0 and 1 as its elements M(R) is also called the Zero – one matrix for R. Directed graph or Digraph of R Let R be a relation on a finite set A. Then R can be represented pictorially with arrows and the elements within the circle, is called Directed graph of R or Digraph of R Problems 1. Let A = {1,2,3,4} and let R be the relation on A defined by xRy if and only if “x divides y” a) Write down R as a set of ordered pairs. b) Draw the diagraph of R. c) Determine the in-degree and out-degree of the vertices in the diagraph. d) Write the matrix Solution: AxA = {(1,1),(1,2),(1,3),(1,4), (2,1), (2,2),(2,3), (2,4), (3,1), (3,2), (3,3), (3,4), (4,1), (4,2), (4,3), (4,4)} R = {(1,1), ),(1,2),(1,3),(1,4), (2,2), (2,4), (3,3), (4,4)} . The diagraph of R is ( ) ( ) = R a a if R a a if m j i j i ij , 0 , 1
20

Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Aug 08, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Relations and Functions (Continued)

Zero – one Matrices

Let R be the relationfrom A to B so that R is a subset of AxB. Let mij = (ai,bj) and assign the values

1 or 0 according the following rule

The mxn matrix formed by mij’s is called the matrix of the relation R, or the relation matrix R,

and is denoted by MR or M(R). Since M(R) contains only 0 and 1 as its elements M(R) is also

called the Zero – one matrix for R.

Directed graph or Digraph of R

Let R be a relation on a finite set A. Then R can be represented pictorially with arrows and the

elements within the circle, is called Directed graph of R or Digraph of R

Problems

1. Let A = {1,2,3,4} and let R be the relation on A defined by xRy if and only if “x divides y”

a) Write down R as a set of ordered pairs.

b) Draw the diagraph of R.

c) Determine the in-degree and out-degree of the vertices in the diagraph.

d) Write the matrix

Solution:

AxA = {(1,1),(1,2),(1,3),(1,4), (2,1), (2,2),(2,3), (2,4), (3,1), (3,2), (3,3), (3,4),

(4,1), (4,2), (4,3), (4,4)}

R = {(1,1), ),(1,2),(1,3),(1,4), (2,2), (2,4), (3,3), (4,4)} . The diagraph of R is

( )( )

∈=

Raaif

Raaifm

ji

ji

ij,0

,1

Page 2: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Vertices 1 2 3 4

In-degree 1 2 2 3

Out-degree 4 2 1 1

The matrix representation is

2. If R={(x,y)|x ≥ y} is relation defined on a set A = {1,2,3,4}.

a) Write down R as a set of ordered pairs.

b) Draw the diagraph of R.

c) Determine the in-degree and out-degree of the vertices in the diagraph.

d) Write the matrix

Solution:

AxA = {(1,1),(1,2),(1,3),(1,4), (2,1), (2,2), (2,3), (2,4), (3,1), (3,2), (3,3), (3,4), (4,1),

(4,2), (4,3), (4,4)}

R = {(1,1),(2,1), (2,2),(3,1), (3,2), (3,3), (4,1), (4,2), (4,3), (4,4)}

The digraph of R is

( )

=

1000

0100

1010

1111

RM

Page 3: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Vertices 1 2 3 4

In-degree 4 3 2 1

Out-degree 1 2 3 4

The matrix representation of R is

3. The matrix of the relation on the set A = {a,b,c,d,e} is

a) Write down R as a set of ordered pairs.

b) Draw the diagraph of R.

c) Determine the in-degree and out-degree of the vertices in the diagraph.

Solution:

R = {(a,a), (a,b), (b,c), (b,d), (c,d), (c,e), (d,b), (d,c), (e,a)}

[Answer for b and c as per previous examples]

4. The digraph of the relation on the set A = {a,b,c,d,e,f} is

a) Write down R as a set of ordered pairs.

b) Draw the matrix of R.

c) Determine the in-degree and out-degree of the vertices in the diagraph.

( )

=

1111

0111

0011

0001

RM

00001

00110

11000

01100

00011

Page 4: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

RESULTS

� (a,b)∈R or (a,b)∈S then (a,b)∈R∪S

� (a,b)∈R and (a,b)∈S then (a,b)∈R∩S

� is the complement of the set R in the universal set AXB.

� Rc is the converse of R

� [(a,b)∈Rc if and only if (b,a)∈R]

� If MR is the matrix of R then (MR)T is the matrix of R

c

5. Let A=B = {1,2,3}, and R = {(1,1), (1,2),(2,3),(3,1)}, S = {(2,1),(3,1), (3,2),(3,3)}

a) Compute R∪S, R∩S, Rc, S

c

b) Draw the diagraphs.

c) Determine the in-degree and out-degree of the vertices in the diagraphs.

d) Write the matrices.

Solution:

Given that R = {(1,1), (1,2),(2,3),(3,1)} and S = {(2,1),(3,1), (3,2),(3,3)}

R∪S = {(1,1), (1,2),(2,3),(2,1),(3,1), (3,2), (3,3)}

R∩S = {(3,1)}

AxB = {(1,1),(1,2),(1,3),(2,1), (2,2),

(2,3),(3,1), (3,2), (3,3)}

= {(1,3),(2,1), (2,2), (3,2), (3,3)}

= {(1,1),(1,2),(1,3), (2,2), (2,3)}

Rc = {(1,1), (2,1), (3,2), (1,3)}

Sc = {(1,2), (1,3), (2,3), (3,3)}

[Answer for c and d as per previous examples]

R

S,R

R

S

Page 5: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

6. The digraphs of R and S are given as

a) Write R and S as ordered pairs

b) Compute R∪S, R∩S, Rc, S

c

c) Determine the in-degree and out-degree of the vertices in the diagraphs.

d) Write the matrices.

COMPOSITION OF RELATION

R is a relation from A to B and S is a relation from B to C then RοS = {(a,c)|a∈A,c∈C, and

there exists b∈B with (a,b)∈A and (b,c)∈B}

1. Let A = {1,2,3,4} and R = {(1,1),(1,3),(3,2), (3,4),(4,2)} and S = {(2,1),(3,3),(3,4),(4,1)} be

relations on A. Find RοS, SοR, R2, R

3, S

2, S

3.

Solution: Given that R = {(1,1),(1,3),(3,2), (3,4),(4,2)} and S = {(2,1),(3,3),(3,4),(4,1)}

RοS = {(1,3), (1,4), (3,1), (4,1)}

SοR = {(2,1), (1,3), (3,2), (3,4), (4,1), (4,3)}

RοR = R2 = {(1,1),(1,3),(1,2),(1,4),(3,2)}

R2οR = R

3 = {(1,1),(1,3),(1,2),(1,4)}

SοS= S2 = {(3,3),(3,4),(3,1)}

S2οS = S

3 = {(3,3),(3,4),(3,1)}

2. Let A = {1,2,3,4} and R = {(1,1),(1,2),(2,3),(3,3),(3,4)} be relation on A. Find R2, R

3, R

4 and

draw their graphs.

S,R

Page 6: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

3. Let A = {a,b,c,d,e} and R = {(a,a),(a,b), (b,c), (c,d),(c,e), (d,e)} be relation on A. Find R2. Verify

that M(R2) = [M(R)]

2

Solution:

R = {(a,a),(a,b), (b,c), (c,d),(c,e), (d,e)}

R = {(a,a),(a,b), (b,c), (c,d),(c,e), (d,e)}

R2 = {(a,a),(a,b),(a,c),(b,d),(b,e),(c,e)}

[M(R)]2 = M(R) M(R)

=

=

--------------------------------------- (1)

R2 = {(a,a),(a,b),(a,c),(b,d),(b,e),(c,e)}

M(R2) = ---------(2)

∴By (1) and (2)

Hence M(R2) = [M(R)]

2

4. Let A = {1,2,3,4} and

Find the matrices RοS and SοR

00000

00000

10000

11000

00111

00000

10000

11000

01000

00011

00000

10000

11000

01000

00011

00000

00000

10000

11000

00111

=

=

0001

0001

0100

1100

M

0000

0010

1000

0111

MSR

Page 7: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Solution:

R = {(1,1),(1,2),(1,3),(2,4),(3,2)}

S = {(1,3),(1,4),(2,3),(3,1),(4,1)}

RοS = {(1,3),(1,4),(1,1),(2,1),(3,3)}

Matrix of RοS =

SοR = {(1,2),(2,2),(3,1),(3,2),(3,3),(4,1),(4,2), (4,3)}

Matrix of SοR =

5. Let A = {1,2,3,4}, B = {w,x,y,z} and C={5,6,7}. Also the relations R1,R2 and R3 are defined as

R1={(1,x),(2,x),(3,y),(3,z)}, R2={(w,5),(x,6)} and R3 = {(w,5),(w,6)}. Find R1οR2, R1οR3,

M(R1), M(R2) and M(R1οR2). Also verify that M(R1οR2) = M(R1).M(R2)

Solution:

R1={(1,x),(2,x),(3,y),(3,z)}, R2={(w,5),(x,6)}

R1οR2 = {(1,6),(2,6)}

R1={(1,x),(2,x),(3,y),(3,z)},R3 = {(w,5),(w,6)}

R1οR3 = Φ

M(R1) =

M(R2) = M(R1οR2) =

M(R1).M(R2) =

= = M(R1οR2)

0000

0100

0001

1101

0111

0111

0010

0010

0000

1100

0010

0010

000

000

010

001

000

000

010

010

0000

1100

0010

0010

000

000

010

001

000

000

010

010

Page 8: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

PROPERTIES OF RELATIONS

RELATION

If A and B are sets, a relation from A to B is any subset of AXB. Subsets of AXA are called relations on A.

REFLEXIVE

A relation R on a set A is called reflexive if for all x ∈A, (x,x)∈R

Example:

Let A = {1,2,3}

R = {(1,1),(2,2),(3,3)}

IRREFLEXIVE

A relation R on a set A is said to be irreflexive if (x,x)∉R for any x∈R.

Example:

Let A = {1,2,3}

R = {(1,3),(2,1),(3,2)}

SYMMETRIC

Relation R on a set A is called symmetric if (x,y)∈R⇒(y,x)∈R, for all x,y∈A

Example:

Let A = {1,2,3}

R = {(1,2),(2,1),(3,2),(2,3)}

TRANSITIVE

Relation R on a set A is called transitive if (x,y),(y,z)∈R⇒(x,z)∈R, for all x,y,z∈A

Example:

Let A = {1,2,3}

R = {(1,3),(3,2),(1,2)}

ANTISYMMETRIC

Given a relation R on a set A is called antisymmetric if for all a,b∈A,aRb and bRa⇒a=b.

Example:Let A = {1,2,3,4}. Determine the nature of the following relations on A.

� R1 = {(1,1),(1,2),(2,1),(2,2),(3,3),(3,4), (4,3),(4,4)}

Page 9: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� R2 = {(1,2),(1,3),(3,1),(1,1),(3,3),(3,2), (1,4), (4,2),(3,4)}

Solution:R1 is reflexive, symmetry and transitive.R2 is transitive

Equivalence Relation

A relation R on a set is said to be an equivalence relation on A if (i)R is reflexive (ii) R is symmetric (iii) R is

transitive , on A.

1. Let A = {1,2,3,4} and R = {(1,1),(1,2),(2,1), (2,2),(3,4),(4,3),(3,3),(4,4)} be a relation A. Verify that R

is equivalence relation.

Solution:

We note that (1,1),(2,2),(3,3),(4,4) belongs to R. That is (a,a)∈R for all a∈A

∴R is reflexive relation.

Next, we note that (1,2),(2,1) and (3,4),(4,3)∈R. That is whenever (a,b)∈R then (b,a)∈R for a,b∈A

∴R is symmetry relation.

Finally, (1,2),(2,1),(1,1)∈R,

(2,1),(1,2),(2,2)∈R,

(4,3),(3,4),(4,4)∈R,

That is whenever (a,b)∈R,(b,c)∈R then for (a,c)∈R a,b,c∈A

∴R is transitive relation.

Hence R is an equivalence relation

2. Let A = {1,2,3,4,5,6, 7,8,9, 10, 11, 12}. On this set define the relation R by (x,y)∈R iff x – y is

multiple of 5.verify R is an equivalence relation.

Equivalence Classes

Let R be an equivalence relation on a set A and a∈A. Then the set of all those elements x of A which are

related to a by R is called equivalence class of a with respect to R. This equivalence class is denoted by

R(a) or [a], or

=[a] = R(a) = {x∈A | (x,a)∈R}

Example

Let R = {(1,1), (1,3), (2,2), (3,1), (3,3)}

[1] = {1,3}[2] = {2}[3] = {1,3}

a

a

Page 10: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Partition of a set

Let A be a nonempty set. Suppose there exists nonempty subsets A1,A2,……,Ak, o A such that the

following two conditions hold:

� A is the union of A1,A2,……,Ak i.e. A = A1UA2U……UAk

� Any two of the subsets A1,A2,……,Ak are disjoint; i.e. Ai∩Aj = Φ for i≠j

1. For the equivalence relation R = {(1,1), (1,2), (2,1),(2,2), (3,4),(4,3),(3,3),(4,4)} defined on the

set A = {1,2,3,4}, determined the partion induced.

Solution:

[1] = {1,2}, [2] = {1,2}, [3] = {3,4}, [4] = {3,4}

[1] and [3] are distinct.

Partion P = {[1],[3]} = {{1,2},{3,4}}

2. Let A = {a,b,c,d,e}. Consider the partion P = {{a,b},{c,d},{e}} of A. Find the equivalence relation

inducing the partion.

Solution:

P has {a,b} then (a,a),(a,b),(b,a),(b,b)∈R

P has {c,d} then (c,c),(c,d),(d,c),(d,d) ∈R

P has {e} then (e,e) ∈R

∴R = {(a,a),(a,b),(b,a),(b,b), (c,c),(c,d),(d,c), (d,d), (e,e)}

3. Let A = {1,2,3,4,5,6,7} and R be the equivalence relation on A that induces the partition A =

{1,2}∪{3}∪{4,5,7}∪{6}. Find R.

Solution:

R = {(1,1),(1,2),(2,1),(2,2),(3,3),(4,4),(4,5), (4,7),(5,5),(5,7),(5,4),(7,4),(7,5),(7,7),(6,6}}

4. Let A = {1,2,3,4,5}. Define a relation R on AxA by (x1,y1)R(x2,y2) iff x1+y1 = x2+y2

� Verify that R is an equivalence relation on AxA.

� Determine the equivalence classes [(1,3)], [(2,4)] and [(1,1)]

� Determine the partition of AxA induced by R.

Solution:

For all (x,y)∈AxA, we have x+y = x+y i.e. (x,y)R(x,y). ∴R is reflexive.

Page 11: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Let us consider (x1,y1),(x2,y2) ∈AxA. Also (x1,y1)R(x2,y2)i.e. x1+y1 = x2+y2.This gives x2+y2 =

x1+y1 which means (x2,y2)R(x1,y1). ∴R is symmetric.

Let us consider (x1,y1),(x2,y2) and (x3,y3) ∈AxA. Suppose that (x1,y1)R(x2,y2) and

(x2,y2)R(x3,y3).Then x1+y1 = x2+y2 and x2+y2= x3+y3.This gives x1+y1 = x3+y3 which means

(x1,y1)R(x3,y3). ∴R is transitive.

Thus, R is reflexive, symmetric and transitive. Hence R is an equivalence relation.

We note that

[(1,3)] = {(x,y)∈AxA|(x,y)R(1,3)}

= {(x,y)∈AxA|x+y = 1+3}

= {(1,3), (2,2), (3,1)}

Since A = {1,2,3,4,5}

Similarly [(2,4)] = {(1,5),(2,4),(3,3),(4,2), (5,1)}

[(1,1)] = {(1,1)}

To determine the partition induced by R, we have to find the equivalence classes of all elements

(x,y) of AxA with respect to R.

[(1,1)] = {(1,1)}

[(1,3)] = [(2,2)] = [(3,1)]

[(2,4)] = [(1,5)] = [(3,3)] = [(4,2)] = [(5,1)]

[(1,2)] = {(1,2),(2,1)} = [(2,1)]

[(1,4)] = {(1,4),(2,3),(3,2),(4,1)} = [(2,3)] = [(3,2)] = [(4,1)]

[(2,5)] = {(2,5), (5,2), (3,4), (4,3)} = [(3,4) = [(4,3)] = [(5,2)]

[(3,5)] = {(3,5), (5,3),(4,4)} = [(4,4)] = [(5,3)]

[(4,5)] = {(4,5),(5,4)} = [(5,4)]

[(5,5)] = {(5,5)}

Thus, [(1,1)], [(1,2)], [(1,3)], [(1,4)], [(1,5)], [(2,5)], [(3,5)], [(4,5)], and [(5,5)] are the only distinct

equivalence classes of AxA with respect to R. Hence the partition of AxA induced by R is

represented byAxA = [(1,1)] ∪ [(1,2)] ∪ [(1,3)] ∪ [(1,4)] ∪ [(1,5)] ∪ [(2,5)] ∪ [(3,5)] ∪ [(4,5)]∪

[(5,5)]

Page 12: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Partial Orders

A relation R on a set A is said to be a partial ordering relation or a partial order on A if

i. R is reflexive

ii. R is antisymmetric and

iii. R is transitive, on A

Poset

A set A with a partial order R defined on it is called a partially ordered set or an ordered set or

poset and it denoted by the pair (A,R).

Example:

� The relation ≤ on the set of integers Z is a poset (Z,≤)

� The relation ≥ on the set of integers Z is a poset (Z,≥)

� The relation < on the set of integers Z is not a poset (Z,<), because reflexive does not exist.

� The relation > on the set of integers Z is not a poset (Z,>), because reflexive does not exist.

Total Order

Let R be a partial order on a set A. Then R is called a total order on A if for all x,y∈A, either xRy or

yRx. In this case, the poset (A,R) is called totally order set.

The totally ordered set is also called a linearly ordered set or chain.

Example:

� The partial order relation ≤ is a totally order on the set R. Because, for any x,y∈R we have x ≤ y or

y ≤ x. Thus (R,≤) is a totally ordered set.

� The partial order relation ≥ is a totally order on the set R. Because, for any x,y∈R we have x ≥ y

or y ≥ x. Thus (R,≥) is a totally ordered set.

Hasse Diagrams

� It is the diagraph of partial orders

� Represent the vertices by dots (bullets)

� Draw the diagraph in such a way that all edges point upward.

� Don’t put arrows for the edges.

� This diagraph is called poset diagram or the Hasse diagram for the partial order.

� In the hasse diagram don’t include reflexive elements

Page 13: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� In the hasse diagram don’t include transitive elements

1. Let A = {1,2,3,4} and R = {(1,1), (1,2),(2,2),(2,4),(1,3),(3,3),(3,4), (1,4),(4,4)}. Verify that R is

partial order on A. Also, write down the Hasse diagram for R.

Solution:

Since (1,1),(2,2),(3,3),(4,4) are in R. R is reflexive.

Also, (1,2) is in R but (2,1) is not in R. It is true for other elements in R. Hence R is

antisymmetry.

We note that (1,1), (1,2),(1,2) is in R, (2,2),(2,4),(2,4) in R (1,3),(3,3) (1,3) in R, (3,4), (4,4),

(3,4) is in R. Hence R is transitive. Hence R is partial order on A.

R for Hasse diagram is {(1,2), (1,3), (2,4), (3,4)} and the Hasse diagram is

2. Let A = {1,2,3,4,6,12}. On A, define the relation R by aRbiff a divides b. Prove that R is a partial

order on A. Draw the Hasse diagram for this relation.

Solution:

R = {(1,1),(1,2),(1,3),(1,4),(1,6),(1,12), (2,2),(2,4),(2,6),(2,12), (3,3),(3,6),(3,12), (4,4),(4,12),

(6,6),(6,12),(12,12)}

One can easily verify that R is a partial order.

R for Hasse diagram {(1,2),(1,3),(2,4),(2,6),(3,6),(3,12),(4,12),(6,12)} and the Hasse diagram is

Page 14: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

3. Draw the Hasse diagram representing the positive divisors of 16.

Solution:

The divisors of 16 are A = {1,2,4,8,16}

R = {(1,1),(1,2),(1,4),(1,8),(1,16),(2,2),(2,4),(2,8),(2,16),(4,4),(4,8),(4,16), (8,8),(8,16),(16,16)}

R for the Hasse diagram is R = {(1,2),(2,4),(4,8),(8,16)} and the Hasse diagram is

4. Draw the Hasse diagram of the relation R on A = {1,2,3,4,5} whose matrix is MR =

5. The Hasse diagram of a partial order R on the set A = {1,2,3,4,5,6} is as given below. Write

down R as a subset of AxA. Construct its diagraph.

6. Determine the matrix of the partial order whose Hasse diagram is given below

10000

01000

11100

11110

11101

Page 15: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

Extermal elements in Posets

Consider a Poset (A,R). We define below some special elements called extremal elements that

may exist in A

Maximal Element

An element a∈A is called a maximal element of A if there exists no element x ≠ a in A such that

aRx.

In other words, a∈A is a maximal element of A if whenever there is x∈A such that aRx then x = a.

Minimal Element

An element a∈A is called a minimal element of A if there exists no element x ≠ a in A such that

xRa.

In other words, a∈A is a minimal element of A if whenever there is x∈A such that xRa then x = a.

In simple words

a is maximal element of A iff in the Hasse diagram of R no edge starts at a.

a is minimal element of A iff in the Hasse diagram of R no edge terminates at a.

Greatest Element

An element a∈A is called a greatest element of A if xRa for all x∈A.

Least Element

An element a∈A is called a least element of A if aRx for all x∈A.

Example: In the following Hasse diagram let us find all extremal elements.

Page 16: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� 5 and 6 are maximal elements. Because no edge starts at 5 and 6.

� 1 is the minimal element. Because no edge terminates at 1.

� No greatest element. Because no element has connection with all the elements.

� 1 is least element. Because 1 is connected with all the elements.

Example: In the following Hasse diagram let us find all extremal elements.

� 5 is the maximal element. Because no edge starts at 5.

� 1 is the minimal element. Because no edge terminates at 1.

� 5 is the greatest element. Because the element 5 has connection with all the elements.

� 1 is least element. Because 1 is connected with all the elements.

Upper Bound

Page 17: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

An element a∈A is called an upper bound of a subset B of A if xRa for all x∈B.

Least Upper Bound (LUB)

An element a∈A is called the least upper bound (LUB) of a subset B of A if the following two

conditions hold:

� a is an upper bound of B

� If a’ is an upper bound of B then aRa’

LUB is also known as Supremum

Lower Bound

An element a∈A is called a lower bound of a subset B of A if aRx for all x∈B.

Greatest Lower Bound (GLB)

An element a∈A is called the greatest lower bound (GLB) of a subset B of A if the following two

conditions hold:

� a is an lower bound of B

� If a’ is a lower bound of B then a’Ra

GLB is also known as Infimum

Example:For the following Hasse diagram find the LUB and GLB for B1 and B2, where B1 = {1,2}

and B2 = {3,4,5}

� 1 and 2 related to 3,4,5,6,7,8. Hence 3,4,5,6,7,8 are upper bounds of B1 = {1,2}

� The upper bound 3 is related to all other upper bounds 4,5,6,7,8. Hence 3 is the LUB of B1. We

write LUB(B1) = 3

Page 18: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� In A, there is no element x such that xR1 and xR2. Therefore B1 has no lower bounds.

Hence B1 has no GLB.

� 3,4 and 5 are related to 6,7,8. Hence 6,7,8 are upper bounds of B2 = {3,4,5}

� No upper bound of B2 is related to other upper bounds.

� Hence B2 has no LUB.

� For each x∈B2, we have 1Rx. Hence 1 is lower bound. Similarly 2 and 3 are lower bounds.

� The lower bounds1 and 2 are related to the lower bound 3. Hence 3 is the GLB of B2. we write

GLB{B2} = 3.

1. Consider the Hasse diagram of a poset (A,R) given below

If B = {c,d,e} find (if they exist}

� All upper bounds of B

� The Least upper bound of B

� All lower bounds of B

� The Greatest lower bound of B

Solution:

From the Hasse diagram we note the following

Page 19: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� All c,d,e of B are related to f,g,h. Hence f,g,h are upper bounds of B.

� The upper bound f of B is related to the upper bounds g and h.

� Hence f is the least upper bound of B. we write LUB{B} = f

From the Hasse diagram we also note that

� The elements a,b,c are related to f,g,h of B. Hence a,b,c are the lower bounds of B.

� The lower bounds a and b of B is related to the lower bound c of B.

� Hence c is the greatest lower bound of B. we write GLB{B} = c.

2. Consider the Hasse diagram of a poset (A,R) given below

If B = {c,d,e} find (if they exist}

� All upper bounds of B

� The Least upper bound of B

� All lower bounds of B

� The Greatest lower bound of B

Solution:

From the Hasse diagram we note the following

� All c,d,e of B are related to e,f,g. Hence e,f,g are upper bounds of B.

Page 20: Relations and Functions (Continued)...Relations and Functions (Continued) Zero – one Matrices Let R be the relationfrom A to B so that R is a subset of AxB. Let m ij = (a i,b j)

� The upper bound e of B is related to the upper bounds f and g.

� Hence e is the least upper bound of B. we write LUB{B} = e

� By examining all upward paths to c,d,e we find that GLB{b} = a.

Theorem:If (A,R) is a poset and A is finite (nonempty), then A has at least one maximal element

and at least one minimal element.

Proof: Let a∈A. If a is not maximal. We can find an element x1∈A such that x1≠a and aRx1. If x1

is not maximal, we can find an element x2 ∈A such that x2 ≠ x1 and x1Rx2. Proceeding like this,

we end up with a finite chain of the form aRx1, x1Rx2, x2Rx3,………….Which cannot be extended

beyond a certain final stage because f is finite. Hence, we end up with some xk∈A which is a

maximal element of A. Thus, A has at least one maximal element.

A similar argument shows that A has at least one minimal element.

Theorem:Every poset has at most one greatest element and at least one least element.

Proof:Assume that a and b are greatest elements of (A,R). Then since b is greatest element we

have aRb. Similarly, since a is greatest element we have bRa. Thus, aRb and bRa. Since R is an

antisymmetric relation, it follows that a = b. Thus, two greatest elements of (A,R), if such exists

cannot be different. If (A,R) has a greatest element, then that element is unique. Thus, (A,R) has

at most one greatest element.

A similar argument shows hat (A,R) has at most one least element.

Theorem:If (A,R) is a poset and B⊆A, then B has at most one LUB and at most one GLB.

Proof:Assume that a and b are two LUB’s of B. Then a and b are upper bounds of B. Since b is an

upper bound of B and a is LUB of B, we have aRb. Similarly, Since a is an upper bound of B and b

is LUB of B, we have bRa. Since R is antisymmetric it follows that a = b.Hence B cannot have two

distinct LUB’s. This means that B has at most one LUB.

A similar argument shows that B has at most one GLB.

Lattice

Let (A,R) be a poset. This poset is called lattice if, for all x,y∈A, the elements LUB{x,y} and

GLB{x,y} exist in A.

Example

Consider the set N of natural numbers, and R be the partial order “less than or equal to”. Then

for any x,y∈N, we note that LUB{x,y} = max{x,y} and GLB{x,y} = min{x,y} and both these belongs

to N. Therefore the poset (N,≤) is a lattice.