Вы находитесь на странице: 1из 27

# | 

 
   
Prepared By:
Mr. Richard R. Basilio
BSECE
ë  
° Relation
° Digraph
° Properties of Relation
° Equivalence Relations
° Functions

 
° ët is any set of ordered pairs (x, y).
° ët can be thought of as a table that list the relationship of
element to other element.
° Example: Table 1

j  
Bill CompSci
Mary Math
Bill Art
Beth History
Dave Math

 
° A (binary) relation R from a set X to a set Y is a subset of the
cartesian product X x Y.
° ëf (x, y) - R, we write xRy and say that x is related to y.
° ën case that x=y, we call a binary relation
° |
  
° The set of values of x, where:
{ x - - R for some y - Y
° 
  
° The values of y, where:
{ y - - R for some x - X
 

° For example 1 from Table 1
The domain, x = { Bill, Mary, Beth, Dave}
The range, y = { CompSci, Math, Art, History}
The relation, R = { (Bill, CompSci), (Mary, Math), (Bill, Art),
(Beth, History), (Dave, Math) }
° Example 2: Given x = {2,3,4} and y = {3,4,5,6,7}
Find R (relation) from x to y by (x, y) - R, if x divides y
with no remainder.
R = {(2,4), (2,6), (3,3), (3,6), (4,4)}
| 
° ët is an informative way to picture a relation on set.
° ët is only a connection with relation.
How to make a digraph?
1. First, draw a dots or vertices to represent the elements of x.
2. ëf the element (x, y) is in the relation, we draw an arrow
(called direct edge) from x to y.
3. ëf the element (x, x) in the relation corresponds to directed
edge from x to x. ët is called loops.
° Example: Given the vertices x = {1,2,3,4}, draw the digraph
of this relation;
R = {(1,1), (1,2), (1,3), (1,4), (2,2), (2,3), (2,4)
(3,3), (3,4), (4,4)}
2   
 
°    

° A relation R on a set x is called reflexive if (x, x) - R for
every x -
° The digraph of a reflexive relation has a loop at every
vertex.
° j    

° A relation R on a set x is called symmetric if for all
(x, y) - X, if (x, y) - R then (y, x) - R
° The digraph of a symmetric relation has the property
that whenever there is a directed edge form a to b,
there is also directed edge from b to a.
2   
 
° º     

° A relation R on a set X is called antisymmetric if for all x, y - X, if
(x, y) - R and X not equal to y, then (y, x) - R
° The digraph of an antisymmetric relations has the property that
between any two vertices there is at most direct edge.
° u
  

° A relation R on a set X is called transitive if for all x, y, z - X,
if (x, y) and (y, z) - R, then (x, z) - R.
° The digraph of a transitive relation has the property that
whenever there are direct edges from x to y and y to z, there is
also direct edge from x to z.
2   
 
° 2

  

° A relation R on set X is called a partial order if R is reflexive,
antisymmetric and transitive.
° The relation R defined on the set of integer by:
(x, y) - R, if x ч y
° ote:
° ëf R is partial order on a set X, the notation x ч y is sometimes used to
indicate that (x, y) - R.
° ëf x, y - X and either x ч y or y ч x, we say that x and y are
 


° ëf every x, y - X and x is not ч y and y is not ч x, we say that x and y
are  


° ëf every pair of elements in x is comparable, we call R a 
 
2   
 
° ënverse Relation
° Let R be a relation from x to y. The inverse of R, denoted by R-1 is
the relation from y to x defined by:
R-1 = { (y, x) | (x, y) - R }
° Example: Given R = {(2,4),(2,6),(3,3),(3,6),(4,4)}
R-1 = {(4,2),(6,2),(3,3),(6,3),(4,4)}
° Composition of Relation
° Let R1 be a relation from x to y and R2 be a relation from y to z.
The composition of R1 and R2. Denote by:
R2 R1 = { (x, y) | (x, y) - R1 and (y, z) - R2 for some y - Y }
° Example: The composition of relation
R1 = {(1,2),(1,6),(2,4),(3,4),(3,6),(3,8)}
R2 = {(2,u),(4,s),(4,t),(6,t),(8,u)}
Ans: R2 R1 = {(1,u),(1,t),(2,s),(2,t),(3,s),(3,t),(3,u)}
 
 
° Theorem:
° Let be a partition of a set X, defined by xRy to mean
that for some set S in , both x and y belong to S, then
R is reflexive, symmetric and transitive. This is the
principle of equivalence relation.
° Partition ʹ it can be used to defined the relation. We defined
a partition of a set X to be a collection set of nonempty
subset of X such that every element in X belongs to exactly
one member of set .
° Where: is collection of set.
° Example:
= { {1,2,3}, {2,3}, {4,5,6} }
 
 
° Example: Define X = { 1, 2, 3, 4, 5, 6 }
= { {1, 3, 5}, {2, 6}, {4} }, write the complete relations
and draw the digraph.
R = { (1,1), (1,3), (1,5), (3,1), (3,3), (3,5), (5,1), (5,3),
(5,5), (2,2), (2,6), (6,2), (6,6), (4,4) }
° Example 2: Determine whether the given relation is an
equivalence relation. List all the collection of set.
R = {(1,1), (2,2), (3,3), (4,4), (5,5), (1,3), (3,1)}
Answer: = { {1,3}, {2}, {4}, {5} }
 ë
° Theorem of Partition
° Let R be an equivalence relation on a set X. For each aX, let:
[a] = { x - X | xRa }, then
= { [a] | aX } is a 
 
° The sets [a] defined in theorem of partition are called the
 
 
 of X given by the relation R.
° Example: List all the equivalence classes of a given relation.
R = { (1,1), (1,3), (1,5), (2,2), (2,4), (3,1), (3,3), (3,5), (4,2),
(4,4), (5,1), (5,3), (5,5) }
° Answer: = { {1,3,5}, {2,6}, {4} }
==={1,3,5}
=={2,6}
={4}
 ë
° Theorem:
° Let R be an equivalence relation on finite set X. ëf each
equivalence class has r elements, there are |X|/r equivalence
classes.
° Example: Find the equivalence classes by the given relation.
R = { (1,1), (1,3), (1,5), (2,2), (2,4), (3,1), (3,3), (3,5), (4,2),
(4,4), (5,1), (5,3), (5,5) }
{(1,1),(1,3),(1,5),(3,1),(3,3),(3,5),(5,1),(5,3),(5,5)} = {1,3,5}
Equivalence classes = |9|/3 = 3
{(2,2),(2,4),(4,2),(4,4)} = {2,4}
Equivalence classes = |4|/2 = 2
Ô 
° rne of the most important concepts in mathematics is a
function.
° ët is a special kind of relation.
° ët is a relationship between two sets.
° Definition:
° A function f : XY is a relation from x to y satisfy the following
properties.
° The domain of function F is X.
° ëf (x, y), (x, y͛) - f, then y = y͛
° Example:
f = { (1,a), (2, b), (3,c) }
Ô 
° A  
 a number in one set to a number in one set
to a number in another set.
° A function maps values to one and only one value. Two value
in one set could map to one value, but one value must never
map to two function, that would be a relation, not a function.
° Example:
f(x) = x2
f(-1) = 1
f(1) = 1
f(7) = 49
f(1/2) = ¼
f(4) = 16
 

°
u  Ô 
° Let A and B be non-empty set, then the function:
f : A x B B
° Example
From set A
f(happy, good) = happy
f(angry, good) = angry
ë
  Ô 
°
  Ô 
° Given two function Y1 = f(x) and Y2 = g(x); then
r
  
Sum of two function Y1 + Y2 = f(x) + g(x) = (f+g)(x)
Difference of two function Y1 - Y2 = f(x) - g(x) = (f-g)(x)
Product of two function Y1 * Y2 = f(x) * g(x) = (f*g)(x)
Quotient of two function Y1 / Y2 = f(x) / g(x) = (f/g)(x)

° Example 1
Given f(x) = x2 + 1 and g(x) = x2 ʹ x
Find: f(x) + g(x) f(x) - g(x)
f(x) * g(x) f(x) / g(x)
 Ô 
° A function f from X to Y is said to be one-to-one (or  )
if for each y - Y there is at most one x - X with f(x) = y.
° f is a one-to-one function from A to B if no two distinct
elements have the same images. ëf images are equal then the
pre-images must also be equal.
 ()   () then   .

## r        

 Ô 
° ëf f is a function from X to Y and the range of f is Y, f is said to
be onto Y (or  )
° A function  from º to is called   if for all  in there is
an  in º such that  ()  .
° All elements in are used.

r     r   
á  Ô 
° Functions can be   one-to-one and onto.
° Bijections are functions that are both injective and surjective.

       r 

## ° Example: Given a function f = {(1,a), (2,c), (3,b) } from

X = { 1, 2, 3 } and Y = { a, b, c }, therefor it is bijective
ëÔ 
° Recall that the inverse relation is created by inverting all the
ordered pairs that comprise the original relation.
° Thus, the inverse relation is a function form Y to X that
denoted by f-1 .
{ (y, x) | (x, y) - f }
° When is the inverse of a function itself a function?
ëÔ 
° Theorem: ëf f: X  Y is one-to-one and onto, the f-1 is one-
to-one and onto function.
° Example 1: Given the f ={ (1,a), (2,c), (3,b) }. What is f-1 ?
Answer: f-1 = { (a,1), (c,2), (b,3) }
° Example 2: Given by f(x) = 4x -1. what is inverse function?
Solution: Swap x and y and solve for y:
ë
    Ô 
° Supposed that g is a function from X to Y and f is a function
from Y to Z.
° The resulting from X to Z is called composition of f with g.
° Denoted by f g
° Example: Given by the set X = {1, 2, 3} to Y = {a, b, c} of
g={(1,a), (2,a), (3,c)} and Y to Z = {x, y, z} of
f = {(a,y), (b,x), (c,z)}. Write the f g