0% found this document useful (0 votes)
145 views250 pages

MCA-25 Discrete Mathematics

This document provides an overview of the key concepts in set theory that are covered in the course on Discrete Mathematics and Optimization. It begins with an introduction to sets and their basic representations using roster and set-builder methods. It defines important set types like the empty set, finite sets, and infinite sets. It also covers subsets, supersets, power sets, and the universal set. Venn diagrams and common set operations like union, intersection, difference, and complement are introduced. Algebraic laws of sets and counting principles are discussed. The document concludes with an overview of classes of sets, partitions of sets, and multisets.

Uploaded by

Firoza
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)
145 views250 pages

MCA-25 Discrete Mathematics

This document provides an overview of the key concepts in set theory that are covered in the course on Discrete Mathematics and Optimization. It begins with an introduction to sets and their basic representations using roster and set-builder methods. It defines important set types like the empty set, finite sets, and infinite sets. It also covers subsets, supersets, power sets, and the universal set. Venn diagrams and common set operations like union, intersection, difference, and complement are introduced. Algebraic laws of sets and counting principles are discussed. The document concludes with an overview of classes of sets, partitions of sets, and multisets.

Uploaded by

Firoza
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/ 250

MASTER OF COMPUTER APPLICATION

MCA-25

DISCRETE MATHEMATICS
AND OPTIMIZATION

SITY OF S
I V ER CI
UN E
R

N
CE
M BE SHWA

& TE CH NO
JA
U

O L
R

GY
GU

Directorate of Distance Education


Guru Jambheshwar University of Science & Technology
HISAR-125001
Discrete Mathematics & Optimization MCA-25

CONTENTS

1. SET THEORY 3

2. RELATION AND FUNCTION 33

3. LOGIC AND PROPOSITION CALCULUS 63

4. GROUP 77

5. GRAPH 100

6. WEIGHTED GRAPHS AND TREES 129

7. INTRODUCTION TO OPERATIONAL 157

RESEARCH AND TECHNOLOGY

8. LINEAR PROGRAMING 174

9. SIMPLEX METHOD AND TWO PHASE 204

SIMPLEX METHOD

DDE, GJUS&T, Hisar 2|


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA-25


AUTHOR: KAPILA DEVI
Lesson No. 1

SET THEORY
REVISED /UPDATED SLM BY RENU BANSAL

STRUCTURE

1.1 Learning Objectives

1.2 Introduction

1.3 Sets and Their Representation

1.3.1 The Empty Set

1.3.2 Finite Sets

1.3.3 Equal Sets

1.3.4 Subsets, Super Sets, Proper Subsets

1.3.5 Power Set

1.3.6 Universal Set

1.4 Venn Diagrams

1.5 Set Operations

1.6 Laws of Algebra of Sets

1.7 Counting principles

1.8 Classes of sets

1.9 Partitions of set

1.10 Multi set

DDE, GJUS&T, Hisar 3|


Discrete Mathematics & Optimization MCA-25

1.11 Check Your Progress

1.12 Summary

1.13 Keywords

1.14 Self-Assessment Test

1.15 Answers to Check Your Progress

1.16 References/ Suggested Reading

1.1 LEARNING OBJECTIVES

After going through this unit, you will be able to

1. describe sets and their representations

2. identify empty set, finite and infinite sets

3. define subsets, super sets, power sets, universal set

4. describe the use of Venn diagram for geometrical description of sets

5. illustrate the set operations of union, intersection, difference and complement

6. know the different algebraic laws of set-operations

7. illustrate the application of sets in solving practical problems

1.2 INTRODUCTION

One of the widely used concepts in present day Mathematics is the concept of Sets. It is considered the
language of modern Mathematics. The whole structure of Pure or Abstract Mathematics is based on the
concept of sets. German mathematician Georg Cantor (1845-1918) developed the theory of sets and
subsequently many branches of modern Mathematics have been developed based on this theory. In this
unit, preliminary concepts of sets,set operations and some ideas on its practical utility will be
introduced.

DDE, GJUS&T, Hisar 4|


Discrete Mathematics & Optimization MCA-25

1.3 SETS AND THEIR REPRESENTATION

A set is a collection of well-defined objects. By well-defined, it is meant that given a particular


collection of objects as a set and a particular object, it must be possible to determine whether that
particular object is a member of the set or not.

The objects forming a set may be of any sort– they may or may not have any common property. Let us
consider the following collections:

(i) the collection of the prime numbers less than 15 i.e.,2,3,5,7, 11,13

(ii) the collection of 0, a, SachinTendulkar ,the river Brahmaputra

(iii) the collection of the beautiful cities of India

(iv) the collection of great mathematicians.

Clearly the objects in the collections (i) and (ii) are well-defined. For example, 7 is a member of (i), but
20 is not a member of (i). Similarly, ‘a’ is a member of (ii), but M.S.Dhoni is not a member. So,the
collections (i) and (ii) are sets. But the collections (iii) and (iv) are not sets, since the objects in these
collections are not well-defined.

The objects forming a set are called elements or members of the set.Sets are usually denoted by capital
letters A, B, C, ...; X, Y, Z, ..., etc., and the elements are denoted by small letters a,b,c,...;x,y,z,...,etc.

If ‘a’ is an element of a set A, then we write aɛA which is read as‘ a belongs to the set A’ or in short,‘ a
belongs to A’. If ‘a’ is not an element of A, we write a ø A and we read as‘ a does not belong to A’. For
example, let A be the set of prime number less than15. Then
2A,3A,5A,7A,11A,1A,4A,17A,etc.

Representation of Sets: Sets are represented in the following two methods:

1. Roster or tabular method

2. Set-builder or Rule method

In the Roster method, the elements of a set are listed in any order, separated by commas and are
enclosed within braces, For example,

DDE, GJUS&T, Hisar 5|


Discrete Mathematics & Optimization MCA-25

A = {2, 3, 5, 7, 11, 13}

B = {0, a Sachin Tendulkar, the river Brahmaputra} C = {1, 3, 5, 7, ...}

In the set C, the elements are all the odd natural numbers.We cannot list all the elements and hence the
dots have been used showing that the list continues in definitely.

In the Rule method,a variable x is used to represent the elements of a set, where the elements satisfy a
definite property, say P(x). Symbolically, the set is denoted by {x:P(x)} or {x|p(x)}.For example,
2
A = {x: x is an odd natural number} B = {x: x –3x+2 = 0}, etc.

If we write these two sets in the Roster method, we get,

A = {1, 3, 5, ...}

B = {1, 2}

Some Standard Symbols for Sets and Numbers: The following standard symbols are used to
represent different sets of numbers:

N = {1, 2, 3, 4, 5, ...}, the set of natural numbers

Z= {..., –3, –2, –1, 0, 1, 2, 3, ...}, the set of integers

Q={x:x=p/q; p, qcZ,qs0},the set of rational numbers

R = {x: x is a real number},

the set of real numbers Z+,Q+,R+respectively represent the sets of positive integers, positive rational

numbers and positive real numbers. Similarly, Z–, Q–, R– represent respectively the sets of negative
0 0 0
integers, negative rational numbers and negative real numbers. Z , Q , R represent the sets of non-zero
integers, non- zero rational numbers and non-zero real numbers.

1.3.1 THE EMPTYSET

Definition: A set which does not contain any element is called an empty set or a null set or a void
set. It is denoted by .

The following sets are some examples of empty sets.

DDE, GJUS&T, Hisar 6|


Discrete Mathematics & Optimization MCA-25

2
(i) the set {x: x = 3 and x cQ}

(ii) the set of people in Assam who are older than 500 years
2
(iii) the set of real roots of the equation x + 4 =0

(iv) the set of Lady President of India born in Assam.

1.3.2 FINITE AND INFINITESETS

Let us consider the sets A = {1, 2, 3, 4, 5}and B = {1, 4, 7, 10, 13, ...}

If we count the members (all distinct) of these sets, then the counting process comes to an end for the
elements of set A, where as for the elements of B, the counting process does not come to an end. In the
first case we say that A is a finite set and in the second case, B is called an infinite set. A has finite
number of elements and number of elements in B are infinite.

Definition: A set containing finite number of distinct elements so that the process of counting the
elements comes to an end after a definite stage is called a finite set; otherwise, a set is called an infinite
set.

Example: State which of the following sets are finite and which are infinite.

(i) the set of natural numbers N

(ii) the set of male persons of Assam as on January 1,2009.

(iii) the set of prime numbers less than20

(iv) the set of concentric circles in a plane

(v) the set of rivers on the earth.

Solution:

(i) N={1,2,3,...}is an infinite set

(ii) it is a finite set.

(iii) {2, 3, 5, 7, 11, 13, 17, 19} is a finite set

(iv) it is an infinite set

DDE, GJUS&T, Hisar 7|


Discrete Mathematics & Optimization MCA-25

(v) it is a finite set.

1.3.3 EQUALSETS

Definition: Two sets A and B are said to be equal sets if every element of A is an element of B and
every element of B is also an element of A. In other words, A is equal to B, denoted by A = B if A and
B have exactly the same elements. If A and B are not equal, we write A ≠ B.

Let us consider the sets A = {1, 2}

B = {x: (x–1) (x–2) = 0}

C = {x: (x–1) (x–2) (x–3) = 0}

Clearly B = {1, 2}, C = {1, 2, 3} and hence A = B, A sC, B sC.

Example:Find the equal and unequal sets:

(i) A = {1, 4,9}


2 2 3
(ii) B = {1 , 2 , 3 }

(iii) C={x:x is a letter of the word TEAM}

(iv) D={x:x is a letter of the word MEAT}

(v) E = {1, {4},9}

Solution: A = B, C = D, A ≠ C, A ≠ D, A ≠ E, B ≠ C, B ≠ D, B ≠ E, C ≠ E, D ≠ E

1.3.4 SUBSETS, SUPERSETS, PROPERSUBSETS

Let us consider the sets A = {1, 2, 3}, B = {1, 2, 3, 4} and C = {3, 2, 1}. Clearly, every element of A is
an element of B, but A is not equal toB.Again, every element of A is an element of C, and also A is
equal to C. In both cases, we say that A is a subset of B and C.In particular, we say that A is a proper
subset of B, but A is not a proper subset of C.

Definition: If every element of a set A is also an element of another set B, then A is called a subset of
B, or A is said to be contained in B, and is denoted by A B. Equivalently, we say that B contains A or
B is a super set of A and is denoted by B A.

DDE, GJUS&T, Hisar 8|


Discrete Mathematics & Optimization MCA-25

Symbolically, A B means that for all x, if x A then x B.

If A is a subset of B, but the re exists at least one element in B which is not in A, then A is called a
proper subset of B, denoted by AB.In other words, AB(ABand A≠B).

The symbol ‘’ stands for ‘logically implies and is implied by’. Some examples of proper subsets are
as follows: N Z, N Q, N R, Z Q, Z R, Q R.

It should be noted that any set A is a subset of itself, that is, AA. Also, the null set  is a subset of
every set, that is, A for any set A. Because, if A, then there must exist an element x such that x
A. But x , hence we must accept that A. Combining the definitions of equality of sets and that of
subsets.

we getA = B (A B and B A)

1.3.5 POWERSET

Let us consider a set A = {a, b}. A question automatically comes to our mind– ‘What are the subsets of
A?’ The subsets of A are , {a}, {b} and A itself. These subsets, taken as elements, again form a set.
Such a set is called the power set of the given set A.

Definition: The set consisting of all the subsets of a given set A as its elements, is called the power set
A A
of A and is denoted by P(A) or 2 . Thus, P(A) or 2 = {X: X A}

Clearly,

(i) P () = {}


A
(ii) if A = {1}, then P = {$, {1}}
A
(iii) if A = {1, 2}, then P = {$, {1}, {2}, A}
A
(iv) if A = {1, 2, 3}, then P = {$, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, A}
n
From these examples we can conclude that if a set A has n elements,then P(A) has 2 elements.

DDE, GJUS&T, Hisar 9|


Discrete Mathematics & Optimization MCA-25

1.3.6 UNIVERSALSET

A set is called a Universal Set or the Universal discourse if it contains all the sets under consideration in
a particular discussion. A universal set is denoted by U.

Example:

 For the sets {1, 2, 3}, {3, 7, 8}, {4, 5, 6, 9}We can take U = {1, 2, 3, 4, 5, 6, 7, 8, 9}

 In connection with the sets N, Z, Q we can take R as the universal set.

 In connection with the population in India, the set of all people in India is the universal set, etc.

1.4VENNDIAGRAM

Simple plane geometrical areas are used to represent relationships between sets in meaningful and
illustrative ways. These diagrams are called Venn-Euler diagrams, or simply theVenn-diagrams.

In Venn diagrams, the universal set U is generally represented by a set of points in a rectangular area
and the subsets are represented by circular regions within the rectangle, or by any closed curve within
the rectangle. As an illustration Venn diagrams of AU,ABU are given below:

U U B
A
A

AU ABU

Similar Venn diagrams will be used in subsequent discussions illustrating different algebraic
operations on sets.

1.5 SETOPERATIONS

We know that given a pair of numbers x and y, we can get new numbers x+y, x–y, xy, x/y (with y ≠ 0)
under the operations of addition, subtraction, multiplication and division. Similarly, given the two sets A
and B we can

DDE, GJUS&T, Hisar 10 |


Discrete Mathematics & Optimization MCA-25

form new sets under set operations of union, intersection, difference and complements. We will now
define these set operations, and the new sets thus obtained will be shown with the help of Venn
diagrams.

1.5.1 UNION OF SETS

Definition: The union of two sets A and B is the set of all elements which are members of set A or set B
or both. It is denoted by A B, read as ‘A union B’ where ‘’ is the symbol for the operation of
‘union’. Symbolically we can describe A B as follows:

AB={x:xAorxB}

A B (Shaded)

It is obvious that A AB, B AB

Example 1: Let A = {1, 2, 3, 4}, B = {2, 4, 5, 6}

Then A B = {1, 2, 3, 4, 5, 6}

Example2:Let Q be the set of all rational numbers and K be the set of all irrational numbers and R be
the set of all real numbers. Then QK = R

Identities: If A, B, C be any three sets, then

(i) AB=BA

(ii) AA=A

(iii) A$= A

(iv) AU = U

(v) (AB)C=A(BC)

DDE, GJUS&T, Hisar 11 |


Discrete Mathematics & Optimization MCA-25

Proof:

(i) AB={x:xA or xB}

= {x: x B or x A}

= B A

(ii) AA={x:xA or xA}={x:xA}=A

(iii) A={x:xA or x}={x:xA}=A

(iv) AU={x:xA or xU}

= {x: x U}, since A U

=U

(v) (AB)C ={x:xAB or xC}

= {x: (x A or x B) or xC}

= {x: x A or (x B or xC}

= {x: xA or xBC}

= A(B C)

1.5.2 INTERSECTION OF SETS

Definition: The intersection of two sets A and B is the set of all elements which are members of both A
and B. It is denoted by AB, read as ’A intersections B’, where ‘’ is the symbol for the operation of
‘intersection’. Symbolically we can describe it as follows:

AB = {x: x A and x B}

DDE, GJUS&T, Hisar 12 |


Discrete Mathematics & Optimization MCA-25

AB (Shaded)

From definition it is clear that if A and B have no common element, then AB = . In this case, the two
sets A and B are called disjoint sets.

AB = 

It is obvious that ABA,ABB.

Example1:LetA={a,b,c,d},B={b,d,4,5} Then AB={b,d}

Example 2: Let A = {1, 2, 3}, B = {4, 5, 6}Then AB = .

Identities:

(i) AB=BA

(ii) AA=A

(iii) A=

(iv) AU=A

(v) (AB)C=A(BC)

(vi) A(BC)=(AB)(AC), A(BC)=(AB)(AC)

Proof:

(i) AB ={x:xAandxB}

= {x : x B and x A}

= BA

(ii) AA ={x:xAandxA}

DDE, GJUS&T, Hisar 13 |


Discrete Mathematics & Optimization MCA-25

= {x : x A}

=A

(iii) Since  has no element, so A and  have no common element.

Hence A=

(iv) AU ={x:xAandxU}

= {x : x A}, since AU

=A

(v) (AB)C={x:xABandxC}

= {x : (x A and x B) and x C}

= {x : x A and (x B and x C}

= {x : x A and x B C}

= A(B C)

(vi) xA(BC)Aandx(BC)

A and (x B or x C)

(x A and xB) or (x A and x C)

(AB) or x (A C)

(A B) (A C)

So, A (BC) (AB) (A C)

and (A B) (A C) A (B C).

Hence, A (B C) = (AB) (AC).

Similarly, it can be proved that A(B C) = (A B) (A C).

DDE, GJUS&T, Hisar 14 |


Discrete Mathematics & Optimization MCA-25

1.5.3 DIFFERENCE OF SETS

Definition: The difference of two sets A and B is the set of all elements which are members of A, but
not of B. It is denoted by A–B.

Symbolically, A – B = {x: x A and x B}

Similarly, B – A = {x: x  B and x  A}

FIG 1.1A –B(S HADED ) FIG 1.2B – A (S HADED )

Example: Let A = {1, 2, 3, 4, 5}, B = {1, 4, 5}, C = {6, 7, 8}

Then A – B = {2, 3}

A–C=A

B–C=B

B–A=

Properties:

(i) A – A =

(ii) A–B A,B–AB

(iii) A–B,AB,B–A are mutually disjoint and (A–B)(AB)(B–A)=AB

(iv) A–(BC)=(A–B)(A–C)

(v) A–(BC)=(A–B)(A–C)

Proof:We prove (iv),others are left as exercises.

DDE, GJUS&T, Hisar 15 |


Discrete Mathematics & Optimization MCA-25

xA–(BC)A andx(B C)

A and (x B and x C)

(x A and x B) and (x A and x C)

(A – B) and x (A – C)

(A – B) (A – C)

So,A–(BC)(A–B)(A–C),(A–B)(A–C)A–(BC)

Hence,A–(BC)=(A–B)(A–C).

1.5.4 COMPLEMENT OF A SET

Definition:If U be the universal set of a set A, then the set of all those elements in U which are not
members of A is called the Compliment of A, denoted by AcorA.

Symbolically, A={x:xUandxA}.

A'
A

Fig 1.3 A (Shaded)

Clearly,A=U–A.

Example:Let U = {1, 2, 3, 4, 5, 6, 7, 8, 9} and A = {2, 4, 6, 8}

ThenA={1,3,5,7,9}

Identities:

(i) U'=,=U

(ii) (A)=A

(iii) AA=U,AA=

DDE, GJUS&T, Hisar 16 |


Discrete Mathematics & Optimization MCA-25

(iv) A–B=AB,B–A=BA

(v) (AB)=AB,(AB)=AB

Proof: We prove(AB)=AB.The rest are left as exercises.

(AB)={x:xUandxAB}

= {x : x U and (xA and x B}

= {x : (x U and x A) and (x U and x B)}

={x:xAandxB}

=AB.

1.6LAWS OF THE ALGEBRA OFSETS

In the preceding discussions we have stated and proved various identities under the
operations of union, intersection and complement of sets. These identities are considered as
Laws of Algebra of Sets. These laws can be directly used to prove different propositions on
Set Theory. These laws are given below:

1. Idempotent laws: AA=A,AA=A

2. Commutative laws: AB=BA,AB=BA

3. Associative laws: A(BC)=(AB)C,

A (B C) = (A B) C

4. Distributive laws: A(BC)=(AB)(AC),

A (B C) = (A B) (A C)

5. Identity laws: A$=A,AU=U

A U = A, A = 

6. Complement laws: AA=U, AnA=

(A)=A,U=,=U

DDE, GJUS&T, Hisar 17 |


Discrete Mathematics & Optimization MCA-25

7. DeMorgan’s laws: (AB)=AB

(AB)=AB.

Let us illustrate the application of the laws in the following examples:

Example 1: Prove that A (A B) = A

Solution: A n(A B) = (A ) (A B), using identity law

= A (B), using distributive law

= A (B ), using commutative law

= A , using identity law

= A, again using identity law

Example2:Prove thatA(AB)=AB

Solution: A(AB) =(AA)(AB),using distributive law

= (A B), using complement law

= (A B), using commutative law

= A B, using identity law

1.7 COUNTING PRINCIPLES

A set S is countable if S is finite or if the elements of S can be arranged as a sequence, in which case S
is said to be countably infinite; otherwise S is said to be uncountable. The set E of even integers is
countably infinite, whereas one can prove that the unit interval I = [0, 1] is uncountable.

Counting Elements in Finite Sets

The notation n(S) or |S| will denote the number of elements in a set S. Thus n(A) = 26, where A is the
letters in the English alphabet, and n(D) = 7, where D is the days of the week. Also n(Φ) = 0 since the
empty set has no elements.

DDE, GJUS&T, Hisar 18 |


Discrete Mathematics & Optimization MCA-25

The following theorem applies.

Theorem: Suppose A and B are finite disjoint sets. Then A ∪ B is finite and

n(A ∪ B) = n(A) + n(B)

This theorem may be restated as follows:

Suppose S is the disjoint union of finite sets A and B. Then S is finite and

n(S) = n(A) + n(B)

Proof: In counting the elements of A ∪ B, first count those that are in A. There are n(A) of these. The
only other elements of A ∪ B are those that are in B but not in A. But since A and B are disjoint, no
element of B is in A, so there are n(B) elements that are in B but not in A. Therefore, n(A ∪
B) = n(A) + n(B).

For any sets A and B, the set A is the disjoint union of A\B and A ∩ B. Thus theorem gives us the
following useful result.

Result 1: Let A and B be finite sets. Then

n(A\B) = n(A) − n(A ∩ B)

For example, suppose an art class A has 25 students and 10 of them are taking a biology class B. Then
the number of students in class A which are not in class B is:

n(A\B) = n(A) − n(A ∩ B) = 25 − 10 = 15

Given any set A, recall that the universal set U is the disjoint union of A and AC. Accordingly, Theorem
also gives the following result.

Result 2: Let A be a subset of a finite universal set U. Then

n(AC) = n(U) − n(A)

For example, suppose a class U with 30 students has 18 full-time students. Then there are 30−18 = 12
part-time students in the class U.

DDE, GJUS&T, Hisar 19 |


Discrete Mathematics & Optimization MCA-25

1.7.1 Inclusion–Exclusion Principle

There is a formula for n(A ∪ B) even when they are not disjoint, called the Inclusion–Exclusion
Principle. Namely:

Theorem (Inclusion–Exclusion Principle) : Suppose A and B are finite sets. Then A ∪ B and A ∩ B
are finite and

n(A ∪ B) = n(A) + n(B) − n(A ∩ B)

That is, we find the number of elements in A or B (or both) by first adding n(A) and n(B) (inclusion)
and then subtracting n(A ∩ B) (exclusion). since its elements were counted twice.

We can apply this result to obtain a similar formula for three sets:

Result 3: Suppose A, B, C are finite sets. Then A ∪ B ∪ C is finite and

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C)

EXAMPLE : Suppose a list A contains the 30 students in a mathematics class, and a list B contains the
35 students in an English class, and suppose there are 20 names on both lists. Find the number of
students:

(a) only on list A, (b) only on list B,

(c) on list A or B (or both), (d) on exactly one list.

(a) List A has 30 names and 20 are on list B; hence 30 − 20 = 10 names are only on list A.

(b) Similarly, 35 − 20 = 15 are only on list B.

(c) We seek n(A ∪ B).

By inclusion–exclusion,

n(A ∪ B) = n(A) + n(B) − n(A ∩ B) = 30 + 35 − 20 = 45.

DDE, GJUS&T, Hisar 20 |


Discrete Mathematics & Optimization MCA-25

In other words, we combine the two lists and then cross out the 20 names which appear twice.

(d) By (a) and (b), 10 + 15 = 25 names are only on one list; that is, n(A ᶿ B) = 25.

1.8 CLASSES OF SETS

CLASSES OF SETS

Given a set S, we might wish to talk about some of its subsets. Thus we would be considering a set of
sets.Whenever such a situation occurs, to avoid confusion, we will speak of a class of sets or collection
of sets rather than a set of sets. If we wish to consider some of the sets in a given class of sets, then we
speak of subclass or subcollection.

EXAMPLE Suppose S = {1, 2, 3, 4}.

(a) Let A be the class of subsets of S which contain exactly three elements of S. Then

A = [{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}]

That is, the elements of A are the sets {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, and {2, 3, 4}.

(b) Let B be the class of subsets of S, each which contains 2 and two other elements of S. Then

B = [{1, 2, 3}, {1, 2, 4}, {2, 3, 4}]

The elements of B are the sets {1, 2, 3}, {1, 2, 4}, and {2, 3, 4}. Thus B is a subclass of A, since every
element of B is also an element of A. (To avoid confusion, we will sometimes enclose the sets of a class
in brackets instead of braces.)

1.9 PARTITIONS OF SET

Partitions

Let S be a nonempty set. A partition of S is a subdivision of S into non overlapping, nonempty subsets.

Precisely, a partition of S is a collection {Ai } of nonempty subsets of S such that:

(i) Each a in S belongs to one of the Ai .

(ii) The sets of {Ai } are mutually disjoint; that is, if

Aj ≠ Ak then Aj ∩ Ak = Φ

DDE, GJUS&T, Hisar 21 |


Discrete Mathematics & Optimization MCA-25

The subsets in a partition are called cells. Figure given below is a Venn diagram of a partition of the
rectangular set

S of points into five cells, A1, A2,A3,A4,A5.

EXAMPLE: Consider the following collections of subsets of S = {1, 2, . . ., 8, 9}:

(i) [{1, 3, 5}, {2, 6}, {4, 8, 9}]

(ii) [{1, 3, 5}, {2, 4, 6, 8}, {5, 7, 9}]

(iii) [{1, 3, 5}, {2, 4, 6, 8}, {7, 9}]

Then (i) is not a partition of S since 7 in S does not belong to any of the subsets. Furthermore, (ii) is not
a partition of S since {1, 3, 5} and {5, 7, 9} are not disjoint.

On the other hand, (iii) is a partition of S.

1.10 MULTI SET

What is a Multiset?

A multiset in mathematics is a generalization of the concept of a set. It’s a collection of unordered


numbers (or other elements), where every element X occurs a finite number of times.

The difference between sets and multisets is in how they address multiples: a set includes any number at
most once, while a multiset allows for multiple instances of the same number. There is just one set with
elements a and b, the set {a,b}, but there are many multisets: {a, b, b}, {a, a, b}, and {a, a, a, a, b, b} are
just a few.

DDE, GJUS&T, Hisar 22 |


Discrete Mathematics & Optimization MCA-25

Multiplicity:

The multiplicity of an element x in a multiset is just the number of times that element appears in the
set. For instance, in the multiset {3, 3, 4, 5, 6} the element 3 has multiplicity 2. The elements 4, 5, and 6
all have multiplicity 1.

If we know the elements included and the multiplicity for each of them we know everything about a
multiset. A multiset which includes just 4 with multiplicity 2, 5 with multiplicity 7 and 99 with
multiplicity 2 can be written as {4, 4, 5, 5, 5, 5, 5, 99, 99}. Order doesn’t matter, so this is the same as
{4, 99, 5, 4, 99, 5, 5, 5, 5 }

To distinguish between sets and multisets, a notation that incorporates square brackets is sometimes
used: the multiset {a, a, b} can be denoted as [a, a, b].

The cardinality of a multiset is constructed by summing up the multiplicities of all its elements. For
example, in the multiset {a, a, b, b, b, c} the multiplicities of the members a, b, and c are respectively 2,
3, and 1, and therefore the cardinality of this multiset is 6.

Operations on Multisets

1. Union of Multisets: The Union of two multisets A and B is a multiset such that the multiplicity of an
element is equal to the maximum of the multiplicity of an element in A and B and is denoted by A ∪ B.

Example:

Let A = {l, l, m, m, n, n, n, n}

B = {l, m, m, m, n},

A ∪ B = {l, l, m, m, m, n, n, n, n}

2. Intersections of Multisets: The intersection of two multisets A and B, is a multiset such that the
multiplicity of an element is equal to the minimum of the multiplicity of an element in A and B and is
denoted by A ∩ B.

Example:

Let A = {l, l, m, n, p, q, q, r}

B = {l, m, m, p, q, r, r, r, r}

DDE, GJUS&T, Hisar 23 |


Discrete Mathematics & Optimization MCA-25

A ∩ B = {l, m, p, q, r}.

3. Difference of Multisets: The difference of two multisets A and B, is a multiset such that the
multiplicity of an element is equal to the multiplicity of the element in A minus the multiplicity of the
element in B if the difference is +ve, and is equal to 0 if the difference is 0 or negative

Example:

Let A = {l, m, m, m, n, n, n, p, p, p}

B = {l, m, m, m, n, r, r, r}

A - B = {n, n, p, p, p}

4. Sum of Multisets: The sum of two multisets A and B, is a multiset such that the multiplicity of an
element is equal to the sum of the multiplicity of an element in A and B

Example:

Let A = {l, m, n, p, r}

B = {l, l, m, n, n, n, p, r, r}

A + B = {l, l, l, m, m, n, n, n, n, p, p, r, r, r}

5. Cardinality of Sets: The cardinality of a multiset is the number of distinct elements in a multiset
without considering the multiplicity of an element

Example:

A = {l, l, m, m, n, n, n, p, p, p, p, q, q, q}

The cardinality of the multiset A is 5.

1.11 CHECK YOUR PROGRESS

1. Express the following sets in Roster method:

(i) A={x: x is a day of the week}

(ii) B = {x: x is a month of the year}

DDE, GJUS&T, Hisar 24 |


Discrete Mathematics & Optimization MCA-25

3
(iii) C = {x: x –1 =0}

(iv) D = {x: x is a positive divisor of100}

(v) E={x:x is a letter of the word ALGEBRA}

2. Which of the following sets are equal?

A = {x | x2 − 4x + 3 = 0}, C= {x | x ∈ N, x <3}, E= {1, 2}, G= {3, 1},

B = {x | x2 − 3x + 2 = 0}, D= {x | x ∈ N, x is odd, x <5}, F = {1, 2, 1}, H= {1, 1, 3}.

3. List the elements of the following sets if the universal set is U = {a, b, c, …, y, z}.

Furthermore, identify which of the sets, if any, are equal.

A = {x | x is a vowel}, C= {x | x precedes f in the alphabet},

B = {x | x is a letter in the word “little”}, D= {x | x is a letter in the word “title”}.

4. Let A = {1, 2, …, 8, 9}, B = {2, 4, 6, 8}, C = {1, 3, 5, 7, 9}, D = {3, 4, 5}, E = {3, 5}.

Which of the these sets can equal a set X under each of the following conditions?

(a) X and B are disjoint. (c) X ⊆A but X _⊂C.

(b) X ⊆D but X _⊂B. (d) X ⊆C but X _⊂A.

5. Write true or false:

(i) 5N (ii) ½  Z (iii) –1 Q

(iv) 2  R (v) -1 R (vi) –3 N

6. Consider the universal set U = {1, 2, 3, …, 8, 9} and sets A = {1, 2, 5, 6}, B = {2, 5, 7},
C= {1, 3, 5, 7, 9}. Find:

(a) A ∩ B and A ∩ C (c) AC and CC (e) A Φ B and A Φ C

(b) A ∪ B and B ∪ C (d) A\B and A\C (f) (A ∪ C)\B and (B ΦC)\A

7. Find the empty sets, finite and infinite sets:

(i) the set of numbers divisible by zero

DDE, GJUS&T, Hisar 25 |


Discrete Mathematics & Optimization MCA-25

(ii) the set of positive integers less than 15 and divisible by 17

(iii) the set of planets of the solar system

(iv) the set of positive integers divisible by 4

(v) the set of co-planer triangles

(vi) the set of Olympians from Assam participating in 2008,Beijing Olympic.

8. Examine the equality of the following sets:


2
(i) A = {2, 3}, B = {x: x –5x+6 =0}

(ii) A = {x: x is a letter of the word WOLF} B = {x: x is a letter of the word FLOW}

(iii) A = {a, b, c}, B = {a, {b,c}}

9. If A={3n:nN}, B={n:nN,n<20} then find AB, B–A.

10. Find the power set P(A) of A = {1, 2, 3, 4, 5}.

11. In a survey of 120 people, it was found that:

65 read Newsweek magazine, 20 read both Newsweek and Time,

45 read Time, 25 read both Newsweek and Fortune,

42 read Fortune, 15 read both Time and Fortune,

8 read all three magazines.

(a) Find the number of people who read at least one of the three magazines.

(b) Find the number of people who read exactly one magazine.

12. Let A = [{1, 2, 3}, {4, 5}, {6, 7, 8}]. (a) List the elements of A; (b) Find n(A).

13. Let S = {a, b, c, d, e, f , g}. Determine which of the following are partitions of S:

(a) P1 = [{a, c, e}, {b}, {d, g}], (c) P3 = [{a, b, e, g}, {c}, {d, f }],

(b) P2 = [{a, e, g}, {c, d}, {b, e, f }], (d) P4 = [{a, b, c, d, e, f , g}].

DDE, GJUS&T, Hisar 26 |


Discrete Mathematics & Optimization MCA-25

1.12 SUMMARY

1. A set is a collection of well-defined and distinct objects. The objects are called members or
elements of the set.

2. Sets are represented by capital letters and elements by small letters. If’a’ is an element of set A,we
write 𝑎 ∈ 𝐴,otherwise 𝑎 ∉ 𝐴.

3. Sets are represented by (i) Roster or Tabular method and (ii)Ruleor Set-builder method.

4. Aset having no element is called empty set or null set or void set, denoted by$.

5. A set having a finite number of elements is called a finite set,otherwise it is called an infinite set.

6. Two sets AandB are equal,i.e. A=B if and only if every element of A is an element of B and also
every element of B is an element of A, otherwise AB.

7. A is a subset of B, denoted by AB if every element of Aisa element of B and A is a proper


subset of B if AB and AB. In this case, we write AB.

8. A=B if and only if AB and BA.

9. The set of all the subsets 8 a set A is called the power set of A, denoted by P(A)or 2A. If |A|=n,

then |P(A)|=2n.

10. Venn diagrams are plane geometrical diagrams used for representing relationships between sets.

11. The union of two sets AandB is AB which consists of all elements which are either in Aor B or
in both. AB={x:xcAor xcB}

12. The intersection of two sets AandB is ABwhich consists of all the elements common to both A
andB.

13. For any two sets A and B, the difference set, A – B consists of all elements which are in A,but not
in B.A– B={x: xcA and xøB}

14. The Universal Set U is that set which contains all the sets under any

particular discussion as its subsets.

DDE, GJUS&T, Hisar 27 |


Discrete Mathematics & Optimization MCA-25

c
15. The complement of a set A, denoted by A orAis that set which consists of all those elements in
U which are not in A.

A'={x:xcUandxøA}=U–A

16. Following are the Laws of Algebra of Sets: AA=A,AA=A

AB = BA, AB = BA

A(BC) = (AB)C, A(BC) = (AB)C

A(BC) = (AB)(AC), A(BC) = (AB)(AC)

A$= A, AU = U, AU = A, A$= $

AA'=U,AA'=$,(A')'=A,U'=$,$'=U

(AB)'=A'B',(AB)'=AB'.

1.13 KEYWORDS

Singleton Set: -If a set contains only one element it is called to be a singleton set.

Finite Set: -A set consisting of a natural number of objects, i.e. in which number element is finite is
said to be a finite set. Consider the sets.

Infinite set: -If the number of elements in a set is finite, the set is said to be an infinite set.

Subset: -A subset A is said to be subset of B if every elements which belongs to A also belongs to B.

Proper set: -A set is said to be a proper subset of B if A is a subset of B, A is not equal to B or A is a


subset of B but B contains at least one element which does not belong to A.

Power set: -Power set of a set is defined as a set of every possible subset. If the cardinality
of A is n than Cardinality of power set is 2^n as every element has two options either to belong to a
subset or not.

Universal set: -Any set which is a superset of all the sets under consideration is said to be universal set
and is either denoted by omega or S or U.

Partition of set:A partition of S is a subdivision of S into nonoverlapping, nonempty subsets.

DDE, GJUS&T, Hisar 28 |


Discrete Mathematics & Optimization MCA-25

Multi sets: multi set isa collection of unordered numbers, where every element X occurs a finite
number of times.

1.14 SELF ASSESSMENT TEST

1. Write‘true’or‘false’with proper justification:

(i) the set of even prime numbers is an empty set

(ii) {x : x+2 = 5, x < 0} is an empty set

(iii) {3} c {1, 2, 3}

(iv) x c{{x, y}}

(v) {a, b} c {a, b, {c}}

(vi) if A be any set, then $cA cU


2
2. Which of the following sets are equal? A = {x: x + x – 2 =0}
2
B = {x: x – 3x + 2 = 0}

C = {x : x Z, |x| = 1} D = {–2, 1}

E = {1, 2}
2
F = {x: x – 1 = 0}

3. Find the sets which are finite and which are infinite:

(i) the set of natural numbers which are multiple of7

(ii) the set of all districts of Assam

(iii) the set of real numbers between 0 and1

(iv) the set of lions in the world.

4. If U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {0, 2, 3, 6}, B = {1, 2, 6, 8},C={3,7,8,9},then


findA,B,C,(𝐴𝑢𝐵)𝑛𝐶,(𝐴𝑢𝐵′)𝑢𝐶′, (𝐴𝑛𝐵)𝑛𝐶′,(𝐴– 𝐶)𝑢𝐵′,(𝐵– 𝐴)′𝑛𝐶.

5. If 𝐴𝑢𝐵 = 𝐵 and 𝐴𝑛𝐵 = 𝐵,then what is the relation between A and B?

DDE, GJUS&T, Hisar 29 |


Discrete Mathematics & Optimization MCA-25

6. Verify the following identities with numerical examples:

(i) 𝐴– 𝐵 = 𝐵′– 𝐴′

(ii) (𝐴– 𝐵)𝑢(𝐵– 𝐴) = (𝐴𝑢𝐵)– (𝐴𝑛𝐵)

(iii) 𝐴– (𝐵𝑛𝐶) = (𝐴– 𝐵)𝑢(𝐴– 𝐶)

(iv) 𝐴– (𝐵𝑢𝐶) = (𝐴– 𝐵)𝑛(𝐴– 𝐶)

7. Write down the power set of the set 𝐴 = {{$}, 𝑎, {𝑏, 𝑐}}.

8. Given 𝐴 = {{𝑎, 𝑏}, {𝑐}, {𝑑, 𝑒, 𝑓}}, how many elements are there in 𝑃(𝐴)?

9. Using Venn diagrams show that

(i) 𝐴𝑢𝐵𝑐𝐴𝑢𝐶but𝐵ø𝐶

(ii) 𝐴𝑛𝐵𝑐𝐴𝑛𝐶but𝐵ø𝐶

(iii) 𝐴𝑢𝐵 = 𝐴𝑢𝐶but𝐵𝑠𝐶.

10. A survey on a sample of 25 new cars being sold at a local auto dealer was conducted to see which
of three popular options, air-conditioning (A), radio (R), and power windows (W), were already
installed. The survey found:

15 had air-conditioning (A), 5 had A and P,

12 had radio (R), 9 had A and R, 3 had all three options.

11 had power windows (W), 4 had R and W,

Find the number of cars that had: (a) onlyW; (b) onlyA; (c) onlyR; (d)R andW but notA; (e)A and R
but not W; (f) only one of the options; (g) at least one option; (h) none of the options.

11. Let S = {1, 2, …, 8, 9}.Determine whether or not each of the following is a partition of S

(a) [{1, 3, 6}, {2, 8}, {5, 7, 9}] (c) [{2, 4, 5, 8}, {1, 9}, {3, 6, 7}]

(b) [{1, 5, 7}, {2, 4, 8, 9}, {3, 5, 6}] (d) [{1, 2, 7}, {3, 5}, {4, 6, 8, 9}, {3, 5}]

DDE, GJUS&T, Hisar 30 |


Discrete Mathematics & Optimization MCA-25

1.15 ANSWERS TO CHECK YOUR PROGRESS

Ans:1

(i) A = {Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday}

(ii) B = {January, February, March, April, May, June, July, August, September, October,
November, December}
2
(iii) C = {1, w,w }

(iv) D = {1, 2, 4, 5, 10, 20, 25, 50, 100}

(v) E = {A, B, E, G, L, R}

Ans: 2 B = C = E = F, A = D = G = H.

Ans:3A = {a, e, i, o, u}, B = D = {l, i, t, e},

C = {a, b, c, d, e}.

Ans: 4(a) C and E; (b) D and E; (c) A, B, and D; (d) None.

Ans : 5 (i) True, (ii) False, (iii) True, (iv) True, (v) False, (vi)True.

Ans:6 (a) A ∩ B = {2, 5}, A ∩ C = {1, 5};

(b) A ∪ B = {1, 2, 5, 6, 7}, B ∪ C = {1, 2, 3, 5, 7, 9};

(c) AC = {3, 4, 7, 8, 9}, CC = {2, 4, 6, 8};

(d) A\B = {1, 6}, A\C = {2, 6};

(e) A ΦB = {1, 6, 7}, A Φ C = {2, 3, 6, 7, 9};

(f) (A ∪ C)\B = {1, 3, 6, 9}, (B Φ C)\A = {3, 9}.

Ans:7 (i) , (ii) $, (iii) finite, (iv) infinite, (v) infinite, (vi) .

Ans:8 (1)B = {2, 3} =A

(2)A = {W, O, L, F}, B = {F, L, O, W} and so, A =B

(3)AB; since bA but b≠B.

DDE, GJUS&T, Hisar 31 |


Discrete Mathematics & Optimization MCA-25

Ans:9 A = {3, 6, 9, 12, 15, 18, 21, ...}, B = {1, 2, 3, ..., 18, 19, 20},

Hence A B = {3, 6, 9, 12, 15, 18}

And B–A={1,2,4,5,7,8,10,11,13,14,16,17,19}

Ans10: P(A) has 25 = 32 elements as follows:

[Φ, {1}, {2}, {3}, {4}, {5}, {1, 2}, {1, 3}, {1, 4}, {1,5}, {2, 3}, {2, 4}, {2, 5},

{3, 4}, {3, 5}, {4, 5}, {1, 2,3}, {1, 2, 4}, {1, 2, 5}, {2, 3, 4}, {2, 3, 5}, {3, 4, 5},

{1, 3, 4}, {1, 3, 5}, {1, 4, 5}, {2, 4, 5}, {1, 2, 3, 4},{1, 2, 3, 5}, {1, 2, 4, 5},

{1, 3, 4, 5}, {2, 3, 4, 5}, A]

Ans11: (a) We want to find n(N ∪ T ∪ F).

n(N ∪ T ∪ F)= n(N) + n(T ) + n(F ) − n(N ∩ T ) − n(N ∩ F) − n(T ∩ F) + n(N ∩ T ∩ F)

= 65 + 45 + 42 − 20 − 25 − 15 + 8 = 100

(b) 28+ 18 + 10 = 56 read exactly one of the magazines.

Ans12: (a) A has three elements, the sets {1, 2, 3}, {4, 5}, and {6, 7, 8}.

(b) n(A) = 3.

Ans:13 (a) P1 is not a partition of S since f ∈ S does not belong to any of the cells.

(b) P2 is not a partition of S since e ∈ S belongs to two of the cells.

(c) P3 is a partition of S since each element in S belongs to exactly one cell.

(d) P4 is a partition of S into one cell, S itself.

1.12REFERENCES/SUGGESTED READINGS

1. Discrete Mathematics – Semyour Lipschutz & Marc Lipson.

2. Discrete Mathematical Structures with Applications to Computer Scinece – J. P. Tremblay & R.


Manohar.

DDE, GJUS&T, Hisar 32 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA- 25


AUTHOR: KAPILA DEVI
Lesson No. 2

RELATION AND FUNCTION

REVISED /UPDATED SLM BY RENU BANSAL

STRUCTURE

2.1 Learning Objectives

2.2 Introduction

2.3 Concept of Relation

2.3.1 Identity Relation

2.3.2 Inverse Relation

2.4 Representation of relations

2.5 Types of Relation

2.5.1 Equivalence Relations

2.5.2 Partial Ordered relations (POSETS)

2.6 Equivalence Class

2.7 Concept of Function

2.8 Types of Function


2.8.1 Inverse Function

2.9 Composition of function

2.10 Check Your Progress

2.11 Summary

2.12 Keywords

DDE, GJUS&T, Hisar 33 |


Discrete Mathematics & Optimization MCA-25

2.13 Self-Assessment Test

2.14 Answers to Check Your Progress

2.15 References/ Suggested Readings

2.1 LEARNING OBJECTIVES

After going through this unit, you will be able to know:

1. The concept of a relation

2. Different types of relation

3. equivalence relation

4. Partial ordered relation

5. Equivalence class

6. The concept of a function

7. Different types of function.

8. Composition of function

2.2 INTRODUCTION

Set theory may be called the language of modern mathematics. We know that a set is a well-defined
collection of objects. Also we know the notion of subset of a set. If every element of a set B is in set A,
then B is a subset of A. Symbolically we denote it by B A.

Also we note that if A is a finite set having n elements, the number of subsets of A is2n. A gain if A, B
are two non-empty sets,

Cartesian product

The Cartesian product of A and B is denoted by A×B and is defined by AB{(a,b):aA, bB}

(a, b) is called an ordered pair. Let aA, cA; bB, dB.

DDE, GJUS&T, Hisar 34 |


Discrete Mathematics & Optimization MCA-25

(a, b)A x B, (c, d)A x B

We know that (a, b) = (c, d) a=c, b=d.

Also we know that if A, B are finite and n(A)=x, n(B)= y, then n(AXB) = n(BXA)=xy

[Here n(A) denotes the number of elements of A]

If one of the sets A and B is infinite, then A X B and B X A are infinite.

In this unit we will study relations and functions which are subsets of Cartesian product of two sets.We
will denote the set of natural numbers by ‘N’, the set of integers by Z, the set of rational numbers by Q,
the set of real numbers by IR, the set of complex numbers by C.

2.3 CONCEPT OFRELATION

Let us consider the following sentences.

 11 is greater than10.

 35 is divisible by7.

 New Delhi is the capital of India.

In each of the sentences there is a relation between two ‘objects’. Now let us see what is meant by
relation in set theory.

Definition Let A and B be two non-empty sets. A subset R of AXB is said to be a relation from Ato
B.If A=B, then any subset of A X A is said to be a relation on A. If R  AxB, and
(a,b)R;aA,bB,it is also written as a Rb and is read as ‘a is R related to b’.

Note. The set of the first components of the ordered pairs of R is called the domain and the set of the
second components of the ordered pairs of R is called the range of R. If A,B are finite sets and
xy
n(A)=x,n(B)=y; then n(AXB)=xy.So,the number of subsets of AXB is2 .Therefore, the number of
xy
relations from A to B is 2 .

Following examples shows representation of relations.

Example 1: Let A ={1, 2, 3},B={8, 9}

DDE, GJUS&T, Hisar 35 |


Discrete Mathematics & Optimization MCA-25

A x B ={(1, 8), (1, 9), (2, 8), (2, 9), (3, 8), (3, 9)}

Let R = {(1, 8), (2, 9), (3, 9)}

Clearly RAxB

R is a relation from A to B. Here 1R8, 2R9, 3R9

Domain of R = {1, 2, 3}

Range of R = {8, 9}

Example 2:Let IR be the set of real numbers. Let R = {(x, y): x, y IR, x<y} IR x IR

R is a relation of IR.

3<5, (3, 5)R i.e. 3R5

19<27, (19, 27)R i.e. 19R27 But 5>3, (5, 3) R, i.e. 5 R3.

Example 3: Let X be the set of odd integers. Let R = {(x, y): x, y X and x+y is odd}

We know that the sum of two odd integers is an even integer.

if x, y are odd, then x+y cannot be odd.

R =X x X

In this case R is called a null relation on X.

Example 4: Let E be the set of even integers. Let R = {(x, y): x, y  E and x+y is even}

We know that the sum of the even integers is an even integer.

 if x and y are even, then x+y is always even.

 R = E x EE x E

In this case R is called a universal relation on E.

2.3.1. IDENTITY RELATION

Let A be a non-emptyset. I = {(a, a): aA} A xA IAis called the identity relation on A.

DDE, GJUS&T, Hisar 36 |


Discrete Mathematics & Optimization MCA-25

Example 5: Let A = {1, 2, 3, 4} Then I = {(1, 1), (2, 2), (3, 3), (4, 4)} A x A.

Clearly IA is the identity relation on A.

2.3.2. INVERSE RELATION

Let A,B be two non-empty sets.Let R be a relation from AtoB,i.e. RAxB. The inverse relation of R is
-1 -1 -1
denoted by R ,and is defined by R = {(b, a): (a, b)R} B xA. Clearly, domain of R = range of R
-1
range of R = domain of R

2.4 REPRESENTATION OF RELATION

There are various ways of picturing relations.

Let S be a relation on the set R of real numbers; that is, S is a subset of R2 = R × R. Frequently, S
consists of all ordered pairs of real numbers which satisfy some given equation E(x, y) = 0 (such as x2 +
y2 = 25).

Since R2 can be represented by the set of points in the plane, we can picture S by emphasizing those
points in the plane which belong to S. The pictorial representation of the relation is sometimes called the
graph of the relation. For example, the graph of the relation x2+y2 = 25 is a circle having its center at
the origin and radius 5.

Directed Graphs of Relations on Sets

DDE, GJUS&T, Hisar 37 |


Discrete Mathematics & Optimization MCA-25

There is an important way of picturing a relation R on a finite set. First we write down the elements of
the set, and then we draw an arrow from each element x to each element y whenever x is related to y.
This diagram is called the directed graphof the relation. For example, shows the directed graph of the
following relation R on the set A = {1, 2, 3, 4}:

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

Observe that there is an arrow from 2 to itself, since 2 is related to 2 under R.

Pictures of Relations on Finite Sets

Suppose A and B are finite sets. There are two ways of picturing a relation R from A to B.

(i) Form a rectangular array (matrix) whose rows are labeled by the elements of A and whose
columns are labeled by the elements of B. Put a 1 or 0 in each position of the array according
as a ∈A is or is not related to b ∈B. This array is called the matrix of the relation.

(ii) Write down the elements of A and the elements of B in two disjoint disks, and then draw an
arrow from a ∈A to b ∈B whenever a is related to b. This picture will be called the arrow
diagram of the relation. Figure below pictures the relation R by the above two ways.

2.5 TYPES OF RELATION

Let A be a non-empty set, and R be a relation on A, i.e. R A x A.

1. R is called reflexive if(a,a)R,i.e;aRa, for all aA.

2. R is called symmetric if whenever (a, b)R, then (b, a)R, i.e, if whenever aRb,then bRa;

DDE, GJUS&T, Hisar 38 |


Discrete Mathematics & Optimization MCA-25

a,bA.

3. R is called anti-symmetric if (a, b)R, (b, a)R  a = b, i.e., if aRb, bRa  a=b; a, bA.

4. R is called transitive if whenever (a,b),(b,cR, then (a,c)R, i.e., if whenever aRb, bRc, then
aRc;a,b,cA.

Example 7: Let A = {1, 2, 3} R = (1, 1), (2, 2), (1, 2), (2, 1)} Examine if R is reflexive, symmetric,
anti-symmetric, transitive.

Solution: Here (1, 1)R, (2, 2)R; but (3, 3)R. R is not reflexive.

Again, (a, b) R (b, a)RR is symmetric.

Again, (1, 2) R, (2, 1) R, but 1 2 R is not anti-symmetric.

Again, if (a, b)R, (b, c) R, then (a, c)R R is transitive.

Example8:Let Z be the set of integers, and R={(x,y):x,yZ,x  y} Examine if R is reflexive,


symmetric, anti-symmetric and transitive.

Solution: We have aa, aZ i.e, (a, a) R, aZ

R is reflexive. Again, if a b, b i.e;(a, b)R (b,a)R

R is not symmetric.

Again, ab, b a a = b

i.e. (a, b) R, (b, a) R a = b

R is anti-symmetric.

Again a b, b c a c

i.e. (a, b), (b, c), R (a, c)R

R is transitive.

Example 9: Give an example of a relation which is transitive, but neither reflexive nor symmetric.

DDE, GJUS&T, Hisar 39 |


Discrete Mathematics & Optimization MCA-25

Solution: LetA={1,2} Let R = {(1, 1), (1, 2)} A x A Clearly R is a relation on A. Here (2, 2)R. R
is not reflexive.

Again (1, 2) R, but (2, 1) R R is not symmetric. But R is transitive.

2.5.1 EQUIVALENCERELATION

Let A be a non-empty set. A relation R on A is called an equivalence relation if it is reflexive,


symmetric and transitive.

Example10:Let Z be the set of integers and R = {(x, y): x, yZ and x + y is even} Examine if R is an
equivalence relation on Z.

Solution: Let x Z

x + x is even

(x, x) R, xZ

R is reflexive.

(x, y)R x + y is even

y + x is even

(y, x)R.

R is symmetric. (x, y) R, (y, z)R

x + y is even, y + z is even

(x + y) + (y + z) is even

(x+ z) + 2y is even

x + z is even (x, z) R

R is transitive

R is an equivalence relation on Z.

DDE, GJUS&T, Hisar 40 |


Discrete Mathematics & Optimization MCA-25

Example11:Let A be the set of all straight lines in a plane. Let R={(x,y):x,yAandxy} Examine if
R is reflexive, symmetric and transitive.

Solution:A line cannot be perpendicular to itself,i.e.xx

(x, x) R

R is not reflexive

If a line x is perpendicular to an other line y, then y is perpendicular to x,i.e. xy yx

(x, y)R  (y, x) R

R is symmetric.

Ifxy,yz,thenxz

(x,z)R
(x,y),(y,z)R

If x is perpendicular to y, y is perpendicular to z, then x is parallel to z.

R is not transitive.

Example12:Let A be the set of all straight lines in a plane. Let R={(x,y):x,yAandx||y}. Examine if R
is an equivalence relation on A.

Solution: A line is parallel to itself, i.e. x||x x A

(x, x) R, x R

R is reflexive. x||y y||x

(x, y) R (y, x)R

R is symmetric. x||y, y||z  x||z

(x, y), (y, z) R  (x, z)R.

R is transitive

Thus, R is an equivalence relation on A.

DDE, GJUS&T, Hisar 41 |


Discrete Mathematics & Optimization MCA-25

Example13:Let IN be the set of natural numbers. Let a relation R be defined on INxIN by (a,b) R (c,d)
if and only if ad=bc Show that R is an equivalence relation on IN x IN.

Solution: : We have ab = ba

(a, b) R (a, b)

R is reflexive

(a, b) R (c, d) ad = bc; a, b, c, d, IN

cb = da

(c, d) R (a, b)

R is symmetric

(a, b) R (c, d) and (c, d) R (e, f); a, b, c, d, e, f, IN

ad = bc and cf = de

adcf = bcde

af = be

(a, b) R (e, f)

R is transitive.

Thus, R is an equivalence relation on IN x IN.

Example 14: (Congruence modulo n) Let Z be the set of integers, and n be any fixed positive integer.
Let a, bZ a is said to be congruent to b modulo n if and only if a–b is divisible by n. Symbolically, we
write. a  b (mod n) Show that the relation ‘congruence modulon’ is an equivalence relation on Z.

Solution: We know that a–a is divisible by n, i.e., a  a (mod n)

the relation is reflexive. Let a  b (mod n)

a–b is divisible by n.

b–a is divisible by n.

DDE, GJUS&T, Hisar 42 |


Discrete Mathematics & Optimization MCA-25

b a (mod n)

the relation is symmetric.

Let a  b (mod n), b  c (mod n)

a–b is divisible by n, b–c is divisible by n

a–b+b–c is divisible by n

a–c is divisible by n

a  c (mod n)

the relation is transitive.

Thus, the relation ‘congruence modulo n’ is an equivalence relation on Z.

We know that 15-3 is divisible by 4.

15 is congruent to 3 modulo 4i.e.

15  3 (mod 4)

15–3 is not divisible by 7

15 is not congruent to 3 modulo 7

i.e.153(mod7)

Example 15: Let Z be the set of integers. Let R = {(a, b): a, b Z, ab0}

Examine if R is an equivalence relation on Z.

Solution: We have aa  0

(a, a)R,aZ

R is reflexive Let (a, b)R

ab 0

ba 0

DDE, GJUS&T, Hisar 43 |


Discrete Mathematics & Optimization MCA-25

(b, a)R

R is symmetric.

We have(–2) x 0 = 0, 0 x2=0

(–2, 0), (0, 2) R

But (–2) x 2 = –4<0

(–2, 2) R

R is not transitive.

Thus, R is not an equivalence relation.

Theorem 1: The inverse of an equivalence relation is also an equivalence relation.

Proof. Let A be a non-empty set.Let R be an equivalence relation on A R is reflexive.

(x, x) R, xA

-1
(x, x) R , xA
-1 –1
R is reflexive. Let (x, y)R
-1
This(y, x)R [by defn of R ]

 (x, y) R [R issymmetric]


-1
(y, x) R
-1
R issymmetric.
-1
Let (x, y), (y,z)R
-1
(y, x), (z, y)R [by defn of R ]

(z, y), (y, x)R

(z, x) R [R is transitive]

DDE, GJUS&T, Hisar 44 |


Discrete Mathematics & Optimization MCA-25

-1
(x, z) R
-1
R is transitive
-1
Thus, R is an equivalence relation.

Theorem 2: The intersection of two equivalence relations is also an equivalence relation.

Proof. Let A be a non-empty set.

Let R and S be two equivalence relations on A. R and S are reflexive

(x, x) R and (x, x) S, x A

(x, x) R S, xA

RS is reflexive. Let (x, y)RS

This (x, y) R and (x, y)S

(y, x)R and (y, x)S [R, S are symmetric]

(y, x) RS

RS is symmetric.

Let (x, y) RS, (y, z) RS

(x, y) R and (x, y) S, (y, z) R and (y, z)S

(x, z) R and (x, z)S [R, S are transitive]

(x, z) RS

RS is transitive.

Thus, RS is an equivalence relation.

Remarks: The union of two equivalence relations is not necessarily an equivalence relation.

Let us consider A = {1, 2, 3}

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

DDE, GJUS&T, Hisar 45 |


Discrete Mathematics & Optimization MCA-25

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

are two equivalence relations on A.

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

(2, 1) RS, (1, 3)RS)

But (2, 3)  RS

RS is not transitive

RS is not an equivalence relation.

2.5.2 PARTIAL ORDERING RELATIONS(POSETS)

Suppose R is a relation on a set S satisfying the following three properties:

1. (Reflexive) For any a ∈S, we have aRa.

2. (Antisymmetric) If aRb and bRa, then a = b.

3. (Transitive) If aRb and bRc, then aRc.

Then R is called a partial order or, simply an order relation, and R is said to define a partial ordering of
S. The set S with the partial order is called a partially ordered setor, simply, an ordered set or poset.
We write (S,R)

when we want to specify the relation R.

The most familiar order relation, called the usual order, is the relation ≤ (read “less than or equal”) on
the positive integers N or, more generally, on any subset of the real numbers R.

here we give some examples.

EXAMPLE :

(a) The relation ⊆ of set inclusion is a partial ordering on any collection of sets since set inclusion has
the three desired properties. That is,

(1) A ⊆ A for any set A.

(2) If A ⊆ B and B ⊆ A, then A = B.

DDE, GJUS&T, Hisar 46 |


Discrete Mathematics & Optimization MCA-25

(3) If A ⊆ B and B ⊆ C, then A ⊆ C.

(b) The relation ≤ on the set R of real numbers is reflexive, antisymmetric, and transitive. Thus ≤ is a
partial ordering on R.

(c) The relation “a divides b,” written a | b, is a partial ordering on the set N of positive integers.
However, “a divides b” is not a partial ordering on the set Z of integers since a | b and b | a need not
imply a = b. For

example, 3|−3 and −3 | 3 but 3 _= −3.

EXAMPLE:

Consider the set Z of integers. Define aRb by b = ar for some positive integer r. Show that R is a partial
order on Z, that is, show that R is: (a) reflexive; (b) antisymmetric; (c) transitive.

(a) R is reflexive since a = a1.

(b) Suppose aRb and bRa, say b = ar and a = bs . Then a = (ar )s = ars . There are three possibilities:

(i) rs = 1,

(ii) a = 1, and

(iii) a = −1. If rs = 1 then r = 1 and s = 1 and so a = b. If a = 1 then b = 1r = 1 = a, and,

similarly, if b = 1 then a = 1. Lastly, if a = −1 then b = −1 (since b _= 1) and a = b. In all three cases, a


= b.

Thus R is antisymmetric.

(c) Suppose aRb and bRc say b = ar and c = bs . Then c = (ar )s = ars and, therefore, aRc. Hence R
is transitive.

Accordingly, because given relation satisfy all the three relations ,so R is a partial order on Z

2.6 EQUIVALENCECLASS

Let us consider the set Z of integers

DDE, GJUS&T, Hisar 47 |


Discrete Mathematics & Optimization MCA-25

Let R = {(a, b): a, b Z, a–b is divisible by 3}

i.e. R = {(a, b): a, bZ, a b (mod 3)}

Clearly R is reflexive, symmetric and transitive.

R is an equivalence relation on Z.

Let [0] denote the set of integers congruent to 0 modulo 3. Then [0] = {...., –9, –6, –3, 0, 3, 6, 9, ...}

Let [1] denote the set of integers congruent to 1 modulo 3. Then [1] = {..., –8, –5, –2, 1, 4, 7, 10, ...}

Let[2]denotethesetofintegerscongruentto2modulo3.Then [2]={....,–7,–4,–1,2,5,8,11, …}

We see that

...... = [0] = [3] = [6]=.....

...... = [1] = [4] = [7]=.....

...... = [2] = [5] = [8]=.....

Each of [0], [1], [2] is called an equivalence class. [0] is the equivalence class of 0, [1] is the
equivalence class of 1, [2] is the equivalence class of 2.We see that there are 3 distinct equivalence
classes, viz, [0], [1], [2].

Also we note that [0] U [1] U [2] = z, [0][1]= ,[1][2]=[2][0] =

The set {[0], [1], [2]} is called a partition of Z.

[0] [2]

[1]
FIG 2.1

Definition: Let A be a non-empty set and R be a relation on A. For any aA, the equivalence class [a]
of a is defined by [a ] = {xA : xRa}i.e.the equivalence class [a] of a is the collection of all those
elements of A which are related to a under the relation R.

Note: [a] , ∵ aRa

DDE, GJUS&T, Hisar 48 |


Discrete Mathematics & Optimization MCA-25

Definition: Let A be a non-empty set.The set P of non-empty subsets of A is called a partition of A if

(i) A is the union of all members of P,

(ii) any two distinct members of P are disjoint.

Theorem 3: Let A be a non-empty set and R be an equivalence relation of A. Let a, bA. Then [a] =
[b] if and only if (a, b) R.

Proof. Let [a] = [b]

R is reflexive, aRa, a[a]

a[b] [[a]=[b]]

aRb (a, b) R

Conversely: Let (a,b)R. aRb

Let x[a]. xRa

Now, xRa and aRb

xRb [R is transitive]

x[b]

Thus, x [a] x[b] [a][b] ...(1)

Again,lety[b] yRb

Now, yRb and bRa [R is symmetric, aRb bRa]

yRa [R is transitive]

y[a]

Thus, y[b] y[a] [b][a] ...(2)

From (1)and(2), [a] =[b]

Theorem 4:Two equivalence classes are either equal or disjoint.

DDE, GJUS&T, Hisar 49 |


Discrete Mathematics & Optimization MCA-25

Proof. Let A be a non-empty set. Let R be an equivalence relation onA.

Let a, bA.

Then [a], [b] are either not disjoint or disjoint. Let [a], [b] be not disjoint,

i.e. [a] [b] 

Let x [a] [b]

x[a] and x[b]

xRa and xRb

aRxandxRb [R is symmetric, xRaaRx]

aRb [R is transitive]

Lety[a]

yRa

Now yRa and aRbyRb [R is transitive]

y [b]

Thus, y[a] y[b]

[a] [b]Similarly, [b]  [a]

[a] = [b]

So, if [a], [b] are not disjoint, they are equal. [a], [b] are either equal or disjoint.

2.7 CONCEPT OF FUNCTION

Let A and B be two non-empty sets, and f A x B such that

(i) (x,y)f,xA and any yB

DDE, GJUS&T, Hisar 50 |


Discrete Mathematics & Optimization MCA-25

(ii) (x, y) f and (x, y)f y=y.

In this case f is said to be a function (or a mapping) from the set A to the set B. Symbolically we write
it as f:A B.

Here A is called the domain and B is called the codomain of f.

Example 16:Let A = {1, 2}, B = {7, 8, 9}

f = {(1, 8), 2, 7)} A x B.

Here, each element of A appears as the first component exactly in one of the ordered pairs of f.

f is a function from A to B.

Example 17:Let A = {1, 2}, B = {7, 8, 9}

g = {(1, 7), (1, 9)} A x B

Here, two distinct ordered pairs have the same first component.

f is not a function from A to B.

Example 18:Let A = {1, 2, 3, 4}, B = {x, y, z, w} Are the following relations from A to B be
functions?

(i) f1 = {(1, x), (1, w), (2, x), (2, z), (4, w)}

(ii) f2 = {(1, y), (2, z), (3, x), (4, w)}

Solution: (i) No. Here two distinct ordered pairs (1, x), (1, w) have the same first component.

(ii) Yes. Here, each element of A appears as the first component exactly in one of the ordered pairs of
f2. Thus we see that.

Every function is a relation, but every relation is not a function.

We observe that if A and B are two non- empty sets and if each element of A is associated with a
unique element of B, then the rule by which this association is

made, is called a function from the set A to the set B.The rules are denoted by f,g etc. The sets A, B
may be the same.

DDE, GJUS&T, Hisar 51 |


Discrete Mathematics & Optimization MCA-25

A f B

x y = f(x)

FIG 2.2

Let f be a function from A to B i.e

f:AB.The unique element y of B that is associated with x of A is called the image of x under
f.Symbolically we write it as f = f(x). x is called the pre- image of y.The set of all the images under f is
called the range off.

Example 19: Let IN be the set of natural members, and Z be the set of integer and f : IN  Z, f(x) = (–

1)x; x IN. Clearly, domain of f = IN

codomain of f = Z

Now f(1) = (–1)1 = –1, f(2) = (–1)2 = 1, f(3) = (–1)3 = –1 and so on.

range of f = {–1, 1}

Identity Function: Let A be a non-empty set and i:AA,i(x)=x,xA I is called the identity function.

Note: In case of identity function, domain and co domain are the same.

Constant Function: Let A,B be two non-empty sets and f:AB be a function such that f(x) = k, x
A

f is called a constant function.

Note: The range of a constant function is a singleton set.

2.8 TYPES OF FUNCTION

Let A, B be two non-empty sets and f: A B be a function.

If there is at least one element in B which is not the image of any element in A, then f is called an “into”
function.

DDE, GJUS&T, Hisar 52 |


Discrete Mathematics & Optimization MCA-25

If each element in B is the image of at least one element in A,then f is called an“onto”function (or a
surjective function or a surjective).

Note:In case of an onto function, range of f=co domain of f.

If different elements in A have different images in B,then f is called a one-one function(or an injective
function or an injection).

If two (or more) different elements in A have the same image in B,then f is called a many-one function.

A function is said to be bijective if it is one-one (injective) and onto (surjective).

Note: Identity function is a bijective function.

How to prove that f is one-one?

Let x1,x 2,A

If f(x) = f(x2) x1 = x2, then f is one-one. or,

If x1 x2 f (x1)f(x2), then f is one-one.

How to prove that f is onto?

Let y B (codomain) Let y = f(x)

We find x in terms of y

If x A, then f is onto; otherwise not.

Example22:LetA={1,2,3,}.Write down all the bijective function from A to itself.

Solution:

i: AA, i(1) = 1, i(2) = 2, i(3) = 3

f1: AA, f1(1) = 1, f1(2) = 3, f1(3) =2

f2: AA, f2(1) = 2, f2(2) = 1, f2(3) =3

f3: AA, f3(1) = 3, f3(2) = 2, f3(3) =1

DDE, GJUS&T, Hisar 53 |


Discrete Mathematics & Optimization MCA-25

f4: AA, f4(1) = 2, f4(2) = 3, f4(3) =1

f5: AA, f5(1) = 3, f5(2) = 1, f5(3) =2

Note. There are 6 =3! bijective functions from A = {1, 2, 3} to itself.

If A has n elements, there are n! bijective functions from A to itself.

Theorem5:Let A be a finite set,andf:AAbe onto.Then f is one-one.

Proof.Let A be a finite set having n elements.

Let A = {a1, a2, ..., an), where ai’ s are distinct.

Let f : AA be onto. Now, range of f

= {f(a1), f(a2), ..., f(an)}f is onto,

range of f = codomain of f =A. A ={f(a1),f(a2), ,f(an)}

A has n elements,

f(a1),f(a2), .......................................... , f(an) are distinct.

Thus, distinct elements in A (domain) have distinct images in A(codomain). f is one-one.

Note: The result does not hold good if A is an infinite set. Let IN be the set of natural numbers.

Let f : ININ, f(x) =1, if x = 1 and x = 2,

= x–1, if x3 Clearly, f is onto, but not one-one.

Theorem 6: Let A be a finite set, and f: AA be one-one. Then f is onto.

Proof:Let A be a finite set having n elements. Let A ={a1,a2, ……, an}, where ai’s are distinct.

Let f : AA be one-one.

f(a1),f(a2), .......................... ,f(an) are n distinct elements of A (codomain).

Let u A (codomain).

DDE, GJUS&T, Hisar 54 |


Discrete Mathematics & Optimization MCA-25

Let u = f(ai), 1 i  n

there exists aiA (domain) such that f(ai) = u. f is onto.

Note:The result does not hold good if A is an infinite set. Let IN be the set of natural numbers.

Let f: IN IN, f(x) = 5xClearly, f is one-one, but not onto.

2.8.1 INVERSE FUNCTION

A function f: A → B is invertible if its inverse relation f −1 is a function from B to A. In general, the


inverse relation f −1 may not be a function. The following theorem gives simple criteria which tells us
when it is.

Theorem : A function f: A → B is invertible if and only if f is both one-to-one and onto.

If f : A → B is one-to-one and onto, then f is called a one-to-one correspondence between A and B. This
terminology comes from the fact that each element of A will then correspond to a unique element of B
and vice versa.

Example:

Let f:R→R be defined by f(x)=3x+1. Find the inverse function f−1.

Solution: For any input x, the function machine corresponding to f spits out the value y=f(x)=3x+1. We
want to find the function f−1that takes the value y as an input and spits out x as the output. In other
words, y=f(x) gives y as a function of x, and we want to find x=f−1(y) that will give us x as a function
of y.

To calculate x as a function of y, we just take the expression y=3x+1 for y as a function of x and solve
for x.

y=3x+1

y-1= 3x

(y-1)/3=x

Therefore, we found out that x=y/3−1/3 , so we can write the inverse function as

f−1(y)=y/3−1/3.

DDE, GJUS&T, Hisar 55 |


Discrete Mathematics & Optimization MCA-25

In the definition of the function f−1, there's nothing special about using the variable y. We could use any
other variable, and write the answer as

f−1(x)=x/3−1/3.

The placeholder variable used in the formula for a function doesn't matter.

2.9 Composition of function

Composition of Function

Consider functions f: A → B and g: B → C; that is, where the codomain of f is the domain of g. Then we
may define a new function from A to C, called the composition of f and g and written g◦f , as follows:

(g◦f )(a) ≡ g(f (a))

That is, we find the image of a under f and then find the image of f (a) under g. we use the functional
notation g◦f for the composition of f and g .

Consider any function f: A → B. Then

f ◦1A= f and 1B◦f = f

where 1Aand 1B are the identity functions on A and B, respectively.

Example:

Let A = {a, b, c},B = {x, y, z},C = {r, s, t}. Let f: A → B and g: B → C be defined by:

f = {(a, y)(b, x), (c, y)} and g = {(x, s), (y, t ), (z, r)}.

Find: composition function g◦f: A → C;

Solution:

Use the definition of the composition function to compute:

(g◦f )(a) = g(f (a)) = g(y) = t

(g◦f )(b) = g(f (b)) = g(x) = s

(g◦f )(c) = g(f (c)) = g(y) = t

That is g◦f = {(a, t ), (b, s), (c, t)}.

DDE, GJUS&T, Hisar 56 |


Discrete Mathematics & Optimization MCA-25

2.10 CHECK YOUR PROGRESS

1. Let A, B be two finite sets, and n(A)=4, n(B)=3. How many relations are there from A to B?

2. Let A = {1, 2, 3, 4, 5} Write down the identity relation on A.

3. Let S = {a, b, c}, T = {b, c, d}, and W = {a, d}. Find S × T × W.

-1
4. Let A = {4, 5, 6}, B = {7, 8, 9} Let R = {(4, 7), (5, 8), (6, 7), (6, 8), (6, 9)}. Write down R .

5. Each of the following defines a relation on the positive integers N:

(1) “x is greater than y.” (3) x + y = 10

(2) “xy is the square of an integer.” (4) x + 4y = 10.

Determine which of the relations are: (a) reflexive; (b) symmetric; (c) antisymmetric; (d)
transitive.

6. Let S = {1, 2, 3, . . . , 9}, and let ∼be the relation on A × A defined by

(a, b) ∼ (c, d) whenever a + d = b + c.

(a) Prove that ∼ is an equivalence relation.

(b) Find [(2, 5)], that is, the equivalence class of (2, 5).

7. Let A be the set of all triangles in a plane. Let R = {(x, y): x, y A., x is similar to y} Examine if
R is an equivalence relation on A.

8. Let IN be the set of n natural numbers. Let f: IN IN, f(x) = x2+1 Examine if f is (i) one-one,
(ii) onto.

9. Let V = {1, 2, 3, 4}. For the following functions f: V → V and g: V → V , find:(a) f ◦g; (b), g◦f ;
(c) f ◦f :

f = {(1, 3), (2, 1), (3, 4), (4, 3)} and g = {(1, 2), (2, 3), (3, 1), (4, 1)}

DDE, GJUS&T, Hisar 57 |


Discrete Mathematics & Optimization MCA-25

10.Decide which of the following functions are: (a) one-to-one; (b) onto; (c) both; (d) neither.

(1) f: Z2 → Z where f (n, m) = n − m; (3) h: Z × (Z\0) → Q where h(n, m) = n/m;

(2) g: Z2 → Z2 where g(n, m) = (m, n); (4) k: Z → Z2 where k(n) = (n, n).

11. Let l be any collection of sets. Is the relation of set inclusion ⊆ a partial order on l ?

2.11 SUMMARY

1. Empty set, IA={(a,a):aA} is called the identity relation on A.

2. If A,B are two non-empty sets, a subset of AXB in said to be a relation from AtoB.
xy
3. If A,B are two finite sets and n(A)=x, n(B)=y, the number of relations from A to B is 2 .
-1 -1
4. If A is a non-n-empty and R is a relation from A to B, the inverse relation R is defined by R =
{(b, a): (a, b)R}, which is a relation from B to A.

5. A relation R on a non-empty set A is called.

a. Reflexive if (a,a) R, for all aA;

b. symmetric if whenever (a, b) R, (b, a) R;

c. anti-symmetric if (a, b) R, (b, a) R a =b;

d. transitive if whenever (a,b),(b,c)R,then(a,c)R.

6. A relation R on a non-empty set A is called an equivalence relation if it is reflexive, symmetric


and transitive.

7. The inverse of an equivalence relation is also an equivalence relation.

8. The intersection of two equivalence relations is also an equivalence relation.

9. If R is a relation on a non-empty set A, then for any aA; the equivalence class [a] of a is the

DDE, GJUS&T, Hisar 58 |


Discrete Mathematics & Optimization MCA-25

collection of all those elements of A which are related to a under the relation R.

10. Two equivalence classes are either equal or disjoint.

11. If A and B are two non-empty sets and if each element of A is associated with a unique element of
B, then the rule by which this association is made, is called a function from AtoB.

12. Every function is a relation, but every relation is not a function.

13. If different elements in domain have different images in codomain, then the function is one-
one(injective).

14. If each element in codomain is the image of at least one element in domain then the function is
onto(surjective).

15. A function is bijective if it is injective and surjective.

16. If A is a finite set and f: AA is onto, then f is one-one.

17. If A is a finite set and f:A A is one-one, then f is onto.

2.12 KEYWORDS

Relation: 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 A1×⋯×An. The minimum cardinality of a
relation R is Zero and maximum is n2 in this case.

Equivalence Relation: A relation is an equivalence Relation if it is reflexive, symmetric, and transitive

Function: 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’.

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.

DDE, GJUS&T, Hisar 59 |


Discrete Mathematics & Optimization MCA-25

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).

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

2.13 SELF ASSESSMENT TEST

1. Let A = {1, 2, 3}, B = {3, 4, 5}. How many relations are there from A to B? Write down any four
relations from A to B.

2. Let A = {3, 4, 5}, B = {5, 6, 7} Which of the following relations are functions from A to B? If it
is a function, determine whether it is one-one and whether it is onto?

(i) {(3, 5), (4, 5), (5, 7)}

(ii) {(3, 7), (4, 5), (5, 6)}

3. Let Q be the set of rational numbers and f:QQ be a function defined f(x)=4x+5. Examine if f is
bijective

4. Let A be the set of all triangles in a plane. Let R = {(x, y): x, y A and x is congruent to y}
Examine if R is an equivalence relation on A.

5. Let IN be the set of natural numbers. A relation R is defined on INxIN by (a,b), R(c,d) if and
only if a+d=b+c. Show that R is an equivalence relation on IN x IN.

6. Let A = {1, 2, 3} R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 3)} Show that R is reflexive but neither
symmetric nor transitive.

7. Let C be the set of complex numbers and IR be the set of real numbers. Let f : CIR, f(z) = |z|, z
C. Examine if f is (1) one-one, (ii) onto.

8. Let A, B be two non-empty sets. Let f:AxBB xA, f (a,b)=(b,a);(a,b) AxB Show that f is
bijective.
a b
9. Let f:INxIN, f(a,b)=3 4 ,(a,b) INxIN Examine if f is(i)one-one,(ii)onto.

DDE, GJUS&T, Hisar 60 |


Discrete Mathematics & Optimization MCA-25

10. Let f : Z x Z Z, f(a, b) = ab, (a, b) Z x Z Examine if f is (i) injective, (ii)surjective.

11. Let V = {1, 2, 3, 4}. For the following functions f: V → V and g: V → V , find:

(a) f ◦g; (b), g◦f ; (c) f ◦f :

f = {(1, 3), (2, 1), (3, 4), (4, 3)} and g = {(1, 2), (2, 3), (3, 1), (4, 1)}

2.14 ANSWERS TO CHECK YOUR PROGRESS

12
1. 2

2. IA = {(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)}

3. {(a, b, a), (a, b, d), (a, c, a), (a, c, d), (a, d, a), (a, d, d), (b, b, a), (b, b, d) (b, c, a), (b, c, d), (b, d,
a), (b, d, d), (c, b, a), (c, b, d), (c, c, a), (c, c, d), (c, d, a), (c, d, d)}

4. R-1 = {(7, 4), (8, 5), (7, 6), (8, 6), (9, 6)}

5. (a) None; (b) (2) and (3); (c) (1) and (4); (d) all except (3).

6. (b) {(1, 4), (2, 5), (3, 6), (4, 7), (5, 8), (6, 9)}.

7. Equivalence relation.

8. One-one, but not onto.

9. (a) {(1, 1), (2, 4), (3, 3), (4, 3)}; (b) {(1, 1), (2, 2), (3, 1), (4, 1)}; (c) {(1, 4), (2, 3), (3, 3), (4, 4)}.

10. (a) g, k; (b) f, g, h; (c) g; (d) none.

11.Yes, since set inclusion is reflexive, antisymmetric, and transitive.

That is, for any sets A, B, C in _ we have:


(i) A ⊆A;

(ii) if A ⊆ B and B ⊆ A, then A = B;

(iii)if A ⊆ B and B ⊆ C, then A ⊆ C.

DDE, GJUS&T, Hisar 61 |


Discrete Mathematics & Optimization MCA-25

2.15 REFERENCES/SUGGESTED READINGS

1. Lanski, Charles: Concepts in Abstract Algebra, (First Indian edition, 2010)American


Mathematical Society.

2. Vasistha,A.R.:ModernAlgebra(Abstractalgebra),KrishnaPrakashan Media(p)Ltd.Meerut-
250001(U).

3. Sen, M.K,Ghosh,Shamikand Mukhopadhyay,Parthasarthi:Topics in Abstract Algebra,


Universities Press (India) Pvt. Ltd., Hyderabad, 500029.

DDE, GJUS&T, Hisar 62 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA-25


AUTHOR: RENU BANSAL
Lesson No. 3

LOGIC AND PROPOSITIONAL CALCULUS

STRUCTURE

3.1 Learning objectives

3.2 Introduction

3.3 Proposition and compound statement

3.4 Basic logic operations

3.5 Propositions and truth tables

3.6 Tautologies and Contradiction

3.7 Logical equivalence

3.8 Algebra of preposition

3.9 Conditional and biconditional statement

3.10 Check Your Progress

3.11 Summary

3.12 Keywords

3.13 Self-Assessment Questions

3.14 Answers to Check YourProgress

3.15 References/ Suggested Readings

DDE, GJUS&T, Hisar 63 |


Discrete Mathematics & Optimization MCA-25

3.1 LEARNING OBJECTIVE

After going through this unit, you will be able to know:

1. What is logical expressions?


2. What is compound statement?
3. How to construct truth tables?
4. What are operators?
5. What is logical equivalence, tautology and contradiction?

3.2 INTRODUCTION

7.6.2 Introduction

Many algorithms and proofs use logical expressions such as:

“IF p THEN q” or “If p1 AND p2, THEN q1 OR q2”

Therefore it is necessary to know the cases in which these expressions are TRUE or FALSE, that is, to
know the “truth value” of such expressions.

In logic we are interested in true or false of statements, and how the truth/falsehood of a statement can
be determined from other statements. However, instead of dealing with individual specific statements,
we are going to use symbols to represent arbitrary statements so that the results can be used in many
similar but different cases. The formalization also promotes the clarity of thought and eliminates
mistakes. There are various types of logic such as logic of sentences (propositional logic), logic of
objects (predicate logic), logic involving uncertainties, logic dealing with fuzziness, temporal logic etc.
Here we are going to be concerned with propositional logic and predicate logic, which are fundamental
to all types of logic.

3.3 PROPOSITIONS AND COMPOUND STATEMENTS

Proposition

A proposition (or statement) is a declarative statement which is true or false, but not both.

DDE, GJUS&T, Hisar 64 |


Discrete Mathematics & Optimization MCA-25

Sentences considered in propositional logic are not arbitrary sentences but are the ones that are either
true or false, but not both. This kind of sentences are called propositions. If a proposition is true, then
we say it has a truth value is "true"; if a proposition is false, its truth value is "false".

Consider the following six sentences:

(i) Grass is green.


(ii) 2+2=6
(iii) China is in Europe.
(iv) 6+4=5
(v) What is your name?
(vi) Keep quiet.

The first four are propositions, the last two are not. Also, (i) and (iii) are true, but (ii) and (iv)
are false.

Compound Propositions

In everyday life we often combine propositions to form more complex propositions or we can say
compound proposition. For example combining "Grass is green", and "The sun is red" we say
something like "Grass is green and the sun is red", "If the sun is red, grass is green", "The sun is red and
the grass is not green" etc. Here "Grass is green", and "The sun is red" are propositions, and form them
using connectives "and", "if... then ..." and "not" a little more complex propositions are formed. These
new propositions can in turn be combined with other propositions to construct more complex
propositions. They then can be combined to form even more complex propositions.

Many propositions are composite, that is, composed of subpropositions and various connectives
discussed subsequently. Such composite propositions are called compound propositions

The following two propositions are composite:

“Roses are red and violets are blue.” and “John is smart or he studies every night.”

DDE, GJUS&T, Hisar 65 |


Discrete Mathematics & Optimization MCA-25

The fundamental property of a compound proposition is that its truth value is completely determined by
the truth values of its sub propositions together with the way in which they are connected to form the
compound propositions.

3.4 BASIC LOGICAL OPERATIONS

Simple sentences which are true or false are basic propositions. Larger and more complex sentences are
constructed from basic propositions by combining them with connectives. Thus propositions and
connectives are the basic elements of propositional logic. Though there are many connectives, we are
going to use the following three basic connectives or operators here:

AND, OR, NOT

Respectively known as conjunction, disjunction, and negation.

Conjuction (AND ) ( ∧):

Conjunction, p ∧ q Any two propositions can be combined by the word “and” to form a compound
proposition called the conjunction of the original propositions. Symbolically, p ∧ q read “p and q,”
denotes the conjunction of p and q. Since p ∧ q is a proposition it has a truth value, and this truth value
depends only on the truth values of p and q as follows:

If p and q are true, then p ∧ q is true, otherwise p ∧ q is false. The truth value of p ∧ q may be
defined equivalently by the table in Fig. 3-1(a). Observe that there are four lines corresponding to the
four possible combinations of T and F for the two subpropositions p and q. Note that p ∧ q is true only
when both p and q are true.

Fig. 3-1

DDE, GJUS&T, Hisar 66 |


Discrete Mathematics & Optimization MCA-25

EXAMPLE 4.1 Consider the following statements: (i) Ice floats in water and 2 + 2 = 4. (ii) Ice floats in
water and 2 + 2 = 5. Only the first statement is true and the others is false since at least one of its
substatement is false.

Disjunction (or) ( ∨ ):

Any two propositions can be combined by the word “or” to form a compound proposition called the
disjunction of the original propositions. Symbolically, p ∨ q read “p or q,” denotes the disjunction of p
and q. The truth value of p ∨ q depends only on the truth values of p and q as follows.

If p and q are false, then p ∨ q is false; otherwise p ∨ q is true. The truth value of p ∨ q may be defined
equivalently by the table in Fig. 3-1(b). Observe that p ∨ q is false only in the fourth case when both p
and q are false.

EXAMPLE 4.2 Consider the following statements:

(i) Ice floats in water or 2 + 2 = 4 (ii) Ice floats in water or 2 + 2 = 5.

Both the statement are true because at least one of its sub-statements is true.

Negation,(NOT), ¬p

Given any proposition p, another proposition, called the negation of p, can be formed by writing
“It is not true that ...” or “It is false that ...” before p or, if possible, by inserting in p the word “not.”
Symbolically, the negation of p, read “not p,” is denoted by

¬p

The truth value of ¬p depends on the truth value of p as follows:

If p is true, then ¬p is false; and if p is false, then ¬p is true.

The truth value of ¬p may be defined equivalently by the table in Fig. 3-1(c). Thus the truth value
of the negation of p is always the opposite of the truth value of p.

EXAMPLE 4.3 Consider the following statements:

(1) sun rises in the east. (2) It is false that sun rises in the east. (3) sun does not rises in the east

DDE, GJUS&T, Hisar 67 |


Discrete Mathematics & Optimization MCA-25

Then (2) and (3) are each the negation of (1).

3.5 PROPOSITIONS AND TRUTH TABLES

Truth Tables

An expression constructed from logical variables ( p, q,...,) will be called a proposition. The main
property of a proposition P (p, q, . . .) is that its truth value depends exclusively upon the truth values of
its variables, that is, the truth value of a proposition is known once the truth value of each of its
variables is known. A simple concise way to show this relationship is through a truth table. We describe
a way to obtain such a truth table below.

Consider, for example, the proposition ¬(p ∧ ¬q). Figure 3-2(a) indicates how the truth table of ¬(p ∧
¬q) is constructed. Observe that the first columns of the table are for the variables p, q,... and that there
are enough rows in the table, to allow for all possible combinations of T and F for these variables. (For
2 variables, as above, 4 rows are necessary; for 3 variables, 8 rows are necessary; and, in general, for n
variables, 2n rows are required.) There is then a column for each “elementary” stage of the construction
of the proposition, the truth value at each step being determined from the previous stages by the
definitions of the connectives ∧, ∨, ¬. Finally we obtain the truth value of the proposition, which
appears in the last column.

The actual truth table of the proposition ¬(p∧¬q)is shown in Fig. 3-2(b). It consists precisely of the
columns in Fig. 4-2(a) which appear under the variables and under the proposition; the other columns
were merely used in the construction of the truth table.

Fig: 3-2

DDE, GJUS&T, Hisar 68 |


Discrete Mathematics & Optimization MCA-25

3.6 TAUTOLOGIES AND CONTRADICTIONS

Tautology and Contradiction

A T AU T O L OG Y is a formula which is "always true" --- that is, it is true for every assignment of truth
values to its simple components.

The opposite of a tautology is a C ON T R A DI C T I O N , a formula which is "always false". In other words,


a contradiction is false for every assignment of truth values to its simple components.

Some propositions P (p, q, . . .) contain only T in the last column of their truth tables or, in other words,
they are true for any truth values of their variables. Such propositions are called tautologies.

For example:

Proposition [ p ∨ ¬(p ∧ q)] is tautology. As if we construct the truth table of p ∨ ¬(p ∧ q) as shown in
Fig.

Since the truth value of p ∨ ¬(p ∧ q) is T for all values of p and q, the proposition is a tautology.

Analogously, a proposition P (p, q, . . .) is called a contradiction if it contains only F in the last column
of its truth table or, in other words, if it is false for any truth values of its variables. For example,

the proposition “p and not p,” that is, p ∧ ¬p, is a contradiction. This is verified by looking at their truth
tables in following Fig.

DDE, GJUS&T, Hisar 69 |


Discrete Mathematics & Optimization MCA-25

3.7 LOGICAL EQUIVALENCE

Logical Equivalence

Two propositions P (p, q, . . .) and Q(p, q, . . .) are said to be logically equivalent, or simply equivalent
or equal, denoted by

P (p, q, . . .) ≡ Q(p, q, . . .)

If they have identical truth tables. Consider, for example, the truth tables of ¬(p ∧ q) and ¬p ∨ ¬q
appearing in Fig. Observe that both truth tables are the same, that is, both propositions are false in the
first case and true in the other three cases. Accordingly, we can write

¬(p ∧ q) ≡ ¬p ∨ ¬q

In other words, the propositions are logically equivalent.

Note:

logical equivalence can also apply for compound statements, for example:

Let p be “he is rich” and q be “he is happy” Let S be the statement:

“It is not true that he is rich and he is happy.”

Then S can be written in the form ¬(p ∧ q). However, as noted above, ¬(p ∧ q) ≡ ¬p ∨ ¬q. Accordingly,
S has the same meaning as the statement:

“he is not rich, or he is not happy.”

DDE, GJUS&T, Hisar 70 |


Discrete Mathematics & Optimization MCA-25

3.8 ALGEBRA OF PROPOSITIONS

ALGEBRA OF PROPOSITIONS

Propositions satisfy various laws which are listed in Table 4-1. (In this table, T and F are restricted to
the truth values “True” and “False,” respectively.) We state this result formally.

Theorem 4.2: Propositions satisfy the laws of Table 4-1.

3.9 CONDITIONAL AND BICONDITIONAL STATEMENTS

Conditional Statement

Let p and q are two statements and these two statements are of the form “If p then q.” Then Such
statements are called conditional statements and are denoted by

p→q

the conditional p → q is frequently read “p implies q” or “p only if q.”

The implication p→ q is false only when p is true, and q is false; otherwise, it is always true. In this
implication, p is called the hypothesis (or antecedent) and q is called the conclusion (or consequent).

The truth values of p → q are defined by the tables in following Fig(a).

DDE, GJUS&T, Hisar 71 |


Discrete Mathematics & Optimization MCA-25

The followings are conditional statements.

1. If a = b and b = c, then a = c.

2. If I get money, then I will purchase a computer.

Bi Conditional Statement

If p and q are two statements then "p if and only if q" is a compound statement, denoted as p ↔ q and
referred as a biconditional statement or an equivalence. The equivalence p ↔ q is true only when both p
and q are true or when both p and q are false.

biconditional statements and are denoted by:

p↔q

For Example: (i) Two lines are parallel if and only if they have the same slope.
(ii) You will pass the exam if and only if you will work hard.

These two statements are example of biconditional statements.

The truth values of p ↔ q are defined by the tables in below Fig. Observe that:

The biconditional p ↔ q is true whenever p and q have the same truth values and false otherwise.

DDE, GJUS&T, Hisar 72 |


Discrete Mathematics & Optimization MCA-25

Note :The truth table of ¬p ∧ q appears in following Fig. Note that the truth table of ¬p ∨ q and p → q
are identical, that is, they are both false only in the second case. Accordingly, p → q is logically
equivalent to ¬p ∨ q; that is,

p → q ≡ ¬p ∨ q

3.10 CHECK YOUR PROGRESS

Q1. Let p be “It is cold” and let q be “It is raining”. Give a simple verbal sentence which describes each

of the following statements: (a) ¬p; (b) p ∧ q; (c) p ∨ q; (d) q ∨ ¬p.

In each case, translate , , and to read “and,” “or,” and “It is false that” or “not,” respectively, and
then simplify the English sentence.

Q2. Verify that the proposition p ¬p is a tautology.

Q3 Show that the propositions ¬(p q) and ¬p ¬q are logically equivalent.

Q4. Rewrite the following statements without using the conditional:

(a) If it is cold, he wears a hat.

(b) If productivity increases, then wages rise.

Q5. Which of the following propositions are tautologies? Which are contradictions? Why?

(a) It is raining or it is not raining.


(b) It is raining (P) and it is not raining (¬P).

DDE, GJUS&T, Hisar 73 |


Discrete Mathematics & Optimization MCA-25

Q6.Use the laws in Table 4-1 to show that ¬(p q) (¬p q) ≡ ¬p.

3.11 Summary

1. A proposition (or statement) is a declarative statement which is true or false, but not both.

2. Many propositions are composite, that is, composed of subpropositions and various connectives
discussed subsequently. Such composite propositions are called compound propositions

3. Though their are three basic connectives or operators known as AND, OR, not

respectively known as conjunction, disjunction, and negation.

4. Property of proposition is that its truth value depends upon the truth value of its variables.

5. If propositions have true for any truth value of their variables, such propositions are called
tautaology.

6. If propositions have false for any truth value of their variables, such propositions are called
contradiction.

7. Two propositions are said to be logically equivalent if they have identical truth tables.

8. The conditional statement are denoted by p → q and is frequently read “p implies q”.

9.biconditional statements are denoted by p ↔ q and is frequently read as “p if and only if q”

3.12 Key words

Propositions

Tautology

Contradiction

Conditional statements

Biconditional statements

Logical equivalence

DDE, GJUS&T, Hisar 74 |


Discrete Mathematics & Optimization MCA-25

3.13 ANSWER TO CHECK YOUR PROGRESS

Ans. 1(a) It is not cold. (c) It is cold or it is raining.

(b) It is cold and raining. (d) It is raining or it is not cold

Ans.2 As truth table shows that all output is true, so it is a tautology

Ans.3 As shown in figure both tables have same output so they are logically equivalent

Ans.4 Recall that “If p then q” is equivalent to “Not p or q;” that is, p → q ≡ ¬p ∨ q. Hence,

(a) It is not cold or he wears a hat.

(b) Productivity does not increase or wages rise.

Ans.5 (a)Answer: tautology

(b)Answer: contradiction
Example reasoning: All rows in the truth table evaluate to false.

Ans.6 Statement Reason

(1) ¬(p q) (¬p q) ≡ (¬p ¬q) (¬p q) DeMorgan’s law

DDE, GJUS&T, Hisar 75 |


Discrete Mathematics & Optimization MCA-25

(2) ≡ ¬p (¬q q) Distributive law

(3) ≡ ¬p T Complement law

(4) ≡ ¬p Identity law

3.14 SELF ASSESMENT TEST

Q1.Write the negation of each statement as simply as possible:

(a) If she works, she will earn money.

(b) He swims if and only if the water is warm.

(c) If it snows, then they do not drive the car.

Q2. Negate each of the following statements:

(a) If the teacher is absent, then some students do not complete their homework.

(b) All the students completed their homework and the teacher is present.

(c) Some of the students did not complete their homework or the teacher is absent

Q3. Find the truth tables for. (a) p ∨ ¬q; (b) ¬p ∧ ¬q.

Q4. Verify that the proposition (p ∧ q)∧ ¬(p ∨ q) is a contradiction.

3.15 References/ Suggested Readings

1. Seymour Lepschutz, Finite mathematics (International edition 1983), McGraw-Hill Book


Company, New York.

2. Discrete Structures, Logic, and Computability, 2nd edition, by J.L. Hein, published by Jones
and Bartlett, 2002.

3. Discrete Mathematics for Computer Scientists, by J. Truss, published by Addison Wesley, 1999.

4. Discrete Mathematics, 5th edition, by K.A. Ross and C.R.B. Wright, published by Prentice Hall,
2003.

DDE, GJUS&T, Hisar 76 |


Discrete Mathematics & Optimization MCA-25

DDE, GJUS&T, Hisar 77 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA-25


AUTHOR: KAPILA DEVI
Lesson No. 4

GROUP THEORY

REVISED /UPDATED SLM BY RENU BANSAL

STRUCTURE

4.1 Learning objectives

4.2 Introduction

4.3 Group

4.4 Semi-group

4.5 Monoid

4.6 Abelian groups

4.7 Subgroups

4.8 Coset

4.9 Lagrange’s Theorem

4.10 Normal Subgroup

4.11 Cyclic Group

4.12 Check Your Progress

4.13 Summary

4.14 Keywords

4.15 Self-Assessment Questions

4.16 Answers to Check Your Progress

4.17 References/ Suggested Readings

DDE, GJUS&T, Hisar 78 |


Discrete Mathematics & Optimization MCA-25

4.1 LEARNINGOBJECTIVES

After going through this unit, you will be able to know:

1. How to describe groups

2. Description of subgroups

3. Definitions of cosets

4. Know about cyclic groups

5. Definitions normal subgroups

6. Illustrate quotient groups.

4.2 INTRODUCTION

In this unit we will introduce the notion of groups. Group is an algebraic structure, i.e, a non- empty set
equipped with a binary operation satisfying certain postulates. Group theory occupies an important
position in the study of abstract algebra.

4.3 GROUP

A non-empty set G, equipped with a binary operation *, is called a group if the following postulates are
satisfied.

(i) Closure property

∀ a,b ∈G : ∀ a*b ∈ G

It means that for a,b belongs to G such that a*b also belongs to G

(ii) Associativity

(a *b) *c = a *(b *c), a, b, cG

(iii) Existence of Identity

DDE, GJUS&T, Hisar 79 |


Discrete Mathematics & Optimization MCA-25

There exists eG such that a *e = a = e *a, aG. e is called identity.

(iv) Existence of Inverse

For every aG, there exists bG such that a *b = e = b *a. so b is called inverse of a.

These all properties of group is known as group axioms.

Note: 1. In order to be a group, there must be a non-empty set equipped with a binary operation
satisfying the postulates mentioned above.

2. We will drop the binary operation symbol and simply write ab. It should be keep in mind that this
is not our usual multiplication.

4.4 Semi group

Semi Group

A non-empty set G equipped with a binary operation is called a semigroup, if the binary operation is
associative.

For example : Consider the positive integer N. then (N,+) are semi group, since addition in N are
associative.

4.5 Monoid

Monoid

A non-empty set G equipped with a binary operation is called a monoid , if the binary operation is
associative as well as operation also has an identity element.

For example: Consider the positive integer N. then (N,×) are monoid , since multiplication in N are
associative and it has identity element as 1.

4.6 Abelian group

Abelian group

A group G is said to be abelian if the commutative law holds, i.e., if a*b=b*a for every a,b ∈ G.

An operation * on a set S is said to be commutative or satisfy the commutative law if

DDE, GJUS&T, Hisar 80 |


Discrete Mathematics & Optimization MCA-25

a*b=b*a

for any elements a,b in S.

For example: The set Z of integers is an abelian group under addition. The identity element is 0 and –a
is additive inverse of a in Z. and addition is associative and commutative both.

Finite and Infinite Groups

A group G is finite if the set G is finite; otherwise it is infinite group.

Order of a group

The number of elements of a finite group G is called the order of G. Symbolically it is denoted by 0(G)
or |G|.

Example 1: Let G = {1} Clearly multiplication is a binary operation on G. Moreover, all the postulates
for a group are satisfied.

G is a group under multiplication. Furthermore, G is an Abelian group.

Example 2: Let G = {–1, 1},

The set consisting of the square roots of unity.

* -1 1

-1 1 -1

1 -1 1

Fig. 3.1

(i) From the table, we see that multiplication is a binary operation on G.

(ii) We know that multiplication of real numbers is associative.

(iii) 1 is the identity under multiplication.

(iv) Every element G possesses inverse in G. 1 is the inverse of1, –1 is the inverse of –1. G is a group
under multiplication.

(v) Moreover, multiplication of real numbers is commutative. G is an Abelian group.

DDE, GJUS&T, Hisar 81 |


Discrete Mathematics & Optimization MCA-25

Example : Let Z be the set of integers

(i) Let a, bZ

a+bZ, a, b Z

i.e. addition is a binary operation on Z.

(ii) We know that multiplication of integers is associative.

(iii) We have 0Z and a+0= a=0+a, aZ

0 is the identity.

(iv) Forever yaZ, there exists –aZ such that a+(–a)= 0= (–a)+a.

Z is a group under addition.

(v) Moreover, addition of real numbers is commutative.

Z is an Abelian group under addition.

Note: Z is an infinite group.

Some other examples are the following.

 Q is an Abelian group under addition.

 IR is an Abelian group under addition.

 Q0, the set of non-zero rational numbers is an Abelian group under multiplication.

 IR0, the set of non-zero real numbers is an Abelian group under multiplication.

 C is an Abelian group under addition.

 C0, the set of non-zero complex numbers is an Abelian group under multiplication.

Example:LetG be the set of rational numbers excluding1.We define on G as follows.

a b = a+b–ab, a, bG

(i) is a binary operation on G [Ref: Example10]

DDE, GJUS&T, Hisar 82 |


Discrete Mathematics & Optimization MCA-25

(ii) is associative onG[Ref: Example 10]

(iii) We have 0 G and

a0 = a + 0 – a0 = a

0 a = 0 + a –0a = a

0 is the identity under .


𝑎
(v) For every a  G, there exists 𝑎−1 G such that

𝑎 𝑎
𝑎∗ =0= ∗𝑎
𝑎−1 𝑎−1
𝑎
𝑎−1is the inverse of a under x.

 G is a group commutative. [Ref: Example 10]

 G is an Abelian group.

Theorem : Let G be a group. Then

(i) Identity element is unique.

(ii) Inverse of each element in G is unique;


–1 –1 –1
(iii) (a ) = a, for all a G, where a denotes the inverse ofa,
–1 –1 –1
(iv) (ab) = b a , for all a, bG

(v) ab = ac b = c, (left cancellation law)

ba = ca b = c, (right cancellation law) for all a, b, cG.

Proof (i) If possible, let e, f be two identities of G.

ef = e = fe [f is identity]

Again ef = f = fe [e is identity]

e=f

DDE, GJUS&T, Hisar 83 |


Discrete Mathematics & Optimization MCA-25

Thus, identity element is unique.

(ii) Let aG and e be the identity of G.

If possible, let b and c be two inverses of a. ab = e = ba[∵b is inverse ofa]

ac = e = ca [∵c is inverse ofa]

Now b = be [∵e is the identity}

= b(ac) [∵e = ac]

= (ba)c [by associativity]

= ec[∵e is theidentity]

=c

Thus, inverse of a is unique.

Note: In view of the above theorem, we write ‘the inverse of a’, not ‘an inverse of a’.
–1 –1
(iii) We have aa = e =a a
–1 –1 –1 –1
a is the inverse of a, and vice versa, a is the inverse of a i.e. (a ) = a
–1 –1 –1 –1
(iv) Let e be the identity of G and a,bG Now (ab)(b a ) =a(bb )a
–1
=aea
–1
= aa
–1 –1 –1 –1
= e (b a )(ab) = b (a a)b
–1
= b eb
–1
=b b

=e
–1 –1 –1
b–1a–1is the inverse of ab, i.e. (ab) = b a

(v) We have ab =ac

DDE, GJUS&T, Hisar 84 |


Discrete Mathematics & Optimization MCA-25

a–1(ab) = a–1(ac)

(a–1a)b=(a–1a)c, [by associativity]

eb = ec

b = c, [∵e is the identity]

Again ba = ca
–1 –1
(ba)a = (ca) a
–1 –1
b(aa ) = c(aa ) [by associativity]

be = ce

b = c [∵e is the identity]

Example5:If, in a group G, every element is its own inverse, prove that G is Abelian.

Solution: Let G be a group. Let a, b G


–1 –1
a = a, b = b (given)
–1 –1 –1
Now ab = (ab) = b a =ba G is Abelian

4.7 SUBGROUP

Let us consider the set Z of integers. We know that Z is a group under addition.

Let 2Z = {0, ± 2,±4,.....................................}be the set of even integers.

Clearly 2Z is a non-empty subset of Z. Moreover, 2Z is also a group under addition. In this case, 2Z is
said to be a subgroup of Z.

Definition: A non-empty subset H of a group G is a subgroup of G if H is also a group under the same
binary operation of G. Symbolically, we write H G.

A subset H of a group is a subgroup of G if:

1. The identity element eH.

DDE, GJUS&T, Hisar 85 |


Discrete Mathematics & Optimization MCA-25

2. H is closed under the operation of G, i.e. if a,bH, then abH.

3. H is closed under inverses, that is if aH, then a-1H.

Note: (1) If e is the identity of G, {e} is also a subgroup of G, called the trivial subgroup of G. All other
subgroups are nontrivial.

(2)G itself is a subgroup of G, called the improper subgroup of G. All other subgroups are proper.

Example : Let us consider G = {–1, 1, –i, i},𝑖 = √−1

We know that G is a group under multiplication,

Let H = {–1, 1}.

We have H G.

Also H is group under multiplication

H ≤ G.

The set of real numbers IR is a group under addition. The set IR+of positive real numbers is a group
under multiplication. IR+ is a subset of IR, but not a subgroup of IR. Binary operations are different.

Theorem : Let H be a subgroup of a group G. Then

(i) The identity element of H is the identity element of G;

(ii) The inverse of any element of H is the same as the inverse of the element of G.

Proof: Let G be a group and H ≤ G.

(i) If possible, let e be the identity of G, and f be the identity of H.

Let a H.

af = a = fa [∵f is the identity of H]

Again aH a G.

ae = a =ea [∵e is the identity of G]

af =ae

DDE, GJUS&T, Hisar 86 |


Discrete Mathematics & Optimization MCA-25

f = e [∵by left cancellation law]

(ii) Let e be the identity of G e is also the identity of H.

Let a H.

If possible, let b be the inverse of a in H, and c be the inverse of a in G.

ab = e =ba

ac = e =ca

ab = acb = c [∵by left cancellation law]

Note: If H,K are two subgroups of a group G and e is the identity of G, then e is also the identity of H as
well as of K. So, H and K have at least one common element, viz., the identity element. Thus, we can
conclude that there cannot be two disjoint subgroups of a group.
–1
Theorem : A non-empty subset H of a group G is a subgroup of G if and only if a, b H ab H.

Proof : Let H ≤G and a, b H.


–1
b H b H [∵H is a group]
–1
Now aH, b H
–1
ab H

Conversely, let H G such that a, b H ab-1H

(i) Now a, a H aa-1H (by the given condition)

e H, where e is the identity of G.

(ii) e H, a H ea–1 H


–1
a H,

every element of H has inverse in H.

(iii) b H b-1H by(ii)

DDE, GJUS&T, Hisar 87 |


Discrete Mathematics & Optimization MCA-25

–1
Now aH, b H
–1 –1 –1 –1
a(b ) H (Since (b ) H)

ab H

(iv) The binary operation is associative in H as it is associative in G.

H is a group under the same binary operation in G. Also HG.

H ≤ G.

Note: If G is an additive group, i.e., if G is a group under addition, then a non-empty subset H of G is a
subgroup of G if and only if a,bHa–bH.

Theorem : The intersection of two subgroups of a group is again a subgroup of the group.

Proof:Let G be a group and e be the identity of G.

Let H ≤ G, K ≤ G.

We note that H K ≠,

for at least the identity element e H K Let a, b HK

aH K aH and aK bH K bH and bK

Now a, b H and H≤G.

–1
ab H a, b K and KG.
–1 –1 –1 –1
ab K ab H and ab K ab HK

HK G

Theorem :The union of two subgroups is a subgroup if and only if one of

them is contained in the other.

Proof:Let G be a group and H G, K G. Let H K. Then H K =K.

DDE, GJUS&T, Hisar 88 |


Discrete Mathematics & Optimization MCA-25

∵KG, H  KG

Conversely, let H G, K G such that H K G. Let e be the identity of G.

We are to prove that either H K or K H

If possible, let it not be true.

HKandKH

there exists a H such that a K Also, there exists b K such that b H

Now aH a H K

bK b H K H KG,

ab H K

This ab H or ab K
–1
IfabH,thenaH,ab H a (ab) H
–1
(a a)b H

ebH

bH,

which is a contradiction.
–1
Similarly, if ab K, then abK, bK (ab)b K
–1
a(bb )K

aeK

a K

which is acontradiction.

So, our assumption is wrong. either H K or K H.

DDE, GJUS&T, Hisar 89 |


Discrete Mathematics & Optimization MCA-25

4.8 COSET

Let G be a group and H G

Let aG

The set Ha = {ha: h H} is called a right Coset of H in G.

Similarly, the set aH = {ah: hH} is called a left Coset of H in G.

Note:(1) Right (or left) Coset cannot be empty we haveeH ea = a Ha Ha 

Similarly, ae = aaH aH

(2) HG, but H a or aH is not necessarily a subgroup of G.

(3) If H is a subgroup of the additive group G and aG, the right Coset of H in G is given by
H+a={h+a:hH}

Similarly, the left Coset of H in G is given by a+H={a+h:hH}

Example: Let us consider the additive group of integers Z. We know that 2 Z = {0,  2,  4,6, …} Z

We have

0+2 Z = {0,  2,  4,6, ........................ } = 2Z

1+2Z = { 1,  3,  5,7, ........................ }

2+2Z = {0,  2,  4,6, ........................ }

3+2Z = { 1,  3,  5,7, .........................} and soon.

Thus, we see that

2Z = 2+2Z = 4+2Z = ....

1+2Z = 3+2Z = 5+2Z = ....

2Z has two distinct left cosets viz. 2Z and 1+2Z suchthat 2Z (1+2Z) =Z

DDE, GJUS&T, Hisar 90 |


Discrete Mathematics & Optimization MCA-25

2Z(1+2Z)=

Similarly,2Z has two distinct right cosets 2Z and 2Z+1 such that 2Z (2Z+1) =Z

2Z(2Z+1)=

Theorem : Let G be a group and H G. Then

(i) aH = H a H; Ha = H a H
–1
(ii) aH = bHa–1bH ; Ha = Hbab H, where a, bG

Proof: (i) Let aH = H

We have aeaH, e is the identity of G

aeH [aH =H]

a H

Conversely, let a H Let x aH

This x = ah, for some hH

Now aH,hH ahH xH Thus, x aHx H

aHH ...(1)
–1 –1
Again, let y H aH, a H a yH
–1
a y = h1, for some h1H

–1
a(a y) =ah1

–1
(aa )y =ah1

ey = ah1

y = ah1aH

Thus, y H y aH

DDE, GJUS&T, Hisar 91 |


Discrete Mathematics & Optimization MCA-25

HaH ...(2)

From (1) and (2), aH = H Similarly Ha = H aH.

(ii) aH = bH
–1 –1
a (aH) =a (bH)
–1 –1
(a a)H =(a b)H
–1
eH = (a b)H
–1
H = (a b)H
–1 –1
a b H (using (1) Similarly, Ha = Hbab H.

Theorem : Any two left (or right) cosets of a subgroup are either disjoint or identical.

Proof: Let G be a group and H G. Let a, bG.

Then aH, bH are two left cosets of H in G. Clearly aH, bH are either disjoint or not disjoint. Let aH, bH
be not disjoint, i.e, aHbH.

Let x aHbH

x aH and x bH

Now x aHx = ah1for some h1H

xbH x = bh2for some h2H ah1= bh2

–1 –1
(ah1)h1 = (bh2)h1

–1 –1
a h1h1 = b h2h1

–1
ae = bh2h1 , where e is the identity of G

–1 –1
a = bh2h1 Similarly b = ah1h2

DDE, GJUS&T, Hisar 92 |


Discrete Mathematics & Optimization MCA-25

Let p aH p = ah3 for some h3 H

–1
= bh2h1 h3

–1
bH, h2h1 h3H

Thus, p aHpbH aHbH

(1) Again, let q bHq = bh4 for some h4 H

q = ah1h2–1h4

aH, h1h2–1h4H

ThusqbH qaH bHaH

(2) From (1) and (2), aH =bH

Thus, aH, bH are either disjoint or identical.

4.9 LAGRANGE’s THEOREM

Lagrange’s subgroup Order Theorem

Theorem: The order of a subgroup of a finite group divides the order of the group.

Proof :Let G be a finite group, and let O(G) = n and HG.

Let e be the identity of G.

Case 1 :Let H = {e},

There is nothing to prove. O(H) =1, and 1 divides n.

Case 2 :Let H = G. Hence O(H) = O(G). There is nothing to prove.

Case 3 :Let H {e}, H  G. Let O(H) = m, m < n.

Let H = {h1, h2, h3,... hm}, where the hi’s are distinct. Let a G, a H.

Let us consider the left Coset. aH = {ah1, ah2, ah3, ..., ahm}

DDE, GJUS&T, Hisar 93 |


Discrete Mathematics & Optimization MCA-25

We claim that all the elements in aH are distinct, for if ahi= ahj, 1im, 1

j m, i j then hi=hj , (by left cancellation law), which is a contradiction. Again, no element of H is

equal to any element of aH, for if hi= ahj,

–1 –1 –1
then hihj i.e. hihj = a i.e. a = hihj H

i.e. a H, which is a contradiction.

Thus, we have listed m+m = 2m elements of G. If this exhausts all the elements of G, then 2m=n.m
dividesn.

If not, let b G, bH, b aH

Let us consider bH = {bh1, bh2, ..., bhm}

Clearly, all the elements in bH are distinct.No element of H is equal to any element of bH.

Again, no element of aH is equal to any element of bH,


–1 –1 –1 –1
For if ahi=bhj, then ahihj =bhjhj i.e ahihj = b i.e b = ahihj aH,

–1
(hihj H) i.e. b aH, which is acontradiction.

Thus, we have listed m+m+m = 3m elements of G. If this exhausts all the elements of G, then 3m=n.
m divides n.

If not, we proceed as above. Since G is finite, we must stop somewhere, say, after k times.

mk = n m divides n.

Remark:The converse of Lagrange’s theorem is not true.

4.10 NORMALSUBGROUP

Definition: A subgroup H of a group G is said to be a normal subgroup of G if aH=Ha, for all aG,
i.e., if its left and right cosets coincide. Symbolically we write HG.

DDE, GJUS&T, Hisar 94 |


Discrete Mathematics & Optimization MCA-25

Note: A group G has at least two normal subgroups, viz., G and {e}. A group, having no normal
subgroups other than G and {e},is called a simple group.

Example: Let G ={ –1, 1, –i, i}

We know that G is a group under multiplication. Let H = {–1, 1}, and HG

Now 1H = {–1, 1} = H1

(–1)H = {1, –1} = H (–1)

iH = {–i, i} = Hi

(–i)H = {i, –i} = H (–i)

Thus, aH = Ha, for all aG H  G.

Note:In the above example, H has two distinct left (or right) cosets, viz H, iH. We note that iH is not a
subgroup of G.

Theorem :Every subgroup of an Abelian group is normal.

Proof:Let G be an Abelian group. Let H G.

Let a G

Now aH = {ah : h H}

= {ha :hH} [ G is aAbelian]

= HaHG.

Theorem :The intersection of any two normal subgroup of a group is again a normal subgroup of the
group.

Proof:Let G be a group, an H G, K G.

H G, KG and so H K G.

Let gG, hHK


–1
hHK hH and hK Now g G, hH and H G,ghg H

DDE, GJUS&T, Hisar 95 |


Discrete Mathematics & Optimization MCA-25

–1
Again gG, hK and K G ghg K
–1 –1 –1
Thus, ghg H and ghg K. ghg H  K

H  K G.

Note:The union of two normal subgroups is not necessarily a normal subgroup.

4.11 CYCLICGROUPS

Definition: A group G is said to be cyclic if there exist an element a in G such that every element of G

can be expressed in the form an,nZ. a is said to be a generator of G. Symbolically we write


G=<a>,i.e.,G is a cyclic group generated by a.

Note: If the group G is additive, every element of G is expressed in the form na.

Examples
1 2
1. We know that G={–1,1}is a group under multiplication. We have (–1) =–1, (–1) =1

G is a cyclic group generated by –1, i.e. G = <–1>


2
2. We know that G={1, ,  } is a group under multiplication; is a complex cube root of unity. We
1
have,  , 2  2, 3  1.. G is cyclic group generated by i.e., G=< > Similarly G
= <2>
1 2 3 4
3. We know that G={–1,1,–i,i}is a group under multiplication. We have i = i, i = –1, i = –i, i =1 G
is a cyclic group generated by i , i.e. G = <i> Similarly G = < – i>

4. Let Z be the additive group of integers.

Let xZ Then x =1x

G is a cyclic group generated by1,i.e. G = < 1 >Similarly G = < –1>.

Theorem :Every cyclic group is Abelian.

Proof :Let G = < a > be a cyclic group.

Let x, y G.

DDE, GJUS&T, Hisar 96 |


Discrete Mathematics & Optimization MCA-25

Then there exist integers m, n such that x = am, y = anNow xy = aman

=am+n

=an+m

= an am

= yx therefore G is Abelian.
–1
Theorem :If a is a generator of a cyclic group G, a is also a generator of G.

Proof :Let G = < a > be a cyclic group. Let x, y G.

Then there exists integer m such that x = am


–1
= (a )–m
–1
G = < a >.

4.12CHECK YOUR PROGRESS

𝑎
1. Is * defined by a * b = 𝑏 binary operation on IR?

2. Is multiplication a binary operation on{–1,1,i,–i}?where 𝑖 = √−1

3. Is the multiplicative group IR+ of positive real numbers a subgroup pf the additive group IR of
real numbers? Justify your answer.

4. Can there be two disjoint subgroups of a group? Justify your answer.

5. Can an Abelian group have a non-Abelian subgroup?

6. Can a non-Abelian group be cyclic?

7. Let G = {1,  ,2 } be the multiplicative group; being a complex cube root of unity. Is the group
simple?

4.13 SUMMARY

DDE, GJUS&T, Hisar 97 |


Discrete Mathematics & Optimization MCA-25

1. A binary operation on a non-empty set S is a function from SxS to S.

m2
2. If S is a finite set having m elements, the number of binary operations on S is m .

3. A binary operation on a non-empty set S is commutative if a b = b a, a,bS.

4. A binary operation on a non-empty set S is associative

5. if (a b)c = a (b c), a, b, c S

6. An element e in a non-empty set S equipped with a binary operation is called an identity

element for x if a e = a = e a, a S.

7. An element b in a non-empty set S equipped with a binary operation is called an inverse

element of a S if a b = e = b a.

8. A group is an algebraic structure i.e., a non-empty set equipped with a binary operation satisfying
certain postulates.

9. The order of a group G is the number of elements in G and the order of an element in a group is
the least positive integer n such that an is the identity element of that group G.

10. A non-empty subset H of a group G is a subgroup of G if H is also a group under the same binary
operation of G.

11. If H is a subgroup of a group G, the set Ha = {ha: h H}, aG, is called a right coset of H in G.
Similarly,a left coset is defined.

12. A group G is said to be cyclic if there exists an element a in G such that every element of G can

be expressed in the form an;nZ

13. A subgroup H of a group G is a normal subgroup of G if aH=Ha, for all a G.

4.14KEYWORDS

Semigroup: A finite or infinite set ‘S′ with a binary operation ‘*’ (Composition) is called semigroup if
it holds following two conditions simultaneously −

DDE, GJUS&T, Hisar 98 |


Discrete Mathematics & Optimization MCA-25

 Closure − For every pair (a, b) ∈S, (a*b) has to be present in the set S.

 Associative –For every element a, b, c ∈S, (a*b) *c=a*(b*c) must hold.

Monoid: A monoid is a semigroup with an identity element. The identity element (denoted by e or E) of
a set S is an element such that (a*e) = a, for every element a∈S. An identity element is also called a unit
element. So, a monoid holds three properties simultaneously − Closure, Associative, Identity element.

Group: A group is a monoid with an inverse element. The inverse element (denoted by I) of a set S is
an element such that (a*I) =(I*a) =a, for each element a∈S. So, a group holds four properties
simultaneously - Closure, Associative, Identity element, Inverse element.

Abelian group: An abelian group G is a group for which the element pair (a,b)∈G always holds
commutative law. So, a group holds five properties simultaneously - Closure, Associative, Identity
element, Inverse element, Commutative.

Cyclic group: A group that can be generated by a single element. Every element of a cyclic group is a
power of some specific element which is called a generator. A cyclic group can be generated by a
generator ‘g’, such that every other element of the group can be written as a power of the generator ‘g’.

Subgroup: A subgroup H is a subset of a group G (denoted by H≤G) if it satisfies the four properties
simultaneously − Closure, Associative, Identity element, and Inverse.

4.15 ANSWERS TO CHECK YOUR PROGRESS

1. No.

2. Yes

3. No,Binary operations are different.

4. No. Two subgroups of a group have at least one common element, viz., the identity element.

5. No.

6. Every cyclic group is Abelian. Therefore, every non-Abelian group is non-cyclic.

7. Yes. It has no normal subgroups other than G, {1}.

DDE, GJUS&T, Hisar 99 |


Discrete Mathematics & Optimization MCA-25

4.16 SELF ASSESSMENT TEST

1. Let IR be the set of real numbers. Examine if the binary operation defined by ab=a+5b;

a,bIR is (i)commutative, (ii)associative.

2. Let S be a set having 3 elements.How many binary operations can be defined on S?

3. Let G be the set of odd integers. A binary operation on G is defined as follows a b = a+b–1; a,

b G.Show that G is an Abelian group under .

–1 –1 –1
4. Prove that a group G is Abelian if and only if (ab) =a b ,for all a,bG.
–1
5. Let G be an Abelian group.Prove that the set H={xG:x=x }is a sub group of G.

6. Show that a group of order 4 is always Abelian.


–1 -1
7. Let g be a group and e be the identity of G.Prove that G is Abelian if b a b a = e, for all a, b G.

8. Let G be a group and H be a subgroup of G. Let a,bG. Show that the two right cosets Ha,Hb are
–1 –1
equal if and only if the two left cosets a H, b H are equal.

4.17REFERENCES / SUGGESTED READINGS

1. Lanski, Charles :Concepts in Abstract Algebra, (First Indian edition,


2010)AmericanMathematicalSociety.

2. Vasistha,A.R.:ModernAlgebra(Abstractalgebra),KrishnaPrakashanMedia(p)Ltd.Meerut-
250001(U.P).

3. Vinberg,E.B.:AcourseinAlgebra(FirstIndianedition,2009),American MathematicalSociety).

4. Vatsa,B.S.andVatsa,Suchi:ModernAlgebra,NewAgeInternational

5. (p) Ltd., New Delhi-110002.

6. Sen,M.K,Ghosh,ShamikandMukhopadhyay,Parthasarthi:Topics in Abstract Algebra, Universities


Press (India) Pvt. Ltd., Hyderabad, 500029.

DDE, GJUS&T, Hisar 100 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA-25


AUTHOR: PANKAJ KUMAR
Lesson No. 5

GRAPH THEORY
REVISED /UPDATED SLM BY RENU BANSAL

STRUCTURE
5.1 Learning Objective
5.2 Introduction
5.3 Graph
5.3.1 Directed graph
5.3.2 Undirected graph
5.3.3 Multi graph
5.4 Paths and circuits
5.5 Some definitions
5.6 Connected and disconnected graphs.
5.7 Matrix representation of graphs
5.7.1 Incidence Matrix
5.7.2 Adjacency Matrix
5.7.3 Adjacency Matrix of a Digraph
5.8 Some Special Graph
5.8.1 Regular Graph
5.8.2 Bipartite Graph
5.8.3 Connected Graph
5.8.4 Euler Graph
5.8.5 Hamiltonion Graph
5.9 Sub graphs
5.9.1 Isomorphic graphs
5.9.2 Homeomorphic graphs

DDE, GJUS&T, Hisar 101 |


Discrete Mathematics & Optimization MCA-25

5.10 Cut point and Bridges


5.11 Planar Graph
5.11.1 Euler Formula
5.12 Check Your Progress
5.13 Summary
5.14 Keywords
5.15 Self-assessment test
5.16 Answer to check your progress
5.17 References/ Suggested Readings

5.1 LEARNINGOBJECTIVES

After going through this unit you will be able to know

1. To gain some knowledge about graphs.

2. Types of graph
3. Representation of graph
4. Graph traversal algorithms

5. What is Planar Graph

5.2 INTRODUCTION

In this chapter we have defined graph which is pictorial representation of relations on sets. We have
defined directed graph, undirected graphs, paths, circuits and matrix associated with graphs.

5.3 GRAPH

A pair of set {V, E}, V, constitute a graph. Elements of set V are called vertices while elements of set
E are called edges or lines or curves. Generally, lines and points of plane represent the edges and
vertices of the graph.

Note: 1. If V is a finite set then we say that graph is finite graph.

DDE, GJUS&T, Hisar 102 |


Discrete Mathematics & Optimization MCA-25

2. Each edge is represented by a pair of vertices say u and v, these vertices are called end points of
edges we will denote it by E(u, v).

5.3.1 DIRECTED GRAPHS

If we put u and v as an ordered pair, then edge is called directed from u to v and such a graph in which
each edge is directed is called directed graph. For example, figures given below is directed graph.

F IG 5.1 D IRECTED G RAPH

5.3.2 UNDIRECTED GRAPH

If a graph is not directed is called undirected graph in such graph edges are given as E(u, v). Graphs given
in Figure 5.2are undirected graphs.

F IG 5.2 UNDIRECTED G RAPHS

5.3.3. MULTI GRAPH

Consider the diagram, The edges e4 and e5 are called multiple edges since they connect the

same endpoints, and the edge e6 is called a loop since its endpoints are the same vertex. Such a
diagram is called a multigraph.

DDE, GJUS&T, Hisar 103 |


Discrete Mathematics & Optimization MCA-25

Note: (1) Edge E (u, u) is called a self-loop. A graph with no self loop and no parallel edge is called a
simple graph otherwise it is called non-simple or multi graph. For example, graph of a relation which is
neither reflexive nor symmetric is simple and that of reflexive relation is not simple. Figure (a) and (b)
are graph which are non-simple and simple respectively.

F IG ( A ) F IG ( B )

(2) Edges e1 and e2 are parallel edges if they have same vertices. Here e1 and e2 are parallel edges.

e1
a b
e2
F IG 5.3 P ARALLEL E DGES

5.4 PATH AND CIRCUIT

In the following figure, we have e(a1 , a 2 ) , e( a 2 , a3 ) , e( a3 , a 4 ) e( a 4 , a5 ) , e( a5 , a 6 ) are the edges so that

we move from a1 to a6 along these edges without using an edge more than once.

DDE, GJUS&T, Hisar 104 |


Discrete Mathematics & Optimization MCA-25

F IG 5.4 S IMPLE G RAPH

WALK: -Let G be a graph. Then a sequence of vertices v0, v1, v2, ……. vt each adjacent to the next and
there is always an edge between vi, and vi+1, is called a walk. The vertex v0 is called the initial vertex
and the vertex vt is called terminate vertex of the path. Number of edges in a walk I s called its length.
A walk is called open walk if it has different beginning and end points and is called closed walk if it’s
beginning and end points are same.

Definition: A Trail is a walk having all distinct edges. A Path is a walk in which all vertices are
distinct. A closed trail is called a Circuit. A circuit in which vertices (except the first and last) do not
repeat is called a Cycle.

Note: A path is always a trail but a trail need not be a path. Similarly, a cycle is always a circuit but a
circuit is not a cycle always.

In figure given below for the graph aba, one is circuit while other is not a circuit.

F IG 5.5 N OT A C IRCUIT F IG 5.6 CIRCUIT AND CYCLE

F IG 5.7

DDE, GJUS&T, Hisar 105 |


Discrete Mathematics & Optimization MCA-25

1. a b c d a c is a trail as no edge repeats

2. a b c d e , a d c b and a d e c b are paths


3. a c d e c b a is a circuit but not a cycle
4. a b c a , a b c d a and a b c e d a are cycles.

6.5 SOME DEFINITIONS

Degree of a vertex: In a non-directed graph G, the degree of a vertex v is determined by counting each
loop on v twice and each other edge once. It is denoted by d (v).

Example: d (V1) = 1, d (V2) = 2, d (V3) = 3 are the degrees of V1, V2 and V3 in following figure.

F IG 5.8

Theorem: The sum of d(vi) for each vi of a undirected graph G (V, E) is twice the number of edges in G

Proof: Since G is undirected graph, each edge of G is incident with two vertices, therefore, contributes
2 to the sum of degree of all the vertices of the undirected graph. Therefore, the sum of degrees of all
the vertices in G is twice the number of edges in G.

Example: Draw a simple graph with three vertices i.e. draw a graph with no self-loop and no parallel
edges.

Solution: Figure shown below is a simple graph.

DDE, GJUS&T, Hisar 106 |


Discrete Mathematics & Optimization MCA-25

F IG 5.9

F IG 5.10

There are five edges in this graph in which edge e4 and e5 has same vertices (c, d). Therefore, these
edges are parallel edges. Further sum of degrees of the vertices is 2+2+3+3=10 = 2.5= 2 times the
number of edges.

Definitions

1. Isolated vertex: A vertex on which no edge incident is called isolated vertex, i.e. a vertex v such that
d (v) = 0.

2. Null graph: A graph G = (V, E) such V  and E =  is called null graph, therefore null graph in which
every vertex is isolated.

Theorem 1: In a non-directed graph, the number of vertices of odd degree is always even.

DDE, GJUS&T, Hisar 107 |


Discrete Mathematics & Optimization MCA-25

Proof: Let the number of vertices in a graph G be n. Let’s suppose that the degree of first k vertices
say v0, v1, v2, …. vk be even and remaining n-k vertices be odd i.e. the vertices with odd degree.

n k n
Now  dv    dv    dv  
i 1
i
i 1
i
i  k 1
i   

But we know by Theorem (3.4.2) that L.H.S. of (1) is even. As d(vi) in first term of R.H.S. is even,
k n
therefore,  dv i  is also even. It gives us that
i 1
 dv 
i  k 1
i must be even. But each d (vi) in that

 dv  is odd. Moreover, we know that sum of odd number is even if they are taken even number
i  k 1
i

of times. So here n-k must be even. i.e. odd number vertices in the graph must be even. Hence the
proof is over.

5.6 CONNECTED AND DISCONNECTED GRAPHS.

Definition: If in a graph we can move from any vertex to the any other vertex of the graph then such
graphs are called connected graphs otherwise it is called disconnected graph. Simple we can say that if
there exists a path between every pair of vertices the graph is called connected.

For example, Graph in Fig. 5.13 is connected graph while in Fig. 5.14 it is disconnected.

F IG 5.11 F IG 5.12

Definition:

1. Let G be a connected graph. The edge connectivity of G is the minimum number of lines (Edges)
whose removal results in a disconnected or trivial graph. It is generally denoted by (G).

DDE, GJUS&T, Hisar 108 |


Discrete Mathematics & Optimization MCA-25

2. Vertex connectivity of a graph G is the minimum number of vertices whose removal results in a
disconnected or trivial graph is called the vertex connectivity of G. It is generally denoted by k(G).

Theorem. The edge connectivity of a connected graph G cannot exceed the minimum degree of G, i.e.
(G) (G).

Proof: Let G be a connected graph and v be a vertex of minimum degree in G. Then the removal of
edges incident with the vertex v disconnects the vertex v from the graph G. Thus the set of all edges
incident with the vertex v forms a cut set of G. But from the definition, edge connectivity is the edge
connectivity of G cannot exceed the minimum degree of v, i.e.  (G)  (G).

Theorem: The vertex connectivity of a graph G is always less than or equal to the edge connectivity of
G, i.e., k (G)  (G).

Proof: If graph G is disconnected or trivial the k (G) =  (G) = 0. If G is connected and has a bridge e,
then  = 1. In this case K = 1, since either G has a cut point incident with e or G is K 2.( k (G)  (G)
when  (G) = 0 or 1). Finally let us suppose that  (G)  2. The G has  lines whose removal disconnects
G. Clearly the -1 of these edges produces a graph with a bridge e = {u, v}. For each of these -1 edges
select an incident point which is different from u or v. The removal of these points (vertices) also
removes -1 edges and if the resulting graph is disconnected then k -1 <. If not the edge e = {u, v}
is a bridge and hence the removal of u and v will result in either a disconnected or a trivial graph.
Hence k  in each case and this completes the proof of the theorem.

Thus, the vertex connectivity of a graph does not exceed the edge connectivity and edge connectivity
of a graph cannot exceed the minimum degree of G. Hence the theorem given below.

Corollary: For any graph G, k(G)  (G)  (G) is disconnected.

Theorem: A graph is disconnected if V can be written as union of two non-empty, disjoint subsets V1
and V2 such that there exist no element of E whose one vertex in V1 and other in V2.

Proof: Let us suppose that G be a connected graph. Take any vertex v in G. Let V1 be the collection of
all these vertices, which are joined by paths to v. Since G is not connected V V1 [if V= V1 then G will be

DDE, GJUS&T, Hisar 109 |


Discrete Mathematics & Optimization MCA-25

connected]. So take v2 a set having all vertices of G which are not in all vertices of V which are not in
V1. Therefore, V1 and V2 are required subsets of V.

Conversely, suppose that V = V1V2, v1, v2 V1V2 = , then if we take v1V1 and v2V2
then there exist no edge between v1 and v2 i.e. graph is disconnected.

Component of a graph means maximal connected subgraph of graph G (V, E). For example, in Fig.
5.15.

F IG 5.13

{v1,v2,v3}, {v4,v5}, {v6,v7,v8,v9}, are components. Further it is clear that a graph is connected if and only
if it has exactly one component.

Theorem: A simple graph with m vertices and r components can have at most (m-r) (m – r + 1)/2 edges.

Proof: Let G (V, E) be a graph with m vertices and r components let m 0, m1, … mr be the number of
vertices in each components of G (V, E). Then we have

mi = m and mi  1 (1)

Now from (1) we get

(2)
 mi  1  m  r
r

i 1

Squaring (2) on both sides we get

2
 r 
  m i  1  m 2  r 2  2mr
 i 1 

DDE, GJUS&T, Hisar 110 |


Discrete Mathematics & Optimization MCA-25

2
 r 
 1  2m i  1m j  1  m 2  r 2  2mr
r
But   m i  1   m
2
i
 i 1  i 1

r
  (mi  2mi )  r  m 2  r 2  2mr  (mi  1)  0 and (m j  1)  0 )
i 1

r r
  mi  2  mi  m  r  2mr  r
2 2 2
i 1 i 1

r
  m i  m  r  2mr  r  2m
2 2 2

i 1

We also know that in a simple graph with mi vertices have at most mi (mi -1)/2. Thus the
maximum number of edges in G is

1 r  1 2
 
r r
m i m i  1   2  i  m i   2 m  r  12m  r   m
1

i 1 2  i 1
m 2

i 1 


1
m  r m  r  1
2

This completes the proof.

Definition: Two vertices u and v in a digraph are said to be mutually reachable if G contains both
directed u-v walk and a directed v-u walk. A digraph is said to be strongly connected if every two of its
vertices are mutually reachable.

5.7MATRIX REPRESENTATION OF GRAPHS

Since we know that it is very easy to manipulate matrices. We take the matrix associated with
different graphs. There are two ways of representing graph- (1) incidence matrix; (2) Adjacency matrix.

DDE, GJUS&T, Hisar 111 |


Discrete Mathematics & Optimization MCA-25

5.7.1 INCIDENCE MATRIX

Let v1, v2, …. vn be n vertices and e1, e2, …, em be m edges of graph G. Then an n × m matrix I = [aij]
whose n rows correspond to n vertices and m columns corresponds to m edges where aijis as

0 if vi is not an end po int of edge e j




a ij  1 if vi is not an end po int of edge e j


2 if e j is self loop on vi

this matrix I = [aij] is called incidence matrix.

Example: Write the incidence matrix of the graph given in Figure

e1 e2 e3 e4
v 1 1 0 0 0
v 2 1 1 0 1
v 3 0 1 1 0
 
v 4 0 0 1 1

F IG 5.14 G RAPH WITH I NCIDENCE M ATRIX

Some facts about incidence matrix of a graph without self-loop.

1. Number of one’s in each column is exactly two since each edge incident exactly on two vertices.
2. With given incidence matrix there always exists a graph.

DDE, GJUS&T, Hisar 112 |


Discrete Mathematics & Optimization MCA-25

3. Sum of entries of any row of matrix gives us the degree of corresponding vertex.
4. A row with all zeroes represents an isolated vertex.

5.7.2 ADJACENCY MATRIX

Let us consider a graph with n vertices say v1, v2, …, vn. Then a square matrix X  [ x ij ] of order n,

where

the number of edges between v i and v j if v i  v j



x ij  
the number of self loops at v i if v i  v j

Example: Write the adjacency matrix of the graph given below:

v1 v 2 v 3 v 4
v 1 0 1 0 1
v 2 1 0 1 0
v 3 0 1 1 1
 
v 4 1 0 1 1

F IG 5.15 G RAPH AND A DJACENCY M ATRIX

Some facts about adjacency matrix

(1) X (G) is symmetric matrix.

(2) If G has no self-loops then diagonal entries of adjacency matrix are zero. If ithdiagonal entry is 1,
then it indicates that there is a self-loop at ith vertex vi.

DDE, GJUS&T, Hisar 113 |


Discrete Mathematics & Optimization MCA-25

5.7.3 ADJACENCY MATRIX OF A DIGRAPH

(i.e. a directed graph) is defined as A (G) = [xij] nxn where G is a graph with n vertices and no parallel
edges and

the number of edges directed from v i to v j if v i  v j



x ij  
the number of self loops at v i if v i  v j

By definition it is clear that the sum of elements of ith row of adjacency matrix is equal to the outgoing
degree of vertex vi i.e. the number of edges going out of vertex vi.

Example: Write the Adjacency matrix of the diagraph given below:

v1 v2 v3 v4
v1 0 1 1 1
v 2 0 0 1 0 
v 3 0 0 0 1
 
v 4 0 0 0 0 

F IG 5.16 A DJACENCY M ATRIX OF A D IGRAPH

5.8 SOME SPECIAL GRAPHS

5.8.1 REGULAR GRAPH

A graph in which every vertex has the same degree is called a regular graph. If every vertex has degree
K, then the graph is called a k-regular or regular graph of degree K.

Note:

1. A graph is called a null graph is every vertex in the graph is an isolated vertex i.e every null graph is

DDE, GJUS&T, Hisar 114 |


Discrete Mathematics & Optimization MCA-25

regular of degree zero.


2. A complete graph kn is regular of degree n–1.

3. If a graph has n vertices and is regular of degree k, then it has k n/2 edges.

F IG 5.17 R EGULAR G RAPH

5.8.2 BIPARTITE GRAPH

A simple graph is called bipartite if its vertex set V can be Partitioned into two disjoint sets
v1andv2such that every edge in the graph connects a vertex in v1 and a vertex in v2. In other words, a

graph G is called bipartite graph when V=v1U v2 and v1v2=and every edge of G is of the form (vi, vj)

with viv1 and vjv2

A complete bipartite graph is a bipartite graph in which every vertex of v1 is adjacent to every vertex of
v2. If number of vertices in v1 are m and number of vertices in v2 are n, then the complete bipartite graph
is denoted by Km,n. A complete bipartite graph km,n has m+n vertices and mn edges. The complete
bipartite graph k3.3 and k3,4 are displayed in fig.6.20

DDE, GJUS&T, Hisar 115 |


Discrete Mathematics & Optimization MCA-25

F IG 5.18 B IPARTITE G RAPHS

5.8.3 CONNECTED GRAPHS

A graph is said to be connected if we can reach any vertex from any other vertex by traveling along the
edges. More formally, A graph is said to be connected if there exists at least one path between every
pair of its vertices, otherwise, the graph is disconnected. That is a graph G is connected if give any
vertices u and v, it is possible to travel from u to v along a sequence of adjacent edges fig.6.21 is
connected graph but in fig.6.22 is a disconnected graph.

F IG 5.19 C ONNECTED G RAPH

F IG 5.20 D ISCONNECTED G RAPH

DDE, GJUS&T, Hisar 116 |


Discrete Mathematics & Optimization MCA-25

A disconnected graph consists of two or more connected graphs. Each of these connected subgroups is
called a component. Figure 5.22 is a disconnected graph with two components.

5.8.4 EULER GRAPH

An undirected graph with no isolated vertices is said to have an Euler circuit if there is a circuit in G
that traverses every edge of the graph exactly once. If there is an open trail from vertex u to v in G and
this trail traverses each edge in G exactly once, the trail is called Euler trail. [A trail from a vertex u to
v is a path that does not involve a repeated edge] An Eulerian tour is a closed walk that starts at some
vertex, passes through each edge exactly once and returns to the starting vertex.

Since any closed walk in an undirected graph enters and leaves any vertex the same number of times,
the subgraph composed of the edges in any closed walk is even.Thus, if the graph contains a closed
walk passing through each edge exactly once, the graph must be even, conversely,if the graph is even,
then it contains an Euler tour,A path that passes through each edge exactly once but vertices may be
repeated is called Euler path.

A graph that contains an Euler tour or Euler circuit is called an Eulerian graph.

Note:1.If a graph G has a vertex of odd degree,then there can be no Euler circuit in G.

2. If a graph G is connected and each vertex has even degree, then there is an Eulercircuit.

Forexample, the graph in figure5.23 is an Eulerian graph because all the vertices are of even degree,
so it has an Euler circuitv1v2v3v5v4v3v1. But the graph G in figure 5.24 is not an Euler

graph because all the vertices of G are not even degrees, so there does not have any Euler circuit.

F IG 5.21 E ULER G RAPH

DDE, GJUS&T, Hisar 117 |


Discrete Mathematics & Optimization MCA-25

F IG 5.22 N OT E ULER G RAPH

5.8.5 HAMILTONIAN GRAPH

Let G be a connected graph with more than two vertices. If there is a path in G that uses each vertex of
the graph exactly once, then such a path is called Hamiltonian path. If the path is a circuit that contains
each vertex in G exactly once, except the initial vertex, then such a path is called a Hamiltonian circuit.
A graph that contains a Hamiltonian circuit is called a Hamiltoniangraph.

Note: i)The complete bipartite graph km,nis Hamiltonian if m = n and m>1.

ii) Eulerian circuit uses every edge exactly once but many repeat vertices, while Hamiltonian circuit
uses each vertex exactly once except for the first and last vertex.

For example, the graph in figure 5.25 is Hamiltonian because there is a Hamiltonian circuit shown by
the arrow symbols

F IG 5.23 H AMILTONIAN G RAPH

DDE, GJUS&T, Hisar 118 |


Discrete Mathematics & Optimization MCA-25

Example: Draw three graph which are

1. Hamiltonian but not a Eulerian

2. Neither Eulerian nor Hamiltonian

Soln.1. Hamiltonian but not a Eulerian

F IG 5.24

2 Neither Eulerian nor Hamiltonian

F IG 5.25

5.9 SUB GRAPHS

Consider a graph G = G (V,E). A graph H = H(V’,E’) is called a subgraph of G if the vertices and edges of
H are contained in the vertices and edges of G, that is, if V’ ⊆V and E’ ⊆E. In particular:

DDE, GJUS&T, Hisar 119 |


Discrete Mathematics & Optimization MCA-25

(i) A subgraph H(V’,E’) of G(V,E) is called the subgraph induced by its vertices V’ if its edge set
E’contains all edges in G whose endpoints belong to vertices in H.

(ii) If v is a vertex in G, then G − v is the subgraph of G obtained by deleting v from G and deleting all
edges in G which contain v.

(iii) If e is an edge in G, then G − e is the subgraph of G obtained by simply deleting the edge e from G.

For example: In given figure Graph(b) is subgraph of Graph (a).

5.9.1 ISOMORPHISM OF GRAPHS

Two graphs are said to be isomorphic it they have identical behavior in terms of graph-theoretic
properties. More precisely:

Let G1(V1, E1) and G2(V2, E2) be two simple undirected graphs. A function f: V1V2is called a graph

isomorphism if

1. F is one-one and onto, i.e, there exists a one-to-one correspondence between their vertices as
well as edges (both the graphs have equal number of vertices and edges, however, vertices may
have different levels.)

2. for all u,vV1, {u,v} E1if and only if {f(u), f(v)}E2

If such a function exists, then the graphs G1and G2 are called isomorphic graphs. For example,we can verify
that the graph G and H in figure5.28 and are isomorphic

DDE, GJUS&T, Hisar 120 |


Discrete Mathematics & Optimization MCA-25

F IG 5.26

F IG 5.27

The correspondence between the two graphs is as follows:

The vertices 1, 2, 3 and 4 in G is corresponds to v1, v4, v3 and v2 respectively in

H. The edges a, b, c, d in G corresponds to e1, e3, e2, e4 respectively.

Note:i) Two isomorphic graphs have equal number of vertices and edges.

ii) Two isomorphic graphs have equal number of vertices withsamedegree.

Example 8:Show that the graph displayed in figure5.30 are not isomorphic.

DDE, GJUS&T, Hisar 121 |


Discrete Mathematics & Optimization MCA-25

F IG 5.28

Solution: The graph G and H both have five vertices and six edges. However, the graph H has a vertex
of degree one namely v3. Whereas G has no vertices of degree one. Hence G and H are not isomorphic.

5.9.2 Homeomorphic Graphs

Given any graph G, we can obtain a new graph by dividing an edge of G with additional vertices. Two
graphs G and G* are said to homeomorphic if they can be obtained from the same graph or
isomorphic graphs by this method. The graphs (a) and (b) in given Fig. are not isomorphic, but they are
homeomorphic since they can be obtained from the graph (c) by adding appropriate vertices.

Note: Graph (a) and (b) are Homeomorphic graphs

5.10 CUT POINT AND BRIDGES

Cut point and Bridges

Let G be a connected graph. A vertex v in G is called a cut point if G−v is disconnected.

DDE, GJUS&T, Hisar 122 |


Discrete Mathematics & Optimization MCA-25

Note, that G−v is the graph obtained from G by deleting v and all edges containing v.

An edge e of G is called a bridge if G−e is disconnected.

Note, that G − e is the graph obtained from G by simply deleting the edge e.

For example: In given Fig.(a),the vertex D is a cutpoint and there are no bridges. In Fig.(b), the edge =
{D,F} is a bridge. (Its endpoints D and F are necessarily cutpoints.)

5.11 PLANAR GRAPHS

PLANAR GRAPHS

A graph or multigraph which can be drawn in the plane so that its edges do not cross is said to be
planar.

Although the complete graph with four vertices K4 is usually pictured with crossing edges as in Fig. (a),
it can also be drawn with non crossing edges as in Fig.(b); hence K4 is planar. Tree graphs form an
important class of planar graphs.

Maps, Regions in planar graphs

DDE, GJUS&T, Hisar 123 |


Discrete Mathematics & Optimization MCA-25

A particular planar representation of a finite planar multigraph is called a map. We say that the map is
connected if the underlying multigraph is connected. A given map divides the plane into various
regions. For example, the map in below Fig. with six vertices and nine edges divides the plane into five
regions. Observe that four of the regions are bounded, but the fifth region, outside the diagram, is
unbounded. Thus there is no loss in generality in counting the number of regions if we assume that our
map is contained in some large rectangle rather than in the entire plane. Observe that the border of
each region of a map consists of edges. Sometimes the edges will form a cycle, but sometimes not. For
example, in given Fig. the borders of all the regions are cycles except for r3. However, if we do move
counterclockwise around r3 starting, say, at the vertex C, then we obtain the closed path (C,D,E, F,E,C)

where the edge {E,F} occurs twice. By the degree of a region r, written deg(r), we mean the length of
the cycle or closed walk which borders r. We note that each edge either borders two regions or is
contained in a region and will occur twice in any walk along the border of the region

Fig.

Thus we have a theorem for regions which is analogous to Theorem for vertices.

Theorem: The sum of the degrees of the regions of a map is equal to twice the number of edges.

The degrees of the regions of above Fig. are:

deg(r1) = 3, deg(r2) = 3, deg(r3) = 5, deg(r4) = 4, deg(r5) = 3

The sum of the degrees is 18, which, as expected, is twice the number of edges.

For notational convenience we shall picture the vertices of a map with dots or small circles, or we shall
assume that any intersections of lines or curves in the plane are vertices.

DDE, GJUS&T, Hisar 124 |


Discrete Mathematics & Optimization MCA-25

5.11.1 Euler’s Formula

Euler gave a formula which connects the number V of vertices, the number E of edges, and the
number R of regions of any connected map. Specifically:

Theorem (Euler): V − E + R = 2.

Proof of Theorem:

Suppose the connected map M consists of a single vertex P as in Fig. (a). Then V = 1, E = 0, and R = 1.

Hence V − E + R = 2. Otherwise M can be built up from a single vertex by the following two
constructions:

(1) Add a new vertex Q2 and connect it to an existing vertex Q1 by an edge which does not cross any
existing edge as in Fig. (b).

(2) Connect two existing vertices Q1 and Q2 by an edge e which does not cross any existing edge as in
Fig.(c).

Neither operation changes the value of V −E +R. Hence M has the same value of V −E +R as the map
consisting of a single vertex, that is, V − E + R = 2. Thus the theorem is proved.

For example: Observe that, in above given Fig., V = 6, E = 9, and R = 5; and, as expected by Euler’s
formula.

V−E+R=6−9+5=2

It emphasize that the underlying graph of a map must be connected in order for Euler’s formula to
hold.

DDE, GJUS&T, Hisar 125 |


Discrete Mathematics & Optimization MCA-25

6.9CHECK YOUR PROGRESS

1. What is a simple graph?

2. Define degree of a vertex?

3. Define pendant and isolated vertex?

4. When a vertex is said to be an even or odd?

5. What do you mean by complete graph and regular graph?

6. Define adjacency matrix of undirected graph?

7. When two graphs are said to be isomorphic?

8. Define Eulerian path?

7.6.3 6.10 SUMMARY

1. A graph G = (v,E) is a pair of sets, where V ={v1,v2, ............... } is a set of vertices and E ={e1,e2,……}

is a set of edges connecting pair of vertices.

2. A graph is said to be undirected graph if its edges are unordered pairs of distinct vertices
otherwise the graph is said to be directed.

3. The degree of a vertex is the number of edges incident with that vertex.

4. A loop is an edge from a vertex to itself. It there is more than one edge between a pair of
vertices, them these edges are called parallel edges.

5. A graph with no loops and parallel edges is called a simple graph.

6. A simple graph in which there is an edge between every pair of vertices is called a complete
graph.

7. The number of vertices of odd degree in a graph is always even.

8. In computers, a graph can be represented in two ways, viz, adjacency matrix and incidence matrix.

DDE, GJUS&T, Hisar 126 |


Discrete Mathematics & Optimization MCA-25

9. The simple graph G1= (v1, E1) and G2= (v2, E2) are isomorphic if there is a one-to-one and onto

function f from v1 to v2 with the property that vertices a and b are adjacent in G1 iff f(a)andf(b)

are adjacent in G2, a,b V1. Such a function f is called an isomorphism.

10. A graph is connected if we can reach any vertex from any other vertex by traveling along the
edges. Otherwise, the graph is disconnected.
11. A graph is Hamiltonian if every vertex of the graph has even number of degrees.

6.11KEYWORDS

Graph: -A graph G = (v,E) is a pair of sets, where V = {v1, v2, ....... } is a set of vertices and E = {e1,
e2,……} is a set of edges connecting pair of vertices.

Simple graph: – A graph in which each edge connects two different vertices and where no two edges
connect the same pair of vertices is called a simple graph.

Multigraph: – A graph in which multiple edges may connect the same pair of vertices is called a
multigraph.

Complete Graphs: – A simple graph of n vertices having exactly one edge between each pair of
vertices is called a complete graph. A complete graph of n vertices is denoted by Kn.

Bipartite Graphs: – A simple graph G is said to be bipartite if its vertex set V can be divided into two
disjoint sets such that every edge in G has its initial vertex in the first set and the terminal vertex in the
second set. Total number of edges are (n*m) with (n+m) vertices in bipartite graph.

Regular Graph: -A Regular graph is a graph in which degree of all the vertices is same. If the degree
of all the vertices is k, then it is called k-regular graph.

Planar graph: - A planar graph is a graph that we can draw in a plane in such a way that no two edges
of it cross each other except at a vertex to which they are incident.

6.12 SELF ASSESSMENT TEST

1. Write the adjacency matrix associated with the graph shown below:

DDE, GJUS&T, Hisar 127 |


Discrete Mathematics & Optimization MCA-25

2. Write incidence matrix of following graphs

3 Draw a graph corresponding to given adjacency matrix.

0 1 0 1
1 0 1 1 
 0 0 1 1 0 0 
and  
0 0 0 1
  1 1 0
1 1 1 0

4. Draw the diagraph of the incidence matrix.

0 0 0 1
0 0 0 0

0 0 0 0
 
1 1 1 0

6.13 ANSWER TO CHECK YOURPROGRESS

1. A graph with no loops and parallel edges is called a simple graph.

2. The degree of a vertex is the number of edges incident with that vertex.

DDE, GJUS&T, Hisar 128 |


Discrete Mathematics & Optimization MCA-25

3. A vertex of degree one is called a pendant vertex and a vertex of degree zero is called an isolated
vertex

4. A vertex is said to be an even or odd vertices according as its degree is an even or odd number.

5. A simple graph is which there exists an edge between every pair of vertices is called a complete
graph. Again a graph in which every vertex has the same degree is called a regular graph.

6. Suppose that G be a simple undirected graph with n vertices. suppose that the vertices of G are
listed arbitrarily as v1, v2, ...... ..., vn. The adjacency matrix denoted by A(G) of G is ann×n matrix
[aij] defined as:[aij] = 1, if vertex viis adjacent to vj 0,otherwise

7. Two simple graph G1 = (V1, E1) and G2 = (V2, E2) are isomorphic if there is a one-to-one and onto

function f from V1toV2with the property that vertices a and b are adjacent in G1 iff f(a) and f(b) are

adjacent in G2, a,b V1

8. A path that passes through each edge exactly once but vertices may be repeated is called on Euler
path. Again a circuit that covers every edge exactly once is called an Euler circuit.

6.14 REFERENCES / SUGGESTED READINGS

1. Seymour Lepschutz, Finite mathematics (International edition 1983), McGraw-Hill Book


Company, New York.

2. N.Deo, Graph Theory with application and computer science , Pentile H

DDE, GJUS&T, Hisar 129 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

Course Code: MCA-25


AUTHOR: RENU BANSAL
Lesson No. 6

WEIGHTED GRAPHS AND TREE

STRUCTURE

6.1 Learning objectives

6.2 Introduction

6.3 Weighted Graphs


6.3.1 Dijkastra’s Algorithm

6.4 Tree

6.5 Spanning Tree

6.5.1 Methods of Minimum Spanning Tree

6.5.2 Kruskal’s Algorithm

6.5.3 Prim’s Algorithm

6.6 Check Your Progress

6.7 Summary

6.8 Keywords

6.9 Self-Assessment Test

6.10 Answers to Check Your Progress

6.11 References/ Suggested Readings

DDE, GJUS&T, Hisar 130 |


Discrete Mathematics & Optimization MCA-25

6.1 LEARNINGOBJECTIVES

After going through this unit you will be able to know

1. What is weighted graphs.

2. How to apply dijkastra’s shortest path algo.

3. What is tree graphs.

4. What is minimum spanning tree.

5. How to find minimum cost path between two nodes using prim’s and kruskal algo.

6.2 INTRODUCTION

In Unit 5, we have discussed about various types of graphs and its applications. In this unit further on
we discussed about what is weighted graphs, and various algos, which we can use in daily life for
computing shortest path and minimum cost path between two nodes.

6.3 WEIGHTED GRAPH

A graph G is called a weighted graph if it’s edges and/or vertices are assigned data of one kind or
another. In particular, G is called a weighted graph if each edge e of G is assigned a non negative
number w(e) called theweight or length of v. Below Figure shows a weighted graph where the weight of
each edge is given in the obvious way. The weight (or length) of a path in such a weighted graph G is
defined to be the sum of the weights of the edges in the path. One important problem in graph theory is
to find a shortest path, that is, a path of minimum weight (length), between any two given vertices. The
length of a shortest path between P and Q in Fig. is 14; one such path is

(P,A1,A2,A5,A3,A6,Q)

The reader can try to find another shortest path

DDE, GJUS&T, Hisar 131 |


Discrete Mathematics & Optimization MCA-25

6.3.1 Dijkstra's Algorithm

It is a greedy algorithm that solves the single-source shortest path problem for a directed graph G = (V,
E) with nonnegative edge weights, i.e., w (u, v) ≥ 0 for each edge (u, v) ∈ E.

Dijkstra's Algorithm maintains a set S of vertices whose final shortest - path weights from the source s
have already been determined. That's for all vertices v ∈ S; we have d [v] = δ (s, v). The algorithm
repeatedly selects the vertex u ∈ V - S with the minimum shortest - path estimate, insert u into S and
relaxes all edges leaving u.

Because it always chooses the "lightest" or "closest" vertex in V - S to insert into set S, it is called as
the greedy strategy.

Dijkstra's Algorithm (G, w, s)

1. INITIALIZE - SINGLE - SOURCE (G, s)

2. S←∅

3. Q←V [G]

4. while Q ≠ ∅

5. do u ← EXTRACT - MIN (Q)

6. S ← S ∪ {u}

7. for each vertex v ∈ Adj [u]

8. do RELAX (u, v, w)

Example:

DDE, GJUS&T, Hisar 132 |


Discrete Mathematics & Optimization MCA-25

Solution:

Step1: Q =[s, t, x, y, z]

We scanned vertices one by one and find out its adjacent. Calculate the distance of each adjacent to the
source vertices.

We make a stack, which contains those vertices which are selected after computation of shortest
distance.

Firstly we take's' in stack M (which is a source)

1. M = [S] Q = [t, x, y, z]

Step 2: Now find the adjacent of s that are t and y.

1. Adj [s] → t, y [Here s is u and t and y are v]

Case - (i) s → t
d [v] > d [u] + w [u, v]
d [t] > d [s] + w [s, t]

DDE, GJUS&T, Hisar 133 |


Discrete Mathematics & Optimization MCA-25

∞ > 0 + 10 [false condition]


Then d [t] ← 10
π [t] ← 5
Adj [s] ← t, y

Case - (ii) s→ y
d [v] > d [u] + w [u, v]
d [y] > d [s] + w [s, y]
∞>0+5 [false condition]
∞>5
Then d [y] ← 5
π [y] ← 5

By comparing case (i) and case (ii)


Adj [s] → t = 10, y = 5
y is shortest
y is assigned in 5 = [s, y]

Step 3: Now find the adjacent of y that is t, x, z.

1. Adj [y] → t, x, z [Here y is u and t, x, z are v]

Case - (i) y →t
d [v] > d [u] + w [u, v]
d [t] > d [y] + w [y, t]
10 > 5 + 3

DDE, GJUS&T, Hisar 134 |


Discrete Mathematics & Optimization MCA-25

10 > 8
Then d [t] ← 8
π [t] ← y

Case - (ii) y → x
d [v] > d [u] + w [u, v]
d [x] > d [y] + w [y, x]
∞>5+9
∞ > 14
Then d [x] ← 14
π [x] ← 14

Case - (iii) y → z
d [v] > d [u] + w [u, v]
d [z] > d [y] + w [y, z]
∞>5+2
∞>7
Then d [z] ← 7
π [z] ← y

By comparing case (i), case (ii) and case (iii)


Adj [y] → x = 14, t = 8, z =7
z is shortest
z is assigned in 7 = [s, z]

Step - 4 Now we will find adj [z] that are s, x

DDE, GJUS&T, Hisar 135 |


Discrete Mathematics & Optimization MCA-25

1. Adj [z] → [x, s] [Here z is u and s and x are v]

Case - (i) z → x
d [v] > d [u] + w [u, v]
d [x] > d [z] + w [z, x]
14 > 7 + 6
14 > 13
Then d [x] ← 13
π [x] ← z

Case - (ii) z → s
d [v] > d [u] + w [u, v]
d [s] > d [z] + w [z, s]
0>7+7
0 > 14
∴ This condition does not satisfy so it will be discarded.
Now we have x = 13.

Step 5: Now we will find Adj [t]

Adj [t] → [x, y] [Here t is u and x and y are v]

Case - (i) t → x
d [v] > d [u] + w [u, v]
d [x] > d [t] + w [t, x]
13 > 8 + 1
13 > 9

DDE, GJUS&T, Hisar 136 |


Discrete Mathematics & Optimization MCA-25

Then d [x] ← 9
π [x] ← t

Case - (ii) t → y
d [v] > d [u] + w [u, v]
d [y] > d [t] + w [t, y]
5 > 10
∴ This condition does not satisfy so it will be discarded.

Thus we get all shortest path vertex as

Weight from s to y is 5
Weight from s to z is 7
Weight from s to t is 8
Weight from s to x is 9

These are the shortest distance from the source's' in the given graph.

DDE, GJUS&T, Hisar 137 |


Discrete Mathematics & Optimization MCA-25

Disadvantage of Dijkstra's Algorithm:

1. It does a blind search, so wastes a lot of time while processing.

2. It can't handle negative edges.

3. It leads to the acyclic graph and most often cannot obtain the right shortest path.

4. We need to keep track of vertices that have been visited.

6.4 Tree

A graph T is called a tree if T is connected and T has no cycles. Examples of trees are shown in Fig. A
forest G is a graph with no cycles; hence the connected components of a forest G are trees. A graph
without cycles is said to be cycle-free. The tree consisting of a single vertex with no edges is called the
degenerate tree. Consider a tree T . Clearly, there is only one simple path between two vertices of T ;
otherwise, the two paths would form a cycle. Also:

(a) Suppose there is no edge {u, v} in T and we add the edge e = {u, v} to T . Then the simple path from
u to v in T and e will form a cycle; hence T is no longer a tree.

(b) On the other hand, suppose there is an edge e = {u, v} in T , and we delete e from T . Then T is no
longer connected (since there cannot be a path from u to v); hence T is no longer a tree.

DDE, GJUS&T, Hisar 138 |


Discrete Mathematics & Optimization MCA-25

The following theorem applies when our graphs are finite.

Theorem : Let G be a graph with n >1 vertices. Then the following are equivalent:

(i) G is a tree.

(ii) G is a cycle-free and has n − 1 edges.

(iii) G is connected and has n − 1 edges.

Proof:

The proof is by induction on n. The theorem is certainly true for the graph with only one vertex and
hence no edges. That is, the theorem holds for n = 1.We now assume that n >1 and that the theorem
holds for graphs with less than n vertices.

(i) implies (ii) Suppose G is a tree. Then G is cycle-free, so we only need to show that G has n−1 edges.
G has a vertex of degree 1. Deleting this vertex and its edge, we obtain a tree T which has n − 1 vertices.
The theorem holds for T , so T has n − 2 edges. Hence G has n − 1 edges. (ii) implies (iii) Suppose G is
cycle-free and has n − 1 edges. We only need show that G is connected. Suppose G is disconnected and
has k components, T1, . . . , Tk , which are trees since each is connected and cycle-free. Say Ti has ni
vertices. Note ni < n. Hence the theorem holds for Ti, so Ti has ni − 1 edges. Thus

n = n1 + n2 +・・・+nk

and

n − 1 = (n1 − 1) + (n2 − 1)+・・・+(nk − 1) = n1 + n2 +・・・+nk − k = n − k

DDE, GJUS&T, Hisar 139 |


Discrete Mathematics & Optimization MCA-25

Hence k = 1. But this contradicts the assumption that G is disconnected and has k >1 components.
Hence G is connected.

(iii) implies (i) Suppose G is connected and has n − 1 edges. We only need to show that G is cycle-free.
Suppose G has a cycle containing an edge e. Deleting e we obtain the graph H = G − e which is also
connected. But H has n vertices and n − 2 edges, and this contradicts. Thus G is cycle-free and hence is
a tree.

This theorem also tells us that a finite tree T with n vertices must have n−1 edges. For example, the tree
shown in below Fig.(a)has 9 vertices and 8 edges, and the tree in Fig.(b) has 13 vertices and 12 edges.

6.5 SPANNING TREES

6.5.1 Spanning Trees

A subgraph T of a connected graph G is called a spanning tree of G if T is a tree and T includes all the
vertices of G. Figure shows a connected graph G and spanning trees T1, T2, and T3 of G.

6.5.2 Minimum Spanning Trees

Suppose G is a connected weighted graph. That is, each edge of G is assigned a nonnegative number
called the weight of the edge. Then any spanning tree T of G is assigned a total weight obtained by

DDE, GJUS&T, Hisar 140 |


Discrete Mathematics & Optimization MCA-25

adding the weights of the edges in T . A minimal spanning tree (MST) of G is a spanning tree whose
total weight is as small as possible.

NOTE:

The weight of a minimal spanning tree is unique, but the minimal spanning tree itself is not. Different
minimal spanning trees can occur when two or more edges have the same weight. In such a case, the
arrangement of the edges in tree is not unique and hence may result in different minimal spanning trees.

6.5.1 Methods of Minimum Spanning Tree

There are two methods to find Minimum Spanning Tree

1. Kruskal's Algorithm

2. Prim's Algorithm

6.5.2 Kruskal's Algorithm:

It is an algorithm to construct a Minimum Spanning Tree (MST) for a connected weighted graph. It is a
Greedy Algorithm. The Greedy Choice is to put the smallest weight edge that does not because a cycle
in the Minimum Spanning Tree constructed so far.

Steps for finding MST using Kruskal's Algorithm:

1. Arrange the edge of G in order of increasing weight.

2. Starting only with the vertices of G and proceeding sequentially add each edge which does not
result in a cycle, until (n - 1) edges are used.

3. EXIT.

MST- KRUSKAL (G, w)

1. A ← ∅

2. for each vertex v ∈ V [G]

3. do MAKE - SET (v)

4. sort the edges of E into non decreasing order by weight w

DDE, GJUS&T, Hisar 141 |


Discrete Mathematics & Optimization MCA-25

5. for each edge (u, v) ∈ E, taken in non decreasing order by weight

6. do if FIND-SET (μ) ≠ if FIND-SET (v)

7. then A ← A ∪ {(u, v)}

8. UNION (u, v)

9. return A

For Example: Find the Minimum Spanning Tree of the following graph using Kruskal's algorithm.

Solution: First we initialize the set A to the empty set and create |v| trees, one containing each vertex
with MAKE-SET procedure. Then sort the edges in E into order by non-decreasing weight.

There are 9 vertices and 12 edges. So MST formed (9-1) = 8 edges

DDE, GJUS&T, Hisar 142 |


Discrete Mathematics & Optimization MCA-25

Now, check for each edge (u, v) whether the endpoints u and v belong to the same tree. If they do then
the edge (u, v) cannot be supplementary. Otherwise, the two vertices belong to different trees, and the
edge (u, v) is added to A, and the vertices in two trees are merged in by union procedure.

Step1: So, first take (h, g) edge

Step 2: then (g, f) edge.

Step 3: then (a, b) and (i, g) edges are considered, and the forest becomes

DDE, GJUS&T, Hisar 143 |


Discrete Mathematics & Optimization MCA-25

Step 4: Now, edge (h, i). Both h and i vertices are in the same set. Thus it creates a cycle. So this edge
is discarded.

Then edge (c, d), (b, c), (a, h), (d, e), (e, f) are considered, and the forest becomes.

Step 5: In (e, f) edge both endpoints e and f exist in the same tree so discarded this edge. Then (b, h)
edge, it also creates a cycle.

Step 6: After that edge (d, f) and the final spanning tree is shown as in dark lines.

DDE, GJUS&T, Hisar 144 |


Discrete Mathematics & Optimization MCA-25

Step 7: This step will be required Minimum Spanning Tree because it contains all the 9 vertices and (9 -
1) = 8 edges

1. e → f, b → h, d → f [cycle will be formed]

Minimum Cost MST

6.5.3 Prim's Algorithm

It is also a greedy algorithm. It starts with an empty spanning tree. The idea is to maintain two sets of
vertices:

o Contain vertices already included in MST.

o Contain vertices not yet included.

DDE, GJUS&T, Hisar 145 |


Discrete Mathematics & Optimization MCA-25

At every step, it considers all the edges and picks the minimum weight edge. After picking the edge, it
moves the other endpoint of edge to set containing MST.

7.6.4 Steps for finding MST using Prim's Algorithm:

1. Create MST set that keeps track of vertices already included in MST.

2. Assign key values to all vertices in the input graph. Initialize all key values as INFINITE (∞).
Assign key values like 0 for the first vertex so that it is picked first.

3. While MST set doesn't include all vertices.

a. Pick vertex u which is not is MST set and has minimum key value. Include 'u'to
MST set.

b. Update the key value of all adjacent vertices of u. To update, iterate through all adjacent
vertices. For every adjacent vertex v, if the weight of edge u.v less than the previous key
value of v, update key value as a weight of u.v.

MST-PRIM (G, w, r)

1. for each u ∈ V [G]

2. do key [u] ← ∞

3. π [u] ← NIL

4. key [r] ← 0

5. Q ← V [G]

6. While Q ? ∅

7. do u ← EXTRACT - MIN (Q)

8. for each v ∈ Adj [u]

9. do if v ∈ Q and w (u, v) < key [v]

10. then π [v] ← u

11. key [v] ← w (u, v)

DDE, GJUS&T, Hisar 146 |


Discrete Mathematics & Optimization MCA-25

Example: Generate minimum cost spanning tree for the following graph using Prim's algorithm.

Solution: In Prim's algorithm, first we initialize the priority Queue Q. to contain all the vertices and the
key of each vertex to ∞ except for the root, whose key is set to 0. Suppose 0 vertex is the root, i.e., r. By
EXTRACT - MIN (Q) procure, now u = r and Adj [u] = {5, 1}.

Removing u from set Q and adds it to set V - Q of vertices in the tree. Now, update the key and π fields
of every vertex v adjacent to u but not in a tree.

1. Taking 0 as starting vertex

2. Root = 0

3. Adj [0] = 5, 1

4. Parent, π [5] = 0 and π [1] = 0

5. Key [5] = ∞ and key [1] = ∞

6. w [0, 5) = 10 and w (0,1) = 28

DDE, GJUS&T, Hisar 147 |


Discrete Mathematics & Optimization MCA-25

7. w (u, v) < key [5] , w (u, v) < key [1]

8. Key [5] = 10 and key [1] = 28

9. So update key value of 5 and 1 is:

Now by EXTRACT_MIN (Q) Removes 5 because key [5] = 10 which is minimum so u = 5.

1. Adj [5] = {0, 4} and 0 is already in heap

2. Taking 4, key [4] = ∞ π [4] = 5

3. (u, v) < key [v] then key [4] = 25

4. w (5,4) = 25

5. w (5,4) < key [4]

6. date key value and parent of 4.

DDE, GJUS&T, Hisar 148 |


Discrete Mathematics & Optimization MCA-25

Now remove 4 because key [4] = 25 which is minimum, so u =4

1. Adj [4] = {6, 3}

2. Key [3] = ∞ key [6] = ∞

3. w (4,3) = 22 w (4,6) = 24

4. w (u, v) < key [v] w (u, v) < key [v]

5. w (4,3) < key [3] w (4,6) < key [6]

Update key value of key [3] as 22 and key [6] as 24.

And the parent of 3, 6 as 4.

1. π[3]= 4 π[6]= 4

DDE, GJUS&T, Hisar 149 |


Discrete Mathematics & Optimization MCA-25

1. u = EXTRACT_MIN (3, 6) [key [3] < key [6]]

2. u = 3 i.e. 22 < 24

Now remove 3 because key [3] = 22 is minimum so u =3.

1. Adj [3] = {4, 6, 2}

2. 4 is already in heap

3. 4 ≠ Q key [6] = 24 now becomes key [6] = 18

4. Key [2] = ∞ key [6] = 24

5. w (3, 2) = 12 w (3, 6) = 18

6. w (3, 2) < key [2] w (3, 6) < key [6]

Now in Q, key [2] = 12, key [6] = 18, key [1] = 28 and parent of 2 and 6 is 3.

1. π [2] = 3 π[6]=3

DDE, GJUS&T, Hisar 150 |


Discrete Mathematics & Optimization MCA-25

Now by EXTRACT_MIN (Q) Removes 2, because key [2] = 12 is minimum.

1. u = EXTRACT_MIN (2, 6)

2. u = 2 [key [2] < key [6]]

3. 12 < 18

4. Now the root is 2

5. Adj [2] = {3, 1}

6. 3 is already in a heap

7. Taking 1, key [1] = 28

8. w (2,1) = 16

9. w (2,1) < key [1]

So update key value of key [1] as 16 and its parent as 2.

1. π[1]= 2

DDE, GJUS&T, Hisar 151 |


Discrete Mathematics & Optimization MCA-25

Now by EXTRACT_MIN (Q) Removes 1 because key [1] = 16 is minimum.

1. Adj [1] = {0, 6, 2}

2. 0 and 2 are already in heap.

3. Taking 6, key [6] = 18

4. w [1, 6] = 14

5. w [1, 6] < key [6]

Update key value of 6 as 14 and its parent as 1.

1. Π [6] = 1

Now all the vertices have been spanned, Using above the table we get Minimum Spanning Tree.

1. 0 → 5 → 4 → 3 → 2 → 1 → 6

2. [Because Π [5] = 0, Π [4] = 5, Π [3] = 4, Π [2] = 3, Π [1] =2, Π [6] =1]

DDE, GJUS&T, Hisar 152 |


Discrete Mathematics & Optimization MCA-25

Thus the final spanning Tree is

Total Cost = 10 + 25 + 22 + 12 + 16 + 14 = 99

6.6 CHECK YOUR PROGRESS

1. Find a minimal spanning tree T for the weighted graph G in figure below?

2. Find the number of trees with seven vertices.

3. Find the weight of a minimum spanning tree by prim’s algorithm. in Fig.

DDE, GJUS&T, Hisar 153 |


Discrete Mathematics & Optimization MCA-25

4. Use kruskal’s algorithm to obtain minimum spanning tree for following figure?

5. In the given graph, identify the shortest path using Dijkastra’s algorithm having minimum cost
to reach vertex E if A is the source vertex.

6.7SUMMARY

1. Graph without cycle is known as tree.

2. When we give weights or label on edeges of any graph , then the graph is known as weighted
graph.

DDE, GJUS&T, Hisar 154 |


Discrete Mathematics & Optimization MCA-25

3. Dijkastra’s Algorithm shows the minimum weight path between two nodes.

4. Two minimum spanning tree for the same graph have unique weight but can be of different
structure.

5. Kruskal’s algo and prim’s algo are two algorithms to find minimum spanning tree.

6.8 KEYWORDS

Weighted graph – A graph G is called a weighted graph if its edges and/or vertices are assigned data
of one kind or another.

Trees –non cyclic structure of graph is known as tree.

Minimum Spanning Tree – A minimal spanning tree (MST) of G is a spanning tree whose total weight
is as small as possible.

6.9SELF ASSESSMENT TEST

Q.1 Suppose we run Dijkstra’s single source shortest-path algorithm on the following edge weighted
directed graph with vertex P as the source. In what order do the nodes get included into the set of
vertices for which the shortest path distances are finalized?

Q.2 What is the weight of the minimum spanning tree using the Prim’s algorithm, starting from
vertex a?

DDE, GJUS&T, Hisar 155 |


Discrete Mathematics & Optimization MCA-25

Q.3 What is the weight of the minimum spanning tree using the Kruskal’s algorithm?

6.10 ANSWERS TO CHECK YOUR PROGRESS

Ans: 1 Since G has n = 9 vertices, T must have n − 1 = 8 edges. Apply Algorithm, that is, keep deleting
edges with maximum length and without disconnecting the graph until only n−1 = 8 edges remain and
without forming any circle until n − 1 = 8 edges are added. Now we got a minimum spanning tree such
as that shown in Fig.

DDE, GJUS&T, Hisar 156 |


Discrete Mathematics & Optimization MCA-25

Ans:2 10

Ans:3 1 + 1 + 1 + 1 + 1 + 2 + 2 + 3 = 12.

Ans:4

Thus the minimal spanning tree of Q which is obtained contains the edges

BD, AE, DF, CE, AF

The spanning tree appears in Fig. it has weight 24.

Ans:5 The minimum cost required to travel from vertex A to E is via vertex C

A to C, cost=3

C to E, cost=2

Total Cost=5, hence Ans is a-c-e.

6.11REFERENCES / SUGGESTED READINGS

1. Seymour Lepschutz, Finite mathematics (International edition 1983), McGraw-Hill Book


Company, New York.

2. Discrete Mathematics with Graph Theory, 2nd edition, by E.G. Goodaire and M.M. Parmenter,
published by Prentice Hall, 2002.
3. N.Deo, Graph Theory with application and computer science , Pentile H

4. Discrete Mathematics, 5th edition, by K.A. Ross and C.R.B. Wright, published by Prentice Hall,
2003.

DDE, GJUS&T, Hisar 157 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

COURSE CODE: MCA-25


AUTHOR: RENU BANSAL
LESSON NO. 7

INTRODUCTION TO OPERATIONS RESEARCH AND TECHNIQUES

STRUCTURE

7.1 Learning Objectives

7.2 Origin and Development of operations research

7.3 Definitions of Operations Research

7.4 Nature and Characteristics of Operations Research

7.5 Scope/Applications of Operations Research

7.6 Models in Operations Research

7.7 Principles of Modelling

7.8 Methodology of Operations Research Study

7.9 Quantitative Techniques of Operations Research (OR Models)

7.10 General Methods for Solving Operations Research Models

7.11 Check Your Progress

7.12 Summary

7.13 Keywords

7.14 Self Assessment Test

7.15 Answer to Check Your Progress

7.16 References/suggested readings

DDE, GJUS&T, Hisar 158 |


Discrete Mathematics & Optimization MCA-25

7.1 LEARNINGOBJECTIVE
T HE MAIN OBJECTIVE OF THIS LESSON IS TO ACQUAINT THE STUDENTS WITH THE CONCEPT OF

OPERATIONS R ESEARCH , ITS HISTORICAL DEVELOPMENT, ITS CHARACTERISTICS AND SCOPES IN

DIFFERENT FIELDS . M ODELS USED IN OPERATIONS R ESEARCH AND THE METHODS TO SOLVE THESE

MODELS ARE ALSO EXPLAINED .

7.2 ORIGIN & DEVELOPMENT OF OPERATIONS RESEARCH

The main origin of Operations Research (OR) was during the Second World-War. At that time, the
military management in England called upon a team of scientists to study the strategic and tactical
problems related to air and land defense of the country. Since they were having very limited military
resources, it was necessary to decide upon the most effective utilization of them, e.g. the efficient ocean
transport, effective bombing, etc.

During World-War II, the Military Commands of U.K. and U.S. A. engaged several inter-disciplinary
teams of scientists to undertake scientific research into strategic and tactical military operations. Their
mission was to formulate specific proposals and plans for adding the Military Commands to arrive at the
decisions on optimal utilization of scarce military resources and efforts, and also to implement the
decisions effectively. The OR teams were not actually engaged in military operations and in fighting the
war. But they were only advisors and significantly instrumental in winning the war to the extent that the
scientific and systematic approaches involved in OR provided a good intellectual support to the strategic
initiatives of the military commands. Hence OR can be associated with “an art of winning the war
without actually fighting it”.

As the name implies, ‘Operations Research’ (sometime abbreviated OR) was apparently invented
because the team was dealing with research on (military) operations. The work of this team of scientists
was named as Operational Research in England.

DDE, GJUS&T, Hisar 159 |


Discrete Mathematics & Optimization MCA-25

The encouraging result obtained by the British OR teams quickly motivated the United States military
management to start with similar activities. Successful application of the U.S. teams included the
invention of new fight patterns, planning sea mining and effective utilization of electronic equipment.

Following the end of war, the success of military teams attracted the attention of Industrial managers
who were seeking solutions to their complex executive-type problems. The most common problem was:
what methods should be adopted so that the total cost is minimum or total profits maximum? The first
mathematical model in this field (called the Simplex Method of linear programming) was developed in
1947 by American mathematician, George B. Dantzig. Since then, new techniques and applications
have been developed through the efforts and cooperation of interested individuals in academic
institutions and industry both.

7.3 DEFINITIONS OF OPERATIONS RESEARCH

‘OR’ HAS BEEN DEFINED SO FAR IN VARIOUS WAYS AND IT IS PERHAPS STILL TOO YOUNG TO BE

DEFINED IN SOME AUTHORITATIVE WAY . SO IT IS IMPORTANT AND INTERESTING TO GIVE BELOW A

FEW OPINIONS ABOUT THE DEFINITION OF OR WHICH HAVE BEEN CHANGED ACCORDING TO THE

DEVELOPMENT OF THE SUBJECT:

1. OR is a scientific method of providing executive department with a quantitative basis for


decision regarding the operations under their control.
-Morse and Kimbal (1946)

2. OR is a scientific method of providing executive with an analytical and objective basis


for decisions. -P.M.S. Blackett (1948)

3. OR is the application of scientific methods, techniques and tools to problems involving


the operations of systems so as to provide these in control of the operations with
optimum solutions to the problem.
-Churchman, Acoff, Arnoff (1957)

DDE, GJUS&T, Hisar 160 |


Discrete Mathematics & Optimization MCA-25

4. OR is the art to giving bad answers to problems to which otherwise worse answers are
given. -T.L. Saaty (1958)

5. Operations Research is the art of winning war without actually fighting it.

6. OR is a scientific approach to problem solving for executive management.


-H.M. Wagner

Most of the definitions of Operations Research have been offered at different times of development of
‘OR’ and hence are bound to emphasis its only one or the other aspect.

7.4 NATURE AND CHARACTERISTICS FEATURES OF O.R

Operations Research has the following characteristics:

1. Inter-disciplinary team approach- In OR, the optimum solution is found by a team of


scientists selected from various disciplines such as mathematics, statistics, economics,
engineering, physics, etc.

OPE 2.
OPERATIONS RESEARCH
Wholistic approach to the system- The most of the problems tackled by OR have the
characteristic that OR tries to find the best (optimum)decisions relative to largest
possible portion of the total organization. The nature of organization is essentially
immaterial.

3. Imperfectness of solutions- By OR techniques, we cannot obtain perfect answers to our


problems but, only the quality of the solution is improved from worse to bad answers.

4. Use of scientific research- OR uses techniques of scientific research to find the


optimum solution.

5. To optimize the total output- OR tries to optimize total return by maximizing the profit
and minimizing the cost or loss.

DDE, GJUS&T, Hisar 161 |


Discrete Mathematics & Optimization MCA-25

7.5 SCOPE/ APPLICATIONS OF OPERATIONS RESEARCH


Operations Research has scopes in almost every field. Applications of Operations Research in various
fields are:

1. In Agriculture- Optimum allocation of land to various crops in accordance with the


climatic conditions; and optimum distribution of water from various resources like canal
for irrigation purposes.
2. In Finance- OR- Techniques can be fruitfully applied:

i. To maximize the per capita income with minimum resources;

ii. Ti find out the profit plan for the company;

iii. To determine the best replacement policies, etc.


3. In Industry- OR is useful to the Industry Director in deciding optimum allocation of various
limited resources such as men, machines, material, money, time, etc., to arrive at the
optimum decision.

4. In Marketing- With the help of OR techniques a Marketing Administrator (Manager)


can decide:

i. Where to distribute the products for sale so that the total cost of transportation
etc. is minimum,

ii. The minimum per unit sale price.

iii. The size of the stock to meet the future demand.

iv. How to select the best advertizing media with respect to time, cost, etc.

v. How, when, and what to purchase at the minimum possible cost?

5. In Personal Management. A personal manager can use OR techniques:

i. To appoint the most suitable persons on minimum salary.

ii. To determine the best age of retirement for the employees.

DDE, GJUS&T, Hisar 162 |


Discrete Mathematics & Optimization MCA-25

iii. To find out the number of persons to be appointed on full time basis when the
workload is seasonal.

6. In Production Management. A production manager can use OR techniques:

i. To find out the number and size of the items to be produced.

ii. In scheduling and sequencing the production runs by proper allocation of


machines.

iii. In calculating the optimum product mix; and to select, locate, and design the sites
for the production plants.

7.6 MODELS IN OPERATIONS RESEARCH

A model is defined as a representation of an actual object or situation. It shows the relationships (direct
or indirect) and inter-relationships of action and reaction in terms of cause and effect.

The main objective of a model is to provide means for analyzing the behavior of the system for the
purpose of improving its performance or, if a system is not in existence, then a model defines the ideal
structure of this future system indicating the functional relationships among its elements. The reliability
of the solution obtained from a model depends on the validity of the model in representing the real
systems.

Models can be classified according to following characteristics:

1. Classification by Structure

i. Iconic Models- Iconic models represent the systems as it is by scaling it up or


down (i.e. by enlarging or reducing the size). In other words, it is an image.

For example, a toy airplane is an iconic model, of a real one. Other common
examples of it are: photographs, drawings, maps etc. A model of an atom is
scaled up so as to make it visible to the naked eye. In a globe, the diameter of the

DDE, GJUS&T, Hisar 163 |


Discrete Mathematics & Optimization MCA-25

earth is scaled down, but the globe has approximately the same shape as the earth,
and the relative sizes of continents, seas, etc., are approximately correct.

ii. Analogue Models- The models, in which one set of properties is used to
represent another set of properties, are called analogue models. After the problem
is solved, the solution is reinterpreted in terms of the original system.

For examples, graphs are very simple analogues because distance is used to
represent the properties such as: time, number, per cent, age, weight, and many
other properties.

iii. Symbolic (Mathematical) Models- The symbolic or mathematical model is one


which employs a set of mathematical symbols (i.e. letters, numbers, etc.) to
represent the decision variables of the system. These variables are related
together by means of a mathematical equation or a set of equation to describe the
behavior of the system. The solution of the problem is then obtained by applying
well-developed mathematical techniques to the model.

2. Classification by Purpose

Models can also be classified by purpose of its utility. The purpose of a model may be
descriptive, predictive or prescriptive.

i. Descriptive Models- A descriptive model simply describes some aspects of a


situation based on observations survey, questionnaire results or other available
data. The result of an opinion poll represents a descriptive model.

ii. Predictive Models- Such models can answer ‘what if’ type of questions, i.e. they
can make predictions regarding certain events. For example, based on the survey
results, television networks such models attempt to explain and predict the
election results before all the votes are actually counted.

iii. Prescriptive Models- Finally, when a predictive model has been repeatedly
successful, it can be used to prescribe a source of action. For example, linear

DDE, GJUS&T, Hisar 164 |


Discrete Mathematics & Optimization MCA-25

programming is a prescriptive (or normative) model because it prescribes what


the managers ought to do.

3. Classification by Nature of Environment

These are mainly of two types:

i. Deterministic Models- Such models assume conditions of complete certainty


and perfect knowledge. For example, linear programming, transportation and
assignment models are deterministic type of models.

ii. Probabilistic (or Stochastic) Models- These types of models usually handle
such situation in which the consequences or payoff of managerial actions cannot
be predicted with certainty. However, it is possible to forecast a pattern of events,
based on which managerial decisions can be made. For example, insurance
companies are willing to insure against risk of fire, accidents, and sickness and so
on, because the pattern of events have been compiled in the form of probability
distributions.

4. Classification by Behavior

i. Static Models- These models do not consider the impact of changes that take
place during the planning horizon, i.e. they are independent of time.

ii. Dynamic Models- In these models, time is considered as one of the important
variables and admits the impact of changes generated by time.

5. Classification by Method of Solution

i. Analytical Models- These models have a specific mathematical structure and


thus can be solved by known analytical or mathematical techniques. For example,
a general linear programming model, the specially structured transportation and
assignment models are analytical models.

ii. Simulation Models- A simulation model is essentially computer assisted


experimentation on a mathematical structure of a real time structure in order to
study the system under a variety of assumptions. Simulation modeling has the

DDE, GJUS&T, Hisar 165 |


Discrete Mathematics & Optimization MCA-25

advantage of being more flexible than mathematical modeling and hence can be
used to represent complex systems which otherwise cannot be formulated
mathematically.

7.7 PRINCIPLES OF MODELING

Following principles should be taken care of while building Operations Research models:

1. Do not build up a complicated model when a simple one would suffice.

2. Beware of modeling the problems to fit a technique.

3. Deductions must be made carefully.

4. Models should be validated prior to implementation.

5. A model should neither be pressed to do; nor criticized for failing to do that for which it
was never intended

6. Beware of overselling the model in cases where assumption made for the construction of
the model can be challenged.

7. The solution of a model cannot be more accurate than the accuracy of the information
that goes into the construction.

8. Models are only aids in decision-marking.

9. Models should not be complicated. It should be as simple as possible.

10. Models should be as accurate as possible.

There are six important phases in OR study, but it is not necessary that in all the studies each and every
phase is invariably present. These phases are arranged in following logical order.

DDE, GJUS&T, Hisar 166 |


Discrete Mathematics & Optimization MCA-25

Phase I- Observe the Problem Environment

Phase I in the process of OR study is observing the problem environment. The activities that
constitute this phase are visits, conferences, observations, research and so on. With the help of
such activities, the OR scientist gets sufficient information and support to proceed and is better
prepared to formulate the problem.

Phase II- Analyse and Define the Problem

Phase II is analyzing and defining the problem. In this phase not only, the problem is defined,
but also uses, objectives and limitations of the study are stressed in the light of the problem. The
end result of this phase is a clear grasp of need for a solution and understanding its nature.

Phase III- Develop a Model

Phase III is to construct a model. A model is representation of some real or abstract situation.
Operations research models are basically mathematical models representing systems, processes
or environment in the form of equation, relationships or formulae. The activities in this phase
include defining inter-relationships among variables, formulating equations, using known OR
models or searching suitable alternate models. The proposed model may be field tested and
modified in order to work under environmental constraints. The model may also be modified if
the management is not satisfied with the answer that it gives.

Phase IV- Select an Appropriate Data Input

No model will work appropriately if data input is not appropriate. Hence, tapping the right kind
of data is a vital phase in OR process. Important activities in this phase are analyzing internal-
external data and facts, collecting opinions using computer data banks.

Phase V- Provide a Solution and Test Reasonableness

Phase V in OR process is to get a solution with the help of a model and data input. First, the
solution is used to test the model and to find limitations, if any. If the solution is not reasonable
or if the model is not behaving properly, updating and modification of the model is considered at
this phase.

DDE, GJUS&T, Hisar 167 |


Discrete Mathematics & Optimization MCA-25

Phase VI- Implement the Solution

Finally, the tested results of the model are implemented to work. This phase is primarily
executed with the cooperation of Operations Research experts and those who are responsible for
managing and operating the systems.

7.9 QUANTITATIVE TECHNIQUES OF OPERATIONS


RESEARCH (OR MODELS)

A BRIEF ACCOUNT OF SOME OF THE IMPORTANT OR MODELS IS GIVEN BELOW:

1. Distribution (Allocation) Models. Distribution models are concerned with the allotment
of resources so as to minimize cost or maximize profit subject to prescribed restrictions.

2. Production/Inventory Models. Inventory/ Production Models are concerned with the


determination of the optimal (economic) order quantity and ordering (production)
intervals considering the factors such as-demand per unit time, cost of placing orders,
costs associated with good help up in the inventory and the cost due to shortage of goods.

3. Queuing Models. In queuing models an attempt is made to predict:

i. How much average time will be spent by the customer in a queue?

ii. What will be an average length of waiting line of queue?

iii. What will be the traffic intensity of a queuing system?

4. Markovian Models. These models are applicable in such situations where the state of
the system can be defined by some descriptive measure of numerical value and where the
system moves from one state to another on a probability basis. Brand- switching
problems considered in marketing studies is an example of such models.
5. Competitive Strategy Models (Games Theory). These models are used to determine
the behavior of decision-making under competition or conflict. Methods for solving such
models have not been found suitable for industrial applications, mainly because they are
referred to an idealistic world neglecting many essential features of reality.

DDE, GJUS&T, Hisar 168 |


Discrete Mathematics & Optimization MCA-25

6. Network Models. These models are applicable in large projects involving complexities
and inter-dependencies of activities. Project Evaluation and Review Techniques (PERT)
and Critical Path Method are used for planning, scheduling and controlling complex
project which can be characterized as works.
7. Job Sequencing Models. These models involve the selection of such a sequence of
performing a series of jobs to be done on machines that optimize the efficiency
performance of the system.
8. Replacement Models. These models deal with the determination of optimum
replacement policy in situations that arise when some items or machinery need
replacement by a new one. Individual and group replacement policies can be used in the
case of such equipments that fail completely and instantaneously.
9. Simulation Models. Simulation is a very powerful technique for solving much complex
models which cannot be solved otherwise and thus it is being extensively applied to
solve a variety of problems. In fact, such models are solved by simulation techniques
where no other method is available for its solution.

7.10 GENERAL METHODS FOR SOLVING OPERATIONS


RESEARCH MODELS

GENERALLY, THREE TYPES OF METHODS ARE USED FOR SOLVING OR MODELS.

1. Analytic Method. If the OR model is solved by using all the tools of classical
mathematics such as differential calculus and finite differences available for the task,
then such type of solutions are called analytic solutions. Solutions of various inventory
models are obtained by adopting the so called analytic procedure.
2. Iterative Method. If classical methods fail because of complexity of the constraints or
the number of variables, and then we are usually forced to adopt an iterative method.
Such a procedure starts with a trial solution and a set of rules for improving it. The trial
solution is then replaced by the improved solution, and the process is repeated until

DDE, GJUS&T, Hisar 169 |


Discrete Mathematics & Optimization MCA-25

either no further improvement is possible or the cost of further calculation cannot be


justified.
3. The Monte-Carlo Method. The basis of Monte-Carlo technique is random sampling of
variable’s values from a distribution of that variable. The method involves taking sample
observations, computing probability distributions for the variable using random numbers
and constructing some functions to determine values of the decision variables.
Advantages:
i. These methods avoid unnecessary expenses and difficulties that arise during the
trial and error experimentation.

ii. By this technique, we find the solution of much complicated mathematical


expression which is not possible by any other method.

Disadvantages:

i. This technique does not give optimal answers to the problems. The good results
are obtained only when the sample size is quite large.

ii. The computations are much complicated even in simple cases.

7.11 CHECK YOUR PROGRESS


1. OPERATIONS RESEARCH IS THE APPLICATION OF ____________ METHODS TO ARRIVE

AT THE OPTIMAL SOLUTIONS TO THE PROBLEMS.

A. economical B. scientific C. a and b both


2. In operations research, the ------------------------------are prepared for situations.
A. mathematical models B. physical models diagrammatic
C. diagrammatic models
3. Operations management can be defined as the application of ----------------------------------
-------to a problem within a system to yield the optimal solution.
A. Suitable manpower
B. mathematical techniques, models, and tools

DDE, GJUS&T, Hisar 170 |


Discrete Mathematics & Optimization MCA-25

C. Financial operations

4. Operations research is based upon collected information, knowledge and advanced study
of various factors impacting a particular operation. This leads to more informed -----------
-----------------------.

A. Management processes B. Decision making

C. Procedures

5. OR can evaluate only the effects of -------------------------------------.

A. Personnel factors. B. Financial factors

C. Numeric and quantifiable factors.

6. By constructing models, the problems in libraries increase and cannot be solved.

A. True
B. False

7. Operations Research started just before World War II in Britain with the establishment
of teams of scientists to study the strategic and tactical problems involved in military
operations.

A. True
B. False

8. OR can be applied only to those aspects of libraries where mathematical models can be
prepared.

A. True
B. False

9. The main limitation of operations research is that it often ignores the human element in
the production process.

A. True
B. False

DDE, GJUS&T, Hisar 171 |


Discrete Mathematics & Optimization MCA-25

7.12 SUMMARY

OPERATIONS RESEARCH DEALS WITH THE APPLICATIONS OF SCIENTIFIC METHODS TO PROBLEM


SOLVING . IT CAN BE USED IN ALMOST EVERY FIELD SUCH AS BUSINESS , AGRICULTURE , MANAGEMENT,

ENGINEERING AND SCIENTIFIC APPLICATIONS . IT USES INTERDISCIPLINARY WHOLISTIC APPROACH TO

FIND SOLUTION WHICH MAY NOT BE PERFECT BUT THE QUALITY OF SOLUTIONS CAN BE IMPROVED BY

APPLYING OR TECHNIQUES . SOLVING A PROBLEM USING OR TECHNIQUES HAS SIX MAIN PHASES .
MODELS USED IN OR CAN BE CLASSIFIED BASED ON STRUCTURE , PURPOSE, NATURE OF
ENVIRONMENT, BEHAVIOUR , METHOD OF SOLUTION ETC . ANALYTIC, ITERATIVE AND MONTE-CARLO
METHODS ARE GENERALLY USED TO SOLVE OR MODELS.

7.13 KEYWORDS

1. Operation Research:-Operations research is a discipline that deals with the application of advanced
analytical methods to help make better decisions.
2. Model:-A model is defined as a representation of an actual object or situation. It shows the
relationships (direct or indirect) and inter-relationships of action and reaction in terms of cause and
effect. The main objective of a model is to provide means for analyzing the behavior of the system
for the purpose of improving its performance.
3. Principles of Modeling:-There are different kind of principle user should remember while using
modeling. Model are made easy to understand. They are not made complicated. They are made up to

7.14 SELF ASSESSMENT TEST


reality.

Q 1. WHAT IS OPERATIONS RESEARCH?

Q 2. What are the characteristics of OR?

Q 3. Discuss the limitations of operations research.

DDE, GJUS&T, Hisar 172 |


Discrete Mathematics & Optimization MCA-25

Q 4. Enumerate with brief description some of the techniques of OR.

Q 5. What is meant by a mathematical model of a real situation? Discuss the importance of models in
the solution of operations research problems.

Q 6. State the different types of models used in operations research.

Q 7. Discuss the various classification schemes of models.

Q 8. Explain briefly the general methods for solving OR models.

Q 9. Describe the methodology of OR and enumerate the models used inproduction management.

Q 10. What are the steps involved in operations research?

Q 11. Describe briefly the different phases of operations research.

Q 12. Discuss the importance of operations research in decision-makingprocess.

Q 13. Discuss scientific method in OR.

Q 14. Discuss the significance and scope of operations research in modernmanagement.

Q 15. ‘Operations research is a bunch of mathematical techniques’. Comment.

Q 16. What are the essential characteristics of OR? Explain the role ofcomputers in this field.

Q 17. Write a note on application of various quantitative techniques indifferent fields of business
decision-making

7.15 ANS TO CHECK YOUR PROGRESS

1. B

2. A

3. B

4. B

5. C

DDE, GJUS&T, Hisar 173 |


Discrete Mathematics & Optimization MCA-25

6. B

7. A

8. A

9. A

7.16 REFERENCES/SUGGESTED READINGS

1. Operations Research by S.D. Sharma.


2. Operations Research- An Introduction (Eighth Edition); Hamdy A. Taha; Pearson Education,
Prentice Hall, Delhi, (2008).
3. Operations Research; A.M. Natarajan, P. Salasubramani, A. Tamilarasi; Pearson Education
(Singapore) Pvt. Ltd., Delhi, (2005).
4. Operations Research (Second Edition), Schaum’s Outlines; Richard Bronson,
GovindasamiNaadimuthu; Tata McGraw Hill Education Private Limited; New Delhi (2010)

DDE, GJUS&T, Hisar 174 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

COURSE CODE: MCA-25


AUTHOR: RENU BANSAL
LESSON NO. 8

LINEAR PROGRAMMING

STRUCTURE

8.1 Learning Objective

8.2 Introduction

8.3 Formulation of Linear Programming Problem

8.4 Graphical Solution of Two Variable Linear Programming Problems

8.5 General Formulation of Linear Programming Problem

8.6 Slack and Surplus Variables

8.7 Standard Form of Linear Programming Problem

8.8 Matrix Form of Linear Programming Problem

8.9 Some Important Definitions

8.10 Applications of Linear Programming

8.11 Check Your Progress

8.12 Summary

8.13 Keyword

8.14 Self Assessment Test

8.15 Answer to Check Your Progress

8.16 References/Suggested Readings

DDE, GJUS&T, Hisar 175 |


Discrete Mathematics & Optimization MCA-25

8.1 LEARNINGOBJECTIVE
The main objective of this lesson is to acquaint with the students with the concept of linear
programming. Formulation of real life situations as linear programming problems and graphical
solution of problems are explained through examples. This lesson also introduces the concept of
slack and surplus variables which will be used throughout the book.

8.2 INTRODUCTION
IN 1947, GEORGE DANTZIG AND HIS ASSOCIATES, WHILE WORKING IN THE U.S. DEPARTMENT OF AIR
FORCE, OBSERVED THAT A LARGE NUMBER OF MILITARY PROGRAMMING AND PLANNING PROBLEMS
COULD BE FORMULATED AS MAXIMIZING / MINIMIZING A LINEAR FORM OF PROFIT /COST FUNCTION

WHOSE VARIABLES WERE RESTRICTED TO VALUES SATISFYING A SYSTEM OF LINEAR CONSTRAINTS (A

SET OF LINEAR EQUATION/ OR INEQUALITIES ). A LINEAR FORM IS A MATHEMATICAL EXPRESSION OF


THE TYPE 𝑎1 𝑥1 + 𝑎2 𝑥2+⋯+ 𝑎𝑛 𝑥N ,WHERE 𝑎1 , 𝑎2 , … . . 𝑎𝑛 ARE CONSTANTS , AND 𝑥1 , 𝑥2,……,. 𝑥N ARE

VARIABLES . THE TERM ‘PROGRAMMING ’ REFERS TO THE PROCESS OF DETERMINING A PARTICULAR


PROGRAMME OR PLAN OF ACTION . SO LINEAR PROGRAMMING (L.P.) IS ONE OF THE MOST IMPORTANT
OPTIMIZATION (MAXIMIZATION /MINIMIZATION ) TECHNIQUES DEVELOPED IN THE FIELD OF

OPERATIONS RESEARCH (O.R.).

The general Linear Programming Problem (LPP) calls for optimizing (maximization/minimization) a
linear function of variables called the ‘Objective Function’ subject to a set of linear equation and /or
inequalities called the ‘Constraints’ or ‘Restrictions’.

8.3 FORMULATION OF LINEAR PROGRAMMING PROBLEMS

THE PROCEDURE FOR MATHEMATICAL FORMULATION OF LPP CONSISTS OF THE FOLLOWING STEPS :

Step 1 Identify the decision variables of the problem.

Step 2 Formulate the objective function to be optimized (maximized or minimized) as a linear


function of the decision variables.

DDE, GJUS&T, Hisar 176 |


Discrete Mathematics & Optimization MCA-25

Step 3 Formulate the constraints of the problem such as resource limitations, market conditions,
interrelation between variables and others as linear equation or inequations in terms of
the decision variables.

Step 4 Add the non-negativity constraints so that negative values of the decision variables do
not have any valid physical interpretation.

The objective function, the set of constraint and the non-negative constraint together
form a linear programming problem.

The formulation of the LP problems is explained with the help of these examples.

Example 1 Production Allocation Problem

A firm manufactures two types of products, A and B and sells them at a profit of Rs 2 on type A and Rs
3 on type B. Each product is processed on two machines G and H. Type A requires one minute if
processing time on G and two minutes on H; type B requires one minute on G and one minute on H.
The machine G is available for not more than 6 hours 40 minutes while machine H is available for 10
hours during any working day.

Formulate the problem as a linear programming problem.

Formulation

Decision Variables. Let 𝑥1 be the number of products of Type A to be produced and let 𝑥2 be the
number of units of type B to be produced.

After carefully understanding the problem, the given information can be systematically arranged in the
form of the following table.

Table 8.1
Time of Production (minutes) Available Time
Machine
Type A(𝑥1 units) Type B (𝑥2 units) (minutes)
G 1 1 400
H 2 1 600
Profit per unit Rs.2 Rs. 3

DDE, GJUS&T, Hisar 177 |


Discrete Mathematics & Optimization MCA-25

Objective function. Since the profit on type A is Rs. 2 per product,2𝑥1 will be the profit on selling 𝑥1
unites of type A. Similarly, 3𝑥2 will be profit on selling 𝑥2 units of type B. Therefore, total profit z on
selling 𝑥1 units of A and 𝑥2 units of B is given by𝐳 = 2𝑥1 + 3𝑥2

Hence, the objective function is

Maximize 𝐳 = 2𝑥1 + 3𝑥2 .

Constraints. Since machine G takes 1 minute time on type A and 1 minute time on type B, the total
number of minutes required on machine G is given by 𝑥1 + 𝑥2 . But machine G is available for not more
than 6 hours 40 minutes (400 minutes).

Therefore 𝑥1 + 𝑥2 ≤ 400.

Similarly, the total number of minutes required on machine H is given by 2𝑥1 + 𝑥2 , but machine
H is available for 10 hours on a working day.

Therefore, 2𝑥1 + 𝑥2 ≤ 600.

Non-negativity restrictions. Since it is not possible to produce negative quantities we have 𝑥1 ≥


0, 𝑥2 ≥ 0.

Hence the allocation problem of the firm can be finally put in the form:

Find 𝒙𝟏 𝐚𝐧𝐝𝒙𝟐 𝐬𝐮𝐜𝐡𝐭𝐡𝐚𝐭𝐭𝐡𝐞𝐩𝐫𝐨𝐟𝐢𝐭 𝐏 𝐢𝐬 𝐦𝐚𝐱𝐢𝐦𝐮𝐦 𝐢. 𝐞.

𝐌𝐚𝐱𝐢𝐦𝐢𝐳𝐞 𝐏 = 𝟐𝒙𝟏 + 𝟑𝒙𝟐

Subject to the constraints

𝒙𝟏 + 𝒙𝟐 ≤ 𝟒𝟎𝟎,

𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟔𝟎𝟎,

𝒙𝟏 ≥ 𝟎, 𝒙𝟐 ≥ 𝟎

DDE, GJUS&T, Hisar 178 |


Discrete Mathematics & Optimization MCA-25

Example 2 (Problem Mix Model)

A Company manufactures two bottling machines X, and Y. X is designed for 5-ounce bottles and Y for
10-ounce bottles. However, each can be used on both types with some loss of efficiency. The following
data are available.

Machine 5-ounce bottles 10-ounce bottles

X 80/min 30/min

Y 40/ min 50/min

The machines can be run 8 hours per day, for 5 days a week. Profit on 5-ounce bottles is 20 paise, and
on 10-ounce bottles is, 30 paise. Weekly production of the drink cannot exceed 500,000 ounce; and, the
market can absorb 30,000 (5-ounce) bottles and 8000 (10-ounce) bottles per week. The company wishes
to maximize its profit, subject to all the production and marketing constraints.

Step 1. To determine the number of 5-ounce bottles and 10-ounce bottles to be produced per week let
𝑥1 and𝑥2 represent the number of bottles to be produced per week.

Step 2. The objective is to maximize the profit, that is, maximize z = Rs. (0.20𝑥1 + 0.30𝑥2 ).

Step 3. Constraints can be formulated as follows:

Since, a 5-ounce bottle takes 1/80 minutes and, a 10-ounce bottle takes 1/30 minutes on machine
X, and the machine can run for 8 hours per day and 5 days per week, the time constraint on
machine X is.

(𝑥1 /80) + (𝑥2 /30 ) ≤ 8x60x5 ≤ 2400 minutes

Similarly, the time constraint on machine Y is,

(𝑥1 /40) + (𝑥2 /50 ) ≤ 2400 minutes

As, the total weekly production cannot exceed 500,000 ounces

5𝑥1 + 10𝑥2 ≤ 500,000 ounces

The constraints on market demand yield,

𝑥1 ≤ 30,000, 𝑥2 ≤ 8000bottles

DDE, GJUS&T, Hisar 179 |


Discrete Mathematics & Optimization MCA-25

The complete product mix model is,

Maximize z= Rs. (0.20𝑥1 + 0.30𝑥2 ).

Subject to

(𝑥1 /80) + (𝑥2 /30 ) ≤ 8x60x5 ≤ 2400

(𝑥1 /40) + (𝑥2 /50 ) ≤ 2400

5𝑥1 + 10𝑥2 ≤ 500,000

𝑥1 ≤ 30,000, 𝑥2 ≤ 8000

Example 3 (Production Allocation Model)

A company manufactures two types of products. A and B and, sells them at a profit of Rs. 4 on type A
and Rs. 5 on type B. Each product is processed on two machines, X and Y. Type A requires 2 minutes
of processing time on X and 3 minutes on Y. Type B requires 2 minutes on X, and, 2 minutes on Y. The
machine, X is available for not more than 5 hours 30 minutes, while Y is available for 8 hours during
any working day. Formulate the problem as a LP problem.

Step 1. Let 𝑥1 be, the number of products of type A, and 𝑥2 be, the number of products of type B.

Step2. To determine the objective function.

The profit on type A is Rs.4 per product. Therefore, 4𝑥1 will be the profit on selling 𝑥1 units of
type A. Similarly, 5𝑥2 will be the profit on selling 𝑥2 units of type B. Therefore, total profit on
selling 𝑥1 units of A, and 𝑥2 units of B, is given by.

𝒛 = 4𝑥1 + 5𝑥2.

Step3. To determine the constraints, since, machine X takes 2 minutes on type A and 2 minutes on type
B, and, it is not available for more than 5 hours 30 minutes (i.e. 330 minutes), the constraint
obtained is

2𝑥1 + 2𝑥2 ≤ 330.

Similarly, since the machine Y is available for 8 hours (480 minutes), the constraint obtained is,

3𝑥1 + 2𝑥2 ≤ 480.

DDE, GJUS&T, Hisar 180 |


Discrete Mathematics & Optimization MCA-25

The non-negativity restrictions are,

𝑥1 ≥ 0 and 𝑥2 ≥ 0.

The complete LP model is,

Maximize z = 4𝑥1 + 5𝑥2.

Subject to

2𝑥1 + 2𝑥2 ≤ 330

3𝑥1 + 2𝑥2 ≤ 480

𝑥1 ≥ 0 , 𝑥2 ≥ 0

Example 4. A company produces two types of hats. Each hat of the first type requires twice as much
labour time as the second type. If all hats are of the second type only, the company can produce a total
of 500 hats a day. The market limits daily sales of the first and second type to 150 and 250 hats.
Assuming that the profits per hat are Rs. 8 for type A and Rs. 5 for type B, formulate the problem as a
linear programming model in order to determine the number of hats to be produced of each type so as to
maximize the profit.

Formulation. Let the company produce hats of type A and hats of type B each day. So the profit P
after selling these two products is given by the linear function:

P=8𝑥1 + 5𝑥2(objective function)

Since the company can produce at the most 500 hats in a day and A type of hats require twice as much
time as that of type B, production restriction is given by 2t𝑥1 + t𝑥2 ≤ 500t where t is the labour time
per unit of second type i.e.

2𝑥1 + 𝑥2 ≤ 500.

But there are limitations on the sale of hats, therefore further restrictions are:

𝑥1 ≤ 150, 𝑥2 ≤ 250.

Also, since the company cannot produce negative quantities,

𝑥1 ≥ 0, and 𝑥2 ≥ 0.

DDE, GJUS&T, Hisar 181 |


Discrete Mathematics & Optimization MCA-25

Hence the problem can be finally put in the form:

Find 𝒙𝟏 𝐚𝐧𝐝𝒙𝟐 𝐬𝐮𝐜𝐡𝐭𝐡𝐚𝐭𝐭𝐡𝐞𝐩𝐫𝐨𝐟𝐢𝐭

𝐏 = 𝟖𝒙𝟏 + 𝟓𝒙𝟐 𝐢𝐬𝐦𝐚𝐱𝐢𝐦𝐮𝐦𝐬𝐮𝐛𝐣𝐞𝐜𝐭𝐭𝐨𝐭𝐡𝐞𝐜𝐨𝐧𝐬𝐭𝐫𝐚𝐢𝐧𝐭𝐬:

𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟓𝟎𝟎, 𝒙𝟏 ≤ 𝟏𝟓𝟎, 𝒙𝟐 ≤ 𝟐𝟓𝟎, 𝒙𝟏 ≥ 𝟎, 𝒙𝟐 ≥ 𝟎

Example 5. The manufacturer of patent medicines is proposed to prepare a production plan for
medicines A and B. There are sufficient ingredients available to make 20,000 bottles- of medicine A
and 40,000 bottles of medicine B, but there are only 45,000 bottles into which either of the medicine
can be filled. Further, it takes three hours to prepare enough material to fill 1000 bottles of medicine A
and one hour to prepare enough material to fill 1000 bottles of medicine B, and there are 66 hours
available for this operation. The profit is Rs. 8 per bottle for medicine A and Rs. 7 per bottle for
medicine B.

Formulate this problem as a L.P.P.

Formulation. Suppose the manufacturer produces 𝑥1 and 𝑥2 thousand of bottles of medicines A and B,
respectively, since it takes three hours to prepare 1000 bottles of medicine A, the time required to fill
𝑥1 thousand bottles of medicine A will be 3𝑥1 hours. Similarly, the time required to prepare 𝑥2
thousand bottles of medicine B will be 𝑥2 hours. Therefore, total time required to prepare 𝑥1 thousand
bottles of medicine A and 𝑥2 thousand bottles of medicine B will be 3𝑥1 + 𝑥2 hours.

Now since the total time available for this operation is 66 hours. 3𝑥1 + 𝑥2 ≤ 66.

Since there are only 45 thousand bottles available for filling medicines A and B, 𝑥1 + 𝑥2 ≤ 45.

There are sufficient ingredients available to make 20 thousand bottles of medicine A and 40 thousand
bottles of medicine B, hence 𝑥1 ≤ 20 and 𝑥2 ≤ 40.

Number of bottles being non-negative,𝑥1 ≥ 0, 𝑥2 ≥ 0

At the rate of Rs. 8 per bottle for type A medicine and Rs. 7 per bottle for type B medicine, the total
profit on 𝑥1 thousand bottles of medicine A and 𝑥2 thousand bottles of medicine B will become

P=8 x 1000 𝑥1 + 7x1000 𝑥2 or P=8000𝑥1 +7000𝑥2

DDE, GJUS&T, Hisar 182 |


Discrete Mathematics & Optimization MCA-25

Thus, the linear programming problem is:

Max. P=8000𝒙𝟏 +7000𝒙𝟐 , subject to the constraints:

𝟑𝒙𝟏 + 𝒙𝟐 ≤ 𝟔𝟔, 𝒙𝟏 + 𝒙𝟐 ≤ 𝟒𝟓,𝒙𝟏 ≤ 𝟐𝟎 ,𝒙𝟐 ≤ 𝟒𝟎

Example 6. A and
toy 𝒙company manufactures
𝟏 ≥ 𝟎, 𝒙𝟐 ≥ 𝟎 two types of doll, a basic version- doll A and a deluxe
version—doll B. Each doll of type B takes twice as long to produce as one of type A, and the company
would have time to make a maximum of 2000 per day. The supply of plastic is sufficient to produce
1500 dolls per day (both A and B combined). The deluxe version requires a fancy dress of which there
are available only 600 per day. If the company makes a profit of Rs. 3.00 and Rs. 5.00 per doll,
respectively on doll A and B, then how many of each doll should be produced per day in order to
maximize the total profit. Formulate this problem.

Formulation. Let 𝑥1 and 𝑥2 be the number of dolls produced per day of type A and B, respectively. Let
the doll A requires t hrs so that the doll B requires 2t hrs. So the total time to manufacture 𝑥1 and 𝑥2
dolls should not exceed 2,000t hrs. Therefore 𝑡𝑥1 + 2t𝑥2 ≤ 2000t. Other constraints are simple. Then
the linear programming problem becomes:

Maximize P=𝟑𝒙𝟏 + 𝟓𝒙𝟐

Subject to the constraints:

𝒙𝟏 + 𝟐𝒙𝟐 ≤ 𝟐𝟎𝟎𝟎 (time constraint)

𝒙𝟏 + 𝒙𝟐 ≤ 𝟏𝟓𝟎𝟎 (plastic constraint)

𝒙𝟐 ≤ 𝟔𝟎𝟎 (dress constraint)

and non-negativity constraint


8.4 GRAPHICAL SOLUTION OF TWO VARIABLE LINEAR
𝒙𝟏 ≥ 𝟎, 𝒙𝟐 ≥ 𝟎
PROGRAMMING PROBLEMS

SIMPLE LINEAR PROGRAMMING PROBLEMS OF TWO DECISION VARIABLES CAN BE EASILY SOLVED BY
GRAPHICAL METHOD . THE OUTLINES OF GRAPHICAL PROCEDURE ARE AS FOLLOWS:

Step 1. Consider each inequality-constraint as equation.

Step 2. Plot each equation on the graph, as each one will geometrically represent a straight line.

DDE, GJUS&T, Hisar 183 |


Discrete Mathematics & Optimization MCA-25

Step 3. Shade the feasible region. Every point on the line will satisfy the equation of the line. If the
inequality- constraint corresponding to that line is ‘≤’, then the region below the line lying in the
first quadrant (due to non-negativity of variables) is shaded. For the inequality-constraint with
‘≥’, sign, the region above the line in the first quadrant is shaded. The points lying in common
region will satisfy all the constraints simultaneously. The common region thus obtained is called
the feasible region.

Step 4. Obtain the solution points (the corner points of the feasible region).

Step 5. Calculate the values of objective function at the solution points.

Step 6. For maximization problem, the optimum solution is the solution point which gives the
maximum value of the objective function and for minimization problems the optimum solution
is the solution point that gives the minimum value of the objective function.

Example 7. Find a geometrical interpretation and solution as well for the following LP problem:
Maximize 𝑧 = 3𝑥1 + 5𝑥2 , subject to restrictions:

𝑥1 + 2𝑥2 ≤ 2000, 𝑥1 + 𝑥2 ≤ 1500, 𝑥2 ≤ 600, and 𝑥1 ≥ 0, 𝑥2 ≥ 0.

Graphical Solution.

Step1. (To graph the inequality-constraints).Consider two mutually Perpendicular lines 𝑜𝑥1 and 𝑜𝑥2
as axes of coordinates. Obviously, any point (𝑥1 , 𝑥2 ) in the positive quadrant will certainly satisfy non-
negativity restrictions: 𝑥1 ≥ 0, 𝑥2 ≥ 0 to plot the line 𝑥1 + 2𝑥2 = 2000, put 𝑥2 = 0, 𝑓𝑖𝑛𝑑 𝑥1 = 2000
from this equation.

(Fig. 8.1)

DDE, GJUS&T, Hisar 184 |


Discrete Mathematics & Optimization MCA-25

Then mark a point L such that OL=2000. Similarly, again put 𝑥1 = 0 to find 𝑥2 = 1000 and mark
another point M such that OM=1000.

Now join the points L and M. This line will represent the equation 𝑥1 + 2𝑥2 = 2000 as shown in the
above figure.

Clearly any point P lying on or below the line 𝑥1 + 2𝑥2 = 2000 will satisfy the inequality 𝑥1 + 2𝑥2 ≤
2000.

Similar procedure is now adopted to plot the other two lines:𝑥1 + 𝑥2 = 1500, and 𝑥2 = 600 as shown
in the figures.

(Fig. 8.2) (Fig. 8.3)

Any point on or below the lines 𝑥1 + 𝑥2 = 1500, 𝑥2 = 600 will also satisfy other two inequalities 𝑥1 +
𝑥2 ≤ 1500, 𝑥2 ≤ 600 respectively.

Step 2. Find the feasible region or solution space by combining the figs. 8.1, 8.2 and 8.3 together. A
common shaded area OABCD is obtained (see fig. 8.4) which is a set of points satisfying the inequality
constraints:

𝑥1 + 2𝑥2 ≤ 2000,𝑥1 + 𝑥2 ≤ 1500, 𝑥2 ≤ 600,

And non-negativity restrictions as 𝑥1 ≥ 0, 𝑥2 ≥ 0. Hence any point in the shaded area (including its
boundary) is feasible solution to the given LPP.

Step 3. Find the co-ordinates of the corner points of feasible region O, A, B, C and D.

DDE, GJUS&T, Hisar 185 |


Discrete Mathematics & Optimization MCA-25

Step 4. Calculate the value of z for each corner point O, A, B, C and D. Maximum value of z is attained
at the corner point B (1000,500), which is the point of intersection of lines

𝑥1 + 2𝑥2 = 2000 and 𝑥1 + 𝑥2 = 1500. Hence, the required solution is 𝑥1 = 1000, 𝑥2 = 500 and max
value z = Rs. 5500.

Example 8. Consider the problem

Max. z =𝑥1 + 𝑥2 ,

Subject to the constraints:

𝑥1 + 2𝑥2 ≤ 2000

𝑥1 + 𝑥2 ≤ 1500

𝑥2 ≤ 600

and 𝑥1 , 𝑥2 ≥ 0

Graphical Solution.

This problem is of the same type as discussed earlier except the objective function is slightly changed.
The feasible region will be similar to that of the above problem.

(Fig. 8.4)

DDE, GJUS&T, Hisar 186 |


Discrete Mathematics & Optimization MCA-25

It is clear that the values of 𝑥1 𝑎𝑛𝑑 𝑥2 which maximize value of z is always unique, but there will be an
infinite number of feasible solutions which give unique value of z. Thus, two corners A and B as well as
any point on the line AB give optimal solution of this problem.

It should be noted that if a linear programming problem has more than one optimum solution, there
exists alternative optimum solutions. In the above example, one optimum solution is:

Maximum Profit z = Rs. 1500 at 𝑥1 = 1500 𝑎𝑛𝑑 𝑥2 = 0 (at corner point A). Alternative optimum
solution to this problem is Maximum Profit z = Rs. 1500 at 𝑥1 = 1000 𝑎𝑛𝑑 𝑥2 = 500 (at corner point
B).

Example 9. Old hens can be bought at Rs. 2 each and young ones at Rs.5 each. The old hens lay 3 eggs
per week and the young ones lay 5 eggs per week, each egg being worth 30 paisa. A hen (young or old)
costs Rs. 1 per week to feed. I have only Rs. 80 to spend for hens, how many of each kind should I buy
to give a profit of more than Rs. 6 per week, assuming that I cannot house more than 20 hens.

Solution. Formulation, let 𝑥1 be the number of old hens 𝑎𝑛𝑑 𝑥2 the number of young hens to be
bought. Since old hens lay 3 eggs per week and the young ones lay 5 eggs per week, the total number of
eggs obtained per week will be =3𝑥1 + 5𝑥2 .

Consequently the profit on each egg being 30 paisa, the total gain will be = Rs. 0.30 (3𝑥1 +
5𝑥2 ).

Total expenditure for feeding (𝑥1 + 𝑥2 ) hens at the rate of Rs. 1 each will be = Rs. 1 (𝑥1 + 𝑥2 ).

Thus total profit z earned per week will be z = total gain- total expenditure

Or z=0.30(3𝑥1 + 5𝑥2 ) - (𝑥1 + 𝑥2 ) or z = 0.50𝑥2 -0.10𝑥1 (objective function)

Since old hens can be bought at Rs. 2 each and young ones at Rs.5 each and there are only Rs.
80 available for purchasing hens, the constraints is :2𝑥1 + 5𝑥2 ≤80.

Also since, is not possible to house more than 20 hens at a time, so 𝑥1 + 𝑥2 ≤ 20.

Also, since the profit is restricted to be more than Rs. 6, this means that the profit function z is
to be maximized. Thus there is no need to add one more constraint, i.e. 0.5𝑥2 -0.1𝑥1 ≥6.

Again, it is not possible to purchase negative quantity of hens, therefore 𝑥1 ≥ 0, 𝑥2 ≥ 0.

DDE, GJUS&T, Hisar 187 |


Discrete Mathematics & Optimization MCA-25

Finally, the problem becomes:

Find 𝐱𝟏 𝐚𝐧𝐝 𝐱𝟐 (real numbers) so as to maximize the profit function z =


0.50𝐱𝟐 −0.10𝐱𝟏

Subject to the constraints:

𝟐𝐱𝟏 + 𝟓𝐱 𝟐 ≤ 80, 𝐱𝟏 + 𝐱𝟐 ≤ 20, and 𝐱𝟏 , 𝐱𝟐 ≥ 𝟎.


Graphical Solution. Plot the straight lines 2𝑥1 + 5𝑥2 =80 and 𝑥1 + 𝑥2 = 20 on the graph and shade the
feasible region as shown in the figure.

(Fig. 8.5)

The feasible region is OBEC. The coordinates of the extreme points of the feasible region are:

O=(0,0), C=(20,0), B=(0,16), E=(20/3,40/3). The values of z at these vertices are:

zA = 0

zC = −2,

zB = 8,

zE = 6.

DDE, GJUS&T, Hisar 188 |


Discrete Mathematics & Optimization MCA-25

Since the maximum value of z is Rs. 8 which occurs at the point B= (0, 16), the solution to the given
problem is 𝑥1 = 0, 𝑥2 = 16, max. z =Rs.8. Hence only 16 young hens I should buy in order to get the
maximum profit of Rs. 8 (which is >6).

Example 10. (Minimization problem) Consider the problem: Min. z =1.5𝑥1 + 2.5𝑥2 subject to 𝑥1 +
3𝑥2 ≥ 3, 𝑥1 + 𝑥2 ≥ 2,𝑥1 , 𝑥2 ≥ 0.

Graphical Solution. The geometrical interpretation of the problem is given in following figure:

(Fig. 8.6)

The minimum value of z is zA =3.5. This minimum is attained at the point of intersection A of the lines
𝑥1 + 3𝑥2 = 3, 𝑎𝑛𝑑 𝑥1 + 𝑥2 = 2. This is the unique point to give the minimum value of z. Now, solving
3 1
these two equations simultaneously, the optimum solution is :𝑥1 = , 𝑥2 = and min. z=3.5.
2 2

Example 11. (Problem having unbounded solution)

Max. z=3𝑥1 + 2𝑥2 subject to 𝑥1 − 𝑥2 ≤ 1, 𝑥1 + 𝑥2 ≥ 3, and 𝑥1 , 𝑥2 ≥ 0.

Graphical Solution. The region of feasible solutions is represented by the shaded area in the given
figure:

DDE, GJUS&T, Hisar 189 |


Discrete Mathematics & Optimization MCA-25

(Fig. 8.7)

It is clear from this figure that the feasible region is unbounded and the problem has no finite maximum
value of z. Such problems are said to have unbounded solutions.

Example 12. (Problem with inconsistent system of constraints)

Maximize z=3𝑥1 + 2𝑥2 subject to 𝑥1 + 𝑥2 ≤ 1, 2𝑥1 + 2𝑥2 ≥ 4, and 𝑥1 , 𝑥2 ≥ 0.

Graphical Solution. The problem is represented graphically in figure.

(Fig. 8.8)

The figure shows that there is no point (𝑥1 , 𝑥2 ) which satisfies both the constraints simultaneously.
Hence the problem has no solution because the constraints are inconsistent.

DDE, GJUS&T, Hisar 190 |


Discrete Mathematics & Optimization MCA-25

Example 13. (Constraints can be consistent and yet there may be no solution)

Max. z=𝑥1 + 𝑥2 subject to 𝑥1 − 𝑥2 ≥ 0, −3𝑥1 + 𝑥2 ≥ 3, and 𝑥1 , 𝑥2 ≥ 0.

Graphical Solution. Figure for this example as given below shows that there is no region of feasible
solutions in this case. Hence there is no feasible solution.

(Fig. 8.9) (Fig. 8.10)

Example 14. (Problem in which constraints are equations rather than inequalities)

Max. z=5𝑥1 + 3𝑥2 subject to 3𝑥1 + 5𝑥2 = 15, 5𝑥1 + 2𝑥2 = 10, 𝑥1 ≥ 0, 𝑥2 ≥ 0.

Graphical Solution. Figure above shows the graphical solution. Since there is only a single solution
point A(20/19,45/19), there is nothing to be maximized.

8.5 GENERAL FORMULATION OF LINEAR PROGRAMMING


PROBLEM

THE GENERAL FORMULATION OF THE LINEAR PROGRAMMING PROBLEM CAN BE STATED AS FOLLOWS:

In order to find the values of n decision variables 𝑥1 , 𝑥2,……, 𝑥𝑛 to maximize or minimize the objective
function z = 𝑐1 𝑥1 + 𝑐2 𝑥2 + 𝑐3 𝑥3 +. . . +𝑐n 𝑥𝑛

and also satisfy m-constraints:

DDE, GJUS&T, Hisar 191 |


Discrete Mathematics & Optimization MCA-25

𝑎11 𝑥1 + 𝑎12 𝑥2 +. . . +𝑎1𝑗 𝑥j +. . . +𝑎1n 𝑥𝑛 (≤= or ≥)𝑏1

𝑎21 𝑥1 + 𝑎22 𝑥2 +. . . +𝑎2𝑗 𝑥j +. . . +𝑎2n 𝑥𝑛 (≤= or ≥)𝑏2

: : : : :

𝑎𝑖1 𝑥1 + 𝑎𝑖2 𝑥2 +. . . +𝑎𝑖𝑗 𝑥j +. . . +𝑎in 𝑥𝑛 (≤= or ≥)𝑏i

: : : : :

𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 +. . . +𝑎𝑚𝑗 𝑥j +. . . +𝑎mn 𝑥𝑛 (≤= or ≥)𝑏m,

where constraints may be in the form of any inequality (≤ or ≥) or even in the form of an equation (=),
and finally satisfy the non-negativity restrictions.

𝑥1 ≥ 0, 𝑥2 ≥ 0, … . 𝑥𝑗 ≥ 0, … . 𝑥𝑛 ≥ 0.

However, by convention, the values of right side parameters 𝑏i (i = 1,2,3 … . , m) are restricted to non-
negative values only. It is important to note that any negative 𝑏i can be changed to a positive value on
multiplying both sides of the constraint by -1. This will not only change the sign of all left side
coefficients and right side parameters but will also change the direction of the inequality sign.

8.6 SLACK AND SURPLUS VARIABLES


1. Slack Variables. If a constraint has ≤ sign, then in order to make it an equality, we have to add
something positive to the left hand side. The non-negative variable which is added to the left
hand side of the constraint to convert it into equation is called the slack variable.

For example, consider the constraints:

𝑥1 + 𝑥2 ≤ 2, 2𝑥1 + 4𝑥2 ≤ 5, 𝑥1 , 𝑥2 ≥ 0

We add the slack variables S1 ≥ 0, 𝑆2 ≥ 0 on the left hand sides of above inequalities
respectively to obtain

𝑥1 + 𝑥2 + 𝑆1 =2

2 𝑥1 + 4𝑥2 + 𝑆2 = 5

DDE, GJUS&T, Hisar 192 |


Discrete Mathematics & Optimization MCA-25

𝑥1 , 𝑥2 , 𝑆1 , 𝑆2 ≥ 0.

1. Surplus Variables. If a constraint has ≥ sign, then in order to make it an equality, we have to
subtract something non-negative from its left hand side. Thus the positive variable which is
subtracted from the left hand side of the constraint to convert it into equation is called the surplus
variable.

For example consider the constraints:

𝑥1 + 𝑥2 ≥ 2, 2𝑥1 + 4𝑥2 ≥ 5, 𝑥1 , 𝑥2 ≥ 0.

We subtract the surplus variables 𝑆1 ≥ 0, 𝑆2 ≥ 0 from the left hand sides of above
inequalities respectively to obtain.

𝑥1 + 𝑥2 − 𝑆1 =2

2 𝑥1 + 4𝑥2 − 𝑆2 = 5

𝑥1 , 𝑥2 , 𝑆1 , 𝑆2 ≥ 0.

8.7 STANDARD FORM OF LINEAR PROGRAMMING PROBLEM

The standard form of the linear programming problem is used to develop the procedure for solving
general linear programming problem. The characteristics of the standard form are explained in the
following steps:

Step1. All the constraints should be converted to equations except for the non-negativity restrictions
which remain as inequalities (≥0). Constraints of the inequality type can be changed to equations
by augmenting (adding or subtracting) the left side of each such constraint by non-negative
variables. These new variables are called Slack Variables and are added if the constraints are (≤)
or subtracted if the constraints are (≥).

For example, consider the constraints: 3 𝑥1 − 4𝑥2 ≥ 7, 𝑥1 − 2𝑥2 ≤ 3.

DDE, GJUS&T, Hisar 193 |


Discrete Mathematics & Optimization MCA-25

These constraints can be changed to equations by introducing surplus and slack variables
𝑥3 and 𝑥4 respectively. Thus, we get.

3 𝑥1 − 4𝑥2 − 𝑥3 = 7, 𝑥1 + 2𝑥2 + 𝑥4 = 3, and 𝑥3 ≥ 0, 𝑥4 ≥ 0.

Step 2. The right side element of each constraint should be made non-negative (if not). The right side
can always be made positive on multiplying both sides of the resulting equation by (−1)
whenever it is necessary.

For example, consider the constraint as 3 𝑥1 − 4𝑥2 ≥ −4

which can be written in the form of the equation 3 𝑥1 − 4𝑥2 − 𝑥3 = −4 by introducing the
surplus variable 𝑥3 ≥ 0.

Again, multiplying both sides by (−1), we get − 3 𝑥1 + 4𝑥2 + 𝑥3 = 4 which is the


constraint equation in standard form.

Step 3. Allvariables must have non-negative values.

A variable which is unrestricted in sign (that is, positive, negative or zero) is equivalent to the
difference between two non-negative variables. Thus, if 𝑥 is unconstrained in sign, it can be replace by
(𝑥 ′ − 𝑥"), where 𝑥′ and 𝑥" are both non-negative, that is 𝑥′ ≥ 0 and 𝑥" ≥ 0.

Step 4. The objective function should be of maximization form.

The minimization of a function 𝑓(𝑥) is equivalent to the maximization of the negative


expression of this function, 𝑓(𝑥), that is,

Min. 𝑓(𝑥) = − Max {− 𝑓(𝑥)}

For example, the linear objective function

Min. z = 𝑐1 𝑥1 + 𝑐2 𝑥2 +. . . +𝑐n 𝑥𝑛

is equivalent to Max(−z), i.e. Max𝑧 ′ = −𝑐1 𝑥1 − 𝑐2 𝑥2 −. . . −𝑐n 𝑥𝑛 with z= −𝑧 ′ .

Consequently, in any L.P. problem, the objective function can be put in the maximization form
as given below:

Max. z =𝑐1 𝑥1 + 𝑐2 𝑥2 +. . . +𝑐n 𝑥𝑛 + 𝑜𝑥n+1 + ⋯ + 𝑜𝑥n+m

DDE, GJUS&T, Hisar 194 |


Discrete Mathematics & Optimization MCA-25

Subject to

𝑎11 𝑥1 + 𝑎12 𝑥2 +. . . +𝑎1 𝑛 𝑥n +𝑥𝑛+1 . = 𝑏1

𝑎21 𝑥2 + 𝑎22 𝑥2 +. . . +𝑎2𝑛 𝑥n +𝑥𝑛+2 = 𝑏2

: : : : :

𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 +. . . 𝑎𝑚𝑛 𝑥n +𝑥𝑛+𝑚 = 𝑏m

Where 𝑥1 ≥ 0, 𝑥2 ≥ 0, … . . 𝑥𝑛 ≥ 0, 𝑥𝑛+1 ≥ 0, … . , 𝑥𝑛+𝑚 ≥ 0.

Example 15 Express the following L.P. problem in standard form.

Min. z = 𝑥1 − 2𝑥2 + 𝑥3 , subject to:

2𝑥1 + 3𝑥2 + 4𝑥3 ≥ −4, 3 𝑥1 + 5𝑥2 + 2𝑥3 ≥ 7, 𝑥1 ≥ 0, 𝑥2 ≥ 0 and 𝑥3 is


unrestricted in sign.

Solution Proceeding according to the above rules, the standard LP form becomes:

Max (𝑧′)=−𝑥1 + 2𝑥2 − (𝑥3 ′ − 𝑥3 "), where 𝑧 ′ = −𝑧, subject to

−2𝑥1 − 3𝑥2 − 4(𝑥3 ′ − 𝑥3 ") + 𝑥4 =4

3𝑥1 + 5𝑥2 + 2(𝑥3′ − 𝑥3 ") − 𝑥5 = 7

𝑥1 ≥ 0, 𝑥2 ≥ 0 , 𝑥3 ′ ≥ 0, 𝑥3 " ≥ 0, 𝑥4 ≥ 0, 𝑥5 ≥ 0.

8.8 MATRIX FORM OF LINEAR PROGRAMMING PROBLEM

The linear programming problem in standard form can be expressed in matrix form as follows:

Maximize 𝑧 = 𝐶X 𝑇 (objective function)

Subject to 𝐴𝑋 𝑇 = 𝑏 𝑇 , b ≥ 0 (Constraint equation)

X≥ 0.(non-negativity restriction)

Where X= (𝑥1 , 𝑥2 , . . . 𝑥n , 𝑥𝑛+1 , … . , , 𝑥𝑛+𝑚 ),

C= (𝑐1 , 𝑐2 , . . . 𝑐n , 0,0, . … . ,0)and b = (𝑏1 , 𝑏2 , . . . 𝑏m ).

DDE, GJUS&T, Hisar 195 |


Discrete Mathematics & Optimization MCA-25

𝑎11 𝑎12 … . . 𝑎1 𝑛 1 0 … 0
𝑎21 𝑎22 . … 𝑎2 𝑛 0 1 … 0
A =[ ]
: ∶ ∶ ∶ ∶ …:
𝑎𝑚1 𝑎𝑚2 . … 𝑎𝑚 𝑛 0 0 … 1

Example 16 Express the following LP problem in the matrix form.

Max. z =2 𝑥1 − 3𝑥2 + 4𝑥3 , subject to

𝑥1 + 2𝑥2 + 𝑥3 ≥ 5, 𝑥1 + 2𝑥2 = 7, 5𝑥1 − 2𝑥2 + 3𝑥3 ≤ 9, and 𝑥1 ≥ 0, 𝑥2 ≥ 0 , 𝑥3 ≥ 0.

Solution. This problem can be written in standard form as

Max. z =2 𝑥1 + 3𝑥2 + 4𝑥3 + 0𝑥4 + 0𝑥5

or

Max. z =(2, 3, 4, 0 , 0)(𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 )T

Subject to 𝑥1 + 𝑥2 + 𝑥3 − 𝑥4 = 5, 𝑥1 + 2𝑥2 = 7, 5𝑥1 − 2𝑥2 + 3𝑥3 + 𝑥5 = 9


𝑥1
1 1 1 −1 0 𝑥2 5
Or [1 2 0 0 𝑥
0] 3 = [7]
5−2 3 0 1 𝑥4 9
[ 𝑥5 ]

Therefore, X= (𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 )T , C = (2 3 4 0 0 ), b =(5 7 9)T and

1 1 1 −1 0
A=[1 2 0 0 0]
5−2 3 0 1

8.9 SOME IMPORTANT DEFINITIONS

Some important definitions related to solution of linear programming problems are given below:

1. Solution to a LPP A set X={𝑥1 , 𝑥2 , . . . , 𝑥𝑛+𝑚 } of variables is called a solution to a LPP,


if it satisfies the given set of constraints.

DDE, GJUS&T, Hisar 196 |


Discrete Mathematics & Optimization MCA-25

2. Feasible solution Any set x={𝑥1 , 𝑥2 , . . . , 𝑥𝑛+𝑚 } of variables is called a feasible


solution of the LPP, if it satisfies the given set of constraints and non-negativity
restrictions.

3. Basis solution A basis solution is a solution obtained by setting any n variables (among
𝑚 + 𝑛 variables) equal to zero and solving for remaining m variables provided the
determinant of the coefficients of these m variables is non-zero. Such m variables (any of
them may be zero) are called basis variables, and the remaining variables which are set
as zero are called non-basic variables.

Thus, the number of basic solution must be almost 𝑚 + 𝑛Cm.

4. Basic feasible solution A basic solution to a LPP is called as a basic feasible solution if
it satisfies the non-negative restriction. There are two types of basic feasible solutions.

(i) Non-degenerate All m basic variables are positive, and remaining n variables will be
zero.

(ii) Degenerate A basic feasible solution is degenerate, if one or more basic variables
are zero.

5. Optimum basic feasiblesolution A basic feasible solution to a LPP is said to be its


optimum solution if it optimizes (maximizes or minimizes) the objective function.

6. Unbounded solution If the value of the objective function z can be increased or


decreased indefinitely, such solutions are called unbounded solutions.

8.10 APPLICATIONS OF LINEAR PROGRAMMING

Some important applications of linear programming in real world are:

1. Personnel Assignment Problem. Linear programming can be applied for assignment of


personnel (employees) for a particular task in some organization. The ratio in which skilled
(trained) and unskilled (untrained) personnel are assigned for a particular task can be

DDE, GJUS&T, Hisar 197 |


Discrete Mathematics & Optimization MCA-25

determined by using linear programming which in turn reduces the overall cost and improves
productivity.

2. Transportation Problem. The means of transportation of goods and the size and location of
newly established warehouses can be determined by using linear programming.

3. Agricultural Applications. Linear programming can be applied in agricultural planning for


allocating the limited resources such as acreage, labour, water, supply and working capital, etc.
so as to maximize the net revenue.

4. Military Applications. These applications involve the problem of selecting an air weapon
system against gurillas so as to keep them pinned down and simultaneously minimize the
amount of aviation gasoline used, a variation of transportation problem that maximizes the total
tonnage of bomb dropped on a set of targets, and the problem of community defense against
disaster to find the number of defence units that should be used in the attack in order to provide
the required level of protection at the lowest possible cost.

5. Production Management. Linear programming can be applied in production management for


determining product mix, product smoothing, and assembly time-balancing.

6. Marketing Management. Linear programming helps in analyzing the effectiveness of


advertising campaign and time based on the available advertising media. It also helps travelling
sales-man in finding the shortest route for his tour.

7. Manpower Management. Linear programming allows the personnel manager to analyses


personnel policy combinations in terms of their appropriateness for maintaining a steady-state
flow of people into through and out of the firm.

8. Physical Distribution. Linear programming determines the most economic and efficient
manner of locating manufacturing plants and distribution centers for physical distribution.

Besides above, linear programming involves the applications in the area of administration,
education, inventory control, fleet utilization, awarding contract, and capital budgeting etc.

DDE, GJUS&T, Hisar 198 |


Discrete Mathematics & Optimization MCA-25

8.11 CHECK YOUR PROGRESS


1. WHAT IS THE OBJECTIVE FUNCTION IN LINEAR PROGRAMMING PROBLEMS ?

A. A constraint for available resource

B. An objective for research and development of a company

C. A linear function in an optimization problem

D. A set of non-negativity conditions

2. Which statement characterizes standard form of a linear programming problem?

A. Constraints are given by inequalities of any type

B. Constraints are given by a set of linear equations

C. Constraints are given only by inequalities of >= type

D. Constraints are given only by inequalities of <= type

3. Feasible solution satisfies __________

A. Only constraints B. only non-negative restriction

C. [a] and [b] both D. [a],[b] and Optimum solution

4. In Degenerate solution value of objective function _____________.

A. increases infinitely B. basic variables are nonzero

C. decreases infinitely D. One or more basic variables are zero

5. Minimize Z = ______________

A. –maximize(Z) B. -maximize(-Z)

C. maximize(-Z) D. none of the above

6. In graphical method the restriction on number of constraint is __________.

A. 2 B. not more than 3 C. 3 D. none of the above

7. In graphical representation the bounded region is known as _________ region.

DDE, GJUS&T, Hisar 199 |


Discrete Mathematics & Optimization MCA-25

A. Solution B. basic solution C. feasible solution D. optimal

8. Graphical optimal value for Z can be obtained from

A. Corner points of feasible region B. Both a and c

C. corner points of the solution region D. none of the above

9. In LPP the condition to be satisfied is

A. Constraints have to be linear B. Objective function has to be linear

C. none of the above D. both a and b

8.12 SUMMARY

The process of determining a particular programme or plan of action is called linear programming.
Every linear programming problem has an objective function which is to be optimized (maximized or
minimized) while satisfying the given set of constraints. The linear programming problems having two
decision variables can be solved by graphical method. If the number of decision variables exceeds two,
graphical method fails as the line of equation having more than two variables cannot be drawn on graph.
Constraints are generally represented by inequalities whereas solving a given problem by graphical
method requires the constraints in the form of equations. These inequalities can be converted into
equations by using slack and surplus variables. Linear programming has a number of applications in our
day-to-day life such as in business, agriculture, production, military etc.

8.13 KEYWORD

1. Linear Programming; -L IN E A R P R OG R A M M IN G (LP, also called LIN E AR OP T IM IZ A T IO N ) is


a method to achieve the best outcome (such as maximum profit or lowest cost) in a mathematical
model whose requirements are represented by LIN EAR relationships.

DDE, GJUS&T, Hisar 200 |


Discrete Mathematics & Optimization MCA-25

2. Linear programming problem: -A L IN EA R P R OG R A M M ING P R OB LE M consists of


a LIN E AR function to be maximized or minimized subject to certain constraints in the form
of LIN EA R equations or inequalities.

3. Slack variable: -In an optimization problem, a slack variable is a variable that added to an
inequality constraint to transform it into an equality. Introducing a slack variable replaces an
inequality constraint with an equality constraint and a non-negativity constraint on the slack
variable.

4. Surplus Variable: -A surplus variable refers to the amount by which the values of the solution
exceed the resources utilized. These variables are also known as negative slack variables. ... In
order to obtain the equality constraint, the surplus variable is added to the greater than or equal to
the type constraints.

8.14 SELF ASSESSMENT TEST

Q1. A manufacturer of Furniture makes two products: chairs and tables. Processing of these
products is done on two machines A and B. A chair requires 2 hours on machine A and
6 hours on machine B.A table requires 5 hours on machine A and no time on machine B.
There are 16 hours of time per day available on machine A and 30 hours on machine B.
Profit gained by manufacturer from chair and a table is Re. 1 and Rs. 5 respectively.
What should be daily production of each of the two products?

Q2. A farm is engaged in breeding pigs. The pigs are fed on various products grown on the
farm. In view of the need to ensure certain nutrient constituents, it is necessary to buy
products (call them A and B) in addition. The contents of the various products, per unit,
in nutrients are vitamins, proteins etc. is given in the following table:

Nutrients Nutrients Contents in Min. Amount of


Nutrient
A B

M1 36 6 108

DDE, GJUS&T, Hisar 201 |


Discrete Mathematics & Optimization MCA-25

M2 3 12 36

M3 20 10 100

The last column of the above tables gives the minimum amount of nutrient constituents
M1, M2, M3 which must be given to the pigs. If the products A and B cost Rs. 20 and Rs.
4 per unit respectively, how much each of these two products should be bought so that
the total cost is minimized?

Q 3. A company produces two types of leather belts, say type A and B. Belt A is of superior
quality and belt B is of a lower quality. Profits on the two types of belt are 40 and 30
paise per belt respectively. Each belt of type A requires twice as much time as required
by a belt of type B. If all belts were of type B, the company would produce 1,000 belts
per day. But the supply of leather is sufficient only for 800 per day. Belt A requires a
fancy buckle and 400 fancy buckles are available for this, per day. For bet of type B,
only 700 buckles are available per day. How should the company manufacture the two
types of belt in order to have maximum overall profit?

Q 4. A company sells two different products A and B. The company makes a profit of Rs. 40
and Rs. 30 per unit on products A and B respectively. The two products are produced in
a common production process and sold in two different markets. The production process
has a capacity of 30,000 man-hours. It takes 3 hours to produce one unit of A and one
hour to produce one unit of B. The market has been surveyed and company officials feel
that the maximum number of units of A that can be sold is 8,000 and the maximum
number of B is 12,000 units. Subject to these limitations, the products can be sold in any
convex combinations. Formulate the above problem as a LPP and solve it by graphical
method.

Q 5. A Manufacturer makes two products P1 and P2 using two machines M1 and M2. Product
P1 requires 2 hours on machine M1 and 6 hours on machine M2. Product P2 requires 5
hours on machine. M1 and no time on machine M2. There are 16 hours of time per day

DDE, GJUS&T, Hisar 202 |


Discrete Mathematics & Optimization MCA-25

available on machine M1 and 30 hours on M2. Profit margin from P1 and P2 is Rs. 2 and
Rs. 10 per unit respectively. What should be the daily production mix to optimize profit?

Q 6. Solve the following LP problems by graphical method:

a) Min. z=5𝑥1 − 2𝑥2 ; subject to 2𝑥1 + 3𝑥2 ≥ 1, 𝑥1 , 𝑥2 ≥ 0.

b) Max. z=5𝑥1 + 3𝑥2 ;subject to 3𝑥1 + 5𝑥2 ≤ 15, 5𝑥1 + 2𝑥2 ≤ 10; 𝑥1 , 𝑥2 ≥ 0.

c) Max. z=5𝑥1 + 7𝑥2 ; s.t. 𝑥1 + 𝑥2 ≤ 4, 3𝑥1 + 8𝑥2 ≤ 24, 10𝑥1 + 7𝑥2 ≤ 35, 𝑥1 , 𝑥2 ≥
0.

d) Max. z=2𝑥1 + 3𝑥2 ;subject to 𝑥1 + 𝑥2 ≤ 1, 3𝑥1 + 𝑥2 ≤ 4; 𝑥1 , 𝑥2 ≥ 0.

e) Min. z=𝑥1 + 2𝑥2 ;subject to 𝑥1 + 3𝑥2 ≤ 10, 𝑥1 + 𝑥2 ≤ 6, 𝑥1 − 𝑥2 ≤ 2, 𝑥1 , 𝑥2 ≥ 0.

8.15 ANSWER TO CHECK YOUR PROGRESS

1 C
2 A
3 C
4 D
5 B
6 D
7 C
8 A
9 D

8.16 REFRENCES/ SUGGESTED READINGS

5. Operations Research by S.D. Sharma.

DDE, GJUS&T, Hisar 203 |


Discrete Mathematics & Optimization MCA-25

6. Operations Research- An Introduction (Eighth Edition); Hamdy A. Taha; Pearson Education,


Prentice Hall, Delhi, (2008).
7. Operations Research; A.M. Natarajan, P. Salasubramani, A. Tamilarasi; Pearson Education
(Singapore) Pvt. Ltd., Delhi, (2005).
8. Operations Research (Second Edition), Schaum’s Outlines; Richard Bronson, Govindasami
Naadimuthu; Tata McGraw Hill Education Private Limited; New Delhi (2010)

DDE, GJUS&T, Hisar 204 |


Discrete Mathematics & Optimization MCA-25

SUBJECT: DISCRETE MATHEMATICS AND OPTIMIZATION

COURSE CODE: MCA-25


AUTHOR: MS. RENU BANSAL
LESSON NO. 9

SIMPLEX METHOD & TWO-PHASE SIMPLEX METHOD

STRUCTURE

9.1 Objective

9.2 Introduction

9.3 Definitions and Notations

9.4 Computational Procedure of Simplex Method

9.5 Flowchart for Simplex Method

9.6 Definitions Used for Two-Phase Simplex Method

9.7 Computational Procedure of Two-Phase Simplex Method

9.8 Flowchart for Two-Phase Simplex Method

9.9 Solved Examples for Two-Phase Simplex Method

9.10 Problem of Degeneracy

9.11 Check Your Progress

9.12 Summary

9.13 Keywords

9.14 Self-Assessment Test

9.15 Answer to Check Your Progress

9.16 References/Suggested Reading

DDE, GJUS&T, Hisar 205 |


Discrete Mathematics & Optimization MCA-25

9.1 LEARNING OBJECTIVE

The main objective of this lesson is to make the students learn about how to solve the linear
programming problems having more than two decision variables. Two new iterative method called
simplex method and Two- Phase Simplex Method is introduced in this lesson. The computational
process of simplex method and Two- Phase Simplex Method is explained through suitable example
and flowchart. The problem of degeneracy is also discussed.

9.2 INTRODUCTION

1. Introduction to Simplex Method

It is not possible to obtain the graphical solution to the LP problems having more than two decision
variables. In such cases, a simple and most widely used simplex method is adopted which was
developed by G. Dantzig in 1947. The Simplex method provides an algorithm (a rule of procedure
usually involving repetitive application of a prescribed operation) which is based on the fundamental
theorem of linear programming.

The Simplex algorithm is an iterative (step-by-step) procedure for solving LP problems. It consists of:-

(i) having a trail basic feasible solution to constraint-equations,

(ii) testing whether it is an optimal solution,

(iii) Improving the first trial solution by a set of rules, and repeating the process till an optimal
solution is obtained.
2. Introduction to Two-Phase Simplex Method

Linear programming problems, in which constraints may also have ‘≥’ and ‘=’ signs after ensuring that
all 𝑏𝑖 are ≥0, are considered in this section. In such problems, basis matrix is not obtained as an identity
matrix in the starting simplex table, therefore we introduce a new type of variable, called, the artificial
variable. These variables are fictitious and cannot have any physical meaning. The artificial variable

DDE, GJUS&T, Hisar 206 |


Discrete Mathematics & Optimization MCA-25

technique is merely a device to get the starting basic feasible solution, so that simplex procedure may be
adopted as usual until the optimal solution is obtained. Artificial variables can be eliminated from the
simplex table as and when they become zero (non-basic). The process of eliminating artificial variables
is performed in Phase I of the solution, and Phase II is used to get an optimal solution. Since the
solution of the LP problem is completed in two phases, it is called ‘Two Phase Simplex Method’.

Remarks:

1. The objective of Phase I is to search for a Basic Feasible Solution (B.F.S.) to the given problem.
It ends up either giving a B.F.S. or indicating that the given L.P.P. has no feasible solution at all.

2. The B.F.S. obtained at the end of Phase I provides a starting B.F.S. for the given L.P.P. Phase II
is then just the application of simplex method to move towards optimality.

3. In Phase II, care must be taken to ensure that an artificial variable is never allowed to become
positive, if were present in the basis. Moreover, whenever some artificial variable happens to
leave the basis, its column must be deleted from the simplex table altogether.

9.3 DEFINITIONS AND NOTATIONS

Let 𝑥B be a basic feasible solution to the LPP.

Maximize z = CX

Subject to AX = b

and, X ≥ 0.

Then, the vector Cb= (𝐶b1 , 𝐶b2 , . . . , 𝐶𝑏𝑛 ) where 𝐶bi are components of C associated with the basic
variables, is called the cost vector associated with the basic feasible solution Xb.

Remarks:

1. If a LPP has a feasible solution, then it has a basic feasible solution.

2. There exists only finite number of basic feasible solutions to a LPP.

DDE, GJUS&T, Hisar 207 |


Discrete Mathematics & Optimization MCA-25

3. Let a LPP have a feasible solution. If we drop one of the basic variables and introduce another
variable in the basic set, then the new solution obtained is also a basic feasible solution.

4. If the net evaluation 𝑧j − 𝐶j = 0 for at least one j for which 𝑎ij > 0, 𝑖 = 1,2 … . , m then another
basic feasible solution is obtained which gives an unchanged value of the objective function. If
for at least one j, for which 𝑎ij ≤ 0, i = 1,2 … . , m and 𝑧j − 𝐶j is negative, then there does not
exist any optimum solution.

Lastly, these notations can be summarized in the following Starting Simplex Table 9.1.

Table 9.1: Starting Simplex Table

𝐶j 𝐶1 𝐶2 … 𝐶n 0 0 … 0
BASIC 𝐶b 𝑋b 𝑋1 = (𝑎1 )𝑋2 .. MIN
VARIA = (𝑎2 ) … 𝑋n (= 𝑎n ) 𝑋n+1 𝑋n+2 … 𝑋n+m
RATIO
BLES
( 𝐵1 ) ( 𝐵2 ) 𝐵m
𝑋n+1 (= 𝑆1 𝐶)b1 (= 0)𝑋b1 ( 𝑋1 1 (= 𝑎11 )𝑋12 (= 𝑎12 )… 𝑋1n (= 𝑎1n ) 1
= 𝑏1 ) 0 … 0

𝑋n+2 (= 𝑆2 )
𝐶b2 (= 0)𝑋b2 ( 𝑋2 1 (= 𝑎21 )𝑋22 (= 𝑎22 )… 𝑋2n (= 𝑎2n ) 0
: = 𝑏2 ) 1 … 0

: : : : :
𝑋n+m (= 𝑆m ) : : : :
:

𝑋m 1 (= 𝑎m1 )𝑋m2 (= 𝑎m2 )… 𝑋mn (= 𝑎mn ) 0


𝐶bm (= 0)𝑋bm ( 0 … 1
= 𝑏m )
Z= CbXb ∆1∆2 … ∆𝑛 0 0 … ∆𝑗 0
= 𝐶b 𝑋j
− 𝐶j

DDE, GJUS&T, Hisar 208 |


Discrete Mathematics & Optimization MCA-25

9.4 COMPUTATIONAL PROCEDURE OF SIMPLEX METHOD

Simplex method is an iterative procedure for solving the problems. Computational procedure of
Simplex method involves the following steps:

Step 1. If the problem is one of minimization, convert it to a maximization problem by considering −z


instead of z using the fact min z = −max. (−z)or min z = −max. (z ′ ), z ′ = −z.

Step 2. We check up all 𝑏𝑖 ′s for no negativity. If some of the are𝑏𝑖 ′s negative multiply the
corresponding constraints through −1 by in order to ensure all 𝑏𝑖 ≥ 0.

Step 3. We change the inequalities to equations by adding slack and surplus variables, if necessary.

Step 4. We add artificial variable to those constraints with (≥) or (=) sign in order to get the identity
basis matrix.

Step 5. We now construct the starting simplex table (Table 9.1). From this table, the initial basic feasible
solution can be read off.

Form of Simplex Table (Summarized Table 9.1)

𝑐𝑗 𝑐1 𝑐2 𝑐3 ………….. 𝑐𝑘 …………. 𝑐𝑚+𝑛

BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 … … . . . . 𝑥𝑘 … … … 𝑥𝑚+𝑛 MIN. RATIO


VARIAB RULE
LES

--- ----- -- ---- ---- ------- ….


---- …….

𝑧 = 𝑐𝐵 𝑥𝐵 ∆1 ∆2 ∆3 … … . . . . ∆𝑘 … … … ∆𝑚+𝑛 ∆𝑗

The computational aspect of the simplex procedure is explained by the following simple example.

Example 1. Consider the linear programming problem:

DDE, GJUS&T, Hisar 209 |


Discrete Mathematics & Optimization MCA-25

Maximize z =3 𝑥1 + 2 𝑥2 , subject to the constraints:

𝑥1 + 𝑥2 ≤ 4, 𝑥1 − 𝑥2 ≤ 2, and 𝑥1 , 𝑥2 ≥ 0.

Solution:

Step 1. First, observe whether all the right side constants of the constraints are non-negative. If not it,
can be changed into positive value on multiplying both sides of the constraints by -1. In this example,
all the 𝑏1 ′s(right side constants) are already positive.

Step 2. Next convert the inequality constraints to equations by introducing the non-negative. The
coefficient of slack variables are always taken zero in the objective function. In this example, all
inequality constraints being ‘≤’, only slack variable 𝑠1 and 𝑠2 are needed. Therefore, given problem
now becomes:

Maximize z =3 𝑥1 + 2𝑥2 + 0𝑠1 + 0𝑠2 , subject to the constraints:

𝑥1 + 𝑥2 + 𝑠1 = 4

𝑥1 − 𝑥2 + 𝑠2 = 2

𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0.

Step 3. Now, present the constraint equations in matrix from:


𝑥1
1 1 1 0 𝑥 2 4
[ ][ ]=[ ]
1 −1 0 1 𝑠1 2
𝑠2

Step 4. Construct the starting simplex table using the notations already explained in Section 3.2

It should be remembered that the values of non-basic variables are always zero at each iteration. So
𝑥1 = 𝑥2 = 0 here. Column 𝑥𝐵 gives the values of basic variables as indicated in the first column. So
𝑠1 = 4 and 𝑠2 = 2 here. The complete starting basic feasible solution can be immediately read from
Table 9.2 as: 𝑠1 = 4 , 𝑠2 = 2, 𝑥1 = 0, 𝑥2 = 0 , and the value of the objective function is zero.

DDE, GJUS&T, Hisar 210 |


Discrete Mathematics & Optimization MCA-25

Table 9.2: Starting Simplex Table for Example 1

𝑐𝑗 3 2 0 0
Basic 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 (𝑠1 ) 𝑥4 (𝑠2 ) MIN RATIO
Variables 𝑥𝐵 / 𝑥𝐾 for 𝑥𝐾
( 𝐵1 ) ( 𝐵2 ) >0

BASIS
𝑠1 0 MATRIX 1 0

4 1 1 To BE COMPUTD
IN NEXT STEP
0 1
𝑠2
1
0 1 -1 1
2
𝑍 = 𝑐𝐵 𝑥𝐵 ∆1 = −3 ∆2 = −2 ∆3 = ∆𝐽 = 𝑧𝐽 − 𝑐𝑗
0 ∆4 = 0 = 𝑐𝐵 𝑥𝑗 − 𝑐𝑗
Step 5. Now, proceed to test the basic feasible solution for optimality by the rules given below. This is
done by computing the ‘net evaluation’ ∆𝐽 for each variable 𝑥𝑗 (column vector 𝑥𝑗 ) by the formula

∆𝐽 = 𝑧𝐽 − 𝑐𝑗 = 𝑐𝐵 𝑥𝑗 − 𝑐𝑗

Thus, we get

∆1 = 𝑐𝐵 𝑥1 – 𝑐𝑗 ∆2 = 𝑐𝐵 𝑥2 − 𝑐2 ∆3 = 𝑐𝐵 𝑥3 − 𝑐3 ∆4 = 0

= (0,0)(1,1) –3 = (0,0)(1, –1) –2 =(0,0)(1,0) –0

= (0×1+0×1) – 3 = (0×1–0×1) – 2 =(0×1+0×0) – 0

=– 3 = –2 =0

Optimality Test:

(i) If all Δj (= 𝑧𝐽 − 𝑐𝑗 )≥ 0, the solution under the test will be optimal. Alternative optimal
solution will exist if any non-basic Δj is also zero.

(ii) If at least one Δj is negative, the solution under test is not optimal, then proceed to improve
the solution in the next step.

DDE, GJUS&T, Hisar 211 |


Discrete Mathematics & Optimization MCA-25

(iii) If corresponding to any negative Δj, all elements of the column Xj are negative or zero, then
the solution under test will be unbounded.

Applying these rules for testing the optimality of starting basic feasible solution, it is
observed that ∆1 and ∆2 both are negative. Hence, we have to proceed to improve this
solution in Step 6.

Step 6. In order to improve this basic feasible solution, the vector entering the basic matrix and the
vector to be removed from the basic matrix are determined by the following rules. Such vectors are
usually named as ‘incoming vector’ and ‘outgoing vector’ respectively.

‘Incoming vector’. The incoming vector 𝑥𝑘 is always selected corresponding to the most negative
value of Δj (say,∆𝑘 ). Here ∆𝑘 = min[∆1 , ∆2]= min [–3, –2]= –3=∆1. Therefore, k=1 and hence column
vector x1 must enter the basic matrix. The column x1 is marked by an upward arrow ( ).

‘Outgoing Vector’. The outgoing vector βr is selected corresponding to the minimum ration of
elements of 𝑥𝐵 by the corresponding positive elements of predetermined incoming vector 𝑥𝑘 . This rule
is called the Minimum Ration Rule. In mathematical form, this rule can be written as
𝑥𝐵𝑟 𝑥𝐵𝑟
= min i [ ,𝑥 ≥ 0 ]
𝑥𝑟𝑘 𝑥𝑖𝑘 𝑖𝑘
xBr x x 4 2
For k=1, = min [ xB1 , xB2 ] = min [1 , 1]
xr1 11 21

xBr 2 xB2
Or =1= .
xr1 x21

Comparing both sides of this equation, we get r=2. So the vector β2 i.e.,𝑥4 marked with downward
arrow ( ) should be removed from the basic matrix. The Starting Table 9.2 is now modified to Table
9.3 given below.

𝑐𝑗 3 2 0 0
Basic 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 (𝑠1 ) 𝑥4 (𝑠2 ) MIN.
Variables (β1 ) ( β2 ) RATIO
𝑥𝐵 / 𝑥1
𝑆1 0 1 1 1 4/1
4 0

DDE, GJUS&T, Hisar 212 |


Discrete Mathematics & Optimization MCA-25

𝑆2 --------------2/1
0 1 -------------1------------------0----------- MIN. RATIO
2 -------1----
𝑍 = 𝑐𝐵 𝑥𝐵 =0 −3 ∆𝐽 = 𝑧𝐽 − 𝑐𝑗
−2 0 0 = 𝑐𝐵 𝑥𝑗 − 𝑐𝑗
(MIN.∆𝐽 )
0 1
Step 7. In order to bring β2 = [ ] in place of incoming vector x1 = [ ], unity must occupy in the
1 1
marked ‘ ’ position and zero at all other places of x1 . IF the number in the marked ‘ ’ position is
other than unity, divide all elements of that row by ‘key element’. (The element at the intersection of
minimum ratio arrow ( ) and incoming vector arrow ( ) is called the key element of pivot element).

Then, subtract appropriate multiplies of this new row from the other (remaining) rows, so as to obtain
zeros in the remaining positions of the column 𝑥1 . Thus, the process can be fortified by simple matrix
transformation as follows:

The remaining coefficient matrix is:

𝑋𝐵 𝑋1 𝑋2 𝑋3 𝑋4

𝑅1 4 1 1 1 0

𝑅2 2 1 –1 0 1

𝑅3 𝑧 = 0 –3 –2 0 0

Applying 𝑅2 𝑅2 + 𝑅1 , 𝑅3 𝑅3 + 5𝑅1

1 0 1 ½ −½

3 1 0 ½ ½

𝑍 = 11 0 0 5/2 ½

Now construct the next improved simplex table as follows:

Table 9.4

DDE, GJUS&T, Hisar 213 |


Discrete Mathematics & Optimization MCA-25

𝑐𝑗 3 2 0 0
Basic 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 (𝑠1 ) 𝑥4 (𝑠2 ) MIN.
Variables ( β2 ) (β1 ) RATIO
𝑥𝐵
/ 𝑥2 , 𝑥2 > 0
𝑆1 0 0 2 1 2/2
2 −1 key row
𝑆2
3 1 −1 0 2/−1 (negative
2 1 ration is not
eounted
𝑍 = 𝑐𝐵 𝑥𝐵 =6 0 − ∆𝐽
5 0 3

Key column

From this tables, the improved basic feasible solution is read as: 𝑥1 = 2, 𝑥2 = 2, 𝑥2 = 0, 𝑠1 = 2, 𝑠2 =
0. The improved value of 𝑧 = 6.

It is of particular interest to note here that Δj’s are also computed while transforming the table by matrix
method. However, the correctness of Δj’s can be verified by computing them independently by using the
formula Δj= 𝑐𝐵 𝑥𝑗 − 𝑐𝑗 .

Step 8. Now repeat Steps 5 through 7 as and when needed until as optimum solution is obtained in
table 3.5

∆𝑘 = most negative ∆𝑗 = −5 = ∆2.

Therefore, k=2 and hence 𝑥2 should be the entering vector (key column). By minimum ratio rule:
𝑥 2
Minimum Ratio( 𝑥𝐵 , 𝑥2 > 0)= Min [2 , −] (since negative ratio is not counted, so the second ratio is not
2

considered and a ‘ – ’ is put)

DDE, GJUS&T, Hisar 214 |


Discrete Mathematics & Optimization MCA-25

Since first ratio is minimum, remove the first vector β1 from the basis matrix. Hence the key element is
2. Dividing the first row by key element 2, the intermediate coefficient matrix is obtained as:

𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4

𝑅1 1 0 1 ½ −½

𝑅2 2 1 −1 0 1

𝑅3 𝑍 =6 0 −5 0 3

Applying 𝑅2 𝑅2 + 𝑅1 , 𝑅3 𝑅3 + 5𝑅1

1 0 1 ½ −½

3 1 0 ½ ½

𝑍 = 11 0 0 5/2 ½

Now construct the next improved simplex table as follows:

Table 9.5: Final Simplex Table

𝑐𝑗 3 2 0 0

Basic Variables 𝑐𝐵 𝑥𝐵 𝑥1 ( β2 𝑥2 (β1 )𝑠1 𝑠2

𝑥2 2 1 0 1 ½
−½
𝑥1 3 3
1 0 ½
½

𝑍 = 𝑐𝐵 𝑥𝐵 =11 0 0 5/2
½

The solution as read from this is : 𝑥1 = 3, 𝑥2 = 1, 𝑠1 = 0, 𝑠2 = 0, and max. 𝑍 = 11. Also, using the
formula ∆𝑗 = 𝑐𝐵 𝑥𝑗 − 𝑐𝑗 verify that all ∆𝑗 are non − negative. Hence the optimum solution is

𝑥1 = 3, 𝑥2 = 1, max 𝑧 = 11.

DDE, GJUS&T, Hisar 215 |


Discrete Mathematics & Optimization MCA-25

Tips for Quick Solution:

1. In the first nitration only, since ∆𝑗 ′s are the same as 𝑐𝑗 ′s, so there is no need of calculating them
separately by using the formula ∆𝑗 = 𝑐𝐵 𝑥𝑗 − 𝑐𝑗 .

2. Mark min (∆𝑗 ) by ‘ ’ which at once indicates the column 𝑥𝑘 needed for computing the
minimum ratio ( 𝑥𝐵 / 𝑥𝑘 ).

3. ‘Key element’ is found at the place where the upward directed arrow ‘ ’ of min ∆𝑗 and the left
directed arrow ( ) of minimum ratio ( 𝑥𝐵 / 𝑥𝑘 ) intersect each other in the siplex table.

4. ‘Key element’ indicates that the current table must be transformed in such a way that the key
element becomes 1 and all other elements in that column become 0.

5. Since ∆𝑗 ′s corresponding to unit column vectors are always zero, there is no need of calculating
them.

6. While transforming the table by row operations, the value of z and corresponding are ∆𝑗′ s also
computed at the same time. Thus a lot of time and labour can be saved in adopting this
technique.

DDE, GJUS&T, Hisar 216 |


Discrete Mathematics & Optimization MCA-25

Flowchart for Simple Simplex Method is given below:

9.5 FLOWCHART FOR SIMPLEX METHOD

DDE, GJUS&T, Hisar 217 |


Discrete Mathematics & Optimization MCA-25

9.6 DEFINITIONS USED FOR TWO-PHASE SIMPLEX METHOD

1. Slack Variable. As explained above, Slack Variable is a non-negative variable which is


added to the left hand side of the constraint to convert it into equation while keeping the
right hand side of the constraint positive.

For example, consider the constraint:

2𝑥1 + 3𝑥2 ≤ 12,

We add the slack variables s1 ≥ 0 on the left hand side of above inequality to obtain the
equation:

2𝑥1 + 3𝑥2 + s1 = 12

Where 𝑠1 ≥ 0.

2. Surplus Variable. For the constraints having sign ≥ while the right hand side of the
constraint is positive, we have to subtract something non-negative from its left hand side.
Thus the non- negative variable which is subtracted from the left hand side of the
constraint to convert it into equation is called the surplus variable.

For example consider the constraint:

𝑥1 + 2𝑥2 ≥ 7.

We subtract the surplus variables s2 ≥ 0 from the left hand side of above inequality to obtain the
equation.

𝑥1 + 2𝑥2 − s2 =7

Where 𝑠2 ≥ 0.

3. Artificial Variable. Artificial Variable is used in the constraints having sign either ‘ = ‘
or ‘≥ ′ while keeping the right hand side of the constraint positive. For the constraints
having sign ‘ = ‘ i.e. equations, only artificial variable is added to the left hand side;

DDE, GJUS&T, Hisar 218 |


Discrete Mathematics & Optimization MCA-25

whereas for the constraints having sign ‘ ≥ ‘, both the surplus and the artificial variables
are used to make the constraint an equation. Artificial variable is used in Two- Phase
Method (Artificial Variable Method) and Big- M Method (Charne’s Penalty Method)
both of which are variants of Simple Simplex Method. Hence artificial variable is a non-
negative variable which is added to the left hand side of the constraints having sign ‘ = ‘
or ‘≥ ′.

If the right hand side of the constraint is negative, first convert it into positive by multiplying both
sides by -1 and then introduce slack, surplus or artificial variables. For example, in the
constraint 3𝑥1 − 2𝑥2 ≤ −12, the right hand side can be made positive by multiplying both sides by
-1. Thus we get −3𝑥1 + 2𝑥2 ≥ 12, now we can introduce surplus and artificial variables in it.

Some examples are given to make your understanding more clear.

After introducing slack,


surplus and artificial variables
Constraints Remarks

3𝑥1 + 4𝑥2 + 𝑥3 ≤ 25 3𝑥1 + 4𝑥2 + 𝑥3 + s1 = 25 (only slack variable is


used)
𝑥1 + 7𝑥2 ≥ 7 𝑥1 + 7𝑥2 − s1 + a1 = 7
(surplus and artificial
14𝑥1 + 𝑥2 − 6𝑥3 = 7 14𝑥1 + 𝑥2 − 6𝑥3 + a1 = 7
variables are used)
3𝑥1 − 2𝑥2 ≤ −12 − 3𝑥1 + 2𝑥2 − s1 + a1 = 12
(only artificial
variable is used)

(surplus and artificial


variables are used)

DDE, GJUS&T, Hisar 219 |


Discrete Mathematics & Optimization MCA-25

9.7 COMPUTATIONAL PROCEDURE OF TWO-PHASE


SIMPLEX METHOD

The two phase simplex method is used to solve a given problem in which some artificial variables are
involved. The solution is obtained in two phases as follows:

Phase 1. In this phase, the simplex method is applied to a specially constructed auxiliary linear
programming problem leading to a final simplex table containing a basic feasible solution to the original
problem.

Step 1. Assign a cost-1 to each artificial variable and a cost 0 to all other variables (in place of
their original cost) in the objective function.

Step 2. Construct the auxiliary linear programming problem in which the new objective
function z* is to be maximized subject to the given set of constraints.

Step 3. Solve the auxiliary problem by simplex method until either of the following three
possibilities do arise:

(i) Max z* < 0 and at least one artificial vector appear in the optimum basis at a
positive level. In this case given problem does not possess any feasible
solution.

(ii) Max z*=0 and at least one artificial vector appears in the optimum basis at zero
level. In this case proceed to Phase-II.

(iii) Max z*=0 and no artificial vector appears in the optimum basis. In this case also
proceed to Phase-II.

Phase II. Now assign the actual costs to the variables in the objective function and a zero cost to every
artificial variable that appears in the basis at the zero level. This new objective function is now
maximized by simplex method subject to the given constraints. That is, simplex method is applied to the
modified simplex table obtained at the end of Phase-I, until an optimum basic feasible solution (if
exists) has been attained. The artificial variables which are non-basic at the end of Phase-I are removed.

DDE, GJUS&T, Hisar 220 |


Discrete Mathematics & Optimization MCA-25

Flowchart for Two- Phase Simplex Mehtod is given below:

9.8 FLOWCHART FOR TWO-PHASE SIMPLEX METHOD

Phase- I

Convert the Objective Function into


Maximization Form, if not

Make the RHS of all constraints positive

Introduce slack, surplus and artificial variables

Convert the LPP into Auxiliary LPP by assigning


a cost -1 to each artificial variable and 0 to
other variables in the objective function (Max
z*)

Solve this Auxiliary LPP by Simple Simplex


Method until

Max z* = 0 and artificial Max z* = 0 and no


vector (s) at zero level artificial vector
if ?

Max z* < 0
and artificial
Proceed to vector (s) at Proceed to
Phase- II +ve level Phase- II

No Feasible
Solution

M
Fig. 9.8.1 Flowchart for Phase-I

DDE, GJUS&T, Hisar 221 |


Discrete Mathematics & Optimization MCA-25

PHASE -11

Assign actual costs to the variables in the


objective function and a zero cost to
every artificial variable that appears in
the optimum basis at zero level

Modify the simplex table (obtained at the


end of Phase- I) by removing the
artificial vector (s) not appearing in the
optimum basis

Now, apply Simple Simplex Method on


modified simplex table to obtain the final
solution.

PHASE-II

Fig. 9.8.2 Flowchart for Phase-II

9.9 Solved Examples for Two-Phase Simplex Method

Example 1. Solve the problem: Min. 𝑧 = 𝑥1 + 𝑥2 subject to

2 𝑥1 + 𝑥2 ≥ 4, 𝑥1 + 7𝑥2 ≥ 7, 𝑎𝑛𝑑 𝑥1 , 𝑥2 ≥ 0.

Solution. First convert the problem of minimization to maximization by writing the objective function
as :

Max. = − 𝑥1 − 𝑥2 or Max = − 𝑥1 − 𝑥2 , where = −z.


(−𝑧) 𝑧′ 𝑧′

DDE, GJUS&T, Hisar 222 |


Discrete Mathematics & Optimization MCA-25

Since all 𝑏𝑖 ′s (4 and 7) are positive , the ‘surplus variables’ 𝑥3 ≥ 0 and 𝑥4 ≥ 0 are introduced,
then constraints become:

2 𝑥1 + 𝑥2 − 𝑥3 =4

𝑥1 + 7𝑥2 −𝑥4 =7

But the basis matrix B would not be an identity matrix due to negative coefficients of 𝑥3 and 𝑥4.
Hence the starting basic feasible solution cannot be obtained.

On the other hand, if so-called ‘artificial variables’ 𝑎1 ≥ 0 and 𝑎2 ≥ 0 are introduced, the constraints
equations can be written as

2 𝑥1 + 𝑥2 − 𝑥3 +𝑎1 =4

𝑥1 + 7𝑥2 −𝑥4 +𝑎2 =7.

It should be noted that 𝑎1 <𝑥3 , 𝑎2 < 𝑥4 , otherwise the constraints of the problem will not hold.

Phase I. Construct the first table (Table 9.8.1) where 𝐴1 and 𝐴2 denote the artificial column-vectors
corresponding to 𝑎1 and 𝑎2 respectively.

Table 9.9.1
BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES
𝑎1 4 2 1 −1 0 1 0
𝑎2 7 1 7 0 −1 0 1
× ×

Now remove each artificial column vector 𝐴1 and 𝐴2 from the basis matrix. To remove vector 𝐴2 first,
select the vector either 𝐴1 or 𝐴2 , being careful to choose any one that will yield a non-negative revised
solution. Take the vector 𝑥2 to enter the basis matrix. It can be easily verified that if the vector 𝐴2 is
entered is place of 𝑥1 , the resulting solution will not be feasible. Thus transformed table (Table 9.8.2)
is obtained.

DDE, GJUS&T, Hisar 223 |


Discrete Mathematics & Optimization MCA-25

Table 9.9.2

BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES

𝑎1 3 13/7 0 −1 1/7 1 −1/7

𝑎2 1 1/7 1 0 − 1/7 0 1/7

This table gives the solution: 𝑥1 = 0, 𝑥2 = 1, 𝑥3 = 0, 𝑥4 = 0 ,𝑎1 = 3, 𝑎2 = 0. When the artificial


variable 𝑎2 becomes zero (non-basic), we forget about it and never consider the corresponding
vector 𝐴2 again for re-entry into the basis matrix.

Similarly, remove 𝐴1 from the basis matrix by introducing it in place of 𝑥4 by the same method. Thus
Table 9.8.3 is obtained.

Table 9.9.3

BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1
VARIABLES

𝑥4 21 13 0 −7 1 7

𝑥2 4 4 1 −1 0 1

This table give the solution: 𝑥1 = 0, 𝑥2 = 4, 𝑥3 = 0, 𝑥4 = 21, 𝑎1 = 0. Since the artificial variable
𝑎1 become zero (non-basic), so drop the corresponding column 𝐴1 from this table. Thus, the solution
( 𝑥1 = 0, 𝑥2 = 4, 𝑥3 = 0, 𝑥4 = 21) is the basic feasible solution and now usual simplex routine can be
started to obtained the required optimal solution.

DDE, GJUS&T, Hisar 224 |


Discrete Mathematics & Optimization MCA-25

Phase II. Now in order to test the starting solution for optimality, construct the starting simplex
Table 9.8.4

Table 9.9.4

𝑐𝑗 − 1 −1 0 0
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 MIN.
VARIABL RATIO
ES (𝑥𝐵 / 𝑥1 )
𝑥4 0 13 0 −7 21/13
𝑥2 21 1 4/2
−1 4 2 1 −1
0
z ′ = 𝐶B 𝑋𝐵 −1 0 1 ∆𝑗
= −4 0

Compute ∆1 = −1, ∆3 = 1.

Key element 13 indicated that 𝑥4 should be removed from the basis matrix. Thus, by usual
transformation method Table 9.8.5 is formed.

Table 9.9.5

𝑐𝑗 -1 −1 0 0
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 MIN. RATIO
VARIABLE COLUMN
S
𝑥1 −1 1 0 −7/13
𝑥2 21/13 1/13
−1 0 1 1/13
10/13 −2/13

DDE, GJUS&T, Hisar 225 |


Discrete Mathematics & Optimization MCA-25

z ′ = 31/13 0 0 6/13 ∆𝑗 ≥0
1/13

Also, verify that

7 1 6
∆𝑗 = 𝐶𝐵 + 𝑋3 − 𝐶3 = (−1, −1) (− , )=
13 13 13
1 1
∆𝑗 = 𝐶𝐵 + 𝑋4 − 𝐶4 = (−1, −1) ( , −2/13) = .
13 13

Since all ∆𝑗 ≥ 0, the required optimal solution is:

21 10 31
𝑥1 = , 𝑥2 = and min. z = (because z = z ′ ).
13 13 13

Simple Way for Two- Phase Simplex Method

Phase I: Table 9.9.6


BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES
𝑎1 4 2 1 −1 1
𝑎2 7 0 0
0
1 7 0 1
−1
𝑎1 3 13/7 0 −1 1 −
𝑥2 1 1/7 1/7
0
1/7 1 0 1/7
− 1/7
𝑥4 21 13 0 −7 7
𝑥2 4 1 ×
1

DDE, GJUS&T, Hisar 226 |


Discrete Mathematics & Optimization MCA-25

2 1 −1 ×
0

Thus, initial basic feasible solution is : 𝑥1 = 0, 𝑥2 = 4, 𝑥3 = 0, 𝑥4 = 21. Now start to improve this
solution Phase II by usual simplex method.

Note.

1. Remove the artificial vector 𝐴2 and insert it anywhere such that 𝑥𝐵 remains feasible (≥0).

2. As soon as 𝐴2 is removed from the basis by matrix transformation or otherwise, delete


𝐴2 forever .

3. Similar process is adopted to remove other artificial vectors one by one from the basis.

4. Purpose of introducing artificial vectors is only to provide an initial basic feasible solution to
start with simplex method in Phase II. So, as soon as the artificial variables become non-basic
(i.e. zero), delete artificial vectors to enter Phase II.

5. Then, start Phase II, which is exactly the same as original simplex method.

Phase II: Table 9.9.7


𝑐𝑗 -1− 1 0 0
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 MIN. RATIO
VARIABLES 𝑥𝐵 / 𝑥𝑘
𝑥4 0 2 13 0 −7 21/13
𝑥2 1 1 4/2
−1
4 2 1 −1
0
′ −1* 0
z = −4 1 ∆𝑗
0
𝑥1 −1 1 0 − 7/13
𝑥2 21/13 1/13
−1
10/13 0 1 1/10

DDE, GJUS&T, Hisar 227 |


Discrete Mathematics & Optimization MCA-25

2/13

z′ 0 0 6/13 ∆𝑗 ≥0
= −31/13 1/13

21 10
Thus, the desired solution is obtained as : 𝑥1 = 13 , 𝑥2 = 13 , max. z = 31/13.

Example 2. Use two-phase simplex method to solve the problem: Minimize 𝑧 = 𝑥1 − 2𝑥2 − 3𝑥3 ,
subject to the constraints:

−2𝑥1 + 𝑥2 + 3𝑥3 = 2, 2𝑥1 +3𝑥2 + 4𝑥3 = 1 and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0.

Solution. First convert the objective function into maximization form:

Max. z′ = − 𝑥1 − 2𝑥2 + 3𝑥3 , where z ′ = −z.

Introducing the artificial variables 𝑎1 ≥ 0 and 𝑎2 ≥ 0, the constraints of the given problem become,

−2𝑥1 + 𝑥2 + 3𝑥3 + 𝑎1 =2

2𝑥1 +3𝑥2 + 4𝑥3 + 𝑎2 = 1

𝑥1 , 𝑥2 , 𝑥3 , 𝑎1 , 𝑎2 ≥ 0.

Phase I. Auxiliary L.P. problem is : Max.z ′ ∗= 0𝑥1 + 0𝑥2 + 0𝑥3 − 1𝑎1 − 1𝑎2 subject to above given
constraints.

The following solution table is obtained for auxiliary problem.

Table 9.9.8

𝑐𝑗 0 0 0 −1−1
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝐴1 𝐴2 MIN. RATIO
VARIABLES 𝑥𝐵 / 𝑥𝑘
𝑎1 −1 −2 1 3 1 2/3
𝑎2 2 0 1/4
−1
1 2 3 4 0
1

DDE, GJUS&T, Hisar 228 |


Discrete Mathematics & Optimization MCA-25

z ′ ∗= 3 0 −4 −7* 0 ∆𝑗
0
𝑎1 −1 − 7/2 − 5/4 0 1
𝑥3 5/4 − 3/4
0
1/4 1/2 3/4 1 0
1/4
z ′ ∗= −5/4 7/4 5/4 0 0 ∆𝑗 ≥0
3/4

Since all ∆𝑗 ≥0, an optimum basic feasible solution to the auxiliary L.P.P. has been attained. But at the
same time max. z ′ ∗ is negative and the artificial variable 𝑎1 appears in the basic solution at a positve
level. Hence the original problem does not possess any feasible solution. Here there is no need to enter
Phase II.

Example 3. Use two-phase simplex method to solve the problem:


15
Minimize 𝑧 = 𝑥1 − 3𝑥2 , subject to the constraints:
2

3 𝑥1 − 𝑥2 − 𝑥3 ≥ 3, 𝑥1 − 𝑥2 + 𝑥3 ≥ 2, , and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0.
15
Solution. Converty the objective function into the maximization form: maximize. 𝑧′ = − 𝑥1 +
2

3𝑥2 .

Introduciing the surplus variables 𝑥4 ≥ 0 and 𝑥5 ≥ 0 , artificial variables 𝑎1 ≥ 0, 𝑎2 ≥ 0 the


constraints of the given problem become

3 𝑥1 − 𝑥2 − 𝑥3 − 𝑥4 + 𝑎1 =3

𝑥1 − 𝑥2 + 𝑥3 − 𝑥5 + 𝑎5 = 2

𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑎1 , 𝑎2 ≥ 0.

Phase I. Assigning a cost −1 to artificial varibales 𝑎1 and 𝑎2 and cost 0 to all other variables, the new
objective function for auxiliary probelem becomes:

𝑀𝑎𝑥. 𝑧 ′ ∗= 0 𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 − 1𝑎1 − 1𝑎2 , Subject to the above given constraints.

DDE, GJUS&T, Hisar 229 |


Discrete Mathematics & Optimization MCA-25

Now apply simplex method in usual manner, (see table 9.9.9).

Phase I: Table 9.9.9

𝑐𝑗 0 0 0 0 0−1 −1
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 𝐴1 𝐴2 MIN. RATIO
VARIABLE 𝑥𝐵 / 𝑥𝑘
S
𝑎1 −1 3 −1 −1 −1 1 0 3/3
𝑎2 3 0 0 2/1
−1 1
2 1 −1 1 0
−1
z ′ ∗= −5 −4* 2 0 1 0 ∆𝑗
1 0
𝑥1 0 1 1 − 1/3 − 1/3 − 1/3 1/3 0 ----
𝑎2 −1 0 1/3 1 ¾
1
0 − 2/3 4/ 3 1/3
−1
′ − 4/3 *
z ∗= −1 0 2/3 1/3 2/3 0 ∆𝑗
−1
𝑥1 0 5/4 1 − 1/2 0 − 1/4 ¼ ¼
𝑥3 0 −¼ ¼ ¾
3/4 0 − 1/2 1 1/4
− 3/4
z ′ ∗= 0 0 0 0 0 1 1 ∆𝑗 ≥0
0

Since all ∆𝑗 ≥0 and no artificial variable appears in the basis, an optimum solution to the auxiliary
problem has been atained.

Phase 2. In theis phase, now consider the actual costs associate with the original variables, the
objective function thus becomes: 𝑀𝑎𝑥. 𝑧 ′ = −15/2 𝑥1 + 3𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5

DDE, GJUS&T, Hisar 230 |


Discrete Mathematics & Optimization MCA-25

Now apply simplex method in the usual manner.

Phase II: Table 9.9.10

𝑐𝑗 − 15/2 3 0 0 0
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 MIN. RATIO
VARIABLE 𝑥𝐵 / 𝑥𝑘
S
𝑥1 −15/2 1 −1/2 0 −1/4−1/4
𝑥3 5/4
0 0 −1/2 1 1/4
3/4 −3/4
. z ′ = −75/8 0 3/4 0 15/8 ∆𝑗
15/8
Since all ∆𝑗 ≥ 0, an optimum basic feasibe solution has been attained.

5 3
Hence optimum solution is : 𝑥1 = , 𝑥2 = 0, 𝑥3 = , min z = 75/8.
4 4

Example 4. Max. 𝑧 = 𝑥1 + 2𝑥2 + 3𝑥3 − 𝑥4 , subject to the constraints:

𝑥1 + 2𝑥2 + 3𝑥3 = 15, 2𝑥1 + 𝑥2 + 5𝑥3 = 20, 𝑥1 + 2𝑥2 + 𝑥3 + 𝑥4 = 10, and 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0.

Solution. Introducing artificial variables 𝑎1 and 𝑎2 in the first and second constraint equations,
respectively, and the original variable 𝑥4 can be treated to work as an artificial variable for third
constraint equation to obtain:

𝑥1 + 2𝑥2 + 3𝑥3 + 𝑎1 = 15

2𝑥1 + 𝑥2 + 5𝑥3 + 𝑎2 = 20

𝑥1 + 2𝑥2 + 𝑥3 + 𝑥4 = 10

Phase 1: Table 9.9.11


BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES
𝑎1 15 1 2 3 0 1
𝑎2 20 0
𝑥4 10 2 1 5 0 0

DDE, GJUS&T, Hisar 231 |


Discrete Mathematics & Optimization MCA-25

1
1 2 1 1 0
0

By the same arguments as given in the previous examples of two-phase method insert 𝑥4 in place of 𝑥1 .
The transformed table (Table 9.9.12) is obtained by applying row transformation

𝑅1 𝑅1 − 𝑅3 , 𝑅2 𝑅2 − 2𝑅3 .

Table 9.9.12
BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES
𝑎1 5 0 0 2 −1 1
𝑎2 0 0
𝑥1 10 0 −3 3 −2 0
1
1 2 1 1 0
0

In spite of the fact that the artificial variable 𝑥4 has served its puropse, the coloumn 𝑥4 cannot be
deleted from Table 4.12 because 𝑥4 is the original variable also. Although the value of the artificial
variable 𝑎2 also becomes zero at this stage, the coloumn 𝐴2 cannot be deleted unless it is inserted at one
of the places 𝑥2 or 𝑥3 or 𝑥4 . Now it is observed that 𝐴2 can be inserted in place of 𝑥3 . Hence
1
transformation Table 9.9.13 is obtained by applying the row transformations:𝑅2 3 𝑅2 , 𝑅1 𝑅1 −
2 1
𝑅2 , 𝑅3 𝑅3 − 3 𝑅2 .
3

Table 9.9.13

BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1 𝐴2
VARIABLES

𝑎1 5 0 2 0 1/3 1
−2/3
𝑥3 0

10 0 −1 1 −2/3 0
𝑥1
1/3

DDE, GJUS&T, Hisar 232 |


Discrete Mathematics & Optimization MCA-25

1 3 0 5/3 0
−4/3

Now removing 𝐴1 and inserting it in the suitable position of 𝑥2 , the next transformed Table 9.8.14 is
obtained by row transformations:
1 1 3
𝑅1 2 𝑅1 , 𝑅2 𝑅2 + 2 𝑅1 , 𝑅3 𝑅3 − 2 𝑅1.

Table 9.9.14

BASIC 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 𝐴1
VARIABLES

𝑥2 5/2 0 1 0 1/6
1/2
𝑥3 5/2
0 0 1 −1/2
𝑥1 5/2
1/2

1 0 0 7/6
−3/2

5
Delete column 𝐴1 (𝑎1 = 0). The starting basic feasible solutin is obtianed:𝑥1 = 𝑥2 = 𝑥3 = 2 , 𝑥4 = 0.

Further, proceed to test this solution for optimality in Phase II. For this, compute

1 1 7
∆4 = 𝑐𝐵 𝑥4 − 𝑐4 = (2, 3, 1) ( , − , ) − 0 = 0.
6 2 6

Phase II: Table 9.9.15


BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑥3 𝑥4 MINRATIO
VARIABLES
𝑥2 2 0 1 0
𝑥3 5/2 1/6
𝑥1 3 0 0 1
5/2 −1/2
1 1 0 0

DDE, GJUS&T, Hisar 233 |


Discrete Mathematics & Optimization MCA-25

5/2 7/6
𝑧 = 𝑐𝐵 𝑥𝐵 0 0 0 ∆𝑗
= 15 0*
5
Since all ∆𝑗 ′s are zero, the solution: 𝑥1 = 𝑥2 = 𝑥3 = 2 , 𝑥4 = 0 , is optimal to give us z ∗= 15. Further,

being zero indicates that alternative optimal solutions are also possible.

Note. Here ∆𝑗 corresponding to non basic vector 𝑥4 also become zero. This indicates that alternative
optimum solutions are possible. However, the other optimal solutions can be obtained as: 𝑥1 = 0, 𝑥2 =
15 25
, 𝑥3 = , 𝑥4 = 0, max. z = 15.
7 7

Now, given the two alternative basic solutions;


5 15 25
(i) 𝑥1 = 𝑥2 = 𝑥3 = 2 , 𝑥4 = 0 (ii) 𝑥1 = 0, 𝑥2 = , 𝑥3 = , 𝑥4 = 0
7 7

An infinite number of non-basic solutions can be obtained and by realizing them any weighted average
of these two basic solutions is also an alternative optimum solution.

To verify this, third solution will be obtained as:


5/2+0
𝑥1 = = 5/4
2

5/2 +15/7
𝑥2 = = 65/28
2

5/2+25/7
𝑥3 = = 85/28
2

0+0
𝑥4 = =0
2

and max. z = 15

9.10 PROBLEM OF DEGENERACY

At the stage of improving the solution, during simplex procedure, minimum ratio 𝑥𝐵 /𝑥𝑘 (𝑥𝑘 > 0) is
determined in the last column of simplex table to find the key row (i.e.a row containing the key
element). But sometimes this ratio may not be unique, i.e., the key element (here the variable to leave

DDE, GJUS&T, Hisar 234 |


Discrete Mathematics & Optimization MCA-25

the basis) is not uniquely determined or at the very first iteration, the value of one or more basic
variables in the 𝑥𝐵 column become equal to zero, this causes the problem of degeneracy.

However, if the minimum ratio is zero for two or more basic variables, degeneracy may result the
simple routine to cycle indefinitely. That is, the solution which we have obtained in one iteration may
repeat again after few iterations and therefore no optimum solution may be obtained under such
circumstances. Fortunately, such phenomenon very rately occurs in practical problems.

Method to Resolve Degeneracy (Tie)

The following systematic procedure can be utilized to avoid cycling due to degeneracy in L.P.
problems.

Step 1. First pick up the rows for which the min. non-negative ratio is same. To be definite,
suppose such rows are first, third, etc., for example.

Step 2. Now rearrange the columns of the usual simplex table so that the column forming the
original unit matrix come first in proper order.

Step 3. Then find the minimum of the ratio:

𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑓𝑖𝑟𝑠𝑡 𝑐𝑜𝑙𝑢𝑚𝑛 𝑜𝑓 𝑢𝑛𝑖𝑡 𝑚𝑎𝑡𝑟𝑖𝑥


[ ],
𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑒𝑠 𝑜𝑓 𝑘𝑒𝑦 𝑐𝑜𝑙𝑢𝑚𝑛

Only if the rows for which min. ratio was not unique. That is, for the rows first, third, etc. as
picked up in step1 (key column is the one for which ∆𝑗 is minimum.)

(i) If this minimum is attained for third row (say), then this row will determine the
key element by intersecting the key column.

(ii) If this minimum is also not unique, then go to next step.

Step 4. Now compute the minimum of the ratio:

𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑠𝑒𝑐𝑜𝑛𝑑 𝑐𝑜𝑙𝑢𝑚𝑛 𝑜𝑓 𝑢𝑛𝑖𝑡 𝑚𝑎𝑡𝑟𝑖𝑥


[ ],
𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑒𝑠 𝑜𝑓 𝑘𝑒𝑦 𝑐𝑜𝑙𝑢𝑚𝑛

Only for the rows for which min. ratio was not unique in Step 3.

DDE, GJUS&T, Hisar 235 |


Discrete Mathematics & Optimization MCA-25

(i) If this min. ratio in unique for the first row (say), then this row will determine the key
element by intersecting the key column.

(ii) If this minimum is still not unique then go to next step.

Step 5. Next compute the minimum of the ratio:

𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑡ℎ𝑖𝑟𝑑 𝑐𝑜𝑙𝑢𝑚𝑛 𝑜𝑓 𝑢𝑛𝑖𝑡 𝑚𝑎𝑡𝑟𝑖𝑥


[ ],
𝑐𝑜𝑟𝑟𝑒𝑠𝑝𝑜𝑛𝑑𝑖𝑛𝑔 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑒𝑠 𝑜𝑓 𝑘𝑒𝑦 𝑐𝑜𝑙𝑢𝑚𝑛

Onlyfor the rows for which min. ratio was not unique in Step 4.

(i) If this min. ratio is unique for the third row (say), then this row will determine the key
element by intersecting the key column.

(ii) If this min. is still not unique, then go on repearting the above outlined procedure till the
unique min. ratio is obtianed to resolve the degeneracy. After the resolution of this tie,
simplex method is applied to obtain the optimum solution. Following example will
make the procedure clear.

Example. Maximize 𝑧 = 3𝑥1 + 9𝑥2 , subject to the constraints: 𝑥1 + 4𝑥2 ≤ 8, 𝑥1 + 2𝑥2 ≤


4, and 𝑥1 , 𝑥2 ≥ 0.

Solution. Introducing the slack variables 𝑠1 ≥ 0and 𝑠2 ≥ 0, the problem becomes:

Max. 𝑧 = 3𝑥1 + 9𝑥2 + 0𝑠1 + 0𝑠2 Subject to the constraints:

𝑥1 + 4𝑥2 + 𝑠1 =8

𝑥1 + 2𝑥2 + 𝑠2 = 4

𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0.

Table 9.10.1

𝑐𝑗 3 9 0 0
BASIC 𝑐𝐵 𝑥𝐵 𝑥1 𝑥2 𝑠1 𝑠2 MIN. RATIO
VARIABLE (𝑥𝐵 / 𝑥𝑘 )
S

DDE, GJUS&T, Hisar 236 |


Discrete Mathematics & Optimization MCA-25

𝑠1 0 8 1 4 1 8
=2
𝑠2 0 0 {44 }Tie
4 = 2
2
1 2 0
1
z=0 −3 − 9 0 ∆𝑗
0
Since min. ration 2 in the last column of above table is not unique, both the slack variables 𝑠1 and 𝑠2
may leave the basis. This is an indication for the existence of degeneracy in the given L.P. problem. So
we apply the above outlined procedure to resolve degeneracy (tie).

First arrange the column 𝑥1 , 𝑥2 , 𝑠1 and𝑠2 in such a way that the initial identity (basis) matrix appears
first. Thus the initial simplex table becomes:

Table 9.10.2

𝑐𝑗 0 0 3 9

BASIC 𝑐𝐵 𝑥𝐵 𝑠1 𝑠2 𝑥1 𝑥2 MIN. RATIO


VARIABLE (𝑠1 / 𝑥2 )
S

𝑠1 0 8 1 0 1 ¼
4
𝑠2 0 0/2
4

0 1 1
2

z=0 0 0 −3 ∆𝑗 ≥0
− 9

Now using the step 3 of the procedure for resolving degeneracy, we find

𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑓𝑖𝑟𝑠𝑡 𝑐𝑜𝑙𝑢𝑚𝑛 (𝑠1 ) 1 0


min[ ]= min [4 , 2]=0
𝑐𝑜𝑟𝑟𝑒𝑠. 𝑒𝑙𝑒𝑚𝑒𝑛𝑡𝑠 𝑜𝑓 𝑘𝑒𝑦 𝑐𝑜𝑙𝑢𝑚𝑛 (𝑥2 )

DDE, GJUS&T, Hisar 237 |


Discrete Mathematics & Optimization MCA-25

which occurs for the second row. Hence 𝑠2 must leave the basis, and the key element is 2 as shown
above.

First Iteration. By usual matrix transformation introduce 𝑥2 and leave 𝑠2 .

Table 9.10.l3

𝑐𝑗 0 0 3 9
BASIC 𝑐𝐵 𝑥𝐵 𝑠1 𝑠2 𝑥1 𝑥2 MIN. RATIO
VARIABLE
S
𝑠1 0 0 1 −2 −1
𝑥2 9 0
2
0 ½ ½
1
z = 18 0 9/2 3/2 ∆𝑗 ≥0
0

Since all ∆𝑗 ≥ 0, an optimum solution has been reached. Hence the optimum basic feasible solution is:
𝑥1 = 0, 𝑥2 = 2, max. z = 18.

9.11 CHECK YOUR PROGRESS


1 Find Solution using Simplex Method.

Maximize Z=3X1+5X2+4X3

Subject to the constraints

2X1+3X2 ≤ 8

2X2+5X3 ≤ 10

3X1+2X2 +4X3≤ 15

And X1, X2, X3 ≥ 0

DDE, GJUS&T, Hisar 238 |


Discrete Mathematics & Optimization MCA-25

2 Find Solution using Simplex Method.

Maximize Z=4X1+3X2

Subject to the constraints

2X1+X2 ≤ 1000

X1+X2 ≤ 800

X1≤ 400

X2≤ 700

And X1, X2 ≥ 0

3 Find Solution using Simplex Method.

Maximize Z=6X1+4X2

Subject to the constraints

2X1+3X2 ≤ 30

3X1+2X2 ≤ 24

X1+X2 ≥ 3

And X1, X2 ≥ 0

4. Find Solution using Two-Phase Simplex Method.

Minimize Z=X1+X2

Subject to the constraints

2X1+4X2 ≥ 4

X1+7X2 ≥ 7

And X1, X2 ≥ 0

5. Find Solution using Two-Phase Simplex Method.

Minimize Z=3X1+5X2

DDE, GJUS&T, Hisar 239 |


Discrete Mathematics & Optimization MCA-25

Subject to the constraints

2X1+8X2 ≥ 40

3X1+4X2 ≥ 50

And X1, X2 ≥ 0

6. Find Solution using Two-Phase Simplex Method.

Minimize Z=5X1+8X2

Subject to the constraints

3X1+2X2 ≥ 3

X1+4X2 ≥ 4

X1+X2 ≤ 5

And X1, X2 ≥ 0

9.12 SUMMARY
Simplex Method:-The LPPs involving more than two decision variables cannot be solved using
graphical method because solving the problem using graphical method involves drawing graph in
the plane and a graph in two dimensional plane can be drawn for the equations/ inequa lities
having only upto two variables. The LPPs having more than two decision variables can be solved
using Simplex Method. The Simplex algorithm is an iterative (step-by-step) procedure for solving LP
problems. It consists of:-

(i) having a trail basic feasible solution to constraint-equations,

(ii) testing whether it is an optimal solution,

(iii) improving the first trial solution by a set of rules, and repeating the process till an optimal
solution is obtained.

DDE, GJUS&T, Hisar 240 |


Discrete Mathematics & Optimization MCA-25

Simplex Method is also called Simple Simplex Method. Like Graphical Method, Simplex Method
can also be used for solving LPPs having two decision variables but it can solve only the LPPs
having all inequalities of type ( ≤ ) and RHS of constraints all positive.

Two Phase Simplex Method:-The LPPs, in which constraints have the sign ‘ =’ or ‘≥’ while
keeping the right hand side constants positive, cannot be solved using Simple Simplex Method. To
solve such problems, a variant of Simplex Method called the Two- Phase Method or the Artificial
Method is used. Like Simple Simplex Method, Two- Phase Simplex Method can be used to solve LPPs
having any number of decision variables. First of all objective function is converted into
maximization form, if any. The right hand side of the constraints should be positive. If the rig ht
hand side of the constraint is not positive, it can be converted to positive value by multiplying
both sides by −1. The sign ‘≤’ becomes ‘≥’ and the sign ‘≥’ becomes ‘≤’ . The sign ‘ = ’ does not
change in this process. Slack, surplus and artificial variables are used accordingly. Now Two- Phase
Simplex method can be applied on this standard form. In Phase-I, an auxiliary LPP is constructed by
assigning a cost −1 to artificial variables and zero cost to every other variables in the objective
function. Now this auxiliary LPP is solved using Simple Simplex Method until one of the three
possibilities arise- i) if Max z* < 0 and at least one artificial vector appear in the optimum basis at a
positive level. In this case given problem does not possess any feasible solution; ii) if Max z*=0 and
at least one artificial vector appears in the optimum basis at zero level. In this case proceed to Phase-II;
and also iii) if Max z*=0 and no artificial vector appears in the optimum basis. In this case also proceed
to Phase-II.

In Phase- II, we assign the actual costs to the variables in the objective function and a zero cost to every
artificial variable that appears in the basis at the zero level. This new objective function is now
maximized by simplex method subject to the given constraints. That is, simplex method is applied to the
modified simplex table obtained at the end of Phase-I, until an optimum basic feasible solution (if
exists) has been attained. The artificial variables which are non-basic at the end of Phase-I are removed.

DDE, GJUS&T, Hisar 241 |


Discrete Mathematics & Optimization MCA-25

Simplex Method:-The S IM P LE X M E TH O D or S IM P LE X A LG OR ITH M is used for calculating the

9.13 KEYWORDS
optimal solution to the linear programming problem. In other words, the S IMP LE X A LGOR I TH M is an
iterative procedure carried systematically to determine the optimal solution from the set of feasible
solutions.A standard method of maximizing a linear function of several variables under several
constraints on other linear functions.

Two-Phase Simplex Method: - the two-phase simplex method proceeds as follows:

1. Bring the constraints into equality form. For each constraint in which the slack variable and the right-
hand side have opposite signs, or in which there is no slack variable, add a new artificial variable that
has the same sign as the right-hand side.

2. Phase I: minimize the sum of the artificial variables, starting from the BFS where the absolute value
of the artificial variable for each constraint, or of the slack variable in case there is no artificial variable,
is equal to that of the right-hand side.

3. If some artificial variable has a positive value in the optimal solution, the original problem is
infeasible; stop.

4. Phase II: solve the original problem, starting from the BFS found in phase I.

9.14 SELF ASSESSMENT TEST


Solve the following problems using Simplex Method.

Q 1. Max. 𝑧 = 2𝑥1 + 𝑥2 , subject to

4𝑥1 + 3𝑥2 ≤ 12,

4𝑥1 + 𝑥2 ≤ 8,

4𝑥1 − 𝑥2 ≤ 8

and 𝑥1 , 𝑥2 ≥ 0.

DDE, GJUS&T, Hisar 242 |


Discrete Mathematics & Optimization MCA-25

Q 2. Max. 𝑧 = 5𝑥1 + 3𝑥2 , subject to

3𝑥1 + 5𝑥2 ≤ 15,

5𝑥1 + 2𝑥2 ≤ 10,

and 𝑥1 , 𝑥2 ≥ 0.

Q 3. Max. 𝑧 = 7𝑥1 + 5𝑥2 , subject to

−𝑥1 − 2𝑥2 ≥ −6,

4𝑥1 + 3𝑥2 ≤ 12,

and 𝑥1 , 𝑥2 ≥ 0.

Q 4. Max. 𝑧 = 5𝑥1 + 7𝑥2 , subject to

𝑥1 + 𝑥2 ≤ 4,

3𝑥1 − 8𝑥2 ≤ 24,

10𝑥1 + 7𝑥2 ≤ 35

and 𝑥1 , 𝑥2 ≥ 0.

Q 5. Max. 𝑧 = 3𝑥1 + 2𝑥2 , subject to

2𝑥1 + 𝑥2 ≤ 40,

𝑥1 + 𝑥2 ≤ 24,

2𝑥1 + 3𝑥2 ≤ 60

and 𝑥1 , 𝑥2 ≥ 0.

Q 6. Max. 𝑧 = 6𝑥1 + 4𝑥2 subject to

2𝑥1 + 3𝑥2 ≤ 30,

3𝑥1 + 2𝑥2 ≤ 24,

𝑥1 + 𝑥2 ≥ 3

and 𝑥1 , 𝑥2 ≥ 0.

DDE, GJUS&T, Hisar 243 |


Discrete Mathematics & Optimization MCA-25

Q 7. Max. 𝑧 = 𝑥1 + 2𝑥2 + 3𝑥3 − 𝑥4 , subject to the constraints:

𝑥1 + 2𝑥2 + 3𝑥3 = 15,

2𝑥1 + 𝑥2 + 5𝑥3 = 20,

𝑥1 + 2𝑥2 + 𝑥3 + 𝑥4 = 10,

and 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0.

Q 8. Max. 𝑧 = 2𝑥1 + 𝑥2 , subject to:

𝑥1 − 𝑥2 ≤ 10,

2𝑥1 − 𝑥2 ≤ 40

and 𝑥1 ≥ 0, 𝑥2 ≥ 0.

Q 9. Maximize 𝑧 = 107𝑥1 + 𝑥2 + 𝑥3 , subject to:

14𝑥1 + 𝑥2 − 6𝑥3 + 3𝑥4 = 7,

1
16𝑥1 + 𝑥2 − 6𝑥3 ≤ 5,
2

3𝑥1 − 𝑥2 − 𝑥3 ≤ 0,

and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0.

Q 10. Max. 𝑧 = 6𝑥1 − 2𝑥2 , subject to:

2𝑥1 − 𝑥2 ≤ 2,

𝑥1 ≤ 4,

and 𝑥1 , 𝑥2 ≥ 0.

Q 11. Max. 𝑧 = 3𝑥1 + 2𝑥2 , subject to:

2𝑥1 + 𝑥2 ≤ 2,

3𝑥1 + 4𝑥2 ≥ 12,

and 𝑥1 , 𝑥2 ≥ 0.

DDE, GJUS&T, Hisar 244 |


Discrete Mathematics & Optimization MCA-25

Q 12. Max. 𝑧 = 5𝑥1 − 2𝑥2 + 3𝑥3 , subject to

2𝑥1 + 2𝑥2 −𝑥3 ≥ 2,

3𝑥1 − 4𝑥2 ≤ 3,

𝑥2 + 3𝑥3 ≤ 5

and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0.

9.15 ANSWER TO CHECK YOUR PROGRESS

1. X1=2.1707, X2=1.2195, X3=1.5122

Max Z=18.6585

2. X1=200, X2=600

Max Z=2600

3. X1=8, X2=0

Max Z=48

4. X1=1.6154, X2=0.7692

Min Z=2.3846

5. X1=15, X2=1.25

Min Z=51.25

6. X1=0, X2=5

9.16 REFERENCES/SUGGESTED READINGS


Min Z=40

9. Operations Research by S.D. Sharma.

DDE, GJUS&T, Hisar 245 |


Discrete Mathematics & Optimization MCA-25

10. Operations Research- An Introduction (Eighth Edition); Hamdy A. Taha; Pearson Education,
Prentice Hall, Delhi, (2008).
11. Operations Research; A.M. Natarajan, P. Salasubramani, A. Tamilarasi; Pearson Education
(Singapore) Pvt. Ltd., Delhi, (2005).
12. Operations Research (Second Edition), Schaum’s Outlines; Richard Bronson,
GovindasamiNaadimuthu; Tata McGraw Hill Education Private Limited; New Delhi (2010)

DDE, GJUS&T, Hisar 246 |


Discrete Mathematics & Optimization MCA-25

NOTES

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

DDE, GJUS&T, Hisar 247 |


Discrete Mathematics & Optimization MCA-25

NOTES

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

DDE, GJUS&T, Hisar 248 |


Discrete Mathematics & Optimization MCA-25

NOTES

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

DDE, GJUS&T, Hisar 249 |


Discrete Mathematics & Optimization MCA-25

NOTES

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________

DDE, GJUS&T, Hisar 250 |

You might also like