Discrete Mathematics
Discrete Mathematics
DISCRETE MATHEMATICS
(I.T & Comp. Science Engg.)
SYLLABUS
B.Tech (CSE/IT, Discrete Mathematical Structures)
Unit I
Logic: Propositional equivalence, predicates and quantifiers, Methods of proofs, proof
strategy, sequences and summation, mathematical induction, recursive definitions and
structural induction, program correctness.
Unit II
Relations: Relations and their properties, n-array relations and their applications,
representing relations, closure of relations, equivalence of relations, partial orderings.
Graph theory: Introduction to graphs, graph terminology, representing graphs and graph
isomorphism, connectivity, Euler and Hamilton paths, planar graphs, graph coloring,
introduction to trees, application of trees.
Unit III
Group theory: Groups, subgroups, generators and evaluation of powers, cosets and
Lagrange's theorem, permutation groups and Burnside's theorem, isomorphism,
automorphisms, homomorphism and normal subgroups, rings, integral domains and
fields.
Unit IV
Lattice theory: Lattices and algebras systems, principles of duality, basic properties of
algebraic systems defined by lattices, distributive and complimented lattices, Boolean
lattices and Boolean algebras, uniqueness of finite Boolean expressions, prepositional
calculus. Coding theory: Coding of binary information and error detection, decoding and
error correction.
Text Books:
1) K.H. Rosen: Discrete Mathematics and its application, 5th edition, Tata McGraw
Hill.Chapter 1(1.1-1.5), Chapter 3(3.1-3.4,3.6), Chapter 4(4.1-4.3,4.5), Chapter
6(6.1,6.2,6.4-6.6) Chapter 7(7.1-7.6), Chapter 8(8.1-8.5,8.7,8.8)
2. C. L. Liu: Elements of Discrete Mathematics, 2nd edition, TMH 2000.
Chapter 11(11.1 – 11.10 except 11.7), Chapter 12(12.1 – 12.8)
3. B.Kalman: Discrete Mathematical Structure, 3rd edition, Chapter 11(11.1,11.2)
Justification of Learning the Subject:
Consider an analog clock (One with hands that continuously rotate and show time in continuous
fashion) and a digital clock (It shows time in discrete fashion). The former one gives the idea of
Continuous Mathematics whereas the later one gives the idea of Discrete Mathematics. Thus,
Continuous Mathematics deals with continuous functions, differential and integral calculus etc.
whereas discrete mathematics deals with mathematical topics in the sense that it analyzes data
whose values are separated (such as integers: Number line has gaps)
Example of continuous math – Given a fixed surface area, what are the dimensions of a cylinder
that maximizes volume?
Example of Discrete Math – Given a fixed set of characters, and a length, how many different
passwords can you construct? How many edges in graph with n vertices? How many ways to
choose a team of two people from a group of n?
This course provides some of the mathematical foundations and skills that you need in your
further study of Information Technology and Computer Science & Engineering. These topics
include: Logic, Counting Methods, Relation and Function, Recurrence Relation and Generating
Function, Introduction to Graph Theory And Group Theory, Lattice Theory and Boolean Algebra
etc.
.
Unit I
PROPOSITIONAL LOGIC AND COUNTING THEORY
OBJECTIVES:
INTRODUCTION :
All of them are propositions except (iv), (v),(ix) & (x) sentences ( i), (ii) are true,
whereas (iii),(iv), (vii) & (viii) are false.
Many propositions are composites that are, composed of sub propositions and
various connectives discussed subsequently. Such composite propositions are
called compound propositions.
The phrases or words which combine simple statements are called logical
connectives. There are five types of connectives. Namely, ‘not’, ‘and’, ‘or’, ‘if…
then’, iff etc. The first one is a unitary operator whereas the other four are binary
operators.
In the following table we list some possible connectives, their symbols &
the nature of the compound statement formed by them.
false.
P Q PQ
T T T
T F F
F T F
F F F
Example 3:
Then, P Q: In this year monsoon is very good and the rivers are flooded.
Disjunction (OR) :
P Q PQ
T T T
T F T
F T T
F F F
Example 4:
P: Paris is in France
Q236
then P Q : Paris is in France or 2 + 3 = 6.
Here, P Q is true since P is true & Q is False.
Thus, the disjunction P Q is false only when P and Q are both false.
Negation (NOT)
If P is true then P is false and if P is false then P is true. The truth table for
Negation is as follows:
P P
T F
F T
Example 5:
P Q PQ
T T T
T F F
F T T
F F T
Example 6:
Then, P Q : If you are good in Mathematics then you are good in Logic.
1) Converse: Q P
If you are good in Logic then you are good in Mathematics.
2)
Contra positive: Q P
If you are not good in Logic then you are not good in Mathematics.
3) Inverse: P Q
If you are not good in Mathematics then you are not good in Logic.
P Q PQ
T T T
T F F
F T F
F F T
Operator Precedence
1
2
3
4
5
LOGICAL EQUIVALANCE:
Compound propositions that have the same truth values in all possible
cases are called logically equivalent.
Some equivalence statements are useful for deducing other equivalence statements.
The following table shows some important equivalence.
Name Equivalence
1. Identity Laws PTP
PFP
2. Domination Laws PTT
PFF
3. Double Negation P
6. Associative Laws P Q R P Q R
P Q R P Q R
7. Distributive Laws P Q R P Q P
R P Q R P Q
8. De Morgan’s Laws P R
P Q P Q
9. Absorption Laws P Q P Q
P P Q
Q P Q Q P
Answers:
a) P Q
b) P Q
c) Q P
d) P Q
e) P Q
E.g. P Q Q R Q, P Q etc.
P Q PQ QP
T T T T T
T F F T F
F T T F F
F F T T T
Tautology:
P P PP
T F T
F T T
P P PP
T F F
F T F
Contingency:
1 2 3 4 5 6 7 8
P Q P Q PQ P Q P Q 67
T T F F T F F T
T F F T T F F T
F T T F T F F T
F F T T F T T T
We can observe that the truth values of p q and p q agree for all possible
combinations of the truth values of p and q.
It follows that p q p q is a tautology; therefore the
given compound propositions are logically equivalent.
p q p pq pq
T T F T T
T F F F F
F T T T T
F F T T T
Solution:
i) The truth table for p q p q
P q pq pq p q p
q
T T T T T
T F F T T
F T F T T
F F F F T
1 2 3 4 5 6
p q pq p q Pq 36
T T T F F F F
T F T F T F F
F T T T F F F
F F F T T T F
The entries in the last column are ‘F’. Hence p q p q is a
contradiction.
iii)
The truth table is as follows.
p q p q pq pq p q p
q
T T F F F T T
T F F T F F T
F T T F F T T
F F T T T T T
p q p q is a tautology.
iv)
The truth table is as follows.
p q q pq pq p q p q
T T F F T F
T F T T F F
F T F F T F
F F T F T F
All the entries in the last column are ‘F’. Hence it is contradiction.
v)
The truth table for p p q q
p q q pq p p q p p q
q
T T F F F T
T F T T T F
F T F T F T
F F T T F T
The last entries are neither all ‘T’ nor all ‘F’.
Contingency.
If values are assigned to all the variables, the resulting sentence is a proposition.
e.g. 1. x < 9 is a predicate
2. 4 < 9 is a proposition
Propositional Function:
The set A is called domain of P(x) and the set Tp of all elements of A for which P (a)
is true is called the truth set of P(x).
Propositional functions can be converted to proposition by two aspects
(i) By assigning exact value to the variable and (ii) using quantification.
e.g. Let A = {x / x is an integer < 8}
Here P(x) is the sentence “x is an integer less than 8”.
The common property is “an integer less than 8”.
P(1) is the statement “1 is an integer less than 8”.
P(1) is true.
Quantifiers:
The universal quantification of a predicate P(x) is the statement, “For all values
of x, P(x) is true.”
1) The sentence P(x) : - (-x) = x is a predicate that makes sense for real
Existential quantification -
The existential quantification of a predicate P(x) is the statement
“There exists a value of x for which P(x) is true.”
The e x i s t e n t i a l q u a n t i f i c a t i o n of P (x) is d e n o t e d xP(x) . The
symbol is called the existential quantifier. e.g.
Solution :
Thus, We have
v x(c(x) y(c( y) F (x, y))
Valid Argument:
We can always use a truth table to show that an argument form is valid. Arguments
b a s e d o n t a u t o l o g i e s r e p r e s e n t u n i v e r s a l l y c o r r e c t method
o f r e a s o n i n g . Their validity depends only on the form of statements
involved and not on the truth values of the variables they contain such
arguments are called rules of inference.
e.g.
Let P: “You have a current password”
Q: “You can log onto the network”.
“You have a current password” therefore: You can log onto the network” has
the form …
.
PQ
P
Q
Where is the symbol that denotes ‘therefore we know that when P & Q are proposition
variables, the statement ((P Q) P) Q is a tautology
.
So, this is valid argument and hence is a rule of inference, called modus ponens or the
law of detachment.
Example17 :
Consider the following argument and determine whether it is valid or not. Either I will
get good marks or I will not graduate. If I did not graduate I will go to USA. I get
good marks. Thus, I would not go to USA.
Solution :
Let P : I will get good marks.
Q : I will graduate.
R : I will go to USA
The given premises are
i) PVQ
ii) QR
iii) P
The conclusion is R.
What are proofs?
Methods of Proof:
There are different methods of proof as follows:
Direct method
Indirect method.
Contradiction method.
Vacuous method.
Method of induction etc
Already you have the idea about above mentioned methods. Let us discuss
method of induction.
MATHEMATICAL INDUCTION
Here we discuss another proof technique. Suppose the statement to be proved
can be put in the from P(n), n n0. where n0 is some fixed integer.
That is suppose we wish to show that P(n) is true for all integers n n0.
Solution (i)
1 + 2 + 3 + ... + n = n (n + 1) / 2
Left Side = 1
Right Side = 1 (1 + 1) / 2 = 1
1 + 2 + 3 + ... + k = k (k + 1) / 2
1 + 2 + 3 + ... + k + (k + 1) = k (k + 1) / 2 + (k + 1)
= (k + 1)(k / 2 + 1)
= (k + 1)(k + 2) / 2
The last statement may be written as
1 + 2 + 3 + ... + k + (k + 1) = (k + 1)(k + 2) / 2
Solution (ii)
Left Side = 1 2 = 1
= (k + 1) [ k (2k + 1)+ 6 (k + 1) ] /6
= (k + 1) [ 2k 2 + 7k + 6 ] /6
Now factor 2k 2 + 7k + 6.
= (k + 1) [ (k + 2) (2k + 3) ] /6
We have started from the statement P(k) and have shown that
1 2 + 2 2 + 3 2 + ... + k 2 + (k + 1) 2 = (k + 1) [ (k + 2) (2k + 3) ] /6
1 3 + 2 3 + 3 3 + ... + n 3 = n 2 (n + 1) 2 / 4
Left Side = 1 3 = 1
Right Side = 1 2 (1 + 1) 2 / 4 = 1
1 3 + 2 3 + 3 3 + ... + k 3 = k 2 (k + 1) 2 / 4
1 3 + 2 3 + 3 3 + ... + k 3 + (k + 1) 3 = k 2 (k + 1) 2 / 4 + (k + 1) 3
= (k + 1) 2 [ k 2 / 4 + (k + 1) ]
= (k + 1) 2 [ k 2 + 4 k + 4 ] / 4
= (k + 1) 2 [ (k + 2) 2 ] / 4
We have started from the statement P(k) and have shown that
1 3 + 2 3 + 3 3 + ... + k 3 + (k + 1) 3 = (k + 1) 2 [ (k + 2) 2 ] / 4
Solution (iv)
n 3 + 2 n is divisible by 3
1 3 + 2(1) = 3
3 is divisible by 3
k 3 + 2 k is divisible by 3
is equivalent to
We now consider the algebraic expression (k + 1) 3 + 2 (k + 1); expand it and group like
terms
(k + 1) 3 + 2 (k + 1) = k 3 + 3 k 2 + 5 k + 3
= [ k 3 + 2 k] + [3 k 2 + 3 k + 3]
=3M+3[k2+k+1]=3[M+k2+k+1]
Solution (v)
3n>n2
STEP 1: We first show that p (1) is true. Let n = 1 and calculate 3 1 and 1 2 and
compare them
31=3
12=1
32=9
22=4
3k>k2
Multiply both sides of the above inequality by 3
3*3k>3*k2
We now combine the above inequalities by adding the left hand sides and the
right hand sides of the two inequalities
2k2>2k+1
We now add k 2 to both sides of the above inequality to obtain the inequality
3k2>k2+2k+1
3 * k 2 > (k + 1) 2
3 * 3 k > (k + 1) 2
3 k + 1 > (k + 1) 2
Solution (vi)
n! > 2 n
STEP 1: We first show that p (4) is true. Let n = 4 and calculate 4 ! and 2 n and compare
them
4! = 24
2 4 = 16
k! > 2 k
Multiply both sides of the above inequality by k + 1
k! (k + 1)> 2 k (k + 1)
k+1>2
2 k (k + 1) > 2 * 2 k
2 k (k + 1) > 2 k + 1
(k + 1)! > 2 k + 1
We have assumed that statement P(k) is true and proved that statement P(k+1) is
also true.
The Addition Rule, states that if one can do a job by doing one or the other (but not
both) of two tasks, and there are m ways to do then first task and n ways to do the
second, then there are m+n ways to do the whole job.
Permutation Formula:
Factorial Rule: For n items, there are n! (pronounced n factorial) ways to arrange them.
Example 2:
Let’s say you have four friends, but only need to text three of them when order matters.
Find the number of ways to text your friends.
Solution:
P(4,3) = 4! 24
= = 24
(4 - 3)! 1!
There are 24 ways to test three out of your four friends if order matters.
Combination Formula:
Example 3:
The art club has 4 members. They want to choose a group of three to compete in a
regional competition. How many ways can three members be chosen?
Solution:
There are 4 ways to chose 3 people for the competition when order is not important
The pigeonhole principle (PHP):
The general rule states when there are k pigeonholes and there are k+1 pigeons, then
they will be 1 pigeonhole with at least 2 pigeons. A more advanced version of the
principle will be the following: If mn + 1 pigeons are placed in n pigeonholes, then there
In fact, we can view the problem as there are 12 pigeonholes (months of the
year) with 13 pigeons (the 13 persons). Of course, by the Pigeonhole Principle, there
will be at least one pigeonhole with 2 or more pigeons.
PRINCIPLE OF INCLUSION-EXCLUSION:
The result generalizes to three finite sets (in fact it generalizes to any finite number of
finite sets):
|A∪B∪C|=|A|+|B|+|C|–|A∩B|–|A∩C|–|B∩C|+|A∩B∩C|
Example :
In a room of 50 people whose dresses have either red or white color, 30 are wearing red dress,
16 are wearing a combination of red and white. How many are wearing dresses that have only
white color?
Solution
36 - 16 = 20
Example :
How many members of {1, 2, 3, ………….., 105} have nontrivial factors in common
with 105?
Solution
Clearly |A| = 35, |B| = 21, and |C| = 15. Furthermore, A ∩B consists of those numbers
divisible by both and 5, i.e., divisible by 15. Likewise, A ∩ C and B ∩ C contain
multiples of 21 and 35
|A U B U C| = 35 + 21 + 15 - 7- -5 - 3 + 1 = 57
Example:
At Sunnydale High School there are 28 students in algebra class,30 students in biology
class, and 8 students in both classes. How many students are in either algebra or biology
class?
Solution:
Let A denote the set of students in algebra class and B denote the set of students in
biology class. To find the number of students in either class, we first add up the students
in each class:
|A| + |B|
However, this counts the students in both classes twice. Thus we have to subtract them
once:|A ∩ B|
This shows
|AUB|=|A| + |B|-|A ∩ B|
|AUB|=28 + 30 - 8 = 50
Example:
At Sunnydale High School there are 55 students in either algebra, biology, or chemistry
class 28 students in algebra class, 30 students in biology class, 24 students in chemistry
class, 8 students in both algebra and biology, 16 students in both biology and chemistry,
5 students in both algebra and chemistry. How many students are in all three classes?
Solution:
Let A, B, C denote the set of students in algebra, biology, and chemistry class,
Respectively. Then A U BU C is the set of students in one of the three classes, A∩B is
the set of students in both algebra and biology, and so forth. To count the number of
Students in all three classes, i.e. count | A U BU C |, we can first add all the number of
However, now we've counted the students in two classes too many times. So we subtract
For students who are in two classes, we've counted them twice, then subtracted them
once, so they're counted once. But for students in all three classes, we counted them 3
times, then subtracted them 3 times. Thus we need to add them again:|A∩B∩C|
Thus
55 = 28 + 30 + 24 - 8 - 16 - 5 + |A∩B∩C|
RECURRENCE RELATION:
Example: Find recurrence relation and initial condition for the number of bit
strings of length n that do not have two consecutive 0s.
Solution: Let an denote the number of bit strings of length n that do not
contain two consecutive 0s. Number of bit strings of length one
that follow the necessary rule are: string 0 and string 1. Thus, a1
= 2. The number of bit strings of length 2 is: string 01, 10 and 11.
Thus, a2 = 3. Now we shall consider the case n 3. The bit strings
of length n that do not have two consecutive 0s are precisely those
strings length n–1 with no consecutive 0s along with a 1 added 1 at the
end of it (which is an–1 in number) and bit strings of length n–2 with
no consecutive 0s with a 10 added at the end of it (which is an–2 in
number). Thus, the recurrence relation is:
an = an–1 + an–2 for n 3 with a1 = 2 and a2 = 3.
Now, in this section we shall discuss a few methods of solving recurrence relation
and hence solve the relations that we have formulated in the previous section.
Backtracking Method:
This is the most intuitive way of solving a recurrence relation. In this method,
we substitute for every term in the sequence in the form of previous term (i.e. an
in the form of an–1, an–1 in the form of an–2 and so on) till we reach the initial condition
and then substitute for the initial condition. To understand this better, we shall
solve the recurrence relations that we have come across earlier.
Solution: Given recurrence relation is an = 1.06an–1, with a0 = 0.5. From this equation,
0.5(1.06)nfor n 0.
Method for solving linear homogeneous recurrence relations with constant
coefficients:
n
relation to look for the solution of the form an = r , where r is
n
constant. Note that, r is a solution to the linear homogeneous recurrence
relation of
degree k, if and only if;
equation are
n–k
divided by r and right side is subtracted from the left side, we
obtain an equation, known as characteristic equation of the recurrence
relation as
follows:
(i) Roots are distinct, say s1 and s2. Then, it can be shown that
a usn vsn is a solution to the recurrence relation, with
n 1 2
a us vs and a us 2 vs 2 .
1 1 2 2 1 2
(ii)
Roots are equal, say s. Then it can be shown that a n solution to the
n
2
Solution: The characteristic equation to the given recurrence relation is x
+ 3x + 2 = 0. Roots of this equation are s1 = – 2 and s2 = – 1. Hence
the solution to the relation is:
n n
bn = u(–1) + v(–2) b.1 = –2 = –u –2v and b2 = 4 = u + 4v.
Solving these two equations simultaneously, we get, u = 0 and v = 1.
n
Thus, explicit solution to the given recurrence relation is bn = (–2)
Let a0 , a1 ,...an be a sequence, and then the corresponding generating function is given
by:
A(x) = a0 x 0 a x 1 ... a x n
1 n
From a given sequence we can find the corresponding generating function and vice
versa.
Unit II
INTRODUCTION TO RELATIONS AND
GRAPH THEORY
OBJECTIVES:
INTRODUCTION :
Relationships between elements of sets occur in many
contexts. We deal with many relationships such as student’s name
and roll no., teacher and her specialization, a person and a relative
(brother – sister, mother – child etc.). In this section, we will discuss
mathematical approach to the relation. These have wide applications in
Computer science (e.g. relational algebra)
RELATIONS:
Example 1: Let A = { 1, 2, 3, 4 } and B = { x, y, z }. Let R = {(1, x), (2, x), (3, y), (3, z)}.
Then R is a relation from A to B.
Example 2: Suppose we say that two countries are adjacent if they have some part
of their boundaries common. Then, “is adjacent to”, is a relation R on the
countries on the earth. Thus, we have, (India, Nepal) R, but (Japan, Sri
Lanka) R.
Example 4: Let A be any set. Then A A and are subsets of A A and hence
they are relations from A to A. These are known as universal relation
and empty relation, respectively.
Note : As relation is a set, it follows all the algebraic operations on relations that we
have discussed earlier.
Definition : Let R be any relation from a set A to set B. The inverse of R,
–1
denoted by R , is the relation from B to A which consists of those
ordered pairs, when reversed, belong to R. That is:
–1
R = {(b, a) : (a, b) R}
Example 5:
Inverse relation of the relation in example 1 is, R–1 = {(x,), (x, 2), (y, 3), (z, 3)}.
REPRESENTATION OF RELATIONS:
Matrices and graphs are two very good tools to represent various
x y z
1 1 0 0
2 1 0 0
3 0 1 1
4 0 0 0
Fig. 1
Thus, if a R b, then we enter 1 in the cell (a, b) and 0 otherwise. Same relation can
be represented pictorially as well, as follows:
1 x
2
3 y
4
z
Fig 2
Thus, two ovals represent sets A and B respectively and we draw an arrow from
a A to b B, if a R b.
If the relation is from a finite set to itself, there is another way of pictorial representation,
known as diagraph.
R = {(1, 2), (2, 2), (2, 4), (3, 2), (3, 4), (4, 1), (4, 3)} Then, the diagraph of R is
drawn as follows:
1 2
34
Fig 3
The directed graphs are very important data structures that have
applications in Computer Science (in the area of networking).
Example 6: Let A = {1, 2, 3, 4}, B = {a, b, c, d},C = {x, y, z } and let R = {(1, a), (2, d),
(3, a), (3, b), (3, d)} and S = {(b, x), (b, z), (c, y), (d, z)}.
Pictorial representation of the relation in Example 6 can be shown as
below (Fig 4).
1 abc
2 d xy
3 z
4
Fig.4
Thus, from the definition of composite relation and also from Fig 4, RS
will be given as below.
In this section, we discuss a number of important types of relations defined from a set
A to itself.
Definition : Let R be a relation from a set A to itself. R is said to be reflexive, if for
every a A, a R a (a is related to itself).
Example 8: Let A = {a, b, c, d} and R be defined as follows: R = {(a, a), (a, c), (b, a), (b, b),
(c, c), (d, c), (d, d)}. R is a reflexive relation.
Example 9: Let A be a set of positive integers and R be a relation on it defined as,
a R b if “a divides b”. Then, R is a reflexive relation, as a
divides to itself for every positive integer a.
Note : If we draw a diagraph of a reflexive relation, then all the vertices will have a
loop. Also if we represent reflexive relation using a matrix, then all its
diagonal entries will be 1.
Definition : Let R be a relation from a set A to itself. R is said to be irreflexive,
if for every a A, a R a
Example 10: Let A be a set of positive integers and R be a relation on it defined as,
a R b if “a is less than b”. Then, R is an irreflexive relation, as a is not less than
itself for any positive integer a.
Example 11: Let A = {a, b, c, d} and R be defined as follows: R = {(a, a), (a, c), (b, a), (b,
d), (c, c), (d, c), (d, d)}.Here R is neither reflexive nor irreflexive relation as b
is not related to itself and a, c, d are related to themselves.
Note : If we draw a diagraph of an irreflexive relation, then no vertex will have a loop.
Also if we represent irreflexive relation using a matrix, then all its diagonal
entries will be 0.
Definition : Let R be a relation from a set A to itself. R is said to be symmetric, if for
a, b A, if a R b then b R a.
Example 14: An equality (or “is equal to”) is a symmetric relation on the set of
integers.
Example 15: Let A = {a, b, c, d} and R be defined as: R = {(a, b), (b, a), (a, c), (c, d),
(d, b)}. R is not symmetric, as a R c but c R a . R is not anti-symmetric, because
a R b and b R c , but a b.
.Example 16: The relation “less than or equal to ()”, is an anti- symmetric
relation.
Example 17: Relation “is less than ( < )”, defined on the set of all real numbers, is an
asymmetric relation.
Definition : Let R be a relation defined from a set A to itself. R is said to transitive, if for
a, b, c A, a R b and b R c, then a R c.
Example 18: Let A = {a, b, c, d} and R be defined as follows: R = {(a,b), (a, c), (b, d),
(a, d), (b, c), (d, c)}. Here R is transitive relation on A.
Example 19: Relation “a divides b”, on the set of integers, is a transitive relation.
Example 20: Consider the set L of lines in the Euclidean plane. Two lines in the plane
are said to be related, if they are parallel to each other. This relation is an
equivalence relation.
Example 21: Let m be a fixed positive integer. Two integers, a, b are said to be
congruent modulo m, written as: a b (mod m), if m divides a – b. The
congruence relation is an equivalence relation.
Solution :
1)
R is reflexive because a a 0 2, a A
2)
R is not irreflexive because 11 0 2
for 1 A (A is the set
of all positive integers.)
3)
R is symmetric because a b 2 b a 2 a R b b R a
4)
R is not asymmetric because 5 4 2 and we have 4 5 2
5 R 4 4 R 5
5)
R is not antisymmetric because 1 R 2 & 2 R 1 1 R 2 1 2 2 &
2 R 1 2 1 2 . But 1 2
6)
R is not transitive because 5 R 4, 4 R 2 but 5 R 2
II) A Z , a R b iff a b 2
Solution :
As per above example we can prove that R is not reflexive, R is
irreflexive, symmetric, not asymmetric, not antisymmetric & not transitive
V) A = Z a R b iff a b 1
1) R is reflexive because a a 1 a | A .
2) R is not irreflexive because 0 0 1 for .
3) R is not symmetric because for 2 5 1 does not imply 5 2 1.
4) R is not asymmetric because for (2,3) R and also (3,2) R.
5) R is not antisymmetric because 5 R 4 and 4 R 5 but 4 5 .
6) R is not transitive because (6,45) R, (5,4) R but (6,47) R.
In this section, we shall know what partitions are and its relationship
with equivalence relations.
Example 24: Let A = {1, 2, 3, 4, 5, 6}. The following sets do not form a partition of A, as
A = A1 A2 A3 but A2 A1 = {1, 2}; A2 = {3, 5}; A3 = {4, 5, 6}.
The following result shows that if P is a partition of a set A, then P can be
used to construct an equivalence relation on A.
Theorem: Let P be a partition of a set A. Define a relation R on A as a R b if and only if
a, b belong to the same block of P then R is an equivalence relation on A.
Example 25: Consider the partition defined in Example 23. Then the equivalence
relation as defined from the partition is:
R={(1, 1),(1, 2),(2, 1),(2, 2),(3, 3),(3, 5), (5, 3), (5, 5), (4, 4)}.
Now, we shall define equivalence classes of R on a set A.
Theorem: Let R be an equivalence relation on a set A and let a, b A, then a R b if and
only if R(a) = R(b), where R(a) is defined as: R(a) = {x A: a R x}. R(a) is
called as relative set of a.
Example26: If we consider an example in 25, we observe that, R(1) = R(2), R(3) = R(5).
Because R (1) = {1,2}, R (2) = {1,2}, R (3) = {3,5}, R(5) = {3,5}.
Earlier, we have seen that, a partition defines an equivalence relation. Now,
we shall see that, an equivalence relation defines a partition.
Theorem: Let R be an equivalence relation on A and let P be the collection of all distinct
relative sets R(a) for a A. Then P is a partition of A and R is equivalence
relation of this partition.
Example 27: Let A = {1, 2, 3, 4} and R = {(1, 1), (1, 2), (2, 1), (2, 2), (3,4), (4, 3), (3, 3),
(4, 4)}. We observe that R(1) = R(2) and R(3) = R(4) and hence P = { {1, 2}, {3,
4} }.
Before we proceed further, we shall have a look at a few examples of partial order
relations.
1 1 1 1 1
0 1 1 1 1
0 0 1 1 1
0 0 0 1 1
0 0 0 0 1
Example 2: Let A be a set of natural numbers and relation R be “less than or equal to
relation ()”. Then R is a partial order relation on A. For any m, n, k
N, n n (reflexive); if m n and m n, then m = n (anti-
symmetric); lastly, if m n and n k, then m k (transitive).
Definition : If R is a partial order relation on a set A, then A is called as partial order set
and it is denoted with (A, R). Typically this set is termed as poset and
the pair is denoted with (A, ).
c
d
b
e
Fig.1
Now, we shall draw Hasse diagram from the above diagrams using following rules.
(i) Drop the reflexive loops
c
d
b
e
Fig. 2
c
d
b
e
Fig. 3
(iii)Drop arrows
c
d
b
e
Fig.4
Note : In many cases, when the graphical representation is so oriented that all the arrow
heads point in one direction (upward, downward, left to right or right to left). A
graphical representation in which all the arrowheads point upwards, is known as
Hasse diagram.
Example 4: `Let A = {1, 2, 3, 4, 6, 9} and relation R defined on A be “ a divides b”. Hasse
diagram for this relation is as follows:
Note : The reader is advised to verify that this relation is indeed a partial order relation.
Further, arrive at the following Hasse diagram from the diagraph of a relation as
per the rules defined earlier.
3
2
Fig.5
1 0 1 1 1
1 1 1 1
0
MR 0 0 1 1
0
0 0 0 0 1
Solution :
4 5
1 2
is
Example 6 :
4 5
2 3
Solution :
Here A = [1, 2, 3, 4, 5)
R 1,1, 2,2, 3,3, 4,4, 5,5, 1,2, 2,4, 2,4, 1,4 , 1,3, 3,5, 1,5
1 1
1 1 1
0 1 0
0 1
M 0 0
1 0 1
R
0 0 0 1 0
0 0
0 0 1
Definition : Let (A, ) be a partially ordered set. Elements a, b A, are said to be comparable, if a b
or b a.
E.g. In example 4, 2 and 4 are comparable, whereas 4 and 9 are not
comparable.
Definition : Let (A, ) be a partially ordered set. A subset of A is said to be a chain if every two
elements in the subset are related.
Example 7: In the poset of example 4, subsets {1, 2, 4}; {1, 3, 6};{1, 2, 6} and {1, 3, 9}
are chains.
Example 8: In the poset of example 4, subsets {2, 9}; {3, 4}; {4, 6, 9}are anti-chains.
Example 9: Let A = {2, 3, 5, 7, 11, 13, 17, 19} and the relation defined on A be .
Then poset (A, ) is a chain.
CLOSURE PROPERTIES
Consider a given set A and let R be a relation on A. Let P be a property of such relations,
such as being reflexive or symmetric or transitive. A relation with property P will be called
a P-relation. The P-closure of an arbitrary relation R on A, written P (R), is a P-relation such
that
R ⊆ P (R) ⊆ S
for every P-relation S containing R. We will write
reflexive (R),symmetric(R), and transitive(R)
for the reflexive, symmetric, and transitive closures of R.
Generally speaking, P (R) need not exist. However, there is a general situation where P (R)
will always exist. Suppose P is a property such that there is at least one P-relation containing
R and that the intersection of any P-relations is again a P-relation. Then one can prove that
EXAMPLE 10 Consider the relation R = {(1, 1), (1, 3), (2, 4), (3, 1), (3, 3), (4, 3)} on the
set A = {1, 2, 3, 4}.
Then
reflexive(R) = R ∪ {(2, 2), (4, 4)} and symmetric(R) = R ∪ {(4, 2), (3, 4)}
Transitive Closure
Let R be a relation on a set A. Recall that R2= R◦R and Rn= Rn1 ◦R. We define
The following theorem applies:
Theorem : R∗ is the transitive closure of R.
Suppose A is a finite set with n elements. We show
R∗= R ∪ R2∪ . . . ∪ Rn
This gives us the following theorem:
Theorem : Let R be a relation on a set A with n elements. Then
transitive (R) = R ∪ R2∪ . . . ∪ Rn
EXAMPLE 11 Consider the relation R = {(1, 2), (2, 3), (3, 3)} on A = {1, 2, 3}.
Then:
R2= R ◦R = {(1, 3), (2, 3), (3, 3)} and R3= R2◦R = {(1, 3), (2, 3), (3, 3)}
Accordingly,
transitive (R) = {(1, 2), (2, 3), (3, 3), (1, 3)}
j k e
h
g
f
h i
b d
c
f g
a
b c e
d
a Fig. 7
Fig. 6
Definition : Let (A, ) be a poset. An element a A is called a maximal
element, if for no b A, a b, a b. E.g. In Fig. 4, j and k are maximal
elements.
Definition : Let a, b be two elements in the poset (A, ). An element c A, is said to be
an upper bound of a, b if a c and b c. E.g. In Fig 7, f1 h are upper bounds
of b and d.
Definition : Let a, b be two elements in the poset (A, ). An element c A, is said to be a
least upper bound of a, b if a c and b c and if d is an upper bound of a, b,
then c d. E.g. In Fig 2, f is a least upper bound of b and d.
Definition : Let a, b be two elements in the poset (A, ). An element c A, is said to be
a lower bound of a, b if c a and c b. E.g. In Fig 6, f, g are lower bounds
of h and i.
Definition : Let a, b be two elements in the poset (A, ). An element c A, is said to be
a greatest lower bound of a, b if c a and c b and if d is a lower bound of a,
b, then d c. E.g. In Fig 4, c is a greatest lower bound of e and g.
E.g. Fig. 6 is not a lattice, because j and k are two least upper bounds of h and i, whereas
Fig. 7 is a lattice.
Graph Theory
Graphs with Basic Terminology
The fundamental concept of graph theory is the graph, which (despite the name) is best
thought of as a mathematical object rather than a diagram, even though graphs have a
very natural graphical representation. A graph – usually denoted G(V,E) or G = (V,E) –
consists of set of vertices V together with a set of edges E. Vertices are also known as
nodes, points and (in social networks) as actors, agents or players. Edges are also
known as lines and (in social networks) as ties or links. An edge e = (u,v) is defined by
the unordered pair of vertices that serve as its end points. Two vertices u and v are
adjacent if there exists an edge (u,v) that connects them. An edge e = (u,u) that links a
vertex to itself is known as a self-loop or reflexive tie. The number of vertices in a graph
is usually denoted n while the number of edges is usually denoted m.
As an example, the graph depicted in Figure 1 has vertex set V={a,b,c,d,e.f} and edge
set E = {(a,b),(b,c),(c,d),(c,e),(d,e),(e,f)}.
e f
a b
c
Figure 1.
a 0 1 0 0 0 0
B 1 0 1 0 0 0
c 0 1 0 1 1 0
D 0 0 1 0 1 0
e 0 0 1 1 0 1
f 0 0 0 0 1 0
Examining either Figure 1 or Figure 2, we can see that not every vertex is adjacent to
every other. A graph in which all vertices are adjacent to all others is said to be
complete. The extent to which a graph is complete is indicated by its density, which is
defined as the number of edges divided by the number possible. If self-loops are
excluded, then the number possible is n(n-1)/2. If self-loops are allowed, then the
number possible is n(n+1)/2. Hence the density of the graph in Figure 1 is 6/15 = 0.40.
e f
a b
c
Figure 3.
The length of a walk (and therefore a path or trail) is defined as the number of edges it
contains. For example, in Figure 3, the path a,b,c,d,e has length 4. A walk between two
vertices whose length is as short as any other walk connecting the same pair of vertices
is called a geodesic. Of course, all geodesics are paths. Geodesics are not necessarily
unique. From vertex a to vertex f in Figure 1, there are two geodesics: a,b,c,d,e,f and
a,b,c,g,e,f.
The graph-theoretic distance (usually shortened to just “distance”) between two vertices is
defined as the length of a geodesic that connects them. If we compute the distance between
every pair of vertices, we can construct a distance matrix D such as depicted in Figure 4. The
maximum distance in a graph defines the graph’s diameter. As shown in Figure 4, the
diameter of the graph in Figure 1 is 4. If the graph is not connected, then there exist pairs of
vertices that are not mutually reachable so that the distance between them is not defined and
the diameter of such a graph is also not defined.
a B c d e f G
a 0 1 2 3 3 4 3
b 1 0 1 2 2 3 2
c 2 1 0 1 1 2 1
d 3 2 1 0 1 2 2
e 3 2 1 1 0 1 1
f 4 3 2 2 1 0 2
g 3 2 1 2 1 2 0
The powers of a graph’s adjacency matrix, Ap, give the number of walks of length p
between all pairs of nodes. For example, A2, obtained by multiplying the matrix by
itself, has entries a 2 that give the number of walks of length 2 that join node vi to node
ij
vj. Hence, the geodesic distance matrix D has entries dij = p, where p is the smallest p
such that aijp > 0. (However, there exist much faster algorithms for computing the
distance matrix.)
The eccentricity e(v) of a point v in a connected graph G(V,E) is max d(u,v), for all u V.
In other words, a point’s eccentricity is equal to the distance from itself to the
point farthest away. The eccentricity of node b in Figure 3 is 3. The minimum
eccentricity of all points in a graph is called the radius r(G) of the graph, while the
maximum eccentricity is the diameter of the graph. In Figure 3, the radius is 2 and the
diameter is
4. A vertex that is least distant from all other vertices (in the sense that its eccentricity
equals the radius of the graph) is a member of the center of the graph and is called a
central point. Every tree has a center consisting of either one point or two adjacent
points.
Directed Graphs
As noted at the outset, the edges contained in graphs are unordered pairs of nodes (i.e.,
(u,v) is the same thing as (v,u)). As such, graphs are useful for encoding directionless
relationships such as the social relation “sibling of” or the physical relation “is near”.
However, many relations that we would like to model are not directionless. For
example, “is the boss of” is usually anti-symmetric in the sense that if u is the boss of v,
it is unlikely that v is the boss of u. Other relations, such as “gives advice to” are simply
non-symmetric in the sense that if u gives advice to v, v may or may not give advice to u.
a b
e
c
f
Figure 5a
a b
e
c
f
Figure 5b
Digraphs are usually represented visually like graphs, except that arrowheads are placed
on lines to indicate direction (see Figure 5). When both arcs (u,v) and (v,u) are present in
a digraph, they may be represented by a double-headed arrow (as in Figure 5a), or two
separate arrows (as shown in Figure 5b).
In a digraph, a walk is a sequence of nodes vo,v1,…vn in which each pair of nodes vi,
vi+1 is linked by an arc (vi,vi+1). In other words, it is a traversal of the graph in which
the flow of movement follows the direction of the arcs, like a car moving from place to
place via one-way streets. A path in a digraph is a walk in which all points are distinct.
A semiwalk is a sequence of nodes vo,v1,…vn in which each pair of nodes vi, vi+1 is
linked by either the arc (vi,vi+1) or the arc (vi+1,vi). In other words, in a semiwalk, the
traversal need not respect the direction of arcs, like a car that freely goes the wrong way
on one-way streets. By analogy, we can also define a semipath, semitrail, and
semicycle.
Another way to think of semiwalks is as walks on the underlying graph, where the
underlying graph is the graph G(V,E) that is formed from the digraph D(V,E’) such that
(u,v) E if and only if (u,v) E’ or (v,u) E’. Thus, the underlying graph of a digraph
is basically the graph formed by ignoring directionality.
A digraph is strongly connected if there exists a path (not a semipath) from every point
to every other. Note that the path from u to v need not involve the same intermediaries as
the path from v to u. A digraph is unilaterally connected if for every pair of points there
is a path from one to the other (but not necessarily the other way around). A digraph is
weakly connected if every pair of points is mutually reachable via a semipath (i.e., if the
underlying graph is connected).
A strong component of a digraph is a maximal strongly connected subgraph. In other
words, it is a subgraph that is strongly connected and which is as large as possible (there
is no node outside the subgraph that is strongly connected to all the nodes in the
subgraph). A weak component is a maximal weakly connected subgraph.
The number of arcs originating from a node v (i.e., outgoing arcs) is called the outdegree
of v, denoted od(v). The number of arcs pointing to a node v (i.e., incoming arcs) is
called the indegree of v, denoted id(v). In a graph representing friendship feelings
among a set of persons, outdegree can be seen as indicating gregariousness, while
indegree corresponds to popularity. The average outdegree of a digraph is necessarily
equal to the average indegree.
Some notations
connected graph : A graph G is connected if between any two vertices there exists a
path in G joining them.
strongly connected graph : A graph G is strongly connected if for any two vertices x
and y there exists a path in G from x to y.
L. Euler, the father of the graph theorysolved the Königsberg’s bridge problem,
1736
Eulerian path problem : a path that traverses each edge in the graph once and only
once.
When the eulerian path is traced, we observe that every time the path meets a
vertex, it goes through two edges which are incident with the vertex and have
not been traced before.
Thus, except for the two vertices at the ends of the path, the degree of any
vertex in the graph must be even.
() omitted.
An directed graph possess an eulerian path if and only if it is connected and the
incoming degree of every vertex is equal to its outgoing degree with the possible
exception of two vertices. For these two vertices, the incoming degree of one is one
larger than its outgoing degree, and the incoming degree of the other is one less than
its outgoing degree.
Hamiltonian Paths and Circuits
Hamiltonian path : A path that passes through each of the vertices in a graph exactly
once.
Theorem : Let G be a linear graph of n vertices. If the sum of the degrees for each
pair of vertices in G is n - 1 or larger, then there exists a hamiltonian path in G.
(2)
Construct a hamiltonian path:
Let there be a length p-1 (p < n) path, (v1, v2, v3, …, vp). Both v1 and vp are
adjacent only to the vertices that are in the path.
There is a cycle containing exactly the vertices v1, v2, v3, …, vp.
We now have the path (vx, vk, vk+1, …, vj-1, vp, vp-1, …,vj, v1, v2, v3, …, vk-1),
which contains p edges.
Proof. Let there be a length p-1 (p < n) path, (v1, v2, v3, …, vp). Let vx be a vertex
that is not included in this path, and there is no edge from vx to v1. However, (v1,
vx) G.
Suppose that (vx, v2) is also an edge in the path. Replace the edge (v1, v2) in
the original path with the two edges (v1, vx) and (vx, v2) so that the vertex vx
will be included in the argument path.
If there is no edge from vx to v2, then there must be an edge (v2, vx) in the path
and we can repeat the argument.
We can repeat the argument until all vertices in the graph are included in the
argumented path.
where v, e, and r are the number of vertices, edges, and regions of the graph,
respectively.
Application of Euler’s formula : In any connected planar graph that has no loops
and has two or more edges,e 3v -6.
Theorem (Kuratowski): A graph is planar if and only if it does not contain any
subgraph that is isometric to o either K5 or K3,3.
Tree: A part of a graph that is connected and contains no cycles.
Theorem: A connected graph possesses a tree iff there is exactly one path in
Spanning Tree: A tree containing all the vertices with exactly n – 1 edges.
There are two algorithms namely Kruskal’s and Prim’ algorithms to find the MST.
Unit III
GROUP THEORY
OBJECTIVES:
INTRODUCTION:
In this chapter, we will study, binary operation as a function, and two more algebraic
structures, semigroups and groups. They are called an algebraic structure because the
operations on the set define a structure on the elements of that set. We also define
the notion of a hornomorphism and product and quotients of groups and semigroup.
BINARY OPERATION
IDENTITY ELEMENT :
SUBSEMI GROUP :
Submonoid : Let (S, ) be a monoid with identity e, and let T be a non- empty subset
of S. If T is closed under the operation and e T, then (T, ) is called a
submonoid of (S, ).
1 2 3 n
to denote .
1 3 n
1
1 2 3 4 5
For example
denotes the permutation on the 5 symbols
5 3 1 2 4
(1,2,3,4,5). maps 1 to 5, 2 to 3, 3 to 1, 4 to 2 and 5 to 4.
1 2 3 4 5 6
i) 2 3 4 1 6 5 . It can be expressed as a product of cycles -
1 2 3 4 5 6
1 2 3 4 5 6
2 3 4 1 6 5
Transposition :
18 3 7 2 5 4 6
1 8 1 3 1 7 2 5 4 6
1 4 5 2 3
1 4 1 5 2 3
= odd no. of transpositions so is odd permutation
Example 3 : Determine whether the following set together with the binary
operation is a semigroup, a monoid or neither. If it is a monoid, specify the
identity. If it is a semigroup or a monoid determine whether it is
commutative.
Solution :
i) A = set of all positive integers. a b max{a, b}i.e. bigger of a and b.
Associative Property :
Since a (b c) max{{a, b}, c} max {a, b, c}
= Max{a,{b, c} } = (a.b).c
is associative.
(A, ) is a semigroup.
* 1 2 3 6 9 18
1 1 2 3 6 9 18
2 2 2 6 6 18 18
3 3 6 3 6 9 18
6 6 6 6 6 18 18
9 9 18 9 18 9 18
18 18 18 18 18 18 18
a * b * c a * b c bc
a b c bc a b c
bc
a b c bc ab ac
abc
(2)From 1 & 2
a * b * c a * b * c a,b,c z
* is associative
(z, &) is a semigroup.
2a
Existence of identity : 2 E is the identity because 2 a =aaE
2
(E, ) is a monoid.
ab ba
Commutative property : Since , we have a b b a Hence is
2 2
commutative.
(E,*) is commutative monoid.
inverse of a G is unique.
(iii) Let G be a group. Let a, b G.
Consider (ab)(b–1a–1)
= a(bb–1)a–1 Associative property
= (ae)a–1 bb–1 = e, eG is identity
= (ae)a–1 Associative property
= aa–1e = a
= eaa–1 = e
Similarly we can prove (b–1a–1)(ab) = e.
Hence (ab) –1 = b–1 a–1
2
Example 6 : Let G be a group with identity e. Show that if a e for all a in G,
then every element is its own inverse
Example 7 : Show that if every element in a group is its own inverse, then the group must
be abelian.
OR
Consider (ab) –1
G is abelian.
Example 8 :Let Zn denote the set of integers (0, 1, .. , n-1). Let be binary operation
on Zn such that ab = the remainder of ab divided by n.
i) Construct the table for the operation for n=4.
ii) Show that (Zn, ) is a semi-group for any n.
iii) Is (Zn, ) a group for any n? Justify your answer.
Solution:
0 1 2 3 4
0 0 1 2 3 4
1 1 2 3 4 0
2 2 3 4 0 1
3 3 4 0 1 2
4 4 0 1 2 3
Solution :
(i) Let a, a H a a–1 H. i.e. e H
The identity element H.
(ii) Let e, a H ea–1 H. i.e. a–1 H
Every element has inverse H.
(iii) Let a, b H. b–1 H. a(b–1) –1 H. i.e. ab H.
Closure property is satisfied.
(iv) Every element in H is also in G. And G is a group. So associative
property is satisfied by the elements of H. Hence associative
property is satisfied by the elements of H.
Hence H is a group. But H is a subset of G. H is a subgroup
of G.
Theorem : Let (S, ) and (T, ’) be monoids with identity e and e’,
respectively. Let f : S T be an isomorphism. Then f(e) = e’.
Similarly, since a e a ,
b f (a) f (e a) f (e * a) f (e) ' a
Proof : If t1, and t2 are any elements of F(S’), then there exist s 1 and s2 in S’ with
t l= f(s1) and t2 = f(s2). Therefore,
t1 t2 f (s1) f (s2 ) f (s1 s2 ) f (s2 s1) f (s2 ) f (s1) t2 t1
Hence (T, ') is also commutative.
Example 1 : Let G be a group. Show that the function f : G G defined
by f(a) = a2 is a homomorphism iff G is abelian.
Solution :
= f(a)f(b) definition of f
f is a homomorphism.
Step 2 :
y a2 G aG s t
f(a) y a2
f is onto.
Step-3 : Assume, f : G G defined by f(a) = a2 s a homomorphism.
Prove that G is abelian.
Let a,bG. f(a) = a2 , f(b) = b2 and f(ab) = (ab)2 by definition of f.
Solution :
Step-1: Show that f is 1-1.
fa (x) axa 1
Consider fa(x) = fa(y) for x, y G
axa–1 = aya–1 definition of f
x=y left and right cancellation laws
f is 1- 1
Step 2 :
Solution :
i) Let f(a)=f(b)
a–1 = b–1 a = b f is 1- l.
ii) aG a 1 G
x1 G
f x x1
f is onto.
iii) Let a,bG. f(a) = a–1, f(b) = b–1 and f(ab) = (ab) –1 by
definition of f.
f(ab) = (ab) –1
= b–1a–1 reversal law of inverse
= a b–1 –1
G is abelian
= f(a)f(b) definition of f.
f is a homomorphism.
Since f is 1-1 and homomorphism, it is isomorphism.
Solution:
Step -1 Show that f is 1-l.
Consider f(x) = f(y) for x, yG
5x = 5y definition of f
x=y f is 1-1
Step 2 :
5xG, x G
s.t. f(x) 5x
f is onto.
For x y G
f(x) = 5x, d(y) = 5y and f(x + y) –
5(x+y)
Consider f(x+y) = 5(x+y) for x, y G
= 5x + 5y
f(x+y) = f(x) + f(y)
f is homomorphism.
Since f is 1-1 and homomorphism, it is isomorphism.
OR
Show that the group G = (R,+) is isomorphic to G’ = (R +, x) where R is
the set of real numbers and R+ is a set of positive real numbers.
Solution :
Solution :
Step - I : Show that f is l-I.
Let x = ai, and y = aj .
Consider f(x) = f(y) for x, y G
f(ai) = f(aj) definition of f
ai = aj
x=y f is 1-1.
Example 6 : Let T be set of even integers. Show that the semigroups (Z,
+) and (T, +) are isomorphic.
Example 7 : For the set A = {a,b,c} give all the permutations of A. Show
that the set of all permutations of A is a group under the composition
operation.
Right Coset : Let (H, ) be a subgroup of (G, ). For any a G, the set
of Ha defined by
Ha h * a | h H
is called the right coset of H in G determined by the element aG. The
element a is called the representative element of the right coset Ha.
1 2 3
f0 , 1 2 3 1 2 3
f1 , f3
1 2 3 1 3 2 3 2 1
1 2 3
f, 1 2 3 1 2 3
f, f5
3 2 1 3
2 3 1 3 2 1
4
Let us prepare the composition table.
0 f f f f f f
0 1 2 3 4 5
f f f f f f f
0 0 1 2 3 4 5
f f f f f f f
1 1 0 4 5 2 3
f f f f f f f
2 2 3 0 4 3 1
f f f f f f f
3 3 4 5 0 1 2
f f f f f f f
4 4 3 1 2 5 0
f f f f f f f
5 5 2 3 1 0 4
From the table it is clear that {f 0, f1}, {f0, f2,}, {f0, f3) and {f0, f4, f5} are
subgroups of (S3, 0): The left cosets of {f0, f1} are {f0, f1}, {f2, f5}, {f3, f4}.
While the right cosets of {f0, f1} are {f0, f1}, {f2, f4}, {f3, f5}. Hence {f0, f1}
is not a normal subgroup.
Similarly we can show that {f0, f2} and {f0, f1} are not normal subgroups.
On the other hand, the left and right cosets of {f 0, f4, f5} are {f0, f4, f5} and
{f1, f2, f3}.
Hence {f0, f4, f5} is a nomal subgroup.
Solution : Let
1 2 3 1 2 3 1 2 3
f0 ,
f1 , f3
1 2 3 1 3 2 3 2 1
1 2 3 1 2 3 1 2 3
f f f5
,
3
2 1 3 , 2 3 1 3 2 1
4
H={f0, f2}
Left Cosets of H in G :
f0H = {f0f0, f0f2} = {f0, f2} f1H = {f1f0, f1f2} = {f1, f4}
f2H = {f2f0, f2f2} = {f2, f0} f3H = {f3f0, f3f2} = {f3, f5}
f4H = {f4f0, f4f2} = {f4, f1} f5H = {f5f0, f5f2} = {f5, f3}
Right Cosets of H in G
Hf0 = {f0f0, f2f0} = {f0, f2} Hf1 = {f0f1, f2f1}={f1, f3}
Since f1 H Hf1 , H is not a normal subgroup of G.
Example 10 : Define a normal sub-group. Let S3 = Group of all
permutations of 3 elements (say 1, 2, 3). For the following subgroups of S,
find all the left cosets . Subgroup of A = {1,(1,2)}
Zero Divisor: A commutative ring is said to have a zero divisor if the product of two non-
zero element is zero. For example, the product of two non- zero matrices may zero.
LATTICES
BASIC TERMINOLOGY
Definition:
A poset is a lattice if every pair of elements has a lub (join) and a glb (meet).
1. An element a A is an upper bound for B iff for every element a' B, a' ≤ a.
2. An element a A is a least upper bound (lub) for B iff a is an upper bound for B and
for every upper bound a' for B, a ≤ a'.
1. An element a A is a lower bound for B iff for every element a' B, a ≤ a'.
2. An element a A is a greatest lower bound (glb) for B iff a is a lower bound for B
and for every lower bound a' for B, a'≤ a.
Theorem:
Theorem:
property holds.
A ≤ ba*b = a a + b = b
Theorem:
properties hold.
Theorem:
properties hold.
a ≤ b ^ a ≤ c => a ≤ b + c
a ≤ b ^ a ≤ c => a ≤ b*c
b ≤ a ^ c ≤ a => b*c ≤ a
b ≤ a ^ c ≤a => b + c ≤ a
Theorem:
a +(b*c) ≤ (a + b)*(a + c)
Theorem:
x ≤ y iff x*y = x
x ≤ y iff x + y = y
Definitions
Algebraic system :A lattice is an algebraic system (L, *, +) with two binary operations
* and + on L which are both (1) commutative and (2) associative and (3) satisfy the
absorption law.
Sublattice : Let (L, *, +) be a lattice and let S be a subset of L. The algebra (S, *, +) is a
sublattice of (L, *, +) iff S is closed under both operations * and +.
Lattice homomorphism: Let (L, *, +) and (S, ^,V) be two lattice. A mapping g:L→S is
called a lattice homomorphism from the lattice (L, *, +) to (S, ^ , V) if for any a, bL,
Order-preserving : Let (P, ≤ ) and (Q, ≤) be two partially ordered sets, A mapping
Complete Lattice: A lattice is called complete if each of its nonempty subsets has a
least upper bound and a greatest lower bound.
1. An element a A is an upper bound for B iff for every element a' B, a' ≤ a.
2. An element a A is a least upper bound (lub) for B iff a is an upper bound for B and
for every upper bound a' for B, a ≤ a'.
Greatest lower bound (glb)
1. An element a A is a lower bound for B iff for every element a' B, a ≤ a'.
2. An element a A is a greatest lower bound (glb) for B iff a is a lower bound for B
and for every lower bound a' for B, a' ≤ a.
Let S be a subset of A in the poset (A, R). If there exists an element a in A such that sRa for all s
in S, then a is called an upper bound. Similarly for lower bounds.
Bounds of the lattice :The least and the greatest elements of a lattice, if they exist, are called the
bounds of the lattice, and are denoted by 0 and 1 respectively.
a + b =1.
EXAMPLE:
{a, b, c}
The digraph is
In the above Hasse diagram, is a minimal element and {a, b, c} is a maximal element.
In the poset above {a, b, c} is the greatest element. is the least element.
In the poset above, {a, b, c}, is an upper bound for all other subsets. is a lower bound
for all other subsets.
{a, b, c}, {a, b} {a, c} and {a} are upper bounds and {a} is related to all of them, {a}
EXAMPLE:
Solution:
- 4 is not related to 2
EXAMPLE:
Determine whether the posets represented by each of the following Hasse diagrams have
a greatest element an a least element.
athematics
Solution
• The least element of the poset with Hasse diagram (a) is a. This poset has no greatest
element.
• The poset with Hasse diagram (b) has neither a least nor a greatest element.
• The poset with Hasse diagram (c) has no least element. Its greatest element is d.
• The poset with Hasse diagram (d) has least element a and greatest element d.
EXAMPLE:
Find the lower and upper bounds of the subsets {a, b, c}, {j, h}, and {a, c, d, f } and find
the greatest lower bound and the least upper bound of {b, d, g}, if they exist.
Solution
The upper bounds of {a, b, c} are e, f, j, h, and its only lower bound is a.
There are no upper bounds of {j, h}, and its lower bounds are a, b, c, d, e, f .
The upper bounds of {b, d, g} are g and h. Since g _ h, g is the least upper bound.
The lower bounds of {b, d, g} are a and b. Since a _ b, b is the greatest lower bound.
EXAMPLE:
Determine whether the posets represented by each of the following Hasse diagrams are
lattices.
Solution
The posets represented by the Hasse diagrams in (a) and (c) are both lattices because in
each poset every pair of elements has both a least upper bound and a greatest lower
bound.
On the other hand, the poset with the Hasse diagram shown in (b) is
not a lattice, since the elements b and c have no least upper bound. To see this note that
each of the elements d, e and f is an upper bound, but none of these three elements
precedes the other two with respect to the ordering of this poset.
EXAMPLE:
Solution
Let A and B be two subsets of S . The least upper bound and the greatest lower bound of
A and B are A U B and A ∩B, respectively.
The set
table is as follows :
0 1
0 0 1
1 1 0
Important Terminology :
Let us choose an integer n m and one-to-one function
m n
e :B B .
1) Encoding Function :
The function e is called an (m, n) encoding function. It means
m n
that every word in B as a word in B .
2) Code word :
m
If bB then e(b) is called the code word
3) Weight :
n
For x B the number of 1’s in x is called the weight of x and is
denoted by x .
e.g. i) x 10011B5 w x 3
3
ii) x 001B w x
n
4) x y Let x, yB , then x y is a sequence of length n that
has 1’s in those positions x & y differ and has O’s in those positions x
& y are the same. i.e. The operation + is defined as 0 + 0 = 0 0+1
=11+1
=01+0=1
e.g. if x, yB5
x 00101, y 10110
x y 10011
w (x y) 3
5) Hamming Distance :
Let x, yBm. The Hamming Distance x, y between x and y is
the weight of x y . It is denoted by x y . e.g. Hamming distance
between x & y can be calculated as follows : if x = 110110, y = 000101
x y = 110011 so x y = 4.
6) Minimum distance :
Let x, y Bn.then minimum distance = min d x, y / x, y B .
n
7) Detection of errors :
Let e : Bm Bn m n is an encoding function then if
minimum distane of e is ( k + 1) then it can detect k or fewer errors.
8) Correction of errors :
Let e : Bm Bn m n is an encoding function then if
minimum distance of e is (2k + 1) then it can correct k or fewer errors.
Weight of a code word : It is the number of 1’s present in the given code
word.
where
zi 1 if y1, yi2 , yi4 has at least two 1’s.
0 if y1, yi2 , yi4 has less than two 1’s.
6
Determine d y for the word y in B .
(a) y 111011 (b) y 010100
where
bm1 0 if b is even.
= 1 if b is odd.
2 6
Example 5 : Let e : B B is an (2,6) encoding function defined as
e(00) = 000000, e(01) = 011101
e(10) = 001110, e(11) = 111111
w x0 x1 w 011101
4 w x0 x2 w
001110 3 w x0 x3
w 111111 6 w x1
x2 w 010011 3 w
x1 x3 w 100010
w x2 x3 w 110001
3 Minimum distance = e = 2
d) Minimum distance = 2
An encoding function e can detect k or fewer errors if the minimum
distance is k + 1. k 1 2k 1
The function can detect 1 or fewer (i.e. 0) error.
GROUP CODE :
m n
An m, n encoding function e : B B is called a group code
if range of e is a subgroup of Bn. i.e. (Ran (e), ) is a group.
Since Ran (e) CBn and if (Ran (e), ) is a group then Ran(e) is a
m n
subgroup of Bn. If an encoding function e : B B (n < n) is a group
code, then the minimum distance of e is the minimum weight of a nonzero
codeword.
.
DECODING AND ERROR CORRECTION :
m n
Consider an m, n encoding function e : B B , we require an
n m
(n,m) decoding function associate with e as d : B B .
Since Bm 2m .
m n
Given an m, n encoding function e : B B , we often need to
n m
determine an n, m decoding function d : B B associated with e.
We now discuss a method, called the maximum likelihood techniques, for
m m
determining a decoding function d for a given e. Since B has 2
m n
elements, there are 2 code words in B . We first list the code words in
a fixed order.
, x1
x
2
, ..., x
2m
If the received word is x1 , we compute x x for 1 i
i ,
1
m s
2 and choose the first code word, say it is x , such that
min
1i2m
x
i
, x1 x
s
, x1
s
That is, x is a code word that is closest to x1 , and the first in the
s
list. If x e b , we define the maximum likelihood decoding function
d associated with e by
d xt b
Observe that d depends on the particular order in which the code
words in e B n are listed. If the code words are listed in a different
order, we may obtain, a different likelihood decoding function d
associated with e.
1 1 0
0 1 1
Example : Let m 2, n 5
and H 1 0 0 . Determine the
0 1 0
0 0
1
2 5
group code eH : B B .
2
Solution : We have B 00, 01,10,11 . Then e00 00x1x2x3
where
x1 0.1 0.0 0
x2 0.1 0.1 0
x3 0.0 0.1 0
e 00 00000
Now,
e 01 01x1x2
where
x3 x1 0.1 1.0
0
x2 0.1 1.1 1
Next x3 0.0 1.1 1
e 01 01011
e 10 10 x1x2
x3 x1 1.1 0.0
1
x2 1.1 1.0 1
x3 1.0 0.1 0
e 10 10110
e 11 11101
1 0 0
0 1 1
1 1 1
Example : Let H be a parity check matrix. determine
1 0 0
0
1 0
0 0 1
the 3, 6 group code eH : B3 B6 .
2 5
Example : Consider the group code defined by e : B B such that
e 00 00000 e 01 01110 e 10 10101 e 11
11011.
Decode the following words relative to maximum likelihood decoding
function.
(a) 11110 (b) 10011 (c) 10100
2 min x , x 1 x , x
i 2
t t
1 min x , x 1 x , x
i 4
t t
(c) xt 10100
4 min x , x 1 x , x
i 3
t t
0 1 1
1 0 1
Example : Let H 1 0 0 be a parity check matrix. decode the
0 1 0
00
1
following words relative to a maximum likelihood decoding function
associated with eH : (i) 10100, (ii) 01101, (iii) 11011.
Solution : The code words are e00 00000, e01 00101, e10
10011, e11 11110 . Then N 00000, 00101,10011,11110 . We
implement the decoding procedure as follows. Determine all left cosets of
N in B5,
as rows of a table. For each row 1, locate the coset leader
i , and rewrite
the row in the order.
1, i
Example : Consider the 2, 4 encoding function e as follows. How
many errors will e detect?
Solution :
1100 ---
Now, let x
1 2 3 4
00000, x 01110, x 10101, x 11011 .
(a) xt 11110
, x x x
x
1
t
1
t 00000 11110 11110 4
x , x x x
2 2
t t 01110 1110 10000 1
x , x x x
3 3
t t 10101 1110 01011 3
x , x x x
4 4
t t 11011 1110 00101 2
Maximum likelihood decoding function d xt 01.
(b) xt 10011
, x x x
x
1
t
1
t 00000 10011 10011 3
x , x x x
2 2
t t 01110 10011 11101 4
x , x x x
3 3
t t 10101 10011 00110 2
x , x x x
4 4
t t 11011 10011 01000 1
Maximum likelihood decoding function d xt 11.
1 0 0
0 1 1
1 1 1
Example : Let H be a parity check matrix. Determine
1 0 0
0
1 0
0 0 1
3 6
the 3, 6 group code eH : B B .
3
Solution : B 000, 001, 010, 011,100,101,110, 111
eH 000 000000 eH 001 001111 eH 010
010011
eH 011 011100 eH 100 100100 eH 101 101011
eH 110 110111 eH 111 111000
Solution :
3 7
Example : Show that the 3, 7 encoding function e : B B
defined by
e 000 0000000 e 001 0010110 e 010 0101000
e011 0111110 e 100 1000101 e 101 1010011
e110 1101101 e 111 1111011 is a group code.
Solution :
Solution :
x3 1.0 0.1 0
where
eH 11 11x1x2 x3 x1 1.1 1.0 1
x2 1.1 1.1 0 eH 01 11101
x3 1.0 1.1 1
(1) xt 01110
, x x x
x
1
t
1
t 00000 01110 01110 3
x , x x x
2
2
t t 01011 01110 00101 2
x , x x x
3
3
t t 10110 01110 11000 2
x , x x x
4
4
t t 11101 01110 10011 3
Maximum likelihood decoding function d xt 01
(2) xt 11101
, x x x
x
1
t
1
t 00000 11101 11101 4
x , x x x
2
2
t t 01110 11101 10110 3
x , x x x
3
3
t t 10101 11101 01011 3
x , x x x
4
4
t t 11011 11101 00000 0
Maximum likelihood decoding function d xt 11
(3) xt 00001
, x x x
x
1
t
1
t 00000 00001 00001 1
x , x x x
2
2
t t 01011 00001 01010 2
x , x x x
3
3
t t 10110 00001 10111 4
x , x x x
4
4
t t 11101 00001 11100 3
Maximum likelihood decoding function d xt 00
(2) xt 11000
, x x x
x
1
t
1
t 00000 11000 11000 2
x , x x x
2
2
t t 01110 11000 10011 3
x , x x x
3
3
t t 10101 11000 01101 3
x , x x x
4
4
t t 11011 11000 10000 1
Maximum likelihood decoding function d xt 11
***