SlideShare a Scribd company logo
1 of 20
Download to read offline
Relation Matrix & Graph
Ms. Rachana Pathak
(rachanarpathak@gmail.com)
Assistant Professor, Dept of Computer Science and Engineering
Walchand Institute of Technology, Solapur
(www.witsolapur.org)
Learning Outcome
2Walchand Institute of Technology, Solapur
At the end of this session,
Students will be able to evaluate relation matrix and graphs on it.
Prerequisite
• Basics of Discrete Mathematics
• Basics of Relation
Walchand Institute of Technology, Solapur 3
Introduction
Relation Matrix
• A relation R from a finite set A to a finite set B can be
represented by a matrix called the relation matrix of R.
• Let A ={a1,a2,a3…am} and B= {b1,b2,b3……bn} be finite set
containing m and n elements, respectively, and R be the
relation from A to B.
• Then R can be represented by an m x n matrix Mr = [rij],which
is defined as follows:
Walchand Institute of Technology, Solapur 4
rij = 1, if ai R bj
0, if ai R bj
Note that the matrix MR has the elements as 1’s and 0’s.
Walchand Institute of Technology, Solapur 5
Example
Let A = {1,2,3,4} and B ={b1,b2,b3}. Consider the relation R =
{(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}. Determine the matrix of the
relation.
Solution :
A = {1,2,3,4} B = {b1,b2,b3}.
Relation R = {(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}.
Matrix of the Relation R is written as-
Walchand Institute of Technology, Solapur 6
Example
b1 b2 b3
1 0 1 1
2 0 0 0
3 0 1 0
4 1 0 1
Walchand Institute of Technology, Solapur 7
Example
0 1 1
0 0 0
0 1 0
1 0 1
Walchand Institute of Technology, Solapur 8
Think & Write?
Let A = {1,2,3,4}. Find the relation R on A determined by the
matrix.
MR = 1 0 1 0
0 0 1 0
1 0 0 0
1 1 0 1
Walchand Institute of Technology, Solapur 9
Answer
The relation R =
{ (1,1),(1,3),(2,3),(3,1),(4,1),(4,2),(4,4) }
Walchand Institute of Technology, Solapur 10
Properties of a Relation in a Set
Walchand Institute of Technology, Solapur 11
• All diagonal entries must
be 1
Reflexive
• Rij = Rij for every i and jSymmetric
• Rij = 1 & Rji = 0 for i≠jAnti-symmetric
Reflexive
Walchand Institute of Technology, Solapur 12
MR = 1 0 1 0
0 1 1 0
1 0 1 0
1 1 0 1
Symmetric
MR = 1 2 3 4
1
2
3
4
Walchand Institute of Technology, Solapur 13
1 1 0 1
1 1 0 0
0 0 0 0
1 0 0 0
Anti-Symmetric
MR = 1 2 3 4
1
2
3
4
Walchand Institute of Technology, Solapur 14
1 0 0 0
1 1 0 0
0 0 0 0
1 0 0 0
Graph
Walchand Institute of Technology, Solapur 15
• A relation defined in a finite set can also be represented pictorially with
the help of a graph.
• Let R be a relation in a finite set A = {a1,a2,….an}.
• Elements of A are represented by points or circles called nodes.
• These nodes are called vertices
• Arcs are used to show the connection called as edge.
• Let us see some examples :
.b
. a aRb
.
Walchand Institute of Technology, Solapur 16
Here we say a
is in relation
with a
^
Here we say a
is in relation
with b
“a is in relation with b and b is in relation
with b”
“ a is in relation with b and b in relation with
c and c is in reltion with a”
Walchand Institute of Technology, Solapur 17
Image source : 1. Discrete Mathematics with combinatorics and graph theory- S. SANTHA (CENGAGE Learning)
Conclusion :
In this session, We have studied all about POSET.
Walchand Institute of Technology, Solapur 18
References
• 1. Discrete mathematical structures with applications to computer science -- J. P.
Tremblay & R. Manohar (MGH International)
• Reference Books:
• 1. Discrete Mathematics with combinatorics and graph theory- S. SANTHA
(CENGAGE Learning)
• 2. Discrete Mathematical Structures – Bernard Kolman, Robert C. Busby (Pearson
Education)
• 3. Discrete mathematics -- Liu (MGH)
19Walchand Institute of Technology, Solapur
Thank You !!!
20Walchand Institute of Technology, Solapur

More Related Content

What's hot (20)

Rank of a matrix
Rank of a matrixRank of a matrix
Rank of a matrix
 
Eigen value and eigen vector
Eigen value and eigen vectorEigen value and eigen vector
Eigen value and eigen vector
 
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
 
Chapter 2: Relations
Chapter 2: RelationsChapter 2: Relations
Chapter 2: Relations
 
Matrices ppt
Matrices pptMatrices ppt
Matrices ppt
 
Theory of automata and formal language
Theory of automata and formal languageTheory of automata and formal language
Theory of automata and formal language
 
Vector space
Vector spaceVector space
Vector space
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
Relations in Discrete Math
Relations in Discrete MathRelations in Discrete Math
Relations in Discrete Math
 
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
Complexity analysis in Algorithms
Complexity analysis in AlgorithmsComplexity analysis in Algorithms
Complexity analysis in Algorithms
 
single linked list
single linked listsingle linked list
single linked list
 
presentation on matrix
 presentation on matrix presentation on matrix
presentation on matrix
 
rank of matrix
rank of matrixrank of matrix
rank of matrix
 
Predicate logic
 Predicate logic Predicate logic
Predicate logic
 
K - Map
  K - Map    K - Map
K - Map
 
Relations
RelationsRelations
Relations
 
Functions in discrete mathematics
Functions in discrete mathematicsFunctions in discrete mathematics
Functions in discrete mathematics
 

Similar to Relation matrix & graphs in relations

Relations in Discrete Mathematical Structures
Relations in Discrete Mathematical StructuresRelations in Discrete Mathematical Structures
Relations in Discrete Mathematical StructuresRachana Pathak
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillaiunni2012
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsWongyos Keardsri
 
Lecture-3 Relational Algebra I.pptx
Lecture-3 Relational Algebra I.pptxLecture-3 Relational Algebra I.pptx
Lecture-3 Relational Algebra I.pptxHanzlaNaveed1
 
Matematika terapan minggu ke-4
Matematika terapan minggu ke-4Matematika terapan minggu ke-4
Matematika terapan minggu ke-4Fisma Ananda
 
Matematika terapan week 4
Matematika terapan week 4 Matematika terapan week 4
Matematika terapan week 4 nellylawar
 
3 relational model
3 relational model3 relational model
3 relational modelUtkarsh De
 
Null space, Rank and nullity theorem
Null space, Rank and nullity theoremNull space, Rank and nullity theorem
Null space, Rank and nullity theoremRonak Machhi
 
Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1Ali Farooq
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfSanjanaAdri
 
Chapter 1 relations_and_functions
Chapter 1 relations_and_functionsChapter 1 relations_and_functions
Chapter 1 relations_and_functionsShahrukh Javed
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxRockyIslam5
 
correlation-analysis.pptx
correlation-analysis.pptxcorrelation-analysis.pptx
correlation-analysis.pptxSoujanyaLk1
 
Stability criterion of periodic oscillations in a (11)
Stability criterion of periodic oscillations in a (11)Stability criterion of periodic oscillations in a (11)
Stability criterion of periodic oscillations in a (11)Alexander Decker
 
Linear_Algebra.pptx
Linear_Algebra.pptxLinear_Algebra.pptx
Linear_Algebra.pptxSuhasL11
 
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
 
correlation-analysis-160424020323.pptx
correlation-analysis-160424020323.pptxcorrelation-analysis-160424020323.pptx
correlation-analysis-160424020323.pptxSoujanyaLk1
 

Similar to Relation matrix & graphs in relations (20)

Relations in Discrete Mathematical Structures
Relations in Discrete Mathematical StructuresRelations in Discrete Mathematical Structures
Relations in Discrete Mathematical Structures
 
Presentation2 vijayan pillai
Presentation2 vijayan pillaiPresentation2 vijayan pillai
Presentation2 vijayan pillai
 
Discrete-Chapter 08 Relations
Discrete-Chapter 08 RelationsDiscrete-Chapter 08 Relations
Discrete-Chapter 08 Relations
 
Lecture-3 Relational Algebra I.pptx
Lecture-3 Relational Algebra I.pptxLecture-3 Relational Algebra I.pptx
Lecture-3 Relational Algebra I.pptx
 
3_Relational_Model.pdf
3_Relational_Model.pdf3_Relational_Model.pdf
3_Relational_Model.pdf
 
Matematika terapan minggu ke-4
Matematika terapan minggu ke-4Matematika terapan minggu ke-4
Matematika terapan minggu ke-4
 
Matematika terapan week 4
Matematika terapan week 4 Matematika terapan week 4
Matematika terapan week 4
 
3 relational model
3 relational model3 relational model
3 relational model
 
Null space, Rank and nullity theorem
Null space, Rank and nullity theoremNull space, Rank and nullity theorem
Null space, Rank and nullity theorem
 
Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1Electromagnetic theory Chapter 1
Electromagnetic theory Chapter 1
 
dm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdfdm_13_RelationsAndTheirProperties (1).pdf
dm_13_RelationsAndTheirProperties (1).pdf
 
Chapter 1 relations_and_functions
Chapter 1 relations_and_functionsChapter 1 relations_and_functions
Chapter 1 relations_and_functions
 
dm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptxdm_13_RelationsAndTheirProperties (1).pptx
dm_13_RelationsAndTheirProperties (1).pptx
 
correlation-analysis.pptx
correlation-analysis.pptxcorrelation-analysis.pptx
correlation-analysis.pptx
 
Stability criterion of periodic oscillations in a (11)
Stability criterion of periodic oscillations in a (11)Stability criterion of periodic oscillations in a (11)
Stability criterion of periodic oscillations in a (11)
 
Linear_Algebra.pptx
Linear_Algebra.pptxLinear_Algebra.pptx
Linear_Algebra.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)
 
Final relation1 m_tech(cse)
Final relation1 m_tech(cse)Final relation1 m_tech(cse)
Final relation1 m_tech(cse)
 
correlation-analysis-160424020323.pptx
correlation-analysis-160424020323.pptxcorrelation-analysis-160424020323.pptx
correlation-analysis-160424020323.pptx
 

More from Rachana Pathak

Relation Hasse diagram
Relation Hasse diagramRelation Hasse diagram
Relation Hasse diagramRachana Pathak
 
Open Source Content Management System
Open Source Content Management System Open Source Content Management System
Open Source Content Management System Rachana Pathak
 
Installation of Joomla using Xampp server Part-2
 Installation of Joomla using Xampp server Part-2 Installation of Joomla using Xampp server Part-2
Installation of Joomla using Xampp server Part-2Rachana Pathak
 
Installation of Joomla using Xampp server Part-1
 Installation of Joomla using Xampp server Part-1 Installation of Joomla using Xampp server Part-1
Installation of Joomla using Xampp server Part-1Rachana Pathak
 

More from Rachana Pathak (6)

Relation Hasse diagram
Relation Hasse diagramRelation Hasse diagram
Relation Hasse diagram
 
Wordpress
Wordpress Wordpress
Wordpress
 
Open Source Content Management System
Open Source Content Management System Open Source Content Management System
Open Source Content Management System
 
GIT
GIT GIT
GIT
 
Installation of Joomla using Xampp server Part-2
 Installation of Joomla using Xampp server Part-2 Installation of Joomla using Xampp server Part-2
Installation of Joomla using Xampp server Part-2
 
Installation of Joomla using Xampp server Part-1
 Installation of Joomla using Xampp server Part-1 Installation of Joomla using Xampp server Part-1
Installation of Joomla using Xampp server Part-1
 

Recently uploaded

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 

Recently uploaded (20)

Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 

Relation matrix & graphs in relations

  • 1. Relation Matrix & Graph Ms. Rachana Pathak (rachanarpathak@gmail.com) Assistant Professor, Dept of Computer Science and Engineering Walchand Institute of Technology, Solapur (www.witsolapur.org)
  • 2. Learning Outcome 2Walchand Institute of Technology, Solapur At the end of this session, Students will be able to evaluate relation matrix and graphs on it.
  • 3. Prerequisite • Basics of Discrete Mathematics • Basics of Relation Walchand Institute of Technology, Solapur 3
  • 4. Introduction Relation Matrix • A relation R from a finite set A to a finite set B can be represented by a matrix called the relation matrix of R. • Let A ={a1,a2,a3…am} and B= {b1,b2,b3……bn} be finite set containing m and n elements, respectively, and R be the relation from A to B. • Then R can be represented by an m x n matrix Mr = [rij],which is defined as follows: Walchand Institute of Technology, Solapur 4
  • 5. rij = 1, if ai R bj 0, if ai R bj Note that the matrix MR has the elements as 1’s and 0’s. Walchand Institute of Technology, Solapur 5
  • 6. Example Let A = {1,2,3,4} and B ={b1,b2,b3}. Consider the relation R = {(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}. Determine the matrix of the relation. Solution : A = {1,2,3,4} B = {b1,b2,b3}. Relation R = {(1,b2),(1,b3),(3,b2),(4,b1),(4,b3)}. Matrix of the Relation R is written as- Walchand Institute of Technology, Solapur 6
  • 7. Example b1 b2 b3 1 0 1 1 2 0 0 0 3 0 1 0 4 1 0 1 Walchand Institute of Technology, Solapur 7
  • 8. Example 0 1 1 0 0 0 0 1 0 1 0 1 Walchand Institute of Technology, Solapur 8
  • 9. Think & Write? Let A = {1,2,3,4}. Find the relation R on A determined by the matrix. MR = 1 0 1 0 0 0 1 0 1 0 0 0 1 1 0 1 Walchand Institute of Technology, Solapur 9
  • 10. Answer The relation R = { (1,1),(1,3),(2,3),(3,1),(4,1),(4,2),(4,4) } Walchand Institute of Technology, Solapur 10
  • 11. Properties of a Relation in a Set Walchand Institute of Technology, Solapur 11 • All diagonal entries must be 1 Reflexive • Rij = Rij for every i and jSymmetric • Rij = 1 & Rji = 0 for i≠jAnti-symmetric
  • 12. Reflexive Walchand Institute of Technology, Solapur 12 MR = 1 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1
  • 13. Symmetric MR = 1 2 3 4 1 2 3 4 Walchand Institute of Technology, Solapur 13 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0
  • 14. Anti-Symmetric MR = 1 2 3 4 1 2 3 4 Walchand Institute of Technology, Solapur 14 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0
  • 15. Graph Walchand Institute of Technology, Solapur 15 • A relation defined in a finite set can also be represented pictorially with the help of a graph. • Let R be a relation in a finite set A = {a1,a2,….an}. • Elements of A are represented by points or circles called nodes. • These nodes are called vertices • Arcs are used to show the connection called as edge. • Let us see some examples :
  • 16. .b . a aRb . Walchand Institute of Technology, Solapur 16 Here we say a is in relation with a ^ Here we say a is in relation with b
  • 17. “a is in relation with b and b is in relation with b” “ a is in relation with b and b in relation with c and c is in reltion with a” Walchand Institute of Technology, Solapur 17 Image source : 1. Discrete Mathematics with combinatorics and graph theory- S. SANTHA (CENGAGE Learning)
  • 18. Conclusion : In this session, We have studied all about POSET. Walchand Institute of Technology, Solapur 18
  • 19. References • 1. Discrete mathematical structures with applications to computer science -- J. P. Tremblay & R. Manohar (MGH International) • Reference Books: • 1. Discrete Mathematics with combinatorics and graph theory- S. SANTHA (CENGAGE Learning) • 2. Discrete Mathematical Structures – Bernard Kolman, Robert C. Busby (Pearson Education) • 3. Discrete mathematics -- Liu (MGH) 19Walchand Institute of Technology, Solapur
  • 20. Thank You !!! 20Walchand Institute of Technology, Solapur