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

Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relationsnszakir
 
Rabin karp string matching algorithm
Rabin karp string matching algorithmRabin karp string matching algorithm
Rabin karp string matching algorithmGajanand Sharma
 
Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computationBipul Roy Bpl
 
Isomorphism in Math
Isomorphism in MathIsomorphism in Math
Isomorphism in MathMahe Karim
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & DimensionManikanta satyala
 
Relation matrix & graphs in relations
Relation matrix &  graphs in relationsRelation matrix &  graphs in relations
Relation matrix & graphs in relationsRachana Pathak
 
Ch 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraCh 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraRupali Rana
 
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial OrderingCMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Srimatre K
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematicNaralaswapna
 

What's hot (20)

Ring
RingRing
Ring
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Combinatorics
CombinatoricsCombinatorics
Combinatorics
 
Trees
Trees Trees
Trees
 
Rabin karp string matching algorithm
Rabin karp string matching algorithmRabin karp string matching algorithm
Rabin karp string matching algorithm
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
Relations
RelationsRelations
Relations
 
Regular expressions-Theory of computation
Regular expressions-Theory of computationRegular expressions-Theory of computation
Regular expressions-Theory of computation
 
Graph algorithm
Graph algorithmGraph algorithm
Graph algorithm
 
Isomorphism in Math
Isomorphism in MathIsomorphism in Math
Isomorphism in Math
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
 
Taylor series
Taylor seriesTaylor series
Taylor series
 
Relation matrix & graphs in relations
Relation matrix &  graphs in relationsRelation matrix &  graphs in relations
Relation matrix & graphs in relations
 
Ch 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraCh 2 lattice & boolean algebra
Ch 2 lattice & boolean algebra
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
 
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial OrderingCMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering
 
Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2Formal Languages and Automata Theory unit 2
Formal Languages and Automata Theory unit 2
 
Discrete mathematic
Discrete mathematicDiscrete mathematic
Discrete mathematic
 
Bottom up parser
Bottom up parserBottom up parser
Bottom up parser
 
Fuzzy Set
Fuzzy SetFuzzy Set
Fuzzy Set
 

Similar to Properties of relations

Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics NANDINI SHARMA
 
CMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their PropertiesCMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their Propertiesallyn joy calcaben
 
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
 
Relations
RelationsRelations
RelationsGaditek
 
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
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Sadat sumon
Sadat sumonSadat sumon
Sadat sumon
 
CMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their PropertiesCMSC 56 | Lecture 13: Relations and their Properties
CMSC 56 | Lecture 13: Relations and their Properties
 
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
 
Relations
RelationsRelations
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 in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
 
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
 
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
 
Types of RELATIONS
Types of RELATIONSTypes of RELATIONS
Types of RELATIONS
 

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

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
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
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
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
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
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
 
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
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
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 🔝✔️✔️
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
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
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

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