SlideShare a Scribd company logo
1 of 16
Fall 2002 CMSC 203 - Discrete Structures 1
You Never Escape Your…You Never Escape Your…
RelationsRelations
Fall 2002 CMSC 203 - Discrete Structures 2
Relations on a SetRelations on a Set
Definition:Definition: A relation on the set A is a relationA relation on the set A is a relation
from A to A.from A to A.
In other words, a relation on the set A is a subsetIn other words, a relation on the set A is a subset
of Aof A××A.A.
Example:Example: Let A = {1, 2, 3, 4}. Which ordered pairsLet A = {1, 2, 3, 4}. Which ordered pairs
are in the relation R = {(a, b) | a < b} ?are in the relation R = {(a, b) | a < b} ?
Fall 2002 CMSC 203 - Discrete Structures 3
Relations on a SetRelations on a Set
Solution:Solution: R = {R = {(1, 2),(1, 2), (1, 3),(1, 3), (1, 4),(1, 4), (2, 3),(2, 3),(2, 4),(2, 4),(3, 4)}(3, 4)}
RR 11 22 33 44
11
22
33
44
11 11
22
33
44
22
33
44
XX XX XX
XX XX
XX
Fall 2002 CMSC 203 - Discrete Structures 4
Properties of RelationsProperties of Relations
We will now look at some useful ways to classifyWe will now look at some useful ways to classify
relations.relations.
Definition:Definition: A relation R on a set A is calledA relation R on a set A is called
reflexivereflexive if (a, a)if (a, a)∈∈R for every element aR for every element a∈∈A.A.
Are the following relations on {1, 2, 3, 4} reflexive?Are the following relations on {1, 2, 3, 4} reflexive?
R = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)}R = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)} No.No.
R = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)}R = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)} Yes.Yes.
R = {(1, 1), (2, 2), (3, 3)}R = {(1, 1), (2, 2), (3, 3)} No.No.
Definition:Definition: A relation on a set A is calledA relation on a set A is called
irreflexiveirreflexive if (a, a)if (a, a)∉∉R for every element aR for every element a∈∈A.A.
Fall 2002 CMSC 203 - Discrete Structures 5
Properties of RelationsProperties of Relations
Definitions:Definitions:
A relation R on a set A is calledA relation R on a set A is called symmetricsymmetric if (b,if (b,
a)a)∈∈R whenever (a, b)R whenever (a, b)∈∈R for all a, bR for all a, b∈∈A.A.
A relation R on a set A is calledA relation R on a set A is called antisymmetricantisymmetric ifif
a = b whenever (a, b)a = b whenever (a, b)∈∈R and (b, a)R and (b, a)∈∈R.R.
Fall 2002 CMSC 203 - Discrete Structures 6
Properties of RelationsProperties of Relations
Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4}
symmetric or antisymmetric?symmetric or antisymmetric?
R = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)}R = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)} symmetricsymmetric
R = {(1, 1)}R = {(1, 1)} sym. andsym. and
antisym.antisym.
R = {(1, 3), (3, 2), (2, 1)}R = {(1, 3), (3, 2), (2, 1)} antisym.antisym.
And.And.
R = {(4, 4), (3, 3), (1, 4)}R = {(4, 4), (3, 3), (1, 4)} antisym.antisym.
Fall 2002 CMSC 203 - Discrete Structures 7
Properties of RelationsProperties of Relations
Definition:Definition: A relation R on a set A is calledA relation R on a set A is called
transitivetransitive if whenever (a, b)if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, thenR, then
(a, c)(a, c)∈∈R for a, b, cR for a, b, c∈∈A.A.
Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4}
transitive?transitive?
R = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)}R = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)} Yes.Yes.
R = {(1, 3), (3, 2), (2, 1)}R = {(1, 3), (3, 2), (2, 1)} No.No.
R = {(2, 4), (4, 3), (2, 3), (4, 1)}R = {(2, 4), (4, 3), (2, 3), (4, 1)} No.No.
Fall 2002 CMSC 203 - Discrete Structures 8
Combining RelationsCombining Relations
Relations are sets, and therefore, we can apply theRelations are sets, and therefore, we can apply the
usualusual set operationsset operations to them.to them.
If we have two relations RIf we have two relations R11 and Rand R22, and both of, and both of
them are from a set A to a set B, then we canthem are from a set A to a set B, then we can
combine them to Rcombine them to R11 ∪∪ RR22, R, R11 ∩∩ RR22, or R, or R11 – R– R22..
In each case, the result will beIn each case, the result will be another relationanother relation
from A to Bfrom A to B..
Fall 2002 CMSC 203 - Discrete Structures 9
Combining RelationsCombining Relations
compositecomposite SS°° RR::
if relation R contains a pair (a, b) and relation Sif relation R contains a pair (a, b) and relation S
contains a pair (b, c), then Scontains a pair (b, c), then S°° R contains a pair (a, c).R contains a pair (a, c).
Example:Example:
SbxRxaxRSba ∈∧∈∃↔∈ ),(),(:),( 
)}4,3(),1,3(),3,2(),4,1(),1,1{(=R
)}1,4(),2,3(),1,3(),0,2(),0,1{(=S
)}1,3(),0,3(),2,2(),1,2(),1,1(),0,1{(=RS 
:
:
Fall 2002 CMSC 203 - Discrete Structures 10
Combining RelationsCombining Relations
Definition:Definition: Let R be a relation on the set A. TheLet R be a relation on the set A. The
powers Rpowers Rnn
, n = 1, 2, 3, …, are defined inductively by, n = 1, 2, 3, …, are defined inductively by
RR11
= R= R
RRn+1n+1
= R= Rnn
°° RR
In other words:In other words:
RRnn
= R= R°° RR°° …… °° R (n times the letter R)R (n times the letter R)
Fall 2002 CMSC 203 - Discrete Structures 11
Combining RelationsCombining Relations
Theorem:Theorem: The relation R on a set A is transitive ifThe relation R on a set A is transitive if
and only if Rand only if Rnn
⊆⊆ R for all positive integers n.R for all positive integers n.
Remember the definition of transitivity:Remember the definition of transitivity:
Definition:Definition: A relation R on a set A is calledA relation R on a set A is called
transitive if whenever (a, b)transitive if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, thenR, then
(a, c)(a, c)∈∈R for a, b, cR for a, b, c∈∈A.A.
The composite of R with itself contains exactlyThe composite of R with itself contains exactly
these pairs (a, c).these pairs (a, c).
Therefore, for a transitive relation R, RTherefore, for a transitive relation R, R°° R does notR does not
contain any pairs that are not in R, so Rcontain any pairs that are not in R, so R°° RR ⊆⊆ R.R.
Since RSince R°° R does not introduce any pairs that are notR does not introduce any pairs that are not
already in R, it must also be true that (Ralready in R, it must also be true that (R°° R)R)°° RR ⊆⊆ R,R,
and so on, so that Rand so on, so that Rnn
⊆⊆ R.R.
Closure of Relation:Closure of Relation:
Definition:Definition: Let R be a relation on a set A. R mayLet R be a relation on a set A. R may
or may not have someor may not have some property Pproperty P, such as, such as
reflexivity, symmetry, or transitivity.reflexivity, symmetry, or transitivity.
If there is a relation S with property PIf there is a relation S with property P
containing R such that S is a subset of everycontaining R such that S is a subset of every
relation with property P containing R, then S isrelation with property P containing R, then S is
called the closure of R with respect to P.called the closure of R with respect to P.
12
Example I:Example I: Find theFind the reflexivereflexive closureclosure of relation R =of relation R =
{(1, 1), (1, 2), (2, 1), (3, 2)} on the set A = {1, 2, 3}.{(1, 1), (1, 2), (2, 1), (3, 2)} on the set A = {1, 2, 3}.
Solution:Solution: We know that any reflexive relation on AWe know that any reflexive relation on A
must contain the elements (1, 1), (2, 2), and (3, 3).must contain the elements (1, 1), (2, 2), and (3, 3).
By adding (2, 2) and (3, 3) to R, we obtain theBy adding (2, 2) and (3, 3) to R, we obtain the
reflexive relation S, which is given byreflexive relation S, which is given by
S = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 2), (3, 3)}.S = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 2), (3, 3)}.
Therefore, S is theTherefore, S is the reflexive closurereflexive closure of R.of R.
Fall 2002 CMSC 203 - Discrete Structures 13
Example II:Example II: Find theFind the transitive closuretransitive closure ofof
the relation R = {(1, 2), (2,3), (3, 4)} on thethe relation R = {(1, 2), (2,3), (3, 4)} on the
setset
A = {1, 2, 3, 4}.A = {1, 2, 3, 4}.
Solution:Solution: R would be transitive, if for allR would be transitive, if for all
pairspairs
(a, b) and (b, c) in R there were also a pair (a,(a, b) and (b, c) in R there were also a pair (a,
c) in R.c) in R.
11stst
order: (1,3),(2,4)order: (1,3),(2,4)
22ndnd
order: (1,4)order: (1,4)
Fall 2002 CMSC 203 - Discrete Structures 14
Graph:Graph:
AA graph Ggraph G == (V ,E)(V ,E) consists ofconsists of VV , a nonempty, a nonempty
set ofset of verticesvertices (or(or nodesnodes) and) and EE, a set of, a set of
edgesedges. Each edge has either one or two. Each edge has either one or two
vertices associated with it, called itsvertices associated with it, called its
endpointsendpoints..
Fall 2002 CMSC 203 - Discrete Structures 15
Fall 2002 CMSC 203 - Discrete Structures 16

More Related Content

What's hot

cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra Sami Ullah
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical inductionKriti Varshney
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityKiran Munir
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical inductionrey castro
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relationsIIUM
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Rachana Pathak
 
The principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariThe principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariDeogiri College Student
 
Types Of Set
Types Of SetTypes Of Set
Types Of SetPkwebbs
 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++Ilio Catallo
 
Sets PowerPoint Presentation
Sets PowerPoint PresentationSets PowerPoint Presentation
Sets PowerPoint PresentationAshna Rajput
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmeticsangeetha s
 
Permutation & Combination
Permutation & CombinationPermutation & Combination
Permutation & CombinationPuru Agrawal
 
Infinite sequence and series
Infinite sequence and seriesInfinite sequence and series
Infinite sequence and seriesBhavik A Shah
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1blaircomp2003
 
Applications of algebra and calculus
Applications of algebra and calculusApplications of algebra and calculus
Applications of algebra and calculusabdulqadir ezzy
 
Relations
RelationsRelations
RelationsGaditek
 

What's hot (20)

Eulers totient
Eulers totientEulers totient
Eulers totient
 
Hashing
HashingHashing
Hashing
 
cryptography Application of linear algebra
cryptography Application of linear algebra cryptography Application of linear algebra
cryptography Application of linear algebra
 
Principle of mathematical induction
Principle of mathematical inductionPrinciple of mathematical induction
Principle of mathematical induction
 
Pigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,CountabilityPigeonhole Principle,Cardinality,Countability
Pigeonhole Principle,Cardinality,Countability
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relations
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)
 
The principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvariThe principle of inclusion and exclusion for three sets by sharvari
The principle of inclusion and exclusion for three sets by sharvari
 
Types Of Set
Types Of SetTypes Of Set
Types Of Set
 
Multidimensional arrays in C++
Multidimensional arrays in C++Multidimensional arrays in C++
Multidimensional arrays in C++
 
Sets PowerPoint Presentation
Sets PowerPoint PresentationSets PowerPoint Presentation
Sets PowerPoint Presentation
 
Modular arithmetic
Modular arithmeticModular arithmetic
Modular arithmetic
 
Permutation & Combination
Permutation & CombinationPermutation & Combination
Permutation & Combination
 
Group Theory
Group TheoryGroup Theory
Group Theory
 
Infinite sequence and series
Infinite sequence and seriesInfinite sequence and series
Infinite sequence and series
 
Mathematical Logic - Part 1
Mathematical Logic - Part 1Mathematical Logic - Part 1
Mathematical Logic - Part 1
 
Applications of algebra and calculus
Applications of algebra and calculusApplications of algebra and calculus
Applications of algebra and calculus
 
RSA ALGORITHM
RSA ALGORITHMRSA ALGORITHM
RSA ALGORITHM
 
Relations
RelationsRelations
Relations
 

Similar to Properties of relations

Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics NANDINI SHARMA
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfSanjanaAdri
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxRockyIslam5
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Himanshu Dua
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Himanshu Dua
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Himanshu Dua
 
Relations between two sets
Relations between two setsRelations between two sets
Relations between two setsYassirdino
 
Introduction to The Relations in Mathematics.pptx
Introduction to The Relations in Mathematics.pptxIntroduction to The Relations in Mathematics.pptx
Introduction to The Relations in Mathematics.pptxJadhavShaileshShashi
 
Relations
RelationsRelations
RelationsNiliha
 
Relations and Its Applications
Relations and Its ApplicationsRelations and Its Applications
Relations and Its ApplicationsVedavyas Sheoy
 

Similar to Properties of relations (20)

Per5 relasi
Per5 relasiPer5 relasi
Per5 relasi
 
Relations
RelationsRelations
Relations
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Relations
RelationsRelations
Relations
 
Sadat sumon
Sadat sumonSadat sumon
Sadat sumon
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
 
Relations
RelationsRelations
Relations
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
 
Relations between two sets
Relations between two setsRelations between two sets
Relations between two sets
 
Introduction to The Relations in Mathematics.pptx
Introduction to The Relations in Mathematics.pptxIntroduction to The Relations in Mathematics.pptx
Introduction to The Relations in Mathematics.pptx
 
Relations
RelationsRelations
Relations
 
Relation and function_xii
Relation and function_xiiRelation and function_xii
Relation and function_xii
 
L08a
L08aL08a
L08a
 
Relations
RelationsRelations
Relations
 
Relations and Its Applications
Relations and Its ApplicationsRelations and Its Applications
Relations and Its Applications
 

More from Inamul Hossain Imran (20)

Secondary storage.pptx
Secondary storage.pptxSecondary storage.pptx
Secondary storage.pptx
 
Region based segmentation
Region based segmentationRegion based segmentation
Region based segmentation
 
Thin film electroluminescent display
Thin film electroluminescent displayThin film electroluminescent display
Thin film electroluminescent display
 
CRT (Cathode ray tube)
CRT (Cathode ray tube)CRT (Cathode ray tube)
CRT (Cathode ray tube)
 
Color model
Color modelColor model
Color model
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
DDA (digital differential analyzer)
DDA (digital differential analyzer)DDA (digital differential analyzer)
DDA (digital differential analyzer)
 
Led (light emitting diode )
Led (light emitting diode )Led (light emitting diode )
Led (light emitting diode )
 
Virtual Blood Bank
Virtual Blood BankVirtual Blood Bank
Virtual Blood Bank
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Monopoly and monopolistic
Monopoly and monopolisticMonopoly and monopolistic
Monopoly and monopolistic
 
Monopolistic market
Monopolistic marketMonopolistic market
Monopolistic market
 
Oligopoly market
Oligopoly  marketOligopoly  market
Oligopoly market
 
Microeconomics vs macroeconomics
Microeconomics vs macroeconomicsMicroeconomics vs macroeconomics
Microeconomics vs macroeconomics
 
Cost and cost curve
Cost and cost curveCost and cost curve
Cost and cost curve
 
Historical Significance of Ahsan Manzil
Historical Significance of  Ahsan ManzilHistorical Significance of  Ahsan Manzil
Historical Significance of Ahsan Manzil
 
Measures of dispersions
Measures of dispersionsMeasures of dispersions
Measures of dispersions
 
Sequential circuits
Sequential circuitsSequential circuits
Sequential circuits
 
Agriculture in bangladesh
Agriculture in bangladeshAgriculture in bangladesh
Agriculture in bangladesh
 
Graph and tree
Graph and treeGraph and tree
Graph and tree
 

Recently uploaded

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Properties of relations

  • 1. Fall 2002 CMSC 203 - Discrete Structures 1 You Never Escape Your…You Never Escape Your… RelationsRelations
  • 2. Fall 2002 CMSC 203 - Discrete Structures 2 Relations on a SetRelations on a Set Definition:Definition: A relation on the set A is a relationA relation on the set A is a relation from A to A.from A to A. In other words, a relation on the set A is a subsetIn other words, a relation on the set A is a subset of Aof A××A.A. Example:Example: Let A = {1, 2, 3, 4}. Which ordered pairsLet A = {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) | a < b} ?are in the relation R = {(a, b) | a < b} ?
  • 3. Fall 2002 CMSC 203 - Discrete Structures 3 Relations on a SetRelations on a Set Solution:Solution: R = {R = {(1, 2),(1, 2), (1, 3),(1, 3), (1, 4),(1, 4), (2, 3),(2, 3),(2, 4),(2, 4),(3, 4)}(3, 4)} RR 11 22 33 44 11 22 33 44 11 11 22 33 44 22 33 44 XX XX XX XX XX XX
  • 4. Fall 2002 CMSC 203 - Discrete Structures 4 Properties of RelationsProperties of Relations We will now look at some useful ways to classifyWe will now look at some useful ways to classify relations.relations. Definition:Definition: A relation R on a set A is calledA relation R on a set A is called reflexivereflexive if (a, a)if (a, a)∈∈R for every element aR for every element a∈∈A.A. Are the following relations on {1, 2, 3, 4} reflexive?Are the following relations on {1, 2, 3, 4} reflexive? R = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)}R = {(1, 1), (1, 2), (2, 3), (3, 3), (4, 4)} No.No. R = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)}R = {(1, 1), (2, 2), (2, 3), (3, 3), (4, 4)} Yes.Yes. R = {(1, 1), (2, 2), (3, 3)}R = {(1, 1), (2, 2), (3, 3)} No.No. Definition:Definition: A relation on a set A is calledA relation on a set A is called irreflexiveirreflexive if (a, a)if (a, a)∉∉R for every element aR for every element a∈∈A.A.
  • 5. Fall 2002 CMSC 203 - Discrete Structures 5 Properties of RelationsProperties of Relations Definitions:Definitions: A relation R on a set A is calledA relation R on a set A is called symmetricsymmetric if (b,if (b, a)a)∈∈R whenever (a, b)R whenever (a, b)∈∈R for all a, bR for all a, b∈∈A.A. A relation R on a set A is calledA relation R on a set A is called antisymmetricantisymmetric ifif a = b whenever (a, b)a = b whenever (a, b)∈∈R and (b, a)R and (b, a)∈∈R.R.
  • 6. Fall 2002 CMSC 203 - Discrete Structures 6 Properties of RelationsProperties of Relations Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4} symmetric or antisymmetric?symmetric or antisymmetric? R = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)}R = {(1, 1), (1, 2), (2, 1), (3, 3), (4, 4)} symmetricsymmetric R = {(1, 1)}R = {(1, 1)} sym. andsym. and antisym.antisym. R = {(1, 3), (3, 2), (2, 1)}R = {(1, 3), (3, 2), (2, 1)} antisym.antisym. And.And. R = {(4, 4), (3, 3), (1, 4)}R = {(4, 4), (3, 3), (1, 4)} antisym.antisym.
  • 7. Fall 2002 CMSC 203 - Discrete Structures 7 Properties of RelationsProperties of Relations Definition:Definition: A relation R on a set A is calledA relation R on a set A is called transitivetransitive if whenever (a, b)if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, thenR, then (a, c)(a, c)∈∈R for a, b, cR for a, b, c∈∈A.A. Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4} transitive?transitive? R = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)}R = {(1, 1), (1, 2), (2, 2), (2, 1), (3, 3)} Yes.Yes. R = {(1, 3), (3, 2), (2, 1)}R = {(1, 3), (3, 2), (2, 1)} No.No. R = {(2, 4), (4, 3), (2, 3), (4, 1)}R = {(2, 4), (4, 3), (2, 3), (4, 1)} No.No.
  • 8. Fall 2002 CMSC 203 - Discrete Structures 8 Combining RelationsCombining Relations Relations are sets, and therefore, we can apply theRelations are sets, and therefore, we can apply the usualusual set operationsset operations to them.to them. If we have two relations RIf we have two relations R11 and Rand R22, and both of, and both of them are from a set A to a set B, then we canthem are from a set A to a set B, then we can combine them to Rcombine them to R11 ∪∪ RR22, R, R11 ∩∩ RR22, or R, or R11 – R– R22.. In each case, the result will beIn each case, the result will be another relationanother relation from A to Bfrom A to B..
  • 9. Fall 2002 CMSC 203 - Discrete Structures 9 Combining RelationsCombining Relations compositecomposite SS°° RR:: if relation R contains a pair (a, b) and relation Sif relation R contains a pair (a, b) and relation S contains a pair (b, c), then Scontains a pair (b, c), then S°° R contains a pair (a, c).R contains a pair (a, c). Example:Example: SbxRxaxRSba ∈∧∈∃↔∈ ),(),(:),(  )}4,3(),1,3(),3,2(),4,1(),1,1{(=R )}1,4(),2,3(),1,3(),0,2(),0,1{(=S )}1,3(),0,3(),2,2(),1,2(),1,1(),0,1{(=RS  : :
  • 10. Fall 2002 CMSC 203 - Discrete Structures 10 Combining RelationsCombining Relations Definition:Definition: Let R be a relation on the set A. TheLet R be a relation on the set A. The powers Rpowers Rnn , n = 1, 2, 3, …, are defined inductively by, n = 1, 2, 3, …, are defined inductively by RR11 = R= R RRn+1n+1 = R= Rnn °° RR In other words:In other words: RRnn = R= R°° RR°° …… °° R (n times the letter R)R (n times the letter R)
  • 11. Fall 2002 CMSC 203 - Discrete Structures 11 Combining RelationsCombining Relations Theorem:Theorem: The relation R on a set A is transitive ifThe relation R on a set A is transitive if and only if Rand only if Rnn ⊆⊆ R for all positive integers n.R for all positive integers n. Remember the definition of transitivity:Remember the definition of transitivity: Definition:Definition: A relation R on a set A is calledA relation R on a set A is called transitive if whenever (a, b)transitive if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, thenR, then (a, c)(a, c)∈∈R for a, b, cR for a, b, c∈∈A.A. The composite of R with itself contains exactlyThe composite of R with itself contains exactly these pairs (a, c).these pairs (a, c). Therefore, for a transitive relation R, RTherefore, for a transitive relation R, R°° R does notR does not contain any pairs that are not in R, so Rcontain any pairs that are not in R, so R°° RR ⊆⊆ R.R. Since RSince R°° R does not introduce any pairs that are notR does not introduce any pairs that are not already in R, it must also be true that (Ralready in R, it must also be true that (R°° R)R)°° RR ⊆⊆ R,R, and so on, so that Rand so on, so that Rnn ⊆⊆ R.R.
  • 12. Closure of Relation:Closure of Relation: Definition:Definition: Let R be a relation on a set A. R mayLet R be a relation on a set A. R may or may not have someor may not have some property Pproperty P, such as, such as reflexivity, symmetry, or transitivity.reflexivity, symmetry, or transitivity. If there is a relation S with property PIf there is a relation S with property P containing R such that S is a subset of everycontaining R such that S is a subset of every relation with property P containing R, then S isrelation with property P containing R, then S is called the closure of R with respect to P.called the closure of R with respect to P. 12
  • 13. Example I:Example I: Find theFind the reflexivereflexive closureclosure of relation R =of relation R = {(1, 1), (1, 2), (2, 1), (3, 2)} on the set A = {1, 2, 3}.{(1, 1), (1, 2), (2, 1), (3, 2)} on the set A = {1, 2, 3}. Solution:Solution: We know that any reflexive relation on AWe know that any reflexive relation on A must contain the elements (1, 1), (2, 2), and (3, 3).must contain the elements (1, 1), (2, 2), and (3, 3). By adding (2, 2) and (3, 3) to R, we obtain theBy adding (2, 2) and (3, 3) to R, we obtain the reflexive relation S, which is given byreflexive relation S, which is given by S = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 2), (3, 3)}.S = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 2), (3, 3)}. Therefore, S is theTherefore, S is the reflexive closurereflexive closure of R.of R. Fall 2002 CMSC 203 - Discrete Structures 13
  • 14. Example II:Example II: Find theFind the transitive closuretransitive closure ofof the relation R = {(1, 2), (2,3), (3, 4)} on thethe relation R = {(1, 2), (2,3), (3, 4)} on the setset A = {1, 2, 3, 4}.A = {1, 2, 3, 4}. Solution:Solution: R would be transitive, if for allR would be transitive, if for all pairspairs (a, b) and (b, c) in R there were also a pair (a,(a, b) and (b, c) in R there were also a pair (a, c) in R.c) in R. 11stst order: (1,3),(2,4)order: (1,3),(2,4) 22ndnd order: (1,4)order: (1,4) Fall 2002 CMSC 203 - Discrete Structures 14
  • 15. Graph:Graph: AA graph Ggraph G == (V ,E)(V ,E) consists ofconsists of VV , a nonempty, a nonempty set ofset of verticesvertices (or(or nodesnodes) and) and EE, a set of, a set of edgesedges. Each edge has either one or two. Each edge has either one or two vertices associated with it, called itsvertices associated with it, called its endpointsendpoints.. Fall 2002 CMSC 203 - Discrete Structures 15
  • 16. Fall 2002 CMSC 203 - Discrete Structures 16