0% found this document useful (0 votes)
15 views

Module 4 Ds2

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Module 4 Ds2

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Exploring Relations Between Two Sets

ALBERT C. QUINIONES, LPT


Introduction to Set Theory
● What is a set? A collection of distinct objects, considered as an object in its
own right.
● Sets can be anything: numbers, people, letters, etc.
● Example: Set A = {1, 2, 3}, Set B = {a, b, c}
● Can you think of a set that represents your favorite things?
Defining Relations
● A relation is a connection between elements of two sets.
● It pairs elements from one set (the domain) to another (the range).
● Example: In a classroom, a relation could be "is a friend of."
● What other relations can you observe in your daily life?
Types of Relations
● One-to-One: Each element of one set is related to a unique
element of the other set.
● One-to-Many: An element of one set may be related to several
elements of the other set.
● Many-to-One: Several elements of one set may be related to a
single element of the other set.
● Many-to-Many: Elements of one set are related to many
elements of the other set, and vice versa.
● Which type of relation do you think is most common in social
networks?
Visualizing Relations with
Arrow Diagrams

● Arrow diagrams show how elements from


one set are related to elements of another
set.
● Each element is represented by a point,
and arrows indicate the relations.
● Can be used to easily identify the type of
relation.
● Let's draw an arrow diagram for the
relation "is a sibling of" in your family.
Cartesian Product

● The Cartesian product of two sets A and


B, denoted A x B, is the set of all ordered
pairs (a, b) where a is in A and b is in B.
● Example: If A = {1, 2} and B = {a, b}, then
A x B = {(1, a), (1, b), (2, a), (2, b)}.
● The Cartesian product is the foundation
for defining relations mathematically.
● How would the Cartesian product change
if set A or B had more elements?
Domain and Range
● Domain: The set of all first elements in the ordered pairs of a
relation.
● Range: The set of all second elements in the ordered pairs of a
relation.
● Example: If R = {(1, a), (2, b)}, then Domain(R) = {1, 2} and
Range(R) = {a, b}.
● Can you find the domain and range of your previous arrow
diagram?
Function as a Special Relation
● A function is a relation where each element in the domain is related to exactly
one element in the range.
● Not all relations are functions, but all functions are relations.
● Example: f(x) = x^2 is a function because each x-value has a unique y-value.
● Think of a real-world example where a function might be used.
Injective, Surjective, and Bijective Functions

● Injective (One-to-One): No two different elements in the domain map to the


same element in the range.
● Surjective (Onto): Every element in the range is mapped to by at least one
element in the domain.
● Bijective: A function that is both injective and surjective.
● Can you identify an example of each type of function in real life?
Graphing Relations
● A graph can represent the relationship between two sets.
● Points on the graph correspond to ordered pairs in the relation.
● The visual representation helps to understand the nature of the
relation.
● Try graphing the function f(x) = x + 1. What does the graph tell
you about the relation?
Inverse Relations
● An inverse relation swaps the elements in each ordered pair of the original
relation.
● If R is a relation from set A to B, then R^-1 is the inverse relation from B to A.
● For functions, the inverse function, if it exists, reverses the input-output
relationship.
● What would be the inverse relation of "is a parent of"?
Composition of Relations
● Composing two relations R and S gives a new relation where the output of R
becomes the input of S.
● Denoted as S o R, read as "S composed with R."
● For functions, (f o g)(x) means apply g to x, then apply f to the result.
● Can you think of a scenario where composition of relations might be useful?
Properties of Relations
● Reflexive: Every element is related to itself.
● Symmetric: If a is related to b, then b is related to a.
● Transitive: If a is related to b and b is related to c, then a is
related to c.
● These properties help classify relations into different categories.
● Which property do you think is most important for the relation "is
equal to"?
Equivalence Relations
● An equivalence relation is reflexive, symmetric, and transitive.
● It partitions a set into equivalence classes, where each class represents a set
of related elements.
● Example: "Has the same birthday as" is an equivalence relation among
people.
● What equivalence relations can you identify in your school?
Partial and Total Orders
● Partial Order: A relation that is reflexive, antisymmetric, and transitive.
● Total Order: A partial order where every pair of elements is comparable.
● Example of Total Order: The less than or equal to relation (≤) on the set of
real numbers.
● Can you find an example of a partial order in a library or bookstore?
Applications of Set Relations
● Database management: Relations are used to link tables based
on common attributes.
● Social networks: Understanding connections between users.
● Scheduling: Relations help in matching tasks with time slots or
resources.
● Can you propose a new application for set relations in
technology?

You might also like