Unit III - Relations
Unit III - Relations
Relations
RELATIONS
Introduction
The elements of a set may be related to one another. For example, in the set of natural
numbers there is the ‘less than’ relation between the elements. The elements of one set may
also be related to the elements another set.
Binary Relation
A binary relation between two sets A and B is a rule R which decides, for any
elements, whether a is in relation R to b. If so, we write a R b. If a is not in relation R to b, then
we shall write a /R b.
We can also consider a R b as the ordered pair (a, b) in which case we can define a binary
relation from A to B as a subset of A X B. This subset is denoted by the relation R.
For example, the relation of father to his child is F = {(a, b) / a is the father of b} In this relation
F, the first member is the name of the father and the second is the name of the child.
The definition of relation permits any set of ordered pairs to define a relation.
For example
For the relation S = {(1, 2), (3, a), (b, a) ,(b, Joe)}
D(S) = {1, 3, b, b} and
R(S) = {2, a, a, Joe}
Let X and Y be any two sets. A subset of the Cartesian product X * Y defines a relation, say C.
For any such relation C, we have D( C ) Í X and R( C) Í Y, and the relation C is said to from X
to Y. If Y = X, then C is said to be a relation form X to X. In such case, c is called a relation in
X. Thus any relation in X is a subset of X * X . The set X * X is called a universal relation in
X, while the empty set which is also a subset of X * X is called a void relation in X.
For example
Let L denote the relation “less than or equal to” and D denote the relation
“divides” where x D y means “ x divides y”. Both L and D are defined on the
set {1, 2, 3, 4}
L = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4,
4)} D = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}
L Ç D = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4,
4)} = D
The relations <, £, >, ³ and = are transitive in the set of real numbers
The relations Í, Ì, Ê, É and equality are also transitive in the family of sets.
The relation of similarity in the set of triangles in a plane is transitive.
For example
For example
For example
Problem1: Let us consider the set T of triangles in a plane. Let us define a relation
R in T as R= {(a, b) / (a, b Є T and a is similar to b}
We have to show that relation R is an equivalence relation
Solution :
Problem3 Let Z be the set of all integers. Let m be a fixed integer. Two integers a and
b are said to be congruent modulo m if and only if m divides a-b, in which case we write a º
b (mod m). This relation is called the relation of congruence modulo m and we can show that is
an equivalence relation.
Solution :
m divides b -
a b º a (mod
m) b R a
that is R is symmetric.
Equivalence Classes:
Let R be an equivalence relation on a set A. For any a ЄA, the equivalence class generated by a
is the set of all elements b Є A such a R b and is denoted [a]. It is also called the R –
equivalence class and denoted by a Є A. i.e., [a] = {b Є A / b R a}
Let Z be the set of integer and R be the relation called “congruence modulo
3” defined by R = {(x, y)/ xÎ Z Ù yÎZ Ù (x-y) is divisible by 3}
Then the equivalence classes are
[0] = {… -6, -3, 0, 3, 6, …}
[1] = {…, -5, -2, 1, 4, 7, …}
[2] = {…, -4, -1, 2, 5, 8, …}
Composition of binary relations:
Definition
Let R be a relation from X to Y, a relation R from Y to X is called the converse of R,
where the ordered pairs of Ř are obtained by interchanging the numbers in each of the
ordered pairs of R. This means for x Î X and y Î Y, that x R y ó y Ř x.
Then the relation Ř is given by R = {(x, y) / (y, x) Î R} is called the converse
of R Example:
Let R = {(1, 2),(3, 4),(2, 2)}
Then Ř = {(2, 1),(4, 3),(2, 2)}
Thus, R+ = R U R2 U R3 U R4 U…
= R U R2 U R3.
={(a, b),(b, c),(c, a),(a, c),(b, a),(c ,b),(a, b),(b, b),(c, c)}
Definition
A binary relation R in a set P is called partial order relation or partial ordering in P
iff R is reflexive, anti symmetric, and transitive.
A partial order relation is denoted by the symbol £., If £ is a partial ordering on P,
then the ordered pair (P, £) is called a partially ordered set or a poset.
Let R be the set of real numbers. The relation “less than or equal to ” or
O , is a partial ordering on R.
Let X be a set and r(X) be its power set. The relation subset, Í on X is partial ordering.
Let Sn be the set of divisors of n. The relation D means “divides” on Sn ,is partial
ordering on Sn .
If x < y but y does not cover x, then x and y are not connected directly by a single line.However,
they are connected through one or more elements of P.
Hasse Diagram:
A Hasse diagram is a digraph for a poset which does not have loops and arcs implied by the
transitivity.
Example 10: For the relation {< a, a >, < a, b >, < a, c >, < b, b >, < b, c >, < c, c >} on set {a,
b,c}, the Hasse diagram has the arcs {< a, b >, < b, c >} as shown below.
Ex: Let A be a given finite set and r(A) its power set. Let Í be the subset relation on the
elements of r(A). Draw Hasse diagram of (r(A), Í) for A = {a, b, c}
Functions
Introduction
A function is a special type of relation. It may be considered as a relation in which each
element of the domain belongs to only one ordered pair in the relation. Thus a function from A
to B is a subset of A X B having the property that for each a ЄA, there is one and only one
b Є B such that (a, b) Î G.
Definition
Let A and B be any two sets. A relation f from A to B is called a function if for every a Є A
there is a unique b Є B such that (a, b) Є f .
Note that the definition of function requires that a relation must satisfy two additional
conditions in order to qualify as a function.
The first condition is that every a Є A must be related to some b Є B, (i.e) the domain of
f must be A and not merely subset of A. The second requirement of uniqueness can be
expressed as (a, b) Є f ٨ (b, c) Є f => b = c
Intuitively, a function from a set A to a set B is a rule which assigns to every element of A, a unique
element of B. If a ЄA, then the unique element of B assigned to a under f is denoted by f
(a).The usual notation for a function f from A to B is f: A® B defined by a ® f (a) where a Є
A, f(a) is called the image of a under f and a is called pre image of f(a).
Definition: A mapping f: R® b is called a constant mapping if, for all aÎA, f (a) =
b, a fixed element.
For example f: Z®Z given by f(x) = 0, for all x ÎZ is a constant mapping.
Definition
A mapping f: A®A is called the identity mapping of A if f (a) = a, for all aÎA. Usually it
is denoted by IA or simply I.
Composition of functions:
If f: A®B and g: B®C are two functions, then the composition of functions f and g, denoted
by g o f, is the function is given by g o f : A®C and is given by
g o f = {(a, c) / a Є A ٨ c Є C ٨ $bÎ B ': f(a)= b ٨ g(b) =
c} and (g of)(a) = ((f(a))
Example 2: Let f(x) = x+2, g(x) = x – 2 and h(x) = 3x for x Î R, where R is the set of real
numbers.
Then f o f = {(x, x+4)/xÎ R} f
o g = {(x, x)/ x Î X} g
o f = {(x, x)/ xÎ X}
g o g = {(x, x-4)/x Î X}
h o g = {(x,3x-6)/ x Î X} h
o f = {(x, 3x+6)/ x Î X}
Inverse functions:
Let f: A® B be a one-to-one and onto mapping. Then, its inverse, denoted by f -1 is given by f -
1 = {(b, a) / (a, b) Î f} Clearly f-1: B® A is one-to-one and onto.
Theorem: Let f: X ®Y and g: Y ® Z be two one to one and onto functions. Then gof is also one
to one and onto function.
Proof
Let f:X ® Y g : Y ® Z be two one to one and onto functions. Let x1, x2 Î X
g o f (x1) = g o f(x2),
g (f(x1)) = g(f(x2)),
g(x1) = g(x2) since [f is 1-1]
x1 = x2 since [ g is 1-1}
so that gof is 1-1.
Proof.
f: A ® B is one to one and onto.
g: B ® C is one to one and onto.
gof: A ® C is also one to one and onto. Þ
(gof) -1: C ® A is one to one and onto.
Let a Î A, then there exists an element b Î b such that f (a) = b Þ a = f-1
(b). Now b Î B Þ there exists an element c Î C such that g (b) = c Þ b = g -
1(c). Then (gof)(a) = g[f(a)] = g(b) = c Þ a = (gof) -1(c). …….(1)
(f -1 o g-1) (c) = f -1(g -1 (c)) = f -1(b) = a Þ a = (f -1 o g -1)( c )
….(2) Combining (1) and (2), we have
(gof) -1 = f -1 o g -1
Recursive Functions:
The term "recursive function" is often used informally to describe any function that is defined
with recursion. There are several formal counterparts to this informal definition, many of which
only differ in trivial respects.
Kleene (1952) defines a "partial recursive function" of nonnegative integers to be any function that
is defined by a noncontradictory system of equations whose left and right sides are composed from
(1) function symbols (for example, , , , etc.), (2) variables for nonnegative integers (for example,
, , , etc.), (3) the constant 0, and (4) the successor function .
For example,
(1)
(2)
(3)
(4)
Note that the equations might not uniquely determine the value of for every possible input, and
in that sense the definition is "partial." If the system of equations determines the value of f for
every input, then the definition is said to be "total." When the term "recursive function" is used
alone, it is usually implicit that "total recursive function" is intended. Note that some authors use
the term "general recursive function to mean partial recursive function, although others use it to
mean "total recursive function."
The set of functions that can be defined recursively in this manner is known to be equivalent to
the set of functions computed by Turing machines and by the lambda calculus.
Introduction:
A lattice is partially ordered set (L, £) in which every pair of elements a, b ÎL has a
greatest lower bound and a least upper bound.
The glb of a subset, {a, b} Í L will be denoted by a * b and the lub by a Å b.
.
Usually, for any pair a, b Î L, GLB {a, b} = a * b, is called the meet or product and LUB{a,
b} = a Å b, is called the join or sum of a and b.
Example1 Consider a non-empty set S and let P(S) be its power set. The relation Í
“contained in” is a partial ordering on P(S). For any two subsets A, BÎ P(S)
GLB {A, B} and LUB {A, B} are evidently A Ç B and A È B respectively.
Example2 Let I+ be the set of positive integers, and D denote the relation of “division” in
I+ such that for any a, b Î I+ , a D b iff a divides b. Then (I+, D) is a lattice in which
the join of a and b is given by the least common multiple(LCM) of a and b, that is,
a Å b = LCM of a and b, and the meet of a and b, that is , a * b is the greatest common divisor
(GCD) of a and b.
Two lattices can have the same diagram. For example if S = {1, 2, 3} then (p(s), Í ) and (S6,D)
have the same diagram viz. fig(1), but the nodes are differently labeled .
We observe that for any partial ordering relation £ on a set S the
converse relation ³ is also partial ordering relation on S. If (S, £) is a lattice
With meet a * b and join a Å b , then (S, ³ ) is the also a lattice with meet
a Å b and join a * b i.e., the GLB and LUB get interchanged . Thus we have
the principle of duality of lattice as follows.
Any statement about lattices involving the operations ^ and V and the relations £ and ³
remains true if ^, V, ³ and £ are replaced by V, ^, £ and ³ respectively.
The operation ^ and V are called duals of each other as are the relations £ and ³.. Also, the
lattice (L, £) and (L, ³) are called the duals of each other.
Properties of lattices:
Let (L, £) be a lattice with the binary operations * and Å then for any a, b, c Î L,
For any a ÎL, a £ a, a £ LUB {a, b} => a £ a * (a Å b). On the other hand,
GLB {a, a Å b} £ a i.e., (a Å b) Å a, hence a * (a Å b) = a
Theorem 1
Let (L, £) be a lattice with the binary operations * and Å denote the operations of meet and join
respectively For any a, b Î L,
a£bóa*b=aóaÅb=b
Proof
Let us assume a * b = a.
Now (a * b) Å b = a Å b
We know that by absorption law , (a * b) Å b = b
so that a Å b = b, therefore a * b = a Þ a Å b = b (5)
similarly, we can prove a Å b = b Þ a * b = a (6)
From (5) and (6), we get
a*b=aÛaÅb=b
Hence the theorem.
Algebraic systems:
An algebraic system, loosely speaking, is a set, together with some operations on the set. Before
formally defining what an algebraic system is, let us recall that a n -ary operation (or operator)
on a set A is a function whose domain is An and whose range is a subset of A . Here, n is a non-
negative integer. When n=0 , the operation is usually called a nullary operation, or a constant,
since one element of A is singled out to be the (sole) value of this operation. A finitary operation
on A is just an n -ary operation for some non-negative integer n .
A prototypical example of an algebraic system is a group, which consists of the underlying set G
, and a set O consisting of three operators: a constant e called the multiplicative identity, a unary
operator called the multiplicative inverse, and a binary operator called the multiplication.
Remarks.
An algebraic system is also called algebra for short. Some authors require that A be non-empty.
Note that A is automatically non-empty if O contains constants. A finite algebra is an algebra
whose underlying set is finite.
By definition, all operators in an algebraic system are finitary. If we allow O to contain infinitary
operations, we have an infinitary algebraic system. Other generalizations are possible. For
example, if the operations are allowed to be multivalued, the algebra is said to be a multialgebra.
If the operations are not everywhere defined, we get a partial algebra. Finally, if more than one
underlying set is involved, then the algebra is said to be many-sorted.
The study of algebraic systems is called the theory of universal algebra. The first important thing
in studying algebraic system is to compare systems that are of the same ``type''. Two algebras are
said to have the same type if there is a one-to-one correspondence between their operator sets
such that an n -ary operator in one algebra is mapped to an n -ary operator in the other algebra.
Examples:
N is a pointed unary system, and under addition and multiplication, is both the standard
interpretation of Peano arithmetic and a commutative semiring.
Boolean algebras are at once semigroups, lattices, and rings. They would even be abelian
groups if the identity and inverse elements were identical instead of complements.
Group-like structures
General Properties:
Property of Closure
If we take two real numbers and multiply them together, we get another real number. (The real
numbers are all the rational numbers and all the irrational numbers.) Because this is always true,
we say that the real numbers are "closed under the operation of multiplication": there is no way
to escape the set. When you combine any two elements of the set, the result is also included in
theset.
Real numbers are also closed under addition and subtraction. They are not closed under the
square root operation, because the square root of -1 is not a real number.
Inverse
The inverse of something is that thing turned inside out or upside down. The inverse of an
operation undoes the operation: division undoes multiplication.
A number's additive inverse is another number that you can add to the original number to get the
additive identity. For example, the additive inverse of 67 is -67, because 67 + -67 = 0, the
additive identity.
Similarly, if the product of two numbers is the multiplicative identity, the numbers are
multiplicative inverses. Since 6 * 1/6 = 1 (the multiplicative identity), the multiplicative inverse
of 6 is 1/6.
Zero does not have a multiplicative inverse, since no matter what you multiply it by, the answer
is always 0, not 1.
Equality
The equals sign in an equation is like a scale: both sides, left and right, must be the same in order
for the scale to stay in balance and the equation to be true.
The addition property of equality says that if a = b, then a + c = b + c: if you add the same
number to (or subtract the same number from) both sides of an equation, the equation continues
to be true.
The multiplication property of equality says that if a = b, then a * c = b * c: if you multiply (or
divide) by the same number on both sides of an equation, the equation continues to be true.
The reflexive property of equality just says that a = a: anything is congruent to itself: the equals
sign is like a mirror, and the image it "reflects" is the same as the original.
In the previous section, we have seen several algebraic system with binary operations.
Here we consider an algebraic system consisting of a set and an associative binary operation on
the set and then the algebraic system which possess an associative property with an identity
element. These algebraic systems are called semigroups and monoids.
Semi group
Let S be a nonempty set and let * be a binary operation on S. The algebraic system (S, *) is
called a semi-group if * is associative
i.e. if a * (b*c) = (a * b) * c for all a, b, c Î S.
Example The N of natural numbers is a semi-group under the operation of usual addition of
numbers.
Monoids
Let M be a nonempty set with a binary operation * defined on it. Then (M, * ) is called a
monoid if
* is associative
a * e = e * a = a for all a Î M
e is called the identity element in (M,*).
It is easy to prove that the identity element is unique. From the definition it follows that (M,*) is
a semigroup with identity.
Example1 Let S be a nonempty set and r(S) be its power set. The algebras (r(S),U) and (r(S), Ç )
are monoids with the identities f and S respectively.
Example2 Let N be the set of natural numbers, then (N,+), (N, X) are monoids with the
identities 0 and 1 respectively.
From the definition it follows that (G,*) is a monoid in which each element has an inverse w.r.t.
* in G.
The order of a group (G,*) is the number of elements of G, when G is finite and is denoted
by o(G) or |G|
Let (S, *) and (T, D) be any two semigroups. A mapping g: S ® T such that any
two elements a, b Î S , g(a * b) = g(a) D g(b) is called a semigroup homomorphism.
Monoid homomorphism
Let (M, *,eM) and (T, D,eT) be any two monoids. A mapping g: M® T such that any
two elements a, b Î M ,
g(a * b) = g(a) D g(b) and
g(eM) = eT
is called a monoid homomorphism.
Theorem 3 For any commutative monoid (M, *),the set of idempotent elements of M forms a
submonoid.
Isomorphism:
−1
In abstract algebra, an isomorphism is a bijective map f such that both f and its inverse f are
homomorphisms, i.e., structure-preserving mappings. In the more general setting of category
theory, an isomorphism is a morphism f: X Y in a category for which there exists an "inverse"
−1 −1 −1
f :Y X, with the property that both f f = idX and f f = idY.
Purpose:
Isomorphisms are studied in mathematics in order to extend insights from one phenomenon to
others: if two objects are isomorphic, then any property which is preserved by an isomorphism
and which is true of one of the objects, is also true of the other. If an isomorphism can be found
from a relatively unknown part of mathematics into some well studied division of mathematics,
where many theorems are already proved, and many methods are already available to find
answers, then the function can be used to map whole problems out of unfamiliar territory over to
"solid ground" where the problem is easier to understand and work with.