Relations represent relationships between elements of sets. Binary relations relate elements of two sets A and B, and are represented as subsets of the Cartesian product A × B. N-ary relations relate elements of more than two sets. Relations can be represented using set notation, arrow diagrams, matrices, or coordinate systems. A relation is reflexive if each element is related to itself, symmetric if aRb implies bRa, and transitive if aRb and bRc imply aRc. Relations can be combined using set operations like union and intersection. The composite of relations R and S relates a to c if there exists a b such that a is related to b by R and b is related to c by S.
Discrete Mathematics - Relations. ... Relations may exist between objects of the same set or between objects of two or more sets. Definition and Properties. A binary relation R from set x to y (written as x R y o r R ( x , y ) ) is a subset of the Cartesian product x × y .
The document defines an equivalence relation as a binary relation R on a set A that is reflexive, symmetric, and transitive. It provides examples to illustrate each property: reflexive means each element is related to itself, symmetric means if a is related to b then b is related to a, and transitive means if a is related to b and b is related to c then a is related to c. The document concludes with an example set and relation that demonstrates all three properties and is therefore an equivalence relation.
A relation maps elements from one set to another set through ordered pairs. The domain is the set of first elements in the ordered pairs and the range is the set of second elements. Relations can have properties like being reflexive, symmetric, transitive, or an equivalence relation. Relations are used in applications like relational databases, project scheduling, and communication networks.
The document discusses closures of relations, including reflexive closure and symmetric closure. It provides definitions and theorems related to closures. It also uses an example to illustrate finding the reflexive closure and symmetric closure of a relation. Additionally, it covers topics like paths in directed graphs, shortest paths, and transitive closure. It includes an example of calculating the transitive closure of a relation by finding its zero-one matrix.
Relations and their Properties
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 9, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
This document contains lecture notes on relations from a Discrete Structures course. It defines what a relation is and provides examples of relations on sets. It then discusses various properties of relations such as reflexive, symmetric, antisymmetric, transitive, and how to combine relations using set operations. It also introduces the concept of the closure of a relation and provides examples of finding the reflexive and transitive closure of relations. Finally, it provides a brief definition of what a graph is in terms of vertices and edges.
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
Equivalence of Relations & Partial Ordering
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 21, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
The document discusses relations and how they can be used to represent relationships between elements of different sets. It defines binary relations as subsets of the Cartesian product of two sets A and B, and uses notation like aRb to indicate that the ordered pair (a,b) is in the relation R. Examples of binary relations include functions and relations on a single set. The document also discusses n-ary relations, and how they can be used to represent databases as relations between tuples of fields. Key concepts for databases represented as relations include primary keys, composite keys, and relational operations like projection and join.
Discrete Mathematics - Relations. ... Relations may exist between objects of the same set or between objects of two or more sets. Definition and Properties. A binary relation R from set x to y (written as x R y o r R ( x , y ) ) is a subset of the Cartesian product x × y .
The document defines an equivalence relation as a binary relation R on a set A that is reflexive, symmetric, and transitive. It provides examples to illustrate each property: reflexive means each element is related to itself, symmetric means if a is related to b then b is related to a, and transitive means if a is related to b and b is related to c then a is related to c. The document concludes with an example set and relation that demonstrates all three properties and is therefore an equivalence relation.
A relation maps elements from one set to another set through ordered pairs. The domain is the set of first elements in the ordered pairs and the range is the set of second elements. Relations can have properties like being reflexive, symmetric, transitive, or an equivalence relation. Relations are used in applications like relational databases, project scheduling, and communication networks.
The document discusses closures of relations, including reflexive closure and symmetric closure. It provides definitions and theorems related to closures. It also uses an example to illustrate finding the reflexive closure and symmetric closure of a relation. Additionally, it covers topics like paths in directed graphs, shortest paths, and transitive closure. It includes an example of calculating the transitive closure of a relation by finding its zero-one matrix.
Relations and their Properties
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 9, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
This document contains lecture notes on relations from a Discrete Structures course. It defines what a relation is and provides examples of relations on sets. It then discusses various properties of relations such as reflexive, symmetric, antisymmetric, transitive, and how to combine relations using set operations. It also introduces the concept of the closure of a relation and provides examples of finding the reflexive and transitive closure of relations. Finally, it provides a brief definition of what a graph is in terms of vertices and edges.
CMSC 56 | Lecture 16: Equivalence of Relations & Partial Orderingallyn joy calcaben
Equivalence of Relations & Partial Ordering
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 21, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
The document discusses relations and how they can be used to represent relationships between elements of different sets. It defines binary relations as subsets of the Cartesian product of two sets A and B, and uses notation like aRb to indicate that the ordered pair (a,b) is in the relation R. Examples of binary relations include functions and relations on a single set. The document also discusses n-ary relations, and how they can be used to represent databases as relations between tuples of fields. Key concepts for databases represented as relations include primary keys, composite keys, and relational operations like projection and join.
The document discusses different types of relations between elements of sets. It defines relations as subsets of Cartesian products of sets and describes how relations can be represented using matrices or directed graphs. It then introduces various properties of relations such as reflexive, symmetric, transitive, and defines what it means for a relation to have each property. Composition of relations is also covered, along with how relation composition can be represented by matrix multiplication.
Representing Relations
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 14, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
Section 9: Equivalence Relations & CosetsKevin Johnson
This document discusses equivalence relations and cosets from abstract algebra. It contains the following key points:
1) It defines equivalence relations as relations that satisfy reflexivity, symmetry, and transitivity. Modular arithmetic and group conjugacy are given as examples of equivalence relations.
2) It introduces the concept of equivalence classes, which are the subsets of elements related by an equivalence relation. It proves that the equivalence classes partition the set.
3) It defines right cosets as translations of a subgroup by group elements. Examples are given of finding the right cosets of subgroups of Z6 and S3.
This document provides definitions and examples of relations and different types of relations. It discusses relations as sets of ordered pairs that satisfy a given rule or property. Reflexive, symmetric, and transitive relations are defined. Several examples of relations over different sets are given and determined to be reflexive, symmetric, transitive or none of the above. Solutions to exercises involving checking properties of various relations are also provided.
The document discusses relations and their properties. It begins by defining a relation as a subset of the Cartesian product of two sets. Relations can be represented using ordered pairs in a set or graphically using arrows. Properties of relations such as reflexive, symmetric, and transitive are introduced. Examples are provided to illustrate relations and calculating their properties. The document also discusses n-ary relations, representing relations using matrices, and operations on relations such as selection.
This document discusses binary relations and their properties. A binary relation R from sets A to B is a subset of the Cartesian product A × B. Relations can be represented using matrices, where the (i,j) entry is 1 if the element (i,j) is in the relation and 0 otherwise. The properties of relations discussed include: reflexive (an element is related to itself), symmetric (if a is related to b then b is related to a), antisymmetric (if a is related to b and b is related to a then a=b), and transitive (if a is related to b and b is related to c then a is related to c). Boolean operations can be used on the matrices
This document discusses relation matrices and graphs. It begins by defining a relation matrix as a way to represent a relation between two finite sets A and B using a matrix with 1s and 0s. An example is provided to demonstrate how to construct a relation matrix. The document then discusses how relations can be represented using graphs by connecting elements with edges. Properties of relations like reflexive, symmetric, and anti-symmetric are explained through examples using relation matrices. Finally, the conclusion restates that relation matrices and graphs can be used to represent relations between sets.
The document discusses relations and their representations. It defines a binary relation as a subset of A×B where A and B are nonempty sets. Relations can be represented using arrow diagrams, directed graphs, and zero-one matrices. A directed graph represents the elements of A as vertices and draws an edge from vertex a to b if aRb. The zero-one matrix representation assigns 1 to the entry in row a and column b if (a,b) is in the relation, and 0 otherwise. The document also discusses indegrees, outdegrees, composite relations, and properties of relations like reflexivity.
The document discusses partial ordered sets (POSETs). It begins by defining a POSET as a set A together with a partial order R, which is a relation on A that is reflexive, antisymmetric, and transitive. An example is given of the set of integers under the relation "greater than or equal to". It is shown that this relation satisfies the three properties of a partial order. The document emphasizes that a relation must satisfy all three properties - reflexive, antisymmetric, and transitive - to be considered a partial order. Some example relations on a set are provided and it is discussed which of these are partial orders.
This document discusses relations and various types of relations. It begins by defining what a relation is as a subset of the Cartesian product of two sets and provides examples of relations. It then discusses the domain and range of relations and inverse relations. The document outlines several types of relations including reflexive, irreflexive, symmetric, and transitive relations and provides examples of each. It concludes by discussing the objectives of understanding different types of relations and their properties.
The document defines ordered pairs, product sets, relations, and digraphs. It provides examples of defining relations between sets and representing them using matrices and digraphs. It introduces concepts such as the domain and range of a relation. It also describes paths in relations and digraphs, and how to compute higher powers of the relation matrix to determine connectivity between elements.
This document introduces the concept of relations in mathematics. It defines a relation as a subset of the Cartesian product between two sets that describes a connection between the ordered pairs. It discusses the domain and range of a relation, and how relations can be represented algebraically or through arrow diagrams. Examples are given of different types of relations such as reflexive, symmetric, and transitive relations. Equivalence relations and equivalence classes are also introduced.
(1) The document discusses relations and functions in mathematics. It defines different types of relations such as empty relation, universal relation, equivalence relation, reflexive relation, symmetric relation and transitive relation. (2) It provides examples to illustrate these relations and checks whether given relations satisfy the properties. (3) The document also discusses that an equivalence relation partitions a set into mutually exclusive equivalence classes.
This document defines and provides examples of relations and functions. It explains that a relation connects elements between two or more sets, and provides examples of universal, identity, symmetric, inverse, reflexive, transitive, and equivalence relations. It then defines a function as a binary relation that associates every element in the first set to exactly one element in the second set. The document outlines the properties of one-to-one (injective), onto (surjective), and bijective (one-to-one and onto) functions, providing examples of each.
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and orderingRai University
This document defines and explains various concepts related to relations and ordering in discrete mathematics including:
- A relation is a set of ordered pairs where the first item is the domain and second is the range.
- Relations can be binary, reflexive, symmetric, transitive, equivalence relations and partial orders.
- Equivalence classes are sets of equivalent elements under an equivalence relation.
- Graphs and matrices can represent relations. Hasse diagrams show partial orderings visually.
- Upper and lower bounds, maximal/minimal elements, chains and covers are discussed in the context of partial orders.
The document defines and provides examples of geometric sequences. A geometric sequence is a sequence where each term is found by multiplying the previous term by a common ratio. The general formula for a geometric sequence is an = a1rn-1, where a1 is the first term and r is the common ratio between terms. Examples show how to identify the common ratio r and use the general formula to determine the specific formula for different geometric sequences.
This document discusses geometric sequences, which are sequences where each term is found by multiplying the preceding term by a constant ratio. It provides the recursive and explicit forms for writing geometric sequences, and gives examples of finding specific terms and writing the explicit formula given the first term and ratio. Key details include that the recursive form is an+1 = ar, and the explicit form is an = arn-1, where a is the first term and r is the common ratio.
The document defines and provides examples of relational algebra concepts. It explains that a relation is a subset of ordered pairs from two sets that represents a connection between the pairs' elements. A binary relation from set A to set B is a subset of the Cartesian product of A and B. The inverse of a relation R consists of reversing the ordered pairs in R. Relations can be represented visually using matrices or directed graphs.
This document provides an overview of relations and their properties in discrete mathematics. It defines what a relation is, distinguishes between relations and functions, and describes key properties of relations including:
- Reflexive relations, where every element is related to itself.
- Symmetric relations, where if a is related to b then b is related to a.
- Transitive relations, where if a is related to b and b is related to c, then a is related to c.
It also discusses how to determine if a relation has these properties, combines multiple relations using set operations, and defines the composite of two relations. The overall goal is for students to understand relations and be able to analyze them for
The document discusses different types of relations between elements of sets. It defines relations as subsets of Cartesian products of sets and describes how relations can be represented using matrices or directed graphs. It then introduces various properties of relations such as reflexive, symmetric, transitive, and defines what it means for a relation to have each property. Composition of relations is also covered, along with how relation composition can be represented by matrix multiplication.
Representing Relations
CMSC 56 | Discrete Mathematical Structure for Computer Science
November 14, 2018
Instructor: Allyn Joy D. Calcaben
College of Arts & Sciences
University of the Philippines Visayas
Section 9: Equivalence Relations & CosetsKevin Johnson
This document discusses equivalence relations and cosets from abstract algebra. It contains the following key points:
1) It defines equivalence relations as relations that satisfy reflexivity, symmetry, and transitivity. Modular arithmetic and group conjugacy are given as examples of equivalence relations.
2) It introduces the concept of equivalence classes, which are the subsets of elements related by an equivalence relation. It proves that the equivalence classes partition the set.
3) It defines right cosets as translations of a subgroup by group elements. Examples are given of finding the right cosets of subgroups of Z6 and S3.
This document provides definitions and examples of relations and different types of relations. It discusses relations as sets of ordered pairs that satisfy a given rule or property. Reflexive, symmetric, and transitive relations are defined. Several examples of relations over different sets are given and determined to be reflexive, symmetric, transitive or none of the above. Solutions to exercises involving checking properties of various relations are also provided.
The document discusses relations and their properties. It begins by defining a relation as a subset of the Cartesian product of two sets. Relations can be represented using ordered pairs in a set or graphically using arrows. Properties of relations such as reflexive, symmetric, and transitive are introduced. Examples are provided to illustrate relations and calculating their properties. The document also discusses n-ary relations, representing relations using matrices, and operations on relations such as selection.
This document discusses binary relations and their properties. A binary relation R from sets A to B is a subset of the Cartesian product A × B. Relations can be represented using matrices, where the (i,j) entry is 1 if the element (i,j) is in the relation and 0 otherwise. The properties of relations discussed include: reflexive (an element is related to itself), symmetric (if a is related to b then b is related to a), antisymmetric (if a is related to b and b is related to a then a=b), and transitive (if a is related to b and b is related to c then a is related to c). Boolean operations can be used on the matrices
This document discusses relation matrices and graphs. It begins by defining a relation matrix as a way to represent a relation between two finite sets A and B using a matrix with 1s and 0s. An example is provided to demonstrate how to construct a relation matrix. The document then discusses how relations can be represented using graphs by connecting elements with edges. Properties of relations like reflexive, symmetric, and anti-symmetric are explained through examples using relation matrices. Finally, the conclusion restates that relation matrices and graphs can be used to represent relations between sets.
The document discusses relations and their representations. It defines a binary relation as a subset of A×B where A and B are nonempty sets. Relations can be represented using arrow diagrams, directed graphs, and zero-one matrices. A directed graph represents the elements of A as vertices and draws an edge from vertex a to b if aRb. The zero-one matrix representation assigns 1 to the entry in row a and column b if (a,b) is in the relation, and 0 otherwise. The document also discusses indegrees, outdegrees, composite relations, and properties of relations like reflexivity.
The document discusses partial ordered sets (POSETs). It begins by defining a POSET as a set A together with a partial order R, which is a relation on A that is reflexive, antisymmetric, and transitive. An example is given of the set of integers under the relation "greater than or equal to". It is shown that this relation satisfies the three properties of a partial order. The document emphasizes that a relation must satisfy all three properties - reflexive, antisymmetric, and transitive - to be considered a partial order. Some example relations on a set are provided and it is discussed which of these are partial orders.
This document discusses relations and various types of relations. It begins by defining what a relation is as a subset of the Cartesian product of two sets and provides examples of relations. It then discusses the domain and range of relations and inverse relations. The document outlines several types of relations including reflexive, irreflexive, symmetric, and transitive relations and provides examples of each. It concludes by discussing the objectives of understanding different types of relations and their properties.
The document defines ordered pairs, product sets, relations, and digraphs. It provides examples of defining relations between sets and representing them using matrices and digraphs. It introduces concepts such as the domain and range of a relation. It also describes paths in relations and digraphs, and how to compute higher powers of the relation matrix to determine connectivity between elements.
This document introduces the concept of relations in mathematics. It defines a relation as a subset of the Cartesian product between two sets that describes a connection between the ordered pairs. It discusses the domain and range of a relation, and how relations can be represented algebraically or through arrow diagrams. Examples are given of different types of relations such as reflexive, symmetric, and transitive relations. Equivalence relations and equivalence classes are also introduced.
(1) The document discusses relations and functions in mathematics. It defines different types of relations such as empty relation, universal relation, equivalence relation, reflexive relation, symmetric relation and transitive relation. (2) It provides examples to illustrate these relations and checks whether given relations satisfy the properties. (3) The document also discusses that an equivalence relation partitions a set into mutually exclusive equivalence classes.
This document defines and provides examples of relations and functions. It explains that a relation connects elements between two or more sets, and provides examples of universal, identity, symmetric, inverse, reflexive, transitive, and equivalence relations. It then defines a function as a binary relation that associates every element in the first set to exactly one element in the second set. The document outlines the properties of one-to-one (injective), onto (surjective), and bijective (one-to-one and onto) functions, providing examples of each.
BCA_Semester-II-Discrete Mathematics_unit-ii_Relation and orderingRai University
This document defines and explains various concepts related to relations and ordering in discrete mathematics including:
- A relation is a set of ordered pairs where the first item is the domain and second is the range.
- Relations can be binary, reflexive, symmetric, transitive, equivalence relations and partial orders.
- Equivalence classes are sets of equivalent elements under an equivalence relation.
- Graphs and matrices can represent relations. Hasse diagrams show partial orderings visually.
- Upper and lower bounds, maximal/minimal elements, chains and covers are discussed in the context of partial orders.
The document defines and provides examples of geometric sequences. A geometric sequence is a sequence where each term is found by multiplying the previous term by a common ratio. The general formula for a geometric sequence is an = a1rn-1, where a1 is the first term and r is the common ratio between terms. Examples show how to identify the common ratio r and use the general formula to determine the specific formula for different geometric sequences.
This document discusses geometric sequences, which are sequences where each term is found by multiplying the preceding term by a constant ratio. It provides the recursive and explicit forms for writing geometric sequences, and gives examples of finding specific terms and writing the explicit formula given the first term and ratio. Key details include that the recursive form is an+1 = ar, and the explicit form is an = arn-1, where a is the first term and r is the common ratio.
The document defines and provides examples of relational algebra concepts. It explains that a relation is a subset of ordered pairs from two sets that represents a connection between the pairs' elements. A binary relation from set A to set B is a subset of the Cartesian product of A and B. The inverse of a relation R consists of reversing the ordered pairs in R. Relations can be represented visually using matrices or directed graphs.
This document provides an overview of relations and their properties in discrete mathematics. It defines what a relation is, distinguishes between relations and functions, and describes key properties of relations including:
- Reflexive relations, where every element is related to itself.
- Symmetric relations, where if a is related to b then b is related to a.
- Transitive relations, where if a is related to b and b is related to c, then a is related to c.
It also discusses how to determine if a relation has these properties, combines multiple relations using set operations, and defines the composite of two relations. The overall goal is for students to understand relations and be able to analyze them for
the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown the quick brown
This document defines relations and functions. Relations are rules that connect input and output numbers. A relation is a set of ordered pairs. A function is a special type of relation where each input has exactly one output. The document discusses types of relations like reflexive, symmetric, and transitive relations. It also discusses types of functions like one-to-one, onto, and bijective functions. Examples are provided to illustrate relations and functions.
This document discusses mathematical concepts related to relations including:
1. The inverse of a relation R-1, which relates elements in the opposite direction as R.
2. The composition of two relations R and S, denoted R◦S or RS, which relates elements related by both R and S.
3. Matrices can represent relations and be used to calculate their composition.
4. A partial order relation on a set A is a relation that is reflexive, antisymmetric, and transitive. Examples of partial order relations include set inclusion and the less than or equal to relation on real numbers.
This document discusses set theory and relations between sets. It begins by introducing basic set notation such as set membership and subset notation. It then defines and provides examples of relations between sets such as subset, equality, union, intersection, difference, and complement. The document also covers properties of sets and relations including commutative, associative, distributive, and other properties. It concludes by discussing relations as subsets of Cartesian products and properties of relations such as reflexive, symmetric, transitive, and antisymmetric relations.
The document discusses relations and some of their properties. A relation R on a set A relates elements of A to each other or to elements of another set. Relations can be reflexive, symmetric, antisymmetric, transitive, etc. based on how the elements are related. The number of possible relations on a set A with n elements is 2^n^2. Relations can be combined using set operations like union and intersection. The composite of two relations R and S relates elements where there is an element in both R and S.
This document provides an overview of chapter 2 on relations from a discrete mathematics course. It defines key concepts such as product sets, relations, inverse relations, representing relations using matrices, and composition of relations. It also covers different types of relations like reflexive, symmetric, antisymmetric, transitive, and equivalence relations. Examples are provided to illustrate these concepts and determine if specific relations satisfy the given properties. The document is copyrighted material from a course on discrete mathematics taught in 2014-2015.
This document discusses relations and various types of relations. It begins by defining what a relation is as a subset of the Cartesian product of two sets and provides examples of relations. It then discusses the domain and range of relations and inverse relations. The document outlines several types of relations including reflexive, irreflexive, symmetric, and transitive relations and provides examples of each. It concludes by discussing the objectives of understanding different types of relations and their properties.
This document discusses relations and various types of relations. It begins by defining what a relation is as a subset of the Cartesian product of two sets and provides examples of relations. It then discusses the domain and range of relations and inverse relations. The document outlines several types of relations including reflexive, irreflexive, symmetric, and transitive relations and provides examples of each. It concludes by discussing the objectives of understanding different types of relations and their properties.
This document contains the syllabus and introduction for a Theory of Computation course. The syllabus outlines 6 topics that will be covered in the course, including finite automata, context free languages, Turing machines, undecidability, and computational complexity. The introduction provides definitions and examples related to sets, relations, functions, languages, and formal proofs. It also gives an overview of basic set theory concepts such as unions, intersections, complements, and Cartesian products.
This document defines and explains various concepts related to sets and relations. It discusses the four main set operations of union, intersection, complement, and difference. It then explains eight types of relations: empty, universal, identity, inverse, reflexive, symmetric, transitive, and equivalence relations. Finally, it defines partial ordering as a relation that is reflexive, antisymmetric, and transitive.
A relation is a set of ordered pairs that shows a relationship between elements of two sets. An ordered pair connects an element from one set to an element of another set. The domain of a relation is the set of first elements of each ordered pair, while the range is the set of second elements. Relations can be represented visually using arrow diagrams or directed graphs to show the connections between elements of different sets defined by the relation.
The document discusses different types of relations, including reflexive, symmetric, transitive, and equivalence relations. It provides examples of each type of relation and defines their key properties. Inverse relations are also discussed, where the ordered pairs of a relation R are reversed to form the inverse relation R-1. An example demonstrates finding the domain, range, and inverse of a given relation defined by an equation.
The document defines and provides examples of relations between sets. It begins by defining a relation as a connection between two or more objects. It then provides examples of relations using sets of countries and cities, where the relation is "capital of". It represents this relation using ordered pairs and diagrams. It discusses properties of relations, including that a relation from set A to B is a subset of the Cartesian product of A and B. It provides several examples of representing different relations using ordered pairs, diagrams, tables, and descriptions. It finds relations based on criteria like "is less than" or "is equal to". Finally, it represents a few example relations between sets using different methods like ordered pairs, diagrams, and tables.
The document discusses binary relations and properties of relations. A binary relation R from set A to set B is a subset of the Cartesian product A × B. Relations can model real-world relationships between elements, like which people drive which cars. Functions are a special type of binary relation where each element of the domain A is related to exactly one element of the range B. The properties of relations discussed include reflexive, symmetric, antisymmetric, transitive, and combining relations using operations like union, intersection, and composition.
The document discusses relations and functions. It defines relations as subsets of Cartesian products of sets and describes how to classify relations as reflexive, symmetric, transitive, or an equivalence relation. It also defines functions, including their domain, codomain, and range. It describes how to classify functions as injective, surjective, or bijective. Examples are provided to illustrate these concepts of relations and functions.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
How to Make a Field Mandatory in Odoo 17Celine George
In Odoo, making a field required can be done through both Python code and XML views. When you set the required attribute to True in Python code, it makes the field required across all views where it's used. Conversely, when you set the required attribute in XML views, it makes the field required only in the context of that particular view.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
How to Setup Warehouse & Location in Odoo 17 InventoryCeline George
In this slide, we'll explore how to set up warehouses and locations in Odoo 17 Inventory. This will help us manage our stock effectively, track inventory levels, and streamline warehouse operations.
3. RELATIONS
• Relationships between elements of sets are represented using the structure called a
relation, which is just a subset of the Cartesian product of the sets.
• Relations can be used to solve problems such as determining which pairs of cities are
linked by airline flights in a network, finding a viable order for the different phases of a
complicated project, or producing a useful way to store information in computer
databases.
• Two types
• Binary Relation
• N-ary Relation
Tahsin Aziz 3
4. BINARY RELATION
• Let A and B be two sets. A binary relation from A to B is a subset of A × B
• A binary relation from A to B is a set R of ordered pairs where the first element of each
ordered pair comes from A and the second element comes from B.
• We use the notation aRb to denote that (a, b) ∈ R and aRb to denote that (a, b) ∉ R.
• Moreover, when (a, b) belongs to R, a is said to be related to b by R.
Tahsin Aziz 4
5. BINARY RELATION
• Example
• Let A = {0, 1, 2} and B = {a, b}.
• Then {(0, a), (0, b), (1, a), (2, b)} is a relation from A to B.
Tahsin Aziz 5
7. N-ARY RELATION
• Let there are n number of sets such that A1, A2,…….,An.
• An N-ary relation on these sets is a subset of A1 × A2 ×…… × An.
• The sets A1, A2,……,An are called the domains of the relation and n is called its degree.
• It is used in database applications.
Tahsin Aziz 7
9. RELATIONS
• If R = ∅ , it is called an empty relation.
• If R = A × B, it is called an universal relation.
Tahsin Aziz 9
10. REPRESENTATIONS OF BINARY RELATIONS
• Relation can be represented in four ways.
1. Set Representation
2. Arrow Diagram
3. Tabular Matrix
4. Co-ordinate/Graph
Tahsin Aziz 10
11. SET REPRESENTATION
• Let there are two sets A and B. Set A = {1, 2, 3, 4} and B = {x, y, z}. R is the relation from
set A to B.
• The set representation of R is:
R = { (1, y), (1, z), (3, y), (3, z), (4, x), (4, z) }
Tahsin Aziz 11
12. REPRESENTATIONS OF BINARY RELATIONS
• Relation can be represented in four ways.
1. Set Representation √
2. Arrow Diagram
3. Tabular Matrix
4. Co-ordinate/Graph
Tahsin Aziz 12
13. ARROW DIAGRAM
• Let there are two sets A and B. A = {1, 2, 3, 4} and B = {x, y, z}. R is the relation from set A to B.
• R = { (1, y), (1, z), (3, y), (3, z), (4, x), (4, z) }.
• The arrow diagram of R is:
Tahsin Aziz 13
1
2
3
4
z
y
x
14. REPRESENTATIONS OF BINARY RELATIONS
• Relation can be represented in four ways.
1. Set Representation √
2. Arrow Diagram √
3. Tabular Matrix
4. Co-ordinate/Graph
Tahsin Aziz 14
15. TABULAR MATRIX
• Let there are two sets A and B. A = {1, 2, 3, 4} and B = {x, y, z}. R is the relation from set A to B.
• R = { (1, y), (1, z), (3, y), (3, z), (4, x), (4, z) }.
• The tabular matrix form of R is:
Tahsin Aziz 15
x y z
1 0 1 1
2 0 0 0
3 0 1 1
4 1 0 1
16. REPRESENTATIONS OF BINARY RELATIONS
• Relation can be represented in four ways.
1. Set Representation √
2. Arrow Diagram √
3. Tabular Matrix √
4. Co-ordinate/Graph
Tahsin Aziz 16
17. CO-ORDINATE/GRAPH
• Let there are two sets A and B. A = {1, 2, 3, 4} and B = {x, y, z}. R is the relation from set A to B.
• R = { (1, y), (1, z), (3, y), (3, z), (4, x), (4, z) }.
• The co - ordinate or graph form of R is:
Tahsin Aziz 17
z x x x
y x x
x x
1 2 3 4
18. REPRESENTATIONS OF BINARY RELATIONS
• Relation can be represented in four ways.
1. Set Representation √
2. Arrow Diagram √
3. Tabular Matrix √
4. Co-ordinate/Graph √
Tahsin Aziz 18
19. RELATIONS AND FUNCTIONS
• Relations represent one-to-many relationships between the elements of the sets A and B,
where an element of A may be related to more than one element of B.
• A function on sets A, B represents a relation where exactly one element of B is related to
each element of A.
Tahsin Aziz 19
20. RELATIONS AND FUNCTIONS
• Relations represent one-to-many relationships between the elements of the sets A and B,
where an element of A may be related to more than one element of B.
Tahsin Aziz 20
0
1
2
b
a
21. RELATIONS AND FUNCTIONS
• A function on sets A, B represents a relation where exactly one element of B is related to
each element of A.
Tahsin Aziz 21
0
1
2
b
a
22. RELATIONS ON A SET
• A relation on a set A is a relation from A to A.
• In other words, a relation on a set A is a subset of A × A
• Example
• Let A be the set {1, 2, 3, 4}, which ordered pairs are in the relation R = {(a, b) | a divides b}?
• Solution
• R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.
Tahsin Aziz 22
23. PROPERTIES OF BINARY RELATION
• Reflexivity
• Symmetry
• Transitivity
Tahsin Aziz 23
24. REFLEXIVITY
• Reflexive
• A relation R on a set A is called reflexive if (a, a) ∈ R for every element a ∈ A.
• Using quantifiers it can be written that, the relation R on the set A is reflexive if ∀a a, a ∈
Tahsin Aziz 24
26. REFLEXIVITY
• Irreflexive
• A relation R on a set A is called irreflexive if (a, a) ∉ R for every element of a ∈ A.
• Using quantifiers it can be written that, the relation R on the set A is irreflexive if ∀a a, a ∉
Tahsin Aziz 26
27. REFLEXIVITY
• The following relations on {1, 2, 3, 4} are irreflexive.
• R3 = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)}
• R4 = {(3, 4)}
• Tabular matrix representation of irreflexive relation:
Tahsin Aziz 27
1 2 3
1 0 1/0 1/0
2 1/0 0 1/0
3 1/0 1/0 0
28. REFLEXIVITY
• Not Reflexive
• A relation R on a set A is called not reflexive if (a, a) ∉ R for some or at least one element of a
∈ A.
• Using quantifiers it can be written that, the relation R on the set A is not reflexive if ∃a a, a ∈
Tahsin Aziz 28
29. REFLEXIVITY
• The following relations on {1, 2, 3, 4} are not reflexive.
• R5 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)}
• R6 = {(1, 1), (1, 2), (2, 1)}
• Tabular matrix representation of not reflexive relation:
Tahsin Aziz 29
1 2 3
1 0 1/0 1/0
2 1/0 1 1/0
3 1/0 1/0 1
30. PROPERTIES OF BINARY RELATION
• Reflexivity √
• Symmetry
• Transitivity
Tahsin Aziz 30
31. SYMMETRY
• Symmetric
• A relation R on a set A is called symmetric if (b, a) ∈ R whenever (a, b) ∈ R, for all a, b ∈ A.
• Whenever aRb, then there should be bRa for every a, b ∈ A.
• Using quantifiers, it can be written as the relation R on the set A is symmetric if ∀a∀b a, b ∈
Tahsin Aziz 31
32. SYMMETRY
• Antisymmetric
• A relation R on a set A such that for all a, b ∈ A, if (a, b) ∈ R and (b, a) ∈ R, then a = b is called
antisymmetric.
Or
• If aRb with a ≠ b exists, then bRa must not hold.
• Similarly, the relation R on the set A is antisymmetric if ∀a∀b a, b ∈ R ∧ b, a ∈ R → a = b .
• Some examples of antisymmetric relation can be:
• <, ≤ on Z (Set of all integers)
• ⊂ on P(Z) (Power set of Z)
Tahsin Aziz 32
34. SYMMETRY
• Not symmetric
• A relation R on a set A is called not symmetric if it is not both symmetric and antisymmetric.
• The following Relation R6 on {1, 2, 3, 4} is not symmetric as it is not both symmetric and
antisymmetric.
• R6 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)}
• R6 is not symmetric because for (3, 4) and (4, 1), (4, 3) and (1, 4) not in R respectively.
• R6 is not antisymmetric because for (1, 2), (2, 1) holds.
Tahsin Aziz 34
35. SYMMETRY
• Both symmetric and antisymmetric
• A relation R on a set A can be both symmetric and antisymmetric.
• The following Relation R7 on {1, 2, 3, 4} is both symmetric and antisymmetric.
• R7 = {(1, 1), (3, 3)}
• R7 is symmetric because for all (a, b), (b, a) holds.
• R7 is antisymmetric because for there is no (a, b) and (b, a) where a ≠ b.
• So a relation is not symmetric does not mean it is antisymmetric.
Tahsin Aziz 35
36. PROPERTIES OF BINARY RELATION
• Reflexivity √
• Symmetry √
• Transitivity
Tahsin Aziz 36
37. TRANSITIVITY
• Transitive
• A relation R on a set A is called transitive if whenever (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R, for all
a, b, c ∈ A.
• Using quantifiers it can be written as the relation R on a set A is transitive if we have
∀a∀b∀c a, b ∈ R ∧ b, c ∈ R → a, c ∈ R .
• That is whenever aRb and bRc holds, then there must be aRc.
• The following relations on {1, 2, 3, 4} are transitive.
• R1 = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)}
• R2 = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)}
• R3 = {(3, 4)}
Tahsin Aziz 37
38. PROPERTIES OF BINARY RELATION
• Reflexivity √
• Symmetry √
• Transitivity √
Tahsin Aziz 38
39. COMBINING RELATIONS
• Relations from A to B are subsets of A × B.
• Two relations from A to B can be combined in any way two sets can be combined.
• So if there are two relations R1 and R2 then the following operations can be done on the sets:
• R1 ⋃ R2
• R1 ⋂ R2
• R1 − R2
• R2 − R1
• R1 ⊕ R2
Tahsin Aziz 39
40. COMBINING RELATIONS
• Let R be a relation from a set A to a set B and S be a relation from set B to a set C.
• The composite of R and S is the relation consisting of ordered pairs (a, c), where a ∈ A, c ∈ C, and for
which there exists an element b ∈ B such that (a, b) ∈ R and (b, c) ∈ S. We denote the composite of R and
S by S ∘ R.
• Example:
• Let R is the relation from {1, 2, 3} to {1, 2, 3, 4} with R = {(1, 1), (1, 4), (2, 3), (3, 1), (3, 4)} and S is the relation from
{1, 2, 3, 4} to {0, 1, 2} with S = {(1, 0), (2, 0), (3, 1), (3, 2), (4, 1)}.
• The composite of the relations R and S, S ∘ R is constructed using all ordered pairs in R and ordered pairs in S,
where the second element of the ordered pair in R agrees with the first element of the ordered pair in S.
• So, S ∘ R = {(1, 0), (1, 1), (2, 1), (2, 2), (3, 0), (3, 1)}.
Tahsin Aziz 40
41. REPRESENTING RELATIONS
• A relation can be represent by two ways:
• By using Matrix
• By using Digraph
Tahsin Aziz 41
42. MATRIX REPRESENTATION
• A relation between finite sets can be represented using a zero–one matrix.
• Suppose that R is a relation from A = {a1, a2,……,am} to B = {b1, b2,……,bn}.
• The elements of the sets A and B have been listed in a particular, but arbitrary order. Furthermore,
when A = B we use the same ordering for A and B.
• The relation R can be represented by the matrix MR = mij , where
• mij =
1 if ai, bj ∈ R,
0 if ai, bj ∉ R.
• In other words, the zero–one matrix representing R has a 1 as its (i, j) entry when ai is related to bj , and
a 0 in this position if ai is not related to bj .
Tahsin Aziz 42
43. MATRIX REPRESENTATION
• Suppose that A = {1, 2, 3} and B = {1, 2}. Let R be the relation from A to B containing (a,
b) if a ∈ A, b ∈ B, and a > b. What is the matrix representing R if a1 = 1, a2 = 2, and a3 =
3, and b1 = 1 and b2 = 2?
• Solution:
• R = {(2, 1), (3, 1), (3, 2)}. It can be represented as
Tahsin Aziz 43
Set B
1 2
SetA
1 0 0
2 1 0
3 1 1
44. MATRIX REPRESENTATION
• So the Matrix for R is MR =
0 0
1 0
1 1
.
• Here, 1s in MR show that the pairs (2, 1), (3, 1), and (3, 2) belong to R. The 0s show that
no other pairs belong to R.
Tahsin Aziz 44
45. MATRIX REPRESENTATION
• The square matrix of a relation on a set can be used to determine whether the relation
has certain properties.
• Reflexivity
• Symmetry
Tahsin Aziz 45
46. MATRIX REPRESENTATION
• Reflexive
• A relation R on A is reflexive if(a, a) ∈ R whenever a ∈ A.
• So it can be said, R is reflexive if and only if ai, ai ∈ R for i = 1, 2,……,n.
• R is reflexive if and only if mii = 1, for i = 1, 2,…….,n.
• R is reflexive if all the elements on the main diagonal of MR are equal to 1.
1 0/1 0/1
0/1 1 0/1
0/1 0/1 1
Tahsin Aziz 46
47. MATRIX REPRESENTATION
• Symmetric
• The relation R is symmetric if (a, b) ∈ R implies that (b, a) ∈ R.
• The relation R on the set A = {a1, a2,...,an} is symmetric if and only if (aj , ai) ∈ R whenever (ai,
aj ) ∈ R.
• R is symmetric if and only if mji = 1 whenever mij = 1. and mji = 0 whenever mij = 0.
• So, R is symmetric if and only if mij = mji, for all pairs of integers i and j with i = 1, 2,……,n
and j = 1, 2,…….,n.
• According to the definition of Transpose Matrix it can be conclude, R is symmetric if and only
if MR = (MR)t
Tahsin Aziz 47
48. MATRIX REPRESENTATION
• Antisymmetric
• The relation R is antisymmetric if and only if (a, b) ∈ R and (b, a) ∈ R imply that a = b.
• The matrix of an antisymmetric relation has the property that if mij = 1 with i ≠ j , then mji =
0.
• That means either mij = 0 or mji = 0 when i ≠ j .
Tahsin Aziz 48
49. MATRIX REPRESENTATION
• Relation R on a set is represented by the following matrix. Determine whether R is
reflexive, symmetric, and/or antisymmetric?
MR =
1 1 0
1 1 1
0 1 1
.
• All the diagonal elements of this matrix are equal to 1, so R is reflexive.
• MR is symmetric, so R is symmetric.
• R is not antisymmetric.
Tahsin Aziz 49
50. MATRIX REPRESENTATION
• The boolean operations AND, OR can be used to find the matrices representing the union and the
intersection of two relations.
• If R1 and R2 are relations on a set A represented by the matrices MR1
and MR2
, respectively.
• The matrix representing the union of these relations has a 1 in the positions where either MR1
or MR2
has
a 1.
• The matrix representing the intersection of these relations has a 1 in the positions where both MR1
and
MR2
have a 1.
• The matrices representing the union and intersection of these relations are
• M R1 ⋃ R2
= MR1
⋁ MR2
• M R1 ⋂ R2
= MR1
∧ MR2
.
Tahsin Aziz 50
51. MATRIX REPRESENTATION
• The matrix for the composite of relations can be found using the boolean product of the
matrices for these relations.
• Let R is a relation from A to B and S is a relation from B to C. Suppose that A, B, and C have
m, n, and p elements, respectively. Let the zero– one matrices for S ∘ R, R, and S be MS∘R = [tij
], MR = [rij ], and MS = [sij ], respectively. These matrices have sizes m × p, m × n, and n × p
respectively.
• The ordered pair (ai, cj ) belongs to S ∘ R if and only if there is an element bk such that (ai, bk)
belongs to R and (bk, cj ) belongs to S. It follows that tij = 1 if and only if rik = skj = 1 for some
k.
• MS∘R = MR ⨀ MS.
Tahsin Aziz 51
52. REPRESENTING RELATIONS
• A relation can be represent by two ways:
• By using Matrix √
• By using Digraph
Tahsin Aziz 52
53. DIGRAPH REPRESENTATION
• Presenting a relation using a pictorial representation is known as Digraph representation.
• Each element of the set is represented by a point, and each ordered pair is represented using
an arc with its direction indicated by an arrow.
• A directed graph, or digraph, consists of a set V of vertices (or nodes) together with a set E of
ordered pairs of elements of V called edges (or arcs).
• The vertex a is called the initial vertex of the edge (a, b), and the vertex b is called the
terminal vertex of this edge.
• An edge of the form (a, a) is represented using an arc from the vertex a back to itself which is
known as loop.
Tahsin Aziz 53
54. DIGRAPH REPRESENTATION
• The relation R on a set A is represented by the directed graph that has the elements of A as
its vertices and the ordered pairs (a, b), where (a, b) ∈ R, as edges.
• This assignment sets up a one-to-one correspondence between the relations on a set A and
the directed graphs with A as their set of vertices.
• Every statement about relations corresponds to a statement about directed graphs, and vice
versa.
• Directed graphs give a visual display of information about relations.
• The relations from a set A to a set B can be represented by a directed graph where there is a
vertex for each element of A and a vertex for each element of B.
Tahsin Aziz 54
55. DIGRAPH REPRESENTATION
• Directed graph can be used to determine properties of relations.
• Reflexive
• A relation is reflexive if and only if there is a loop at every vertex of the directed graph, so
that every ordered pair of the form (x, x) occurs in the relation.
• Symmetric
• A relation is symmetric if and only if for every edge between distinct vertices in its digraph
there is an edge in the opposite direction, so that (y, x) is in the relation whenever (x, y) is in
the relation.
Tahsin Aziz 55
56. DIGRAPH REPRESENTATION
• Antisymmetric
• A relation is antisymmetric if and only if there are never two edges in opposite directions
between distinct vertices.
• Transitive
• Finally, a relation is transitive if and only if whenever there is an edge from a vertex x to a
vertex y and an edge from a vertex y to a vertex z, there is an edge from x to z. Which means
completing a triangle where each side is a directed edge with the correct direction.
Tahsin Aziz 56
57. DIGRAPH REPRESENTATION
• The directed graph or digraph with vertices a, b, c, d and some edges.
• Edges (a, b), (a, d), (b, b), (b, d), (c, a), (c, b), and (d, b) will be look like
a
c d
b
Tahsin Aziz 57
58. REPRESENTING RELATIONS
• A relation can be represent by two ways:
• By using Matrix √
• By using Digraph √
Tahsin Aziz 58
59. CLOSURES OF RELATIONS
• Let R be a relation on a set A.
• R may or may not have some property P, such as reflexivity, symmetry, or transitivity.
• If there is a relation S with property P containing R such that S is a subset of every
relation with property P containing R, then S is called the closure of R with respect to P.
• There are three types of closures:
• Reflexive Closure
• Symmetric Closure
• Transitive Closure
Tahsin Aziz 59
60. CLOSURES OF RELATIONS
• Reflexive Closure
• Let R is a relation on a set A
• The reflexive closure of R can be formed by adding to R all pairs of the form (a, a) with a ∈ A,
not already in R.
• The addition of these pairs produces a new relation that is reflexive, contains R, and is
contained within any reflexive relation containing R.
• The reflexive closure of R equals R ∪ ∆ , where = ∆ {(a, a) | a ∈ A} is the diagonal relation on
A.
Tahsin Aziz 60
61. CLOSURES OF RELATIONS
• Example:
• The relation R = {(1, 1), (1, 2), (2, 1), (3, 2)} on the set A = {1, 2, 3} is not reflexive. This can be
make reflexive by adding (2, 2) and (3, 3) to R, because these are the only pairs of the form (a,
a) that are not in R. Clearly, this new relation contains R.
• Furthermore, any reflexive relation that contains R must also contain (2, 2) and (3, 3). Because
this relation contains R, is reflexive, and is contained within every reflexive relation that
contains R, it is called the reflexive closure of R.
Tahsin Aziz 61
62. CLOSURES OF RELATIONS
• Symmetric Closure
• The symmetric closure of a relation R can be constructed by adding all ordered pairs of the
form (b, a), where (a, b) is in the relation, that are not already present in R.
• Adding these pairs produces a relation that is symmetric, that contains R, and that is
contained in any symmetric relation that contains R.
• The symmetric closure of a relation can be constructed by taking the union of a relation with
its inverse
• The symmetric closure of R is R ⋃ R−1
, where R−1 = {(b, a) | (a, b) ∈ R}.
Tahsin Aziz 62
63. CLOSURES OF RELATIONS
• Example
• The relation {(1, 1), (1, 2), (2, 2), (2, 3), (3, 1), (3, 2)} on {1, 2, 3} is not symmetric.
• To make this a symmetric relation we need to only add (2, 1) and (1, 3), because these are the
only pairs of the form (b, a) with (a, b) ∈ R that are not in R.
• This new relation is symmetric and contains R. Furthermore, any symmetric relation that
contains R must contain this new relation, because a symmetric relation that contains R must
contain (2, 1) and (1, 3). Consequently, this new relation is called the symmetric closure of R.
Tahsin Aziz 63
64. CLOSURES OF RELATIONS
• Transitive Closure
• A transitive relation S containing R such that S is a subset of every transitive relation containing R. Here, S is the
smallest transitive relation that contains R. This relation is called the transitive closure of R.
• A computer network has data centers in boston, chicago, denver, detroit, new york, and san diego.
• There are direct, one-way telephone lines from boston to chicago, from boston to detroit, from chicago to detroit, from
detroit to denver, and from new york to san diego.
• Let R be the relation containing (a, b) if there is a telephone line from the data center in a to that in b. How can we
determine if there is some (possibly indirect) link composed of one or more telephone lines from one center to another?
• Because not all links are direct, such as the link from boston to denver that goes through detroit, R cannot be used
directly to answer this. In the language of relations, R is not transitive, so it does not contain all the pairs that can be
linked.
• We can find all pairs of data centers that have a link by contructing a transitive closure.
Tahsin Aziz 64
65. EQUIVALENCE RELATIONS
• A relation on a set A is called an equivalence relation if it is reflexive, symmetric, and transitive.
• Two elements 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.
• Suppose an equivalence relation is transitive, if a and b are equivalent and b and c are equivalent, it
follows that a and c are equivalent.
• Example
• = in general algebra
• ≡ in propositional calculus
Tahsin Aziz 65
66. EQUIVALENCE RELATIONS
• Suppose that R is the relation on the set of strings of English letters such that aRb if and
only if l(a) = l(b), whenever l(x) is the length of the string x. Is R an equivalence relation?
• Solution:
• Let a is a string and aRa which means l(a) = l(a), it follows that R is reflexive.
• Suppose that aRb, then l(a) = l(b). Again let bRa, then l(b) = l(a). Therefore, R is symmetric.
• Let aRb and bRc, then l(a) = l(b) and l(b) = l(c) which imply that l(a) = l(c) that means aRc.
Therefore, R is transitive.
• Because R is reflexive, symmetric, and transitive, it is an equivalence relation.
Tahsin Aziz 66
67. EQUIVALENCE RELATIONS
• Prove that, “=” is an equivalence relation.
• Solution:
• It is true for a = a. So “=” is reflexive.
• Suppose a = b, then it is also true for b = a. Therefore, “=” is symmetric.
• Suppose a = b and b = c, which show that a = c. So “=” is transitive.
• Because “=” is reflexive, symmetric, and transitive, it is an equivalence relation.
Tahsin Aziz 67
68. EQUIVALENCE RELATIONS
• Congruence Modulo
• If a and b are two integers and m is an positive integer, then a is congruent to b modulo m if
m divides a − b.
• We use the notation a ≡ b (mod m) to indicate that a is congruent to b modulo m.
• If a and b are not congruent to modulo m, we write a ≢ b (mod m)
• Example: Whether 17 is congruent to 5 modulo 6.
• 17 ≡ 5 (mod 6), 17 − 5 =12 which is divided by 6.
• So we can say 17 is congruent to 5 modulo 6.
Tahsin Aziz 68
69. EQUIVALENCE RELATIONS
• Congruence modulo m, let m be an integer with m > 1. Show that the relation R = {(a, b) | a ≡ b (mod m)} is
an equivalence relation on the set of integers.
• Solution:
• We know a ≡ b (mod m) if and only if m divides a − b.
• Here a − a = 0 is divisible by m. Hence a ≡ a (mod m), so congruence modulo m is reflexive.
• Next, suppose that a ≡ b (mod m). Then m divides a − b. So a − b = km, where k is an integer. We can write a = b + km. It
follows that b − a = (−k)m means b = a + (-k)m. So b ≡ a (mod m). Hence, congruence modulo m is symmetric.
• Again, suppose that a ≡ b (mod m) and b ≡ c (mod m). Then m divides both a − b and b − c. Therefore, there are integers
k and l with a − b = km and b − c = lm. So we can write a = b + km and c = b - lm. Subtracting c from a we obtain, a - c =
b + km – b + lm. Which equals to km + lm = (k + l)m. Here (k + l) is an integer. Thus, a ≡ c (mod m). Therefore,
congruence modulo m is transitive.
• It follows that congruence modulo m is an equivalence relation.
Tahsin Aziz 69
70. EQUIVALENCE CLASSES
• 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, the subscript R is often deleted and [a] is
used to denote the equivalence class.
• These classes are disjoint.
Tahsin Aziz 70
71. EQUIVALENCE CLASSES
• If R is an equivalence relation on a set A, the equivalence class of the element a is
• [a]R = {s | (a, s) ∈ R}.
• If b ∈ [a]R, then b is called a representative of this equivalence class.
• Any element of a class can be used as a representative of this class. That is, there is
nothing special about the particular element chosen as the representative of the class.
Tahsin Aziz 71
72. EQUIVALENCE CLASSES
• Example
• We can group all the numbers that are equivalent to each other.
• 0 ≡ 2 ≡ 4 ≡ …………(mod 2) and 1 ≡ 3 ≡ 5 ≡ …………(mod 2)
• We can write as
• [0] = {0, 2, 4, ………..} and [1] = {1, 3, 5, ………..}
• [0] and [1] is known as equivalence class.
• 0, 1 are representatives of these equivalence class.
Tahsin Aziz 72
73. EQUIVALENCE CLASSES
• Consider the relation R = {(a, b) | a ≡ b (mod 2)}. Now find out the equivalence classes from it.
Or,
• What are the equivalence classes of 0 and 1 for congruence modulo 2?
• Solution:
• The equivalence class of 0 contains all integers a such that a ≡ 0 (mod 2). The integers in this class are those
divisible by 2. Hence, the equivalence class of 0 for this relation is [0]={……., −4, −2, 0, 2, 4, …….}.
• The equivalence class of 1 contains all the integers a such that a ≡ 1 (mod 2). The integers in this class are those
that have a remainder of 1 when divided by 2. Hence, the equivalence class of 1 for this relation is [1]={……, -5,
−3, −1, 1, 3, 5, ,…….}.
Tahsin Aziz 73
74. EQUIVALENCE CLASSES
• If R is an equivalence relation on a set A then there are A1, A2, A3,……. such that
• Ai ⊆ A
• ∀ 𝑎, 𝑏 ∈ 𝐴𝑖
𝑎𝑅𝑏
• Ai ∩ Aj = ∅, when i ≠ j
• A1 ∪ A2 ∪ A3 ∪ ……….. = A
• Here, Ai is an equivalence class. {A1, A2, A3,……. } is a partition of A. e, for e ∈ Ai is a
representative of Ai
• Representative of different classes are not equivalent to each other.
• An equivalence relation on A partitions A into disjoint non- empty sets.
Tahsin Aziz 74
75. PARTITIONS
• Consider the relation r = {(a, b)| a ≡ b mod 2}.
• This splits the integers into two equivalence classes: even numbers and odd numbers.
• These two sets together form a partition of the integers.
• A partition of a set is a collection of non-empty disjoint subsets of S whose union in S.
• In this example, the partition is {[0], [1]} or {{….., -3, -1, 1, 3,…..}, {….., -4, -2, 0, 2, 4,…..}}
• We have partitioned Z into equivalence classes [0] and [1], under the relation of
congruence modulo 2 = set of integers = {….., -4, -3, -2, -1, 0, 1, 2, 3, 4,…..}
Tahsin Aziz 75
76. ORDER OF RELATION
• Partial order:
• A binary relation R on a set is a partial order if and only if it is reflexive, antisymmetric and
transitive.
• Total order:
• A binary relation R on a set A is a total order if and only if it is a partial order and for any pair of
elements a and b of A, (a, b) ∈ R or (b, a) ∈ R.
• That is every element is related with every element one way or the other.
• A total order is also called a linear order.
• Quasi order:
• A binary relation R on a set A is a quasi order if and only if it is irreflexive and transitive.
Tahsin Aziz 76