0% found this document useful (0 votes)
52 views5 pages

Dms Mod3

The document discusses relations and functions in discrete mathematics. It defines relations as subsets of Cartesian products between sets and describes properties like domain, range, and types of relations. It then defines functions as mappings from one set to another and describes injective, surjective and bijective functions. It also discusses composition of functions.

Uploaded by

geetha megharaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views5 pages

Dms Mod3

The document discusses relations and functions in discrete mathematics. It defines relations as subsets of Cartesian products between sets and describes properties like domain, range, and types of relations. It then defines functions as mappings from one set to another and describes injective, surjective and bijective functions. It also discusses composition of functions.

Uploaded by

geetha megharaj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

3.

RELATIONS Discrete Mathematics

Whenever sets are being discussed, the relationship between the elements of the sets is
the next thing that comes up. 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 xRy or R(x,y)) is a subset of the Cartesian
product x × y. If the ordered pair of G is reversed, the relation also changes.

Generally an n-ary relation R between sets A1, ... , and An is a subset of the n-ary product
2
A1×...×An. The minimum cardinality of a relation R is Zero and maximum is n in this case.
A binary relation R on a single set A is a subset of A × A.

For two distinct sets, A and B, having cardinalities m and n respectively, the maximum
cardinality of a relation R from A to B is mn.

Domain and Range


If there are two sets A and B, and relation R have order pair (x, y), then:

 The domain of R is the set { x | (x, y) ∈ R for some y in B }
 
The range of R is the set { y | (x, y) ∈ R for some x in A }

Examples

Let, A = {1,2,9} and B = {1,3,7}

 Case 1: If relation R is ‘equal to’ then R = {(1, 1), (3, 3)}



 Case 2: If relation R is ‘less than’ then R = {(1, 3), (1, 7), (2, 3), (2, 7)}

 Case 3: If relation R is ‘greater than’ then R = {(2, 1), (9, 1), (9, 3), (9, 7)}

Representation of Relations using Graph


A relation can be represented using a directed graph.

The number of vertices in the graph is equal to the number of elements in the set from
which the relation has been defined. For each ordered pair (x, y) in the relation R, there
will be a directed edge from the vertex ‘x’ to vertex ‘y’. If there is an ordered pair (x, x),
there will be self- loop on vertex ‘x’.

Suppose, there is a relation R = {(1, 1), (1,2), (3, 2)} on set S = {1,2,3}, it can be
represented by the following graph:

10
Discrete Mathematics

Figure: Representation of relation by directed graph

Types of Relations
1. The Empty Relation between sets X and Y, or on E, is the empty set ∅

2. The Full Relation between sets X and Y is the set X×Y


3. The Identity Relation on set X is the set {(x,x) | x ∈ X}

4. The Inverse Relation R' of a relation R is defined as: R’= {(b,a) | (a,b) ∈R} Example: If R = {(1, 2), (2,3)} then R’ will be {(2,1),
(3,2)}

5. A relation R on set A is called Reflexive if ∀a∈A is related to a (aRa holds). Example: The relation R = {(a,a), (b,b)} on set X={a,b} is
reflexive

6. A relation R on set A is called Irreflexive if no a∈A is related to a (aRa does not hold).

Example: The relation R = {(a,b), (b,a)} on set X={a,b} is irreflexive


7. A relation R on set A is called Symmetric if xRy implies yRx, ∀x∈A and ∀y∈A.

Example: The relation R = {(1, 2), (2, 1), (3, 2), (2, 3)} on set A={1, 2, 3} is
symmetric.
8. A relation R on set A is called Anti-Symmetric if xRy and yRx implies x=y ∀x ∈ A and ∀y ∈ A.

Example: The relation R = {(1, 2), (3, 2)} on set A= {1, 2, 3} is antisymmetric.

9. A relation R on set A is called Transitive if xRy and yRz implies xRz, ∀x,y,z ∈ A. Example: The relation R = {(1, 2), (2, 3), (1, 3)} on set A= {1, 2,
3} is transitive.

10. A relation is an Equivalence Relation if it is reflexive, symmetric, and


transitive.
Example: The relation R = {(1, 1), (2, 2), (3, 3), (1, 2),(2,1), (2,3), (3,2), (1,3),
(3,1)} on set A= {1, 2, 3} is an equivalence relation since it is reflexive,
symmetric, and transitive.

11
4. FUNCTIONS Discrete Mathematics

A Function assigns to each element of a set, exactly one element of a related set.
Functions find their application in various fields like representation of the computational
complexity of algorithms, counting objects, study of sequences and strings, to name a
few. The third and final chapter of this part highlights the important aspects of functions.

Function – Definition
A function or mapping (Defined as f: X→Y) is a relationship from elements of one set X to
elements of another set Y (X and Y are non-empty sets). X is called Domain and Y is called
Codomain of function ‘f’.
Function ‘f’ is a relation on X and Y s.t for each x ∈X, there exists a unique y ∈ Y such that (x,y) ∈ R. x is called pre-image and y is called image of function f.

A function can be one to one, many to one (not one to many). A function f: A→B is said
to be invertible if there exists a function g: B→A

Injective / One-to-one function


A function f: A→B is injective or one-to-one function if for every b ∈ B, there exists at most one a ∈ A such that f(s) = t.

This means a function f is injective if a1 ≠ a2 implies f(a1) ≠ f(a2).

Example
1. f: N →N, f(x) = 5x is injective.
+ + 2
2. f: Z →Z , f(x) = x is injective.
2 2 2
3. f: N→N, f(x) = x is not injective as (-x) = x

Surjective / Onto function


A function f: A →B is surjective (onto) if the image of f equals its range. Equivalently, for every b ∈ B, there exists some a ∈ A
such that f(a) = b. This means that for any y in B, there exists some x in A such that y = f(x).

Example
+ + 2
1. f : Z →Z , f(x) = x is surjective.
2 2 2
2. f : N→N, f(x) = x is not injective as (-x) = x

Bijective / One-to-one Correspondent


A function f: A →B is bijective or one-to-one correspondent if and only if f is both
injective and surjective.

12
Discrete Mathematics

Problem:
Prove that a function f: R→R defined by f(x) = 2x – 3 is a bijective function.

Explanation: We have to prove this function is both injective and


surjective. If f(x1) = f(x2), then 2x1 – 3 = 2x2 – 3 and it implies that x1 = x2.
Hence, f is injective.
Here, 2x – 3= y
So, x = (y+5)/3 which belongs to R and f(x) =
y. Hence, f is surjective.
Since f is both surjective and injective, we can say f is bijective.

Composition of Functions
Two functions f: A→B and g: B→C can be composed to give a composition g o f. This is a
function from A to C defined by (gof)(x) = g(f(x))

Example
Let f(x) = x + 2 and g(x) = 2x, find ( f o g)(x) and ( g o f)(x)

Solution
(f o g)(x) = f (g(x)) = f(2x) = 2x+2
(g o f)(x) = g (f(x)) = g(x+2) =
2(x+2)=2x+4 Hence, (f o g)(x) ≠ (g o f)(x)

Some Facts about Composition


 
 If f and g are one-to-one then the function (g o f) is also one-to-one.
 
 If f and g are onto then the function (g o f) is also onto.

Composition
 always holds associative property but does not hold commutative
property.

13
Discrete Mathematics

Part 2: Mathematical Logic

14

You might also like