Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

1

Keep Learning with Us VBSPU 4th sem. OT Notes

Semester-4

BCA 403

OT
(Optimization Techniques)

(According to Purvanchal University Syllabus)

“Full Line By Line Notes”

Created By : D.P.Mishra

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
2
Keep Learning with Us VBSPU 4th sem. OT Notes

Unit – 1
Linear Programming
Definition of LPP–
 A linear programming problem consists of a linear function to be
maximized or minimized subject to certain constraints in the form
of linear equations or inequalities.
 Linear Programming Problems (LPP) provide the method of finding such an
optimized function along with/or the values which would optimize the
required function accordingly. It is one of the most important Operations
Research tools.

It consists for four basic components:

 Decision variables represent quantities to be determined


 Objective function represents how the decision variables affect the cost or
value to be optimized (minimized or maximized)
 Constraints represent how the decision variables use resources, which are
available in limited quantities
 Data quantifies the relationships represented in the objective function and the
constraints
All linear programming problems must have following five characteristics:
(a) Objective function:There must be clearly defined objective which can be
stated in quantitative way. In business problems the objective is generally profit
maximization or cost minimization.
(b) Constraints:All constraints (limitations) regarding resources should be fully
spelt out in mathematical form.
(c) Non-negativity:The value of variables must be zero or positive and not
negative. For example, in the case of production, the manager can decide about
any particular product number in positive or minimum zero, not the negative.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
3
Keep Learning with Us VBSPU 4th sem. OT Notes

(d) Linearity:The relationships between variables must be linear. Linear means


proportional relationship between two ‘or more variable, i.e., the degree of
variables should be maximum.
(e) Finiteness:The number of inputs and outputs need one to be finite. In the
case of infinite factors, to compute feasible solution is not possible.

Graphical solution of two variable LPP–


LPP

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
4
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
5
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
6
Keep Learning with Us VBSPU 4th sem. OT Notes

General LPP problem–


problem

Canonical and standard form of LPP–

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
7
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
8
Keep Learning with Us VBSPU 4th sem. OT Notes

Simplex methods and artificial variable–


 Simplex method is an iterative procedure for solving LPP in a finite number
of steps.
 This method provides an algorithm which consists of moving from one
vertex of the region of feasible solution to another in such a manner that
the value of the objective function at the succeeding vertex is less or more
as the case may be than at the previous vertex.
 This procedure is repeated and since the number of vertices is finite, the
method leads to an optimal vertex in a finite number of steps or indicates
the existence of unbounded solution.

Artificial Variable :
 In order to use the simplex method on problems with mixed constraints, we
turn to a device called an artificial variable.
 This variable has no physical meaning in the original problem and is
introduced solely for the purpose of obtaining a basic feasible solution so
that we can apply the simplex method.
 An artificial variable is a variable introduced into each equation that has a
surplus variable. To ensure that we 7 q p consider only basic feasible
solutions, an artificial variable is required to satisfy the nonnegative
constraint.

Sensitivity analysis–
 Sensitivity Analysis deals with finding out the amount by which we can
change the input data for the output of our linear programming model to
remain comparatively unchanged.
 This helps us in determining the sensitivity of the data we supply for the
problem. If a small change in the input (for example in the change in the
availability of some raw material) produces a large change in the optimal
solution for some model, and a corresponding small change in the input for
some other model doesn't affect its optimal solution as much, we can
“Failure is the opportunity to begin again more intelligently.”
For More Information Visit Our Blog: www.dpmishra.com
9
Keep Learning with Us VBSPU 4th sem. OT Notes

conclude that the second problem is more robust then the first. The second
model is less sensitive to the changes in the input data.

Problem of degeneracy & Concept of duality–


Every LPP (called the primal) is associated with another LPP (called its dual).

Either of the problem can be considered as primal with the other as dual. The
importance of the duality concept is due to two main reasons:

(i) If the primal contains a large number of constraints and a smaller


number of variables, the labour of computation can be considerably
reduced by converting it in to the dual problem and then solving it.
(ii) (ii) The interpretation of the dual variables from the cost or economic
point of view, proves extremely useful in making future decisions in the
activities being programmed.

Formulation of Dual Problem


For formulating a dual problem, first we bring the problem in the canonical form.
The following changes are used in formulating the dual problem.

(1) Change the objective function of maximization in the primal into that of
minimization in the dual and vice versa.

(2) The number of variables in the primal will be the number of constraints in the
dual and vice versa.

(3) The cost coefficients C1, C2 ... Cn in the objective function of the primal will
be the RHS constant of the constraints in the dual and vice versa.

(4) In forming the constraints for the dual, we consider the transpose of the body
matrix of the primal problem.

(5) The variables in both problems are non-negative.

(6) If the variable in the primal is unrestricted in sign, then the corresponding
constraint in the dual will be an equation and vice versa.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
10
Keep Learning with Us VBSPU 4th sem. OT Notes

Unit – 2
Transportation problems
Introduction to transportation model–
model
 Transportation problems are one of the subclasses of LPPs in which the
objective is to transport various quantities of a single homogenous
commodity that are initially stored at various origins, to different
destinations in such a way that the transportation cost is minimum.

Matrix form of TP–


TP

Application of TP model
model–
 Application of Transportation Problem:
Problem
o Minimize shipping costs
o Determine low cost location

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
11
Keep Learning with Us VBSPU 4th sem. OT Notes

o Find minimum cost production schedule


o Military distribution system

Assignment problems–
problems

Mathematical Formulation–
Formulation

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
12
Keep Learning with Us VBSPU 4th sem. OT Notes

Finding IBFS–
An initial basic feasible solution to
a transportation problem can be found by any one of the three

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
13
Keep Learning with Us VBSPU 4th sem. OT Notes

following methods:
(i) North west corner rule (NWC)
(ii) Least cost method (LCM)
(iii) Vogel's approximation method (VAM)

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
14
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
15
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
16
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
17
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
18
Keep Learning with Us VBSPU 4th sem. OT Notes

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
19
Keep Learning with Us VBSPU 4th sem. OT Notes

Degeneracy–
non negative independent allocations is less than m]n[1,
In a TP, if the number of non-negative
where m is the number of origins (rows) and n is the number of destinations
(columns) there exists a degeneracy. This may occur either at the initial stage or
at the subsequentent iteration.

To resolve this degeneracy, we adopt the following steps.

(1) Among the empty cell, we choose an empty cell having the least cost which is
of an independent position. If this cell is more than one, choose any one
arbitrarily.

ell as chosen in step (1) we allocate a small positive quantity ∈> 0. The
(2) To the cell
cells containing ∈ are treated like other occupied cells and degeneracy is removed
by adding one (more) accordingly. For this modified solution, we adopt the steps
involved in MODI method
ethod till an optimum solution is obtained.

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
20
Keep Learning with Us VBSPU 4th sem. OT Notes

Unbalanced transportation problem–


problem

“Failure is the opportunity to begin again more intelligently.”


.com
For More Information Visit Our Blog: www.dpmishra.com
21
Keep Learning with Us VBSPU 4th sem. OT Notes

Unit – 3
Sequencing models & Related problems
Sequencing problem–
 When a number of jobs are given to be done and they require processing
on two or more machines, the main concern of a manager is to find the
order or sequence to perform these jobs. We shall consider the sequencing
problems in respect of the jobs to be performed in a factory and study the
method of their solution. Such sequencing problems can be broadly divided
in two groups. In the first one, there are n jobs to be done, each of which
requires processing on some or all of the k different machines.

Processing n jobs through two machine–


Example
There are nine jobs, each of which must go through two machines P and Q in the
order PQ, the processing times (in hours) are given below:

Job(s)
Machine
A B C D E F G H I
P 2 5 4 9 6 8 7 5 4
Q 6 8 7 4 3 9 3 8 11

Find the sequence that minimizes the total elapsed time T. Also calculate the total
idle time for the machines in this period.
Solution
The minimum processing time on two machines is 2 which correspond to task A
on machine P. This shows that task A will be preceding first. After assigning task A,
we are left with 8 tasks on two machines
Machine B C D E F G H I
P 5 4 9 6 8 7 5 4
Q 8 7 4 3 9 3 8 11
“Failure is the opportunity to begin again more intelligently.”
For More Information Visit Our Blog: www.dpmishra.com
22
Keep Learning with Us VBSPU 4th sem. OT Notes

Minimum processing time in this reduced problem is 3 which correspond to jobs E


and G (both on machine Q). Now since the corresponding processing time of task
E on machine P is less than the corresponding processing time of task G on
machine Q therefore task E will be processed in the last and task G next to last.
The situation will be dealt as

A G E

The problem now reduces to following 6 tasks on two machines with processing
time as follows:
Machine B C D F H I
P 5 4 9 8 5 4
Q 8 7 4 9 8 11

Here since the minimum processing time is 4 which occurs for tasks C and I on
machine P and task D on machine Q. Therefore, the task C which has less
processing time on P will be processed first and then task I and task D will be
placed at the last i.e., 7th sequence cell.
The sequence will appear as follows:
A C I D E G

The problem now reduces to the following 3 tasks on two machines

Machine B F H
P 5 8 5
Q 8 9 8

In this reduced table the minimum processing time is 5 which occurs for tasks B
and H both on machine P. Now since the corresponding time of tasks B and H on
machine Q are same i.e. 8. Tasks B or H may be placed arbitrarily in the
4th and 5th sequence cells. The remaining task F can then be placed in the
6th sequence cell. Thus the optimal sequences are represented as

A I C B H F D E G

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
23
Keep Learning with Us VBSPU 4th sem. OT Notes

or
A 1 C H B F D E G
Further, it is also possible to calculate the minimum elapsed time corresponding
to the optimal sequencing A → I → C → B → H → F → D → E → G.
Job Machine A Machine B
Sequence
Time In Time Out Time In Time Out
A 0 2 2 8
I 2 6 8 19
C 6 10 19 26
B 10 15 26 34
H 15 20 34 42
F 20 28 42 51
D 28 37 51 55
E 37 43 55 58
G 43 50 58 61

Hence the total elapsed time for this proposed sequence staring from job A to
completion of job G is 61 hours .During this time machine P remains idle for 11
hours (from 50 hours to 61 hours)and the machine Q remains idle for 2 hours only
(from 0 hour to 2 hour ).
Processing n jobs through three machine–
Example
There are five jobs (namely 1,2,3,4 and 5), each of which must go through
machines A, B and C in the order ABC. Processing Time (in hours) are given
below:
Jobs 1 2 3 4 5
Machine A 5 7 6 9 5
Machine B 2 1 4 5 3
Machine C 3 7 5 6 7

Find the sequence that minimum the total elapsed time required to complete the
jobs.
Solution

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
24
Keep Learning with Us VBSPU 4th sem. OT Notes

Here Min Ai = 5; Bi = 5 and Ci =3 since the condition of Min. Ai ≥ Max. Bi is


satisfied the given problem can be converted into five jobs and two machines
problem.

Jobs
1 7 5
2 8 8
3 10 9
4 14 11
5 8 10

The Optimal Sequence will be


2 5 4 3 1

Total elapsed Time will be


Machine A Machine B Machine C
Jobs In Out In Out In Out
2 0 7 7 8 8 15
5 7 12 12 15 15 22
4 12 21 21 26 26 32
3 21 27 27 31 32 37
1 27 32 32 34 37 40
Min. total elapsed time is 40 hours.
Idle time for Machine A is 8 hrs. (32-40)
Idle time for Machine B is 25 hours (0-7, 8-12, 15-21, 26-27, 31-32 and 34-40)
Idle time for Machine C is 12 hours (0-8, 22-26.)
Processing n jobs through m machine–
Find an optimal sequence for the following sequencing problem of four jobs and
five machines when passing is not allowed, of which processing time (in hours) is
given below:
Job Machine
A B C D E

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
25
Keep Learning with Us VBSPU 4th sem. OT Notes

1 7 5 2 3 9

2 6 6 4 5 10
3 5 4 5 6 8
4 8 3 3 2 6

Also find the total elapsed time.


Solution
Here Min. Ai = 5, Min. Ei = 6
Max. (Bi, Ci, Di) = 6, 5, 6�respectively
Since Min. Ei = Max. (Bi, Di) and Min. Ai = Max. Ci satisfied therefore the problem
can be converted into 4 jobs and 2 fictitious machines G and H as follows:
Fictitious Machine
Job
1 17 19
2 21 25
3 20 23
4 16 14

The above sequence will be:


1 3 2 4
Total Elapsed Time Corresponding to Optimal Sequence can be obtained as
follows:
Machine A Machine Machine C Machine Machine E
B D
Job In Out In Out In Out In Out In Out
1 0 7 7 12 12 14 14 17 17 26
3 7 12 12 16 16 21 21 27 27 35
2 12 18 18 24 24 28 28 33 35 45
4 18 26 26 29 29 32 33 35 45 51

Thus the minimum elapsed time is 51 hours.


Idle time for machine A = 25 hours(26-51)
Idle time for machine B = 33 hours(0-7,16-18,24-26,29-51)
Idle time for machine C = 37 hours(0-12,14-16,21-24,28-29,32-51)

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
26
Keep Learning with Us VBSPU 4th sem. OT Notes

Idle time for machine D = 35 hours (0-14,17-21,27-28,35-51)


Idle time for machine E = 18 hours (0-17,26-27)
Traveling salesman problem–
 The Traveling Salesman Problem (TSP) is a problem in combinatorial
optimization studied in operations research and theoretical computer
science. Given a list of cities and their pair wise distances, the task is to find
a shortest possible tour that visits each city exactly once.
 The TSP has several applications even in its purest formulation, such as
planning, logistics, and the manufacture of microchips.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
27
Keep Learning with Us VBSPU 4th sem. OT Notes

Unit – 4
PERT & CPM
PERT–
 PERT is an acronym for Program (Project) Evaluation and Review
Technique, in which planning, scheduling, organizing, coordinating
and controlling uncertain activities take place. The technique studies and
represents the tasks undertaken to complete a project, to identify the
least time for completing a task and the minimum time required to
complete the whole project. It was developed in the late 1950s. It is aimed
to reduce the time and cost of the project.

CPM–
 Developed in the late 1950s, Critical Path Method or CPM is an algorithm
used for planning, scheduling, coordination and control of activities in
a project. Here, it is assumed that the activity duration is fixed and certain.
CPM is used to compute the earliest and latest possible start time for
each activity.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
28
Keep Learning with Us VBSPU 4th sem. OT Notes

Comparison Chart

BASIS FOR
PERT CPM
COMPARISON

Meaning PERT is a project CPM is a statistical technique


management technique, of project management that
used to manage uncertain manages well defined
activities of a project. activities of a project.

What is it? A technique of planning A method to control cost and


and control of time. time.

Orientation Event-oriented Activity-oriented

Evolution Evolved as Research & Evolved as Construction


Development project project

Model Probabilistic Model Deterministic Model

Focuses on Time Time-cost trade-off

Estimates Three time estimates One time estimate

Appropriate for High precision time Reasonable time estimate


estimate

Management of Unpredictable Activities Predictable activities

Nature of jobs Non-repetitive nature Repetitive nature

Critical and Non- No differentiation Differentiated


critical activities

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
29
Keep Learning with Us VBSPU 4th sem. OT Notes

BASIS FOR
PERT CPM
COMPARISON

Suitable for Research and Development Non-research projects like


Project civil construction, ship
building etc.

Crashing concept Not Applicable Applicable

Network and basic components–


PERT / CPM networks contain two major components
i. Activities, and
ii. Events
Activity: An activity represents an action and consumption of resources (time,
money, energy) required to complete a portion of a project. Activity is
represented by an arrow.
An Activity

Event: An event (or node) will always occur at the beginning and end of an
activity. The event has no resources and is represented by a circle. The ith event
and jth event are the tail event and head event respectively.
An Event

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
30
Keep Learning with Us VBSPU 4th sem. OT Notes

Unit – 5
Dynamic Programming
Bellman’s principal of optimality of Dynamic
Programming–
Bellman’s principle of optimality: An optimal policy (set of decisions) has the
property that whatever the initial state and decisions are, the remaining decisions
must constitute and optimal policy with regard to the state resulting from the first
decision.
Mathematically, this can be written as:
fN(x)=max.[r(dn)+fN−1T(x,dn)]dn∈xfN(x)=max.[r(dn)+fN−1T(x,dn)]dn∈x

where fN(x)=the optimal return from an N-stage process when initial state is x

r(dn)=immediate return due to decisiondn

T(x,dn)=the transfer function which gives the resulting state

{x}=set of admissible decisions

This equation is also known as a dynamic programming equation. It represents a


necessary condition for optimality associated with the mathematical optimization
method known as dynamic programming. It writes the value of a decision
problem at a certain point in time in terms of the payoff from some initial choices
and the value of the remaining decision problem that results from those initial
choices. This breaks a dynamic optimization problem into simpler subproblems.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
31
Keep Learning with Us VBSPU 4th sem. OT Notes

Multistage decision problem & Its solution by


Dynamic Programming–
 The dynamic programming approach for solving multistage decision-making
problems is presented.
 A general formulation is given followed by models of deterministic,
stochastic, and adaptive versions of a particular multistage decision-making
problem.
 The dynamic programming approach for solving multistage decision-making
problems is presented. A general formulation is given followed by models
of deterministic, stochastic, and adaptive versions of a particular multistage
decision-making problem.
 Dynamic programming is a useful mathematical technique for making a
sequence of interrelated decisions. It provides a systematic procedure for
determining the optimal combination of decisions. In contrast to linear
programming, there does not exist a standard mathematical formulation of
“the” dynamic programming problem.

Simple Difference between DPP & LPP –


 Dynamic programming is a way of solving problems by breaking them
down into simpler subproblems. It is essentially a 'smart' recursion. Often
extra work doesn't have to be repeated if solutions to subproblems are
cached after they are solved. Dynamic programming has a confusing name
which traces back to its roots as a field studied by operations researchers.

Linear programming is a mathematical method (and associated algorithms)


for maximizing or minimizing a function subject to a series of linear
constraints.

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com
32
Keep Learning with Us VBSPU 4th sem. OT Notes

D.P. Algorithm–
The solution of a multistage problem by dynamic programming involves the
following steps.

Step 1: Identify the decision variables and specify the objective function to be
optimized under certain limitations, if any.

Step 2: Decompose the given problem into a number of smaller sub-problems.


Identify the state variable at each stage.

Step 3: Write down the general recursive relationship for computing the optimal
policy. Decide whether forward or backward method is to be followed to solve
the problem.

Step 4: Construct appropriate stages to show the required values of the return
function at each stage.

Step 5: Determine the overall optimal policy or decisions and its value at each
stage. There may be more than such optimal policy.

Note: Some Topics are missing here…

“Failure is the opportunity to begin again more intelligently.”


For More Information Visit Our Blog: www.dpmishra.com

You might also like