0% found this document useful (0 votes)
45 views11 pages

Lecture 6

This document defines and provides examples of different types of relations. A relation is a set of ordered pairs where the domain is the set of all first elements and the range is the set of all second elements. Different types of relations include reflexive relations where each element is related to itself, symmetric relations where if a is related to b then b is related to a, and transitive relations where if a is related to b and b is related to c, then a is related to c. The inverse of a relation switches the order of the elements in each pair.

Uploaded by

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

Lecture 6

This document defines and provides examples of different types of relations. A relation is a set of ordered pairs where the domain is the set of all first elements and the range is the set of all second elements. Different types of relations include reflexive relations where each element is related to itself, symmetric relations where if a is related to b then b is related to a, and transitive relations where if a is related to b and b is related to c, then a is related to c. The inverse of a relation switches the order of the elements in each pair.

Uploaded by

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

Relations

1
A relation is a set of ordered pairs.
The domain is the set of all x values in the relation

domain = {-1,0,2,4,9}

These are the x values written in a set from smallest to


largest
This is a
{(2,3), (-1,5), (4,-2), (9,9), (0,-6)} relation

These are the y values written in a set from smallest to


largest
range = {-6,-2,3,5,9}

The range is the set of all y values in the


relation
• Recall the definition of Cartesian Product

DEF: Consider two arbitrary sets A and B.


The sets of all ordered pairs (a,b) where a  A and b B is called
the product, or Cartesian Product, of A and B. By definition,
A×B ={(a,b):a  A and b  B}

Q: If A = {1,2}, B = {3,4}, C = {5,6,7} what is A B C ?


A B C ={ (1,3,5), (1,3,6), (1,3,7),
(1,4,5), (1,4,6), (1,4,7),
(2,3,5), (2,3,6), (2,3,7),
(2,4,5), (2,4,6), (2,4,7) }

3
Relations
• Let A, B be any sets. A binary relation or relation R from A
to B, written R:A×B, or R:A,B, is a subset of the set A×B.

• Suppose R is a relation from A to B. Then R is a set of


ordered pairs e.g. (a,b) where each a  A and b  B.

• The notation a R b or aRb, we may say “a is related to b ”, if


(a,b)R.

4
Complementary Relations
• Let R:A,B be any binary relation.
• Then, R:A×B, the complement of R, is the
binary relation defined by
R :≡ {(a,b) | (a,b)R} = (A×B) − R
• The a R b or aRb say “a is not related to b ”, if
(a,b)  R.

05/21/23 (c)2001-2003, Michael P. Frank 5


Inverse Relations
• Any binary relation R:A×B has an inverse
relation R−1:B×A, i.e. relation from B to A
instead of A to B, defined by
R−1 :≡ {(b,a) | (a,b)R}.
E.g., <−1 = {(b,a) | a<b} = {(b,a) | b>a} = >.
• E.g., if R:People→Foods is defined by
a R b  a eats b, then:
b R−1 a  b is eaten by a. (Passive voice.)

05/21/23 (c)2001-2003, Michael P. Frank 6


Reflexivity
• A relation R on A is reflexive if aA, aRa i.e. for
every aA, (a,a) A

• R is not reflexive if there exists an aA such that


(a,a)  A

05/21/23 (c)2001-2003, Michael P. Frank 7


Reflexivity
• A relation R is irreflexive if for every aA, (a,a)  A

• R is not irreflexive if there exist at least one aA,


(a,a)  A
Example: < is irreflexive, because ≥ is reflexive.
– Note “irreflexive” does NOT mean “not reflexive”!

05/21/23 (c)2001-2003, Michael P. Frank 8


Symmetry & Antisymmetry
• A binary relation R on A is symmetric iff
R = R−1, that is, if (a,b)R ↔ (b,a)R.
– E.g., = (equality) is symmetric. < is not.
• R is not symmetric if there exist a,bR such
that (a,b)R but (b,a)R.

• A binary relation R is antisymmetric if


a≠b, (a,b)R → (b,a)R.
05/21/23 (c)2001-2003, Michael P. Frank 9
Asymmetry
• A relation R on set A is asymmetric if (a,b)R
then (b,a)R.

• R is not asymmetric if for some a and b from


A, both (a,b)R and (b,a)  R.

05/21/23 (c)2001-2003, Michael P. Frank 10


Transitivity
• A relation R is transitive iff (for all a,b,c)
(a,b)R  (b,c)R → (a,c)R.

• A relation is intransitive iff it is not transitive


i.e. if there exist a,b,c R such that (a,b),(b,c)
R but (a,c) R .

05/21/23 (c)2001-2003, Michael P. Frank 11

You might also like