SlideShare a Scribd company logo
Equivalence of Relations
& Partial Ordering
Lecture 16, CMSC 56
Allyn Joy D. Calcaben
Equivalence
Equivalence
Definition 1
A relation on a set A is called an equivalence relation if it is
reflexive, symmetric, and transitive.
Equivalence
Definition 2
Two elements a and b that are related by an equivalence relation
are called equivalent.
Equivalence
Definition 2
Two elements a and b that are related by an equivalence relation
are called equivalent.
The notation a ~ b is often used to denote that a and b are
equivalent elements with respect to a particular equivalence
relation.
Example
Let R be the relation on the set of integers such that aRb if and
only if a = b or a = -b. Is R an equivalence relation?
Solution
Let R be the relation on the set of integers such that aRb if and
only if a = b or a = -b. Is R an equivalence relation?
YES
Example
Let R be the relation on the set of real numbers such that aRb if
and only if a − b is an integer. Is R an equivalence relation?
Solution
Let R be the relation on the set of real numbers such that aRb if
and only if a − b is an integer. Is R an equivalence relation?
YES
Example
Let R be the relation on the set of real numbers such that aRb if
and only if a − b is a positive integer. Is R an equivalence relation?
Solution
Let R be the relation on the set of real numbers such that aRb if
and only if a − b is a positive integer. Is R an equivalence relation?
NO
Example
Is the “divides” relation on the set of positive integers an
equivalence relation?
Solution
Is the “divides” relation on the set of positive integers an
equivalence relation?
NO
Equivalence Class
Definition 3
Let R be an equivalence relation on a set A. The set of all elements
that are related to an element a of A is called the equivalence
class of a.
Equivalence Class
Definition 3
Let R be an equivalence relation on a set A. The set of all elements
that are related to an element a of A is called the equivalence
class of a.
The equivalence class of a with respect to R is denoted by [a]R.
When only one relation is under consideration, we can delete the
subscript R and write [a] for this equivalence class.
Equivalence Class
In other words, if R is an equivalence relation on a set A, the
equivalence class of the element a is [a]R = { b | (a, b) ∈ R }.
If b ∈ [a]R, then b is called a representative of this equivalence
class
Example
Given the equivalence relation R = {(1,1), (1,2), (1,3), (2,1), (2,2),
(2,3), (3,1), (3,2), (3,3), (4,4), (5,5)} on set {1, 2, 3, 4, 5}.
Find [1], [2], [3], [4], and [5].
Solution
Given the equivalence relation R = {(1,1), (1,2), (1,3), (2,1), (2,2),
(2,3), (3,1), (3,2), (3,3), (4,4), (5,5)} on set {1, 2, 3, 4, 5}.
Find [1], [2], [3], [4], and [5].
[1] = {1, 2, 3} [4] = {4}
[2] = {1, 2, 3} [5] = {5}
[3] = {1, 2, 3}
Example
What is the equivalence class of an integer for the equivalence
relation such that aRb if and only if a = b or a = −b?
Solution
What is the equivalence class of an integer for the equivalence
relation such that aRb if and only if a = b or a = −b?
[a] = { –a, a }.
This set contains two distinct integers unless a = 0.
Solution
What is the equivalence class of an integer for the equivalence
relation such that aRb if and only if a = b or a = −b?
[a] = { –a, a }.
This set contains two distinct integers unless a = 0.
For instance, [ 7 ] = { −7, 7 },
[−5] = {−5, 5 }, and
[0] = {0}
Partial Orderings
Partial Orderings
Definition 1
A relation R on a set S is called a partial ordering or partial order if
it is reflexive, antisymmetric, and transitive.
Partial Orderings
Definition 1
A relation R on a set S is called a partial ordering or partial order if
it is reflexive, antisymmetric, and transitive.
A set S together with a partial ordering R is called a partially
ordered set, or poset, and is denoted by (S,R). Members of S are
called elements of the poset.
Example
Is the “divides” relation a partial ordering on the set of positive
integers?
Solution
Is the “divides” relation a partial ordering on the set of positive
integers?
(Z+, |) is a poset
Partial Ordering
Definition 2
The elements a and b of a poset (S, ≼ ) are called comparable if
either a ≼ b or b ≼ a.
When a and b are elements of S such that neither a ≼ b nor b ≼ a,
a and b are called incomparable.
Example
Are all the elements in the poset (Z+, |) comparable?
Solution
Are all the elements in the poset (Z+, |) comparable?
NO
For instance: 3 | 7 and 7 | 3
Partial Ordering
The adjective “partial” is used to describe partial orderings
because pairs of elements may be incomparable.
When every two elements in the set are comparable, the relation
is called a total ordering.
Partial Ordering
Definition 3
If (S, ≼ ) is a poset and every two elements of S are comparable, S
is called a totally ordered or linearly ordered set, and ≼ is called a
total order or a linear order. A totally ordered set is also called a
chain.
Example
Are all the elements in the poset (Z, ≤) comparable?
Solution
Are all the elements in the poset (Z, ≤) comparable?
Yes
The poset (Z, ≤) is totally ordered.
Hasse Diagrams
Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the
set {1, 2, 3, 4}
Hasse Diagrams
Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the
set {1, 2, 3, 4}
1. Start with the directed graph for this relation
Hasse Diagrams
Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the
set {1, 2, 3, 4}
1. Start with the directed graph for this relation
2. Because a partial ordering is reflexive, a loop (a, a) is present at every
vertex a. Remove these loops.
Hasse Diagrams
Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the
set {1, 2, 3, 4}
1. Start with the directed graph for this relation
2. Because a partial ordering is reflexive, a loop (a, a) is present at every
vertex a. Remove these loops.
3. Next, remove all edges that must be in the partial ordering because of
the presence of other edges and transitivity.
Hasse Diagrams
Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the
set {1, 2, 3, 4}
1. Start with the directed graph for this relation
2. Because a partial ordering is reflexive, a loop (a, a) is present at every
vertex a. Remove these loops.
3. Next, remove all edges that must be in the partial ordering because of
the presence of other edges and transitivity.
4. Finally, arrange each edge so that its initial vertex is below its terminal
vertex. Remove all the arrows on the directed edges, because all edges
point “upward” toward their terminal vertex.
Example
Draw the Hasse diagram representing the partial ordering { (a, b) |a divides
b } on {1, 2, 3, 4, 6, 8, 12}.
Any Question?
oSet
November 12 – December 05
41
Reminders

More Related Content

What's hot

Properties of relations
Properties of relationsProperties of relations
Properties of relations
Inamul Hossain Imran
 
Vector space
Vector spaceVector space
Vector space
Jaimin Patel
 
Set concepts
Set conceptsSet concepts
Set concepts
Malti Aswal
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functions
suthi
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
rey castro
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
Yosuke Mizutani
 
Set theory
Set theorySet theory
Set theory
Shiwani Gupta
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.ppsindu psthakur
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
Manikanta satyala
 
Defining Functions on Equivalence Classes
Defining Functions on Equivalence ClassesDefining Functions on Equivalence Classes
Defining Functions on Equivalence Classes
Lawrence Paulson
 
Independence, basis and dimension
Independence, basis and dimensionIndependence, basis and dimension
Independence, basis and dimension
ATUL KUMAR YADAV
 
Sets
SetsSets
Sets
nischayyy
 
Set Theory
Set TheorySet Theory
Set Theory
Set TheorySet Theory
Set Theoryitutor
 
Lesson02 Vectors And Matrices Slides
Lesson02   Vectors And Matrices SlidesLesson02   Vectors And Matrices Slides
Lesson02 Vectors And Matrices SlidesMatthew Leingang
 
Definition ofvectorspace
Definition ofvectorspaceDefinition ofvectorspace
Definition ofvectorspace
Tanuj Parikh
 
1. set theory
1. set theory1. set theory
1. set theory
caymulb
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)
Rachana Pathak
 
CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operations
allyn joy calcaben
 

What's hot (20)

Properties of relations
Properties of relationsProperties of relations
Properties of relations
 
Vector space
Vector spaceVector space
Vector space
 
Set concepts
Set conceptsSet concepts
Set concepts
 
Set, Relations and Functions
Set, Relations and FunctionsSet, Relations and Functions
Set, Relations and Functions
 
Mathematical induction
Mathematical inductionMathematical induction
Mathematical induction
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Set theory
Set theorySet theory
Set theory
 
Relations & functions.pps
Relations  &  functions.ppsRelations  &  functions.pps
Relations & functions.pps
 
Linear algebra-Basis & Dimension
Linear algebra-Basis & DimensionLinear algebra-Basis & Dimension
Linear algebra-Basis & Dimension
 
Defining Functions on Equivalence Classes
Defining Functions on Equivalence ClassesDefining Functions on Equivalence Classes
Defining Functions on Equivalence Classes
 
Independence, basis and dimension
Independence, basis and dimensionIndependence, basis and dimension
Independence, basis and dimension
 
Relations
RelationsRelations
Relations
 
Sets
SetsSets
Sets
 
Set Theory
Set TheorySet Theory
Set Theory
 
Set Theory
Set TheorySet Theory
Set Theory
 
Lesson02 Vectors And Matrices Slides
Lesson02   Vectors And Matrices SlidesLesson02   Vectors And Matrices Slides
Lesson02 Vectors And Matrices Slides
 
Definition ofvectorspace
Definition ofvectorspaceDefinition ofvectorspace
Definition ofvectorspace
 
1. set theory
1. set theory1. set theory
1. set theory
 
Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)Poset in Relations(Discrete Mathematics)
Poset in Relations(Discrete Mathematics)
 
CMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set OperationsCMSC 56 | Lecture 6: Sets & Set Operations
CMSC 56 | Lecture 6: Sets & Set Operations
 

Similar to CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering

Relational Algebra (1).pptx
Relational Algebra (1).pptxRelational Algebra (1).pptx
Relational Algebra (1).pptx
SarowarSuman
 
G-1-SETS.pdf
G-1-SETS.pdfG-1-SETS.pdf
G-1-SETS.pdf
catadajasmin903
 
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
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
Meghaj Mallick
 
24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
Meghaj Mallick
 
Relations
RelationsRelations
Relations
Shiwani Gupta
 
Chap2_SETS_PDF.pdf
Chap2_SETS_PDF.pdfChap2_SETS_PDF.pdf
Chap2_SETS_PDF.pdf
RatipornChomrit
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillai
unni2012
 
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
 
Per5 relasi
Per5 relasiPer5 relasi
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
RockyIslam5
 
Relations
RelationsRelations
Relations
Niliha
 
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
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
SanjanaAdri
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
Lets Educate India
 
Top school in delhi
Top school in delhiTop school in delhi
Top school in delhi
Edhole.com
 
Modern algebra
Modern algebraModern algebra
Modern algebra
Mohanamalar8
 

Similar to CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering (20)

Relational Algebra (1).pptx
Relational Algebra (1).pptxRelational Algebra (1).pptx
Relational Algebra (1).pptx
 
G-1-SETS.pdf
G-1-SETS.pdfG-1-SETS.pdf
G-1-SETS.pdf
 
Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )Week 5 ( basic concept of relation )
Week 5 ( basic concept of relation )
 
Lemh101
Lemh101Lemh101
Lemh101
 
Partial-Orderings in Discrete Mathematics
 Partial-Orderings in Discrete Mathematics Partial-Orderings in Discrete Mathematics
Partial-Orderings in Discrete Mathematics
 
24 partial-orderings
24 partial-orderings24 partial-orderings
24 partial-orderings
 
Relations
RelationsRelations
Relations
 
Chap2_SETS_PDF.pdf
Chap2_SETS_PDF.pdfChap2_SETS_PDF.pdf
Chap2_SETS_PDF.pdf
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillai
 
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)
 
Per5 relasi
Per5 relasiPer5 relasi
Per5 relasi
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
 
Relations
RelationsRelations
Relations
 
Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1Ncert class-12-mathematics-part-1
Ncert class-12-mathematics-part-1
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
 
Introductions to Relations
Introductions to RelationsIntroductions to Relations
Introductions to Relations
 
Top school in delhi
Top school in delhiTop school in delhi
Top school in delhi
 
Modern algebra
Modern algebraModern algebra
Modern algebra
 

More from allyn joy calcaben

CMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: MatricesCMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: Matrices
allyn joy calcaben
 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relations
allyn joy calcaben
 
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
 
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program CorrectnessCMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
allyn joy calcaben
 
CMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical InductionCMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical Induction
allyn joy calcaben
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
allyn joy calcaben
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
allyn joy calcaben
 
CMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of FunctionsCMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of Functions
allyn joy calcaben
 
CMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of InferenceCMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of Inference
allyn joy calcaben
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
allyn joy calcaben
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
allyn joy calcaben
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
allyn joy calcaben
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
allyn joy calcaben
 
La Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda MovementLa Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda Movement
allyn joy calcaben
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithm
allyn joy calcaben
 
Chapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiChapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements ii
allyn joy calcaben
 
#11 osteoporosis
#11 osteoporosis#11 osteoporosis
#11 osteoporosis
allyn joy calcaben
 

More from allyn joy calcaben (17)

CMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: MatricesCMSC 56 | Lecture 17: Matrices
CMSC 56 | Lecture 17: Matrices
 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relations
 
CMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing RelationsCMSC 56 | Lecture 14: Representing Relations
CMSC 56 | Lecture 14: Representing Relations
 
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program CorrectnessCMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
CMSC 56 | Lecture 12: Recursive Definition & Algorithms, and Program Correctness
 
CMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical InductionCMSC 56 | Lecture 11: Mathematical Induction
CMSC 56 | Lecture 11: Mathematical Induction
 
CMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & AlgorithmsCMSC 56 | Lecture 10: Integer Representations & Algorithms
CMSC 56 | Lecture 10: Integer Representations & Algorithms
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 
CMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of FunctionsCMSC 56 | Lecture 8: Growth of Functions
CMSC 56 | Lecture 8: Growth of Functions
 
CMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of InferenceCMSC 56 | Lecture 4: Rules of Inference
CMSC 56 | Lecture 4: Rules of Inference
 
CMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and StrategyCMSC 56 | Lecture 5: Proofs Methods and Strategy
CMSC 56 | Lecture 5: Proofs Methods and Strategy
 
CMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & QuantifiersCMSC 56 | Lecture 3: Predicates & Quantifiers
CMSC 56 | Lecture 3: Predicates & Quantifiers
 
CMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional EquivalencesCMSC 56 | Lecture 2: Propositional Equivalences
CMSC 56 | Lecture 2: Propositional Equivalences
 
CMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional LogicCMSC 56 | Lecture 1: Propositional Logic
CMSC 56 | Lecture 1: Propositional Logic
 
La Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda MovementLa Solidaridad and the Propaganda Movement
La Solidaridad and the Propaganda Movement
 
Computer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC AlgorithmComputer Vision: Feature matching with RANSAC Algorithm
Computer Vision: Feature matching with RANSAC Algorithm
 
Chapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements iiChapter 7 expressions and assignment statements ii
Chapter 7 expressions and assignment statements ii
 
#11 osteoporosis
#11 osteoporosis#11 osteoporosis
#11 osteoporosis
 

Recently uploaded

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
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
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
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
 
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
 

Recently uploaded (20)

Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
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
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
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
 
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
 

CMSC 56 | Lecture 16: Equivalence of Relations & Partial Ordering

  • 1. Equivalence of Relations & Partial Ordering Lecture 16, CMSC 56 Allyn Joy D. Calcaben
  • 3. Equivalence Definition 1 A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive.
  • 4. Equivalence Definition 2 Two elements a and b that are related by an equivalence relation are called equivalent.
  • 5. Equivalence Definition 2 Two elements a and b that are related by an equivalence relation are called equivalent. The notation a ~ b is often used to denote that a and b are equivalent elements with respect to a particular equivalence relation.
  • 6. Example Let R be the relation on the set of integers such that aRb if and only if a = b or a = -b. Is R an equivalence relation?
  • 7. Solution Let R be the relation on the set of integers such that aRb if and only if a = b or a = -b. Is R an equivalence relation? YES
  • 8. Example Let R be the relation on the set of real numbers such that aRb if and only if a − b is an integer. Is R an equivalence relation?
  • 9. Solution Let R be the relation on the set of real numbers such that aRb if and only if a − b is an integer. Is R an equivalence relation? YES
  • 10. Example Let R be the relation on the set of real numbers such that aRb if and only if a − b is a positive integer. Is R an equivalence relation?
  • 11. Solution Let R be the relation on the set of real numbers such that aRb if and only if a − b is a positive integer. Is R an equivalence relation? NO
  • 12. Example Is the “divides” relation on the set of positive integers an equivalence relation?
  • 13. Solution Is the “divides” relation on the set of positive integers an equivalence relation? NO
  • 14. Equivalence Class Definition 3 Let R be an equivalence relation on a set A. The set of all elements that are related to an element a of A is called the equivalence class of a.
  • 15. Equivalence Class Definition 3 Let R be an equivalence relation on a set A. The set of all elements that are related to an element a of A is called the equivalence class of a. The equivalence class of a with respect to R is denoted by [a]R. When only one relation is under consideration, we can delete the subscript R and write [a] for this equivalence class.
  • 16. Equivalence Class In other words, if R is an equivalence relation on a set A, the equivalence class of the element a is [a]R = { b | (a, b) ∈ R }. If b ∈ [a]R, then b is called a representative of this equivalence class
  • 17. Example Given the equivalence relation R = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3), (4,4), (5,5)} on set {1, 2, 3, 4, 5}. Find [1], [2], [3], [4], and [5].
  • 18. Solution Given the equivalence relation R = {(1,1), (1,2), (1,3), (2,1), (2,2), (2,3), (3,1), (3,2), (3,3), (4,4), (5,5)} on set {1, 2, 3, 4, 5}. Find [1], [2], [3], [4], and [5]. [1] = {1, 2, 3} [4] = {4} [2] = {1, 2, 3} [5] = {5} [3] = {1, 2, 3}
  • 19. Example What is the equivalence class of an integer for the equivalence relation such that aRb if and only if a = b or a = −b?
  • 20. Solution What is the equivalence class of an integer for the equivalence relation such that aRb if and only if a = b or a = −b? [a] = { –a, a }. This set contains two distinct integers unless a = 0.
  • 21. Solution What is the equivalence class of an integer for the equivalence relation such that aRb if and only if a = b or a = −b? [a] = { –a, a }. This set contains two distinct integers unless a = 0. For instance, [ 7 ] = { −7, 7 }, [−5] = {−5, 5 }, and [0] = {0}
  • 23. Partial Orderings Definition 1 A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive.
  • 24. Partial Orderings Definition 1 A relation R on a set S is called a partial ordering or partial order if it is reflexive, antisymmetric, and transitive. A set S together with a partial ordering R is called a partially ordered set, or poset, and is denoted by (S,R). Members of S are called elements of the poset.
  • 25. Example Is the “divides” relation a partial ordering on the set of positive integers?
  • 26. Solution Is the “divides” relation a partial ordering on the set of positive integers? (Z+, |) is a poset
  • 27. Partial Ordering Definition 2 The elements a and b of a poset (S, ≼ ) are called comparable if either a ≼ b or b ≼ a. When a and b are elements of S such that neither a ≼ b nor b ≼ a, a and b are called incomparable.
  • 28. Example Are all the elements in the poset (Z+, |) comparable?
  • 29. Solution Are all the elements in the poset (Z+, |) comparable? NO For instance: 3 | 7 and 7 | 3
  • 30. Partial Ordering The adjective “partial” is used to describe partial orderings because pairs of elements may be incomparable. When every two elements in the set are comparable, the relation is called a total ordering.
  • 31. Partial Ordering Definition 3 If (S, ≼ ) is a poset and every two elements of S are comparable, S is called a totally ordered or linearly ordered set, and ≼ is called a total order or a linear order. A totally ordered set is also called a chain.
  • 32. Example Are all the elements in the poset (Z, ≤) comparable?
  • 33. Solution Are all the elements in the poset (Z, ≤) comparable? Yes The poset (Z, ≤) is totally ordered.
  • 34. Hasse Diagrams Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the set {1, 2, 3, 4}
  • 35. Hasse Diagrams Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the set {1, 2, 3, 4} 1. Start with the directed graph for this relation
  • 36. Hasse Diagrams Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the set {1, 2, 3, 4} 1. Start with the directed graph for this relation 2. Because a partial ordering is reflexive, a loop (a, a) is present at every vertex a. Remove these loops.
  • 37. Hasse Diagrams Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the set {1, 2, 3, 4} 1. Start with the directed graph for this relation 2. Because a partial ordering is reflexive, a loop (a, a) is present at every vertex a. Remove these loops. 3. Next, remove all edges that must be in the partial ordering because of the presence of other edges and transitivity.
  • 38. Hasse Diagrams Consider the directed graph for the partial ordering { (a, b) | a ≤ b } on the set {1, 2, 3, 4} 1. Start with the directed graph for this relation 2. Because a partial ordering is reflexive, a loop (a, a) is present at every vertex a. Remove these loops. 3. Next, remove all edges that must be in the partial ordering because of the presence of other edges and transitivity. 4. Finally, arrange each edge so that its initial vertex is below its terminal vertex. Remove all the arrows on the directed edges, because all edges point “upward” toward their terminal vertex.
  • 39. Example Draw the Hasse diagram representing the partial ordering { (a, b) |a divides b } on {1, 2, 3, 4, 6, 8, 12}.
  • 41. oSet November 12 – December 05 41 Reminders

Editor's Notes

  1. With matrices, we set the diagonal to all 1’s