0% found this document useful (0 votes)
48 views13 pages

Report Automata

The document defines relations and functions. A relation is a set of ordered pairs where the first element is from one set and the second from another. A function is a special type of relation where each element of the domain is mapped to exactly one element in the range. Functions can be one-to-one (injective), onto (surjective), or bijective (both one-to-one and onto). Equivalence relations are reflexive, symmetric, and transitive.

Uploaded by

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

Report Automata

The document defines relations and functions. A relation is a set of ordered pairs where the first element is from one set and the second from another. A function is a special type of relation where each element of the domain is mapped to exactly one element in the range. Functions can be one-to-one (injective), onto (surjective), or bijective (both one-to-one and onto). Equivalence relations are reflexive, symmetric, and transitive.

Uploaded by

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

Relations

and

Functions
Definition of Relation:

A relation on sets S and T is a set of ordered pairs (s, t), where


(a) s є S (s is a member of S )
(b) t є T
(c) S and T need not be different
(d) The set of all first elements in the “domain” of the relation,
and
(e) The set of all second elements is the “range” of the relation.

Example:

Fig.1 Sets S and T


are Disjoint
Suppose S is the set {a, b, c, d, e} and set T is {w, x, y, z}.

Then a Relation on S and T is

R = {(a, y), (c, w), (c, z), (d, y)}

The four ordered pairs in the relation is represented as


shown in Fig. 2.

Fig. 2 R = {(a, y), (c, w), (c, z), (d, y)}


Equivalence Relation

 Reflexive Relation

 Symmetric

 Transitive relation

• Examples:

• Equality (=)

• A is the set of English words, (w1, w2) ∈ R if w1 and w2 start with the

same letter

• Separates set into equivalence classes (all words that start with a, for example

• If a ∈ A, then [a] represents equivalence class that contains a.


Reflexive

A relation R  A x A is reflexive if (a, a) ∈ R for each a ∈ A. The


directed graph representing a reflexive relation has a loop from each
node to itself. Let A= { 1, 2, 3} then R= { (1, 1), (2, 2) , (3, 3) } is a
reflexive relation defined on set A

1 1
R=
2 2 {(1, 1)
(2, 2)
(3, 3)}
3 3
Symmetric

A relation R  A x A is symmetric if (b, a) ∈ R whenever (a, b) ∈ R. Let


A= { 1, 2, 3} then R= { (1, 2), (2, 1) , (2, 3) , (3, 2) } is a Symmetric relation
defined on set A
Note: if the relation is not symmetric then it is anti symmetric

1 1
R=
2 { (1,
2 2), (2,
1) , (2,
3 3 3) , (3,
2) }

Symmetric
Transitive

A binary relation R is transitive if whenever (a, b) ∈ R and (b,


c) ∈ R, then (a, c) ∈ R. The relation {(a, b) : a, b ∈ P and a is
an ancestor of b} is transitive, since if a is an ancestor of band
b is an ancestor of c, then a is an ancestor of c. So is the less-
than-or-equal relation Let A= { 1, 2, 3} then R= { (1, 2), (2, 3) ,
(1, 3) } is a transitive relation defined on set A

Example:

1 1 R= {
(1, 2),
(2, 3) ,
2 2 (1, 3) }

3 3
Functions

Suppose every element of S occurs exactly once as the first element of an


ordered pair. In Fig shown, every element of S has exactly one arrow
arising from it. This kind of relation is called a “function”.

A function is otherwise known as “Mapping”. A function is said to map an


element in its domain to an element in its range. Every element in S in
the domain, i.e., every element of S is mapped to some element in the
range. No element in the domain maps to more than one element in the
range.
Functions as relations

A function f :A B is a relation from A to B i.e., a subset of A x B,


such that each a є A belongs to a unique ordered pair (a, b) in f.

Kinds of function

(a) One-to-One Function (Injection):


A function f : A B is said to be one-to-one if different elements
in the domain A have distinct images in the range. A function f is
one-to-one if f (a) = f (a') implies a = a'.
(b) Onto function (Surjection):
A function f : A B is said to be an onto function if
each element of B is the image of some element of A. i.e., f
:AB is onto if the image of f is the entire codomain, i.e. if
f (A) = B. i.e., f maps A onto B.
(c) One-to-one onto Function (Bijection):
A function that is both one-to-one and onto is called a “Bijection”.
Such a function maps each and every element of A to exactly one
element of B, with no elements left over.

Fig. below shows bijection.


Link references:

• http://www.ioenotes.edu.np/media/notes/theory-of-computation-toc/Chapter1-i

ntroduction.pdf

• https://www.cs.usfca.edu/~galles/cs411/lecture/lecture1.pdf

You might also like