SlideShare a Scribd company logo
How About Some…How About Some…
RelationsRelations
RelationsRelations
When (a, b) belongs to R, a is said to beWhen (a, b) belongs to R, a is said to be relatedrelated to bto b
by R.by R.
Example:Example: Let P be a set of people, C be a set of cars,Let P be a set of people, C be a set of cars,
and D be the relation describing which person drivesand D be the relation describing which person drives
which car(s).which car(s).
P = {Carl, Suzanne, Peter, Carla},P = {Carl, Suzanne, Peter, Carla},
C = {Mercedes, BMW, tricycle}C = {Mercedes, BMW, tricycle}
D = {(Carl, Mercedes), (Suzanne, Mercedes),D = {(Carl, Mercedes), (Suzanne, Mercedes),
(Suzanne, BMW), (Peter, tricycle)}(Suzanne, BMW), (Peter, tricycle)}
This means that Carl drives a Mercedes, SuzanneThis means that Carl drives a Mercedes, Suzanne
drives a Mercedes and a BMW, Peter drives a tricycle,drives a Mercedes and a BMW, Peter drives a tricycle,
and Carla does not drive any of these vehicles.and Carla does not drive any of these vehicles.
Functions as RelationsFunctions as Relations
You might remember that aYou might remember that a functionfunction f from a set A tof from a set A to
a set B assigns a unique element of B to eacha set B assigns a unique element of B to each
element of A.element of A.
TheThe graphgraph of f is the set of ordered pairs (a, b) suchof f is the set of ordered pairs (a, b) such
that b = f(a).that b = f(a).
Since the graph of f is a subset of ASince the graph of f is a subset of A××B, it is aB, it is a relationrelation
from A to B.from A to B.
Moreover, for each elementMoreover, for each element aa of A, there is exactlyof A, there is exactly
one ordered pair in the graph that hasone ordered pair in the graph that has aa as its firstas its first
element.element.
Functions as RelationsFunctions as Relations
Conversely, if R is a relation from A to B such thatConversely, if R is a relation from A to B such that
every element in A is the first element of exactly oneevery element in A is the first element of exactly one
ordered pair of R, then a function can be defined withordered pair of R, then a function can be defined with
R as its graph.R as its graph.
This is done by assigning to an element aThis is done by assigning to an element a∈∈A theA the
unique element bunique element b∈∈B such that (a, b)B such that (a, b)∈∈R.R.
Relations on a SetRelations on a Set
Definition:Definition: A relation on the set A is a relation from AA relation on the set A is a relation from A
to A.to A.
In other words, a relation on the set A is a subset ofIn other words, a relation on the set A is a subset of
AA××A.A.
Example:Example: Let A = {1, 2, 3, 4}. Which ordered pairs areLet A = {1, 2, 3, 4}. Which ordered pairs are
in the relation R = {(a, b) | a < b} ?in the relation R = {(a, b) | a < b} ?
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
Relations on a SetRelations on a Set
How many different relations can we define on aHow many different relations can we define on a
set A with n elements?set A with n elements?
A relation on a set A is a subset of AA relation on a set A is a subset of A××A.A.
How many elements are in AHow many elements are in A××A ?A ?
There are nThere are n22
elements in Aelements in A××A, so how many subsetsA, so how many subsets
(= relations on A) does A(= relations on A) does A××A have?A have?
The number of subsets that we can form out of a setThe number of subsets that we can form out of a set
with m elements is 2with m elements is 2mm
. Therefore, 2. Therefore, 2nn22
subsets can besubsets can be
formed out of Aformed out of A××A.A.
Answer:Answer: We can define 2We can define 2nn22
different relationsdifferent relations
on A.on A.
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 ifif
(a, a)(a, a)∉∉R for every element aR for every element a∈∈A.A.
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, a)if (b, a)∈∈RR
whenever (a, b)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.
A relation R on a set A is calledA relation R on a set A is called asymmetricasymmetric ifif
(a, b)(a, b)∈∈R implies that (b, a)R implies that (b, a)∉∉R for all a, bR for all a, b∈∈A.A.
Properties of RelationsProperties of Relations
Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4}
symmetric, antisymmetric, or asymmetric?symmetric, antisymmetric, or asymmetric?
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 asym.and asym.
R = {(4, 4), (3, 3), (1, 4)}R = {(4, 4), (3, 3), (1, 4)} antisym.antisym.
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, then (a, c)R, then (a, c)∈∈R forR for
a, b, ca, 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.
Counting RelationsCounting Relations
Example:Example: How many different reflexive relations canHow many different reflexive relations can
be defined on a set A containing n elements?be defined on a set A containing n elements?
Solution:Solution: Relations on R are subsets of ARelations on R are subsets of A××A, whichA, which
contains ncontains n22
elements.elements.
Therefore, different relations on A can be generatedTherefore, different relations on A can be generated
by choosing different subsets out of these nby choosing different subsets out of these n22
elements, so there are 2elements, so there are 2nn22
relations.relations.
AA reflexivereflexive relation, however,relation, however, mustmust contain the ncontain the n
elements (a, a) for every aelements (a, a) for every a∈∈A.A.
Consequently, we can only choose among nConsequently, we can only choose among n22
– n =– n =
n(n – 1) elements to generate reflexive relations, son(n – 1) elements to generate reflexive relations, so
there are 2there are 2n(n – 1)n(n – 1)
of them.of them.
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 them, and both of them
are from a set A to a set B, then we can combineare from a set A to a set B, then we can combine
them to Rthem 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 relation fromanother relation from
A to BA to B..
Combining RelationsCombining Relations
…… and there is another important way to combineand there is another important way to combine
relations.relations.
Definition:Definition: Let R be a relation from a set A to a set BLet R be a relation from a set A to a set B
and S a relation from B to a set C. Theand S a relation from B to a set C. The compositecomposite ofof
R and S is the relation consisting of ordered pairs (a,R and S is the relation consisting of ordered pairs (a,
c), where ac), where a∈∈A, cA, c∈∈C, and for which there exists anC, and for which there exists an
element belement b∈∈B such that (a, b)B such that (a, b)∈∈R andR and
(b, c)(b, c)∈∈S. We denote the composite of R and S byS. We denote the composite of R and S by
SS°° RR..
In other words, if relation R contains a pair (a, b) andIn other words, if relation R contains a pair (a, b) and
relation S contains a pair (b, c), then Srelation S contains a pair (b, c), then S°° R contains aR contains a
pair (a, c).pair (a, c).
Combining RelationsCombining Relations
Example:Example: Let D and S be relations on A = {1, 2, 3, 4}.Let D and S be relations on A = {1, 2, 3, 4}.
D = {(a, b) | b = 5 - a} “b equals (5 – a)”D = {(a, b) | b = 5 - a} “b equals (5 – a)”
S = {(a, b) | a < b} “a is smaller than b”S = {(a, b) | a < b} “a is smaller than b”
D = {(1, 4), (2, 3), (3, 2), (4, 1)}D = {(1, 4), (2, 3), (3, 2), (4, 1)}
S = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}S = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}
SS°° D = {D = { (2, 4),(2, 4), (3, 3),(3, 3), (3, 4),(3, 4), (4, 2),(4, 2), (4, 3),(4, 3),
D maps an element a to the element (5 – a), andD maps an element a to the element (5 – a), and
afterwards S maps (5 – a) to all elements larger than (5afterwards S maps (5 – a) to all elements larger than (5
– a), resulting in– a), resulting in SS°°D = {(a,b) | b > 5 – a}D = {(a,b) | b > 5 – a} oror SS°°D = {(a,b)D = {(a,b)
| a + b > 5}.| a + b > 5}.
(4, 4)}(4, 4)}
Combining RelationsCombining Relations
We already know thatWe already know that functionsfunctions are justare just
special casesspecial cases ofof relationsrelations (namely those that(namely those that
map each element in the domain onto exactlymap each element in the domain onto exactly
one element in the codomain).one element in the codomain).
If we formally convert two functions intoIf we formally convert two functions into
relations, that is, write them down as sets ofrelations, that is, write them down as sets of
ordered pairs, the composite of these relationsordered pairs, the composite of these relations
will be exactly the same as the composite ofwill be exactly the same as the composite of
the functions (as defined earlier).the functions (as defined earlier).
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)
Combining RelationsCombining Relations
Theorem:Theorem: The relation R on a set A is transitive if andThe relation R on a set A is transitive if and
only if Ronly 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 called transitiveA relation R on a set A is called transitive
if whenever (a, b)if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, then (a, c)R, then (a, c)∈∈R forR for
a, b, ca, b, c∈∈A.A.
The composite of R with itself contains exactly theseThe composite of R with itself contains exactly these
pairs (a, c).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, andR, and
so on, so that Rso on, so that Rnn
⊆⊆ R.R.

More Related Content

What's hot

Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & Cosets
Kevin Johnson
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relations
allyn joy calcaben
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
Lets Educate India
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
Himanshu Dua
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
IIUM
 
Relations and Functions 1
Relations and Functions 1Relations and Functions 1
Relations and Functions 1
Lakshmikanta Satapathy
 
Relations and Functions 2
Relations and Functions 2Relations and Functions 2
Relations and Functions 2
Lakshmikanta Satapathy
 
Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )
OliverBaltazar2
 
Toc chapter 1 srg
Toc chapter 1 srgToc chapter 1 srg
Toc chapter 1 srg
Shayak Giri
 
Set theory
Set theorySet theory
Set theory
manikanta361
 
Group abstract algebra
Group  abstract algebraGroup  abstract algebra
Group abstract algebra
NaliniSPatil
 
Group theory
Group theoryGroup theory
Group theory
Anirban Bhattacharjee
 
PGR seminar - November 2011 - Subgroup structure of simple groups
PGR seminar - November 2011 - Subgroup structure of simple groupsPGR seminar - November 2011 - Subgroup structure of simple groups
PGR seminar - November 2011 - Subgroup structure of simple groupsRaffaele Rainone
 
Crisp sets
Crisp setsCrisp sets
Crisp sets
DEEPIKA T
 
Group Theory
Group TheoryGroup Theory
Group Theory
shinojmadhu
 
Isomorphism
IsomorphismIsomorphism
Isomorphism
sheisirenebkm
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetMoe Han
 

What's hot (20)

Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Section 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & CosetsSection 9: Equivalence Relations & Cosets
Section 9: Equivalence Relations & Cosets
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relations
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
 
Relations digraphs
Relations  digraphsRelations  digraphs
Relations digraphs
 
Relations and Functions 1
Relations and Functions 1Relations and Functions 1
Relations and Functions 1
 
Lemh101
Lemh101Lemh101
Lemh101
 
Relations and Functions 2
Relations and Functions 2Relations and Functions 2
Relations and Functions 2
 
Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )
 
L08a
L08aL08a
L08a
 
Toc chapter 1 srg
Toc chapter 1 srgToc chapter 1 srg
Toc chapter 1 srg
 
Set theory
Set theorySet theory
Set theory
 
Group abstract algebra
Group  abstract algebraGroup  abstract algebra
Group abstract algebra
 
Group theory
Group theoryGroup theory
Group theory
 
PGR seminar - November 2011 - Subgroup structure of simple groups
PGR seminar - November 2011 - Subgroup structure of simple groupsPGR seminar - November 2011 - Subgroup structure of simple groups
PGR seminar - November 2011 - Subgroup structure of simple groups
 
Crisp sets
Crisp setsCrisp sets
Crisp sets
 
Group Theory
Group TheoryGroup Theory
Group Theory
 
Isomorphism
IsomorphismIsomorphism
Isomorphism
 
Abstract Algebra Cheat Sheet
Abstract Algebra Cheat SheetAbstract Algebra Cheat Sheet
Abstract Algebra Cheat Sheet
 

Similar to Per5 relasi

Relations
RelationsRelations
Relations
PJS KUMAR
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
NANDINI SHARMA
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
nszakir
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
SanjanaAdri
 
Relations
RelationsRelations
Relations
Shiwani Gupta
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
RockyIslam5
 
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 in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
Pearl Rose Cajenta
 
Relations and Its Applications
Relations and Its ApplicationsRelations and Its Applications
Relations and Its Applications
Vedavyas Sheoy
 
Relational Algebra (1).pptx
Relational Algebra (1).pptxRelational Algebra (1).pptx
Relational Algebra (1).pptx
SarowarSuman
 
Relation and function
Relation and functionRelation and function
Relation and function
AadityaGera
 
Relations
RelationsRelations
Relations
Niliha
 
Sets and relations
Sets and relationsSets and relations
Sets and relations
SURBHI SAROHA
 
Relations
RelationsRelations
Relation and function_xii
Relation and function_xiiRelation and function_xii
Relation and function_xii
Barnali Banerjee
 
Relations between two sets
Relations between two setsRelations between two sets
Relations between two sets
Yassirdino
 
Inverse of Relations Presentation.pptx
Inverse of Relations   Presentation.pptxInverse of Relations   Presentation.pptx
Inverse of Relations Presentation.pptx
MuhammadArishImran
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillai
unni2012
 
Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1
RAHUL SINGH
 

Similar to Per5 relasi (20)

Relations
RelationsRelations
Relations
 
Relation in Discrete Mathematics
Relation in Discrete Mathematics Relation in Discrete Mathematics
Relation in Discrete Mathematics
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
 
Relations
RelationsRelations
Relations
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
 
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 and Its Applications
Relations and Its ApplicationsRelations and Its Applications
Relations and Its Applications
 
Relational Algebra (1).pptx
Relational Algebra (1).pptxRelational Algebra (1).pptx
Relational Algebra (1).pptx
 
Relation and function
Relation and functionRelation and function
Relation and function
 
Relations
RelationsRelations
Relations
 
Sets and relations
Sets and relationsSets and relations
Sets and relations
 
Relations
RelationsRelations
Relations
 
Relation and function_xii
Relation and function_xiiRelation and function_xii
Relation and function_xii
 
Relations between two sets
Relations between two setsRelations between two sets
Relations between two sets
 
Inverse of Relations Presentation.pptx
Inverse of Relations   Presentation.pptxInverse of Relations   Presentation.pptx
Inverse of Relations Presentation.pptx
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillai
 
Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1
 

More from Evert Sandye Taasiringan

Per4 induction
Per4 inductionPer4 induction
Per4 induction
Evert Sandye Taasiringan
 
Per1 himpunan&amp;fungsiumn
Per1 himpunan&amp;fungsiumnPer1 himpunan&amp;fungsiumn
Per1 himpunan&amp;fungsiumn
Evert Sandye Taasiringan
 
Per1 himpunan umn
Per1 himpunan umnPer1 himpunan umn
Per1 himpunan umn
Evert Sandye Taasiringan
 
Per7 kombinasi&amp;permutasi
Per7 kombinasi&amp;permutasiPer7 kombinasi&amp;permutasi
Per7 kombinasi&amp;permutasi
Evert Sandye Taasiringan
 
Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
Evert Sandye Taasiringan
 
Per1 pendahuluan umn
Per1 pendahuluan umnPer1 pendahuluan umn
Per1 pendahuluan umn
Evert Sandye Taasiringan
 
Pengantar matematikadiskrit
Pengantar matematikadiskritPengantar matematikadiskrit
Pengantar matematikadiskrit
Evert Sandye Taasiringan
 
Per2 logika umn
Per2 logika umnPer2 logika umn
Per2 logika umn
Evert Sandye Taasiringan
 
Per3 logika
Per3 logikaPer3 logika
Pengantar matematika diskrit
Pengantar matematika diskritPengantar matematika diskrit
Pengantar matematika diskrit
Evert Sandye Taasiringan
 
Per3 pembuktian
Per3 pembuktianPer3 pembuktian
Per3 pembuktian
Evert Sandye Taasiringan
 
Per4 function1
Per4 function1Per4 function1
Per4 function1
Evert Sandye Taasiringan
 
Per4 function2
Per4 function2Per4 function2
Per4 function2
Evert Sandye Taasiringan
 
Per5_matrix multiplication
Per5_matrix multiplicationPer5_matrix multiplication
Per5_matrix multiplication
Evert Sandye Taasiringan
 
Per5 sequences
Per5 sequencesPer5 sequences
Per5 sequences
Evert Sandye Taasiringan
 
Per6 basis_Representations Of Integers
Per6 basis_Representations Of IntegersPer6 basis_Representations Of Integers
Per6 basis_Representations Of Integers
Evert Sandye Taasiringan
 
Pertemuan 5_Relation Matriks_01 (17)
Pertemuan 5_Relation Matriks_01 (17)Pertemuan 5_Relation Matriks_01 (17)
Pertemuan 5_Relation Matriks_01 (17)
Evert Sandye Taasiringan
 
Per6 basis2_NUMBER SYSTEMS
Per6 basis2_NUMBER SYSTEMSPer6 basis2_NUMBER SYSTEMS
Per6 basis2_NUMBER SYSTEMS
Evert Sandye Taasiringan
 
Per6dm0910
Per6dm0910Per6dm0910
Contoh Tugas Kuliah Matematika Diskrit
Contoh Tugas Kuliah Matematika DiskritContoh Tugas Kuliah Matematika Diskrit
Contoh Tugas Kuliah Matematika Diskrit
Evert Sandye Taasiringan
 

More from Evert Sandye Taasiringan (20)

Per4 induction
Per4 inductionPer4 induction
Per4 induction
 
Per1 himpunan&amp;fungsiumn
Per1 himpunan&amp;fungsiumnPer1 himpunan&amp;fungsiumn
Per1 himpunan&amp;fungsiumn
 
Per1 himpunan umn
Per1 himpunan umnPer1 himpunan umn
Per1 himpunan umn
 
Per7 kombinasi&amp;permutasi
Per7 kombinasi&amp;permutasiPer7 kombinasi&amp;permutasi
Per7 kombinasi&amp;permutasi
 
Per3 logika&amp;pembuktian
Per3 logika&amp;pembuktianPer3 logika&amp;pembuktian
Per3 logika&amp;pembuktian
 
Per1 pendahuluan umn
Per1 pendahuluan umnPer1 pendahuluan umn
Per1 pendahuluan umn
 
Pengantar matematikadiskrit
Pengantar matematikadiskritPengantar matematikadiskrit
Pengantar matematikadiskrit
 
Per2 logika umn
Per2 logika umnPer2 logika umn
Per2 logika umn
 
Per3 logika
Per3 logikaPer3 logika
Per3 logika
 
Pengantar matematika diskrit
Pengantar matematika diskritPengantar matematika diskrit
Pengantar matematika diskrit
 
Per3 pembuktian
Per3 pembuktianPer3 pembuktian
Per3 pembuktian
 
Per4 function1
Per4 function1Per4 function1
Per4 function1
 
Per4 function2
Per4 function2Per4 function2
Per4 function2
 
Per5_matrix multiplication
Per5_matrix multiplicationPer5_matrix multiplication
Per5_matrix multiplication
 
Per5 sequences
Per5 sequencesPer5 sequences
Per5 sequences
 
Per6 basis_Representations Of Integers
Per6 basis_Representations Of IntegersPer6 basis_Representations Of Integers
Per6 basis_Representations Of Integers
 
Pertemuan 5_Relation Matriks_01 (17)
Pertemuan 5_Relation Matriks_01 (17)Pertemuan 5_Relation Matriks_01 (17)
Pertemuan 5_Relation Matriks_01 (17)
 
Per6 basis2_NUMBER SYSTEMS
Per6 basis2_NUMBER SYSTEMSPer6 basis2_NUMBER SYSTEMS
Per6 basis2_NUMBER SYSTEMS
 
Per6dm0910
Per6dm0910Per6dm0910
Per6dm0910
 
Contoh Tugas Kuliah Matematika Diskrit
Contoh Tugas Kuliah Matematika DiskritContoh Tugas Kuliah Matematika Diskrit
Contoh Tugas Kuliah Matematika Diskrit
 

Recently uploaded

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 

Recently uploaded (20)

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 

Per5 relasi

  • 1. How About Some…How About Some… RelationsRelations
  • 2. RelationsRelations When (a, b) belongs to R, a is said to beWhen (a, b) belongs to R, a is said to be relatedrelated to bto b by R.by R. Example:Example: Let P be a set of people, C be a set of cars,Let P be a set of people, C be a set of cars, and D be the relation describing which person drivesand D be the relation describing which person drives which car(s).which car(s). P = {Carl, Suzanne, Peter, Carla},P = {Carl, Suzanne, Peter, Carla}, C = {Mercedes, BMW, tricycle}C = {Mercedes, BMW, tricycle} D = {(Carl, Mercedes), (Suzanne, Mercedes),D = {(Carl, Mercedes), (Suzanne, Mercedes), (Suzanne, BMW), (Peter, tricycle)}(Suzanne, BMW), (Peter, tricycle)} This means that Carl drives a Mercedes, SuzanneThis means that Carl drives a Mercedes, Suzanne drives a Mercedes and a BMW, Peter drives a tricycle,drives a Mercedes and a BMW, Peter drives a tricycle, and Carla does not drive any of these vehicles.and Carla does not drive any of these vehicles.
  • 3. Functions as RelationsFunctions as Relations You might remember that aYou might remember that a functionfunction f from a set A tof from a set A to a set B assigns a unique element of B to eacha set B assigns a unique element of B to each element of A.element of A. TheThe graphgraph of f is the set of ordered pairs (a, b) suchof f is the set of ordered pairs (a, b) such that b = f(a).that b = f(a). Since the graph of f is a subset of ASince the graph of f is a subset of A××B, it is aB, it is a relationrelation from A to B.from A to B. Moreover, for each elementMoreover, for each element aa of A, there is exactlyof A, there is exactly one ordered pair in the graph that hasone ordered pair in the graph that has aa as its firstas its first element.element.
  • 4. Functions as RelationsFunctions as Relations Conversely, if R is a relation from A to B such thatConversely, if R is a relation from A to B such that every element in A is the first element of exactly oneevery element in A is the first element of exactly one ordered pair of R, then a function can be defined withordered pair of R, then a function can be defined with R as its graph.R as its graph. This is done by assigning to an element aThis is done by assigning to an element a∈∈A theA the unique element bunique element b∈∈B such that (a, b)B such that (a, b)∈∈R.R.
  • 5. Relations on a SetRelations on a Set Definition:Definition: A relation on the set A is a relation from AA relation on the set A is a relation from A to A.to A. In other words, a relation on the set A is a subset ofIn other words, a relation on the set A is a subset of AA××A.A. Example:Example: Let A = {1, 2, 3, 4}. Which ordered pairs areLet A = {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) | a < b} ?in the relation R = {(a, b) | a < b} ?
  • 6. 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
  • 7. Relations on a SetRelations on a Set How many different relations can we define on aHow many different relations can we define on a set A with n elements?set A with n elements? A relation on a set A is a subset of AA relation on a set A is a subset of A××A.A. How many elements are in AHow many elements are in A××A ?A ? There are nThere are n22 elements in Aelements in A××A, so how many subsetsA, so how many subsets (= relations on A) does A(= relations on A) does A××A have?A have? The number of subsets that we can form out of a setThe number of subsets that we can form out of a set with m elements is 2with m elements is 2mm . Therefore, 2. Therefore, 2nn22 subsets can besubsets can be formed out of Aformed out of A××A.A. Answer:Answer: We can define 2We can define 2nn22 different relationsdifferent relations on A.on A.
  • 8. 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 ifif (a, a)(a, a)∉∉R for every element aR for every element a∈∈A.A.
  • 9. 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, a)if (b, a)∈∈RR whenever (a, b)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. A relation R on a set A is calledA relation R on a set A is called asymmetricasymmetric ifif (a, b)(a, b)∈∈R implies that (b, a)R implies that (b, a)∉∉R for all a, bR for all a, b∈∈A.A.
  • 10. Properties of RelationsProperties of Relations Are the following relations on {1, 2, 3, 4}Are the following relations on {1, 2, 3, 4} symmetric, antisymmetric, or asymmetric?symmetric, antisymmetric, or asymmetric? 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 asym.and asym. R = {(4, 4), (3, 3), (1, 4)}R = {(4, 4), (3, 3), (1, 4)} antisym.antisym.
  • 11. 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, then (a, c)R, then (a, c)∈∈R forR for a, b, ca, 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.
  • 12. Counting RelationsCounting Relations Example:Example: How many different reflexive relations canHow many different reflexive relations can be defined on a set A containing n elements?be defined on a set A containing n elements? Solution:Solution: Relations on R are subsets of ARelations on R are subsets of A××A, whichA, which contains ncontains n22 elements.elements. Therefore, different relations on A can be generatedTherefore, different relations on A can be generated by choosing different subsets out of these nby choosing different subsets out of these n22 elements, so there are 2elements, so there are 2nn22 relations.relations. AA reflexivereflexive relation, however,relation, however, mustmust contain the ncontain the n elements (a, a) for every aelements (a, a) for every a∈∈A.A. Consequently, we can only choose among nConsequently, we can only choose among n22 – n =– n = n(n – 1) elements to generate reflexive relations, son(n – 1) elements to generate reflexive relations, so there are 2there are 2n(n – 1)n(n – 1) of them.of them.
  • 13. 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 them, and both of them are from a set A to a set B, then we can combineare from a set A to a set B, then we can combine them to Rthem 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 relation fromanother relation from A to BA to B..
  • 14. Combining RelationsCombining Relations …… and there is another important way to combineand there is another important way to combine relations.relations. Definition:Definition: Let R be a relation from a set A to a set BLet R be a relation from a set A to a set B and S a relation from B to a set C. Theand S a relation from B to a set C. The compositecomposite ofof R and S is the relation consisting of ordered pairs (a,R and S is the relation consisting of ordered pairs (a, c), where ac), where a∈∈A, cA, c∈∈C, and for which there exists anC, and for which there exists an element belement b∈∈B such that (a, b)B such that (a, b)∈∈R andR and (b, c)(b, c)∈∈S. We denote the composite of R and S byS. We denote the composite of R and S by SS°° RR.. In other words, if relation R contains a pair (a, b) andIn other words, if relation R contains a pair (a, b) and relation S contains a pair (b, c), then Srelation S contains a pair (b, c), then S°° R contains aR contains a pair (a, c).pair (a, c).
  • 15. Combining RelationsCombining Relations Example:Example: Let D and S be relations on A = {1, 2, 3, 4}.Let D and S be relations on A = {1, 2, 3, 4}. D = {(a, b) | b = 5 - a} “b equals (5 – a)”D = {(a, b) | b = 5 - a} “b equals (5 – a)” S = {(a, b) | a < b} “a is smaller than b”S = {(a, b) | a < b} “a is smaller than b” D = {(1, 4), (2, 3), (3, 2), (4, 1)}D = {(1, 4), (2, 3), (3, 2), (4, 1)} S = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)}S = {(1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (3, 4)} SS°° D = {D = { (2, 4),(2, 4), (3, 3),(3, 3), (3, 4),(3, 4), (4, 2),(4, 2), (4, 3),(4, 3), D maps an element a to the element (5 – a), andD maps an element a to the element (5 – a), and afterwards S maps (5 – a) to all elements larger than (5afterwards S maps (5 – a) to all elements larger than (5 – a), resulting in– a), resulting in SS°°D = {(a,b) | b > 5 – a}D = {(a,b) | b > 5 – a} oror SS°°D = {(a,b)D = {(a,b) | a + b > 5}.| a + b > 5}. (4, 4)}(4, 4)}
  • 16. Combining RelationsCombining Relations We already know thatWe already know that functionsfunctions are justare just special casesspecial cases ofof relationsrelations (namely those that(namely those that map each element in the domain onto exactlymap each element in the domain onto exactly one element in the codomain).one element in the codomain). If we formally convert two functions intoIf we formally convert two functions into relations, that is, write them down as sets ofrelations, that is, write them down as sets of ordered pairs, the composite of these relationsordered pairs, the composite of these relations will be exactly the same as the composite ofwill be exactly the same as the composite of the functions (as defined earlier).the functions (as defined earlier).
  • 17. 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)
  • 18. Combining RelationsCombining Relations Theorem:Theorem: The relation R on a set A is transitive if andThe relation R on a set A is transitive if and only if Ronly 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 called transitiveA relation R on a set A is called transitive if whenever (a, b)if whenever (a, b)∈∈R and (b, c)R and (b, c)∈∈R, then (a, c)R, then (a, c)∈∈R forR for a, b, ca, b, c∈∈A.A. The composite of R with itself contains exactly theseThe composite of R with itself contains exactly these pairs (a, c).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, andR, and so on, so that Rso on, so that Rnn ⊆⊆ R.R.