You are on page 1of 17

1uly 2011

Master of Computer Application (MCA) - Semester 4


MC0079 - Computer Based Optimization Methods
(Book ID: B0902)
Assignment Set - 1

1. Use graphical method and solve the L.P.P.
Maximize Z 5x
1
+ 3x
2

subject to 3x
1
+ 5x
2
A 15
5x
1
+ 2x
2
A 10
x
1
, x
2
K 0
Ans:
Max : 5x1 3x2
Subject to
3x1 5 x2 15
5x1 2x2 10
X1 0 , y1 0.
Now, graph the inequalities and Iind out the solution set. (Since all quantities involved are positive it is
enough iI we have the 1
st
quadrant).



3x15x215
X1 0 1 5
X2 3 2.4 0
5x12x210

The solution set/space is the closed polygonal region OABC.
Every point in this region satisIies the given constraints and is a Ieasible solution. So the region OABC is
also called as the Ieasible region.
From this region we have to Iind the point at which the value oI the objective Iunction
: 5x1 3x2 is maximum.
Now we have to Iind the values oI : at the various vertices/extreme points oI the polygonal region and
decide the maximum.
Value oI : at 0(0, 0) 0 0 0.
Value oI : at A(2, 0) 5 x 2 0 10.
Value oI : at B(1, 2.5) (5 x 1 3x 2.5) 8
Value oI : at C(0, 3) (5 x 0 3 x 3) 9.
Maximum z Rs.10 at x1 2, and x2 0.

.


2. Explain the algorithm for solving a linear programming problem by graphical method.
Ans:
An Algorithm for solving a linear programming problem by Graphical Method
(This algorithm can be applied only Ior problems with two variables).
Step - I Formulate the linear programming problem with two variables (iI the given problem has more
than two variables, then we cannot solve it by graphical method).
Step - II Consider a given inequality. Suppose it is in the Iorm
,
1
x
1
,
2
x
2
b (or ,
1
x
1
,
2
x
2
b). Then consider the relation
,
1
x
1
,
2
x
2
b. Find two distinct points (k, l), (c, d) that lie on the straight line ,
1
x
1
,
2
x
2
b. This can be
Iound easily II x
1
0, then x
2
. II x
2
0, then x
1
. ThereIore
(k, l) (0, ) and (c, d) ( ,0) are two points on the straight line
,
1
x
1
,
2
x
2
b.
Step - III Represent these two points (k, l), (c, d) on the graph which denotes XY-axis plane. Join these
two points and extend this line to get the straight line which represents ,
1
x
1
,
2
x
2
b.
Step - IV ,
1
x
1
,
2
x
2
b divides the whole plane into two halI planes, which are ,
1
x
1
,
2
x
2
b (one
side) and ,
1
x
1
,
2
x
2
b (another side). Find the halI plane that is related to the given inequality.
Step - J Do step-II to step-IV Ior all the inequalities given in the problem. The intersection oI the halI-
planes related to all the inequalities and x
1
0, x
2
0 , is called the feasible region ( or feasible
solution space). Now Iind this Ieasible region.
Step - VI The Ieasible region is a multisided Iigure with corner points A, B, C, .(say). Find the co-
ordinates Ior all these corner points. These corner points are called as extreme points.
Step - VII Find the values oI the objective Iunction at all these corner/ extreme points.
Step - VIII II the problem is a maximization (minimization) problem, then the maximum (minimum)
value oI : among the values oI : at the corner/extreme points oI the Ieasible region is the optimal value oI
:. II the optimal value exists at the corner/extreme point, say A(u, v), then we say that the solution x
1
u
and x
2
v is an optimal Ieasible solution.
Step - IX Write the conclusion (that include the optimum value oI :, and the co-ordinates oI the corner
point at which the optimum value oI : exists).






3. A manufacturing firm has discontinued production of a certain unprofitable product line. This
created considerable excess production capacity. Management is considering to devote this
excess capacity to one or more of three products: call them product 1, 2 and 3. The available
capacity on the machines which might limit output are given below :
Machine Type
Available Time
(in machine hours per week)
Milling Machine 250
Lathe 150
Grinder 50

The number of machine-hours required for each unit of the respective product is given below :
Productivity (in Machine hours/Unit)
Machine Type Product 1 Product 2 Product 3
Milling Machine 8 2 3
Lathe 4 3 0
Grinder 2 - 1
The unit profit would be Rs. 20, Rs. 6 and Rs. 8 for products 1, 2 and 3. Find how much of each
product the firm should produce in order to maximize profit ?
Ans:
et x
1
, x
2
, x
3
units oI products 1, 2 and 3 are produced in a week.
Then total proIit Irom these units is
Z 20 x
1
6 x
2
8 x
3

To produce these units the management requires
8x
1
2x
2
3x
3
machine hours oI Milling Machine
4x
1
3x
2
0 x
3
machine hours oI athe
and 2x
1
x
3
machine hours oI Grinder
Since time available Ior these three machines are 250, 150 and 50 hours respectively, we have
8x
1
2x
2
3x
3
250
4x
1
3x
2
150
2x
1
x
3
50.
Obviously x
1
, x
2
, x
3
0
Thus the problem is to
Maximize Z 20x
1
6x
2
8x
3

Subject to 8x
1
2x
2
3x
3
250
4x
1
3x
2
150
2x
1
x
3
50,
x
1
, x
2
, x
3
0.
Rewriting in the standard Iorm,
Maximize Z 20x
1
6x
2
8x
3
0S
1
0S
2
0S
3

Subject to 8x
1
2x
2
3x
3
S
1
250
4x
1
3x
2
S
2
150
2x
1
x
3
S
3
50,
x
1
, x
2
, x
3
, S
1
, S
2
, S
3
0.
The initial basic solution is
X
0

The initial simplex table is given by

x
1
enters the basic set oI variables replacing the variable S
3
. The Iirst iteration gives the Iollowing table

x
2
enters the basic set oI variables replacing the variable s
2
. The second iteration gives the Iollowing table

x
3
enters the basic set oI variables replacing the variable x
1
. The third iteration yields the Iollowing table

Since all z
j
c
j
0 in the last row, the optimum solution is 700.
i.e., the maximum proIit is Rs. 700/- which is achieved by producing 50 units oI product 2 and 50 units oI
product 3.








4. Determine optimal solution to the problem given below. Obtain the initial solution by VAM.
Write down the differences between PERT and CPM.

Ans:
Basic difference between PERT and CPM
Though there are no essential diIIerences between PERT and CPM as both oI them share in common the
determination oI a critical path and are based on the network representation oI activities and their
scheduling that determines the most critical activities to be controlled so as to meet the completion date oI
the project.
PERT
1. Since PERT was developed in connection with an R and D work, thereIore it had to cope with the
uncertainties which are associated with R and D activities. In PERT, total project duration is regarded as a
random variable and thereIore associated probabilities are calculated so as to characterize it.
2. It is an event-oriented network because in the analysis oI network emphasis is given an important
stages oI completion oI task rather than the activities required to be perIormed to reach to a particular
event or task.
3. PERT is normally used Ior projects involving activities oI non-repetitive nature in which time estimates
are uncertain.
4. It helps in pinpointing critical areas in a project so that necessary adjustment can be made to meet the
scheduled completion date oI the project.
CPM
1. Since CPM was developed in connection with a construction project which consisted oI routine tasks
whose resources requirement and duration was known with certainty, thereIore it is basically
deterministic.
2. CPM is suitable Ior establishing a trade-oII Ior optimum balancing between schedule time and cost oI
the project.
3. CPM is used Ior projects involving activities oI repetitive nature.


5. Explain Project Management (PERT).
Ans:
Project Management - PERT
Probability and Cost Consideration in Project Scheduling
The analysis in CPM does not take into the case where time estimates Ior the diIIerent activities are
probabilistic. Also it does not consider explicitly the cost oI schedules. Here we will consider both
probability and cost aspects in project scheduling.
Probability considerations are incorporated in project scheduling by assuming that the time estimate Ior
each activity is based on 3 diIIerent values. They are
a The optimistsic time, which will be required iI the execution oI the project goes extremely well.
b The pessimistic time, which will be required iI everything goes bad.
m The most likely time, which will be required iI execution is normal.
The most likely estimate m need not coincide with mid-point oI a and b. Then the expected duration
oI each activity can be obtained as the mean oI and 2 m. i.e. .
This estimate can be used to study the single estimate D in the critical path calculation.
The variance oI each activity denoted by V is deIined by variance
V .
The earliest expected times Ior the node i denoted by E(mi) Ior each node i is obtained by taking the sum
oI expected times oI all activities leading to the node i, when more than one activity leads to a node i, then
greatest oI all E(mi) is chosen . et mi be the earliest occurrence time oI the event i, we can consider mi
as a random variable. Assuming that all activities oI the network are statistical independent, we can
calculate the mean and the variance oI the as Iollows . Where
K deIines the activities along the largest path leading to i.
For the latest expected time, we consider the last node. Now Ior each path move backwords, substituting
the Ior each activity (ij). Thus we have iI only one path
events Irom J to i or it is the minimum oI E|J) | Ior all J Ior which the activities (i, j) is deIined.
ote: The probability distribution oI times Ior completing an event can be approximated by the normal
distribution due to central limit theorem.
Since represents the earliest occurrence time, event will meet a certain schedule time STi (speciIied by
an analyst) with probability
Pr
Pr (Z Ki)
where Z ~N(01) and Ki . It is common practice to compute the probability that event i
will occur no later than its Ce such probability will then represent the chance that the succeeding events
will occur within the (ESe, Ce) duration.




























1uly 2011
Master of Computer Application (MCA) - Semester 4
MC0079 - Computer Based Optimization Methods - 4 Credits
(Book ID: B0902)
Assignment Set - 2 (40 Marks)



1. Find the optimum integer solution to the following all IPP
Maximize z x
1
+ 2x
2

subject to the constraints
x
1
+ x
2
7
2x
1
11
2x
2
7
x
1
, x
2
K and are integers
Ans:
Step 1: Introducing the slack variables, we get
2x
2
x
3
7
x
1
x
2
x
4
7
2x
1
x
5
11
x
1
, x
2
, x
3
, x
4
, x
5
~ 0.
Step 2: Ignoring the integer condition, we get the initial simplex table as Iollows

Introducing x
2
and leaving x
3
Irom the basis, we get



Introducing X
1
and leaving X
4
we get the Iollowing optimum table.
Optimum table




The optimum solution thus got is .
Step 3: Since the optimum solution obtained above is not an integer solution, we must go to next step.
Step 4 Now we select the constraint corresponding to the criterion
maxi 1
Bi
) max 1
B1
, 1
B2
, 1
B3
)
max
Since in this problem, the x
2
equation and x
1
-equation both have the same value oI I
Bi
ie , either one
oI the two equations can be used.
Now consider the Iirst row oI the optimum table . The Gomory`s constraint to be added is


Adding this new constraint to the optimum table we get

Step 5: To apply dual simplex method. Now, in order to remove the inIeasibility oI the optimum solution
, we use the dual simplex method.
i) leaving vector is G
1
(i.e. )

ii) Entering vector is given by


ThereIore 3. So we must enter ,
3
corresponding to which x
3
is given in the above table. Thus
dropping G
1
and introducing x
3
. We get the Iollowing dual simplex table.



Thus clearly the optimum Ieasible solution is obtained in integers.
Finally we get the integer optimum solution to the given IPP as x
1
4, x
2
3 and max : 10


3. In a certain game, player A has three possible choices L, M and , while player B has two,
possible choices P and Q. Payments are to be made according to the choices made.

Choices Payment
L, P
L, Q
M, P
M, Q
, P
, Q
A pays B Rs. 3
B pays A Rs. 2
A pays B Rs. 2
B pays A Rs. 4
B pays A Rs. 2
B pays A Rs. 3

What are the best strategies for players A and B in this game? What is the value of the game for A
and B?

Ans:
The above payments can be easily arranged in the Iorm oI a matrix. et positive number represent a
payment Irom B to A and negative number a payment Irom A to B. Now we have the payoII matrix
shown in table below.
When player A plays his Iirst strategy (namely ), he may gain -3 or 3 depending upon player B`s
selected strategy. He can guarantee, however, a gain oI at least mm (-3, 3) -3 regardless oI B`s selected
strategy. Similarly, iI A plays his second strategy (namely M), he guarantees an income oI at least min. (-
2, 4) -2; iI he plays his third strategy (namely N) he guarantees an income oI at least mm (2, 3) 2.
Thus the minimum value in each row represents the minimum gain guaranteed to A, iI he plays his pure
(grand) strategies.
These values are indicated in the matrix under Minimum oI row`.
Now, player A, by selecting his third strategy (N), is maximizing his minimum gain.
This gain is given by max. -3, -2, 2} 2. This selection oI player A is called the maxi-min strategy and
his corresponding gain is called the maxi-min or lower value oI the game.

Similar way we can Iind mini-max corresponding to the Player B, who wishes to minimize his losses
(shown in the table).
ThereIore in this game, mini-max value maxi-min value 2. The value oI the game is thus equal to 2.
The game has a saddle point given by the entry (N, P) oI the matrix.
As the game value is 2, (and not zero), the game is not Iair.


4. Find the saddle point iI they exists, game value and optimum strategies.

7 3
3 4
, (b)



5 4
3 2
2 3
, (c)


13 3 0
11 5 9
11 13 1
, and
(d)


0 2 2 10 8
14 8 4 6 2
12 10 6 8 10
2 14 0 4 16


Ans
For all the matrices the rows stands Ior strategies Ior the player A and the columns stands Ior the
strategies Ior the player B.
In (i) the player A and B has 2 strategies each. Since there is no element which is both the lowest in its
row and highest in its column, no saddle point exists here.
In (ii), Row min 2, -3, -5;
Column max 3, 2.
Maxi-min max 2, -3, -5} 2, and mini-max min 3, 2} 2. This corresponds to the strategies A,
row 1 and B, column 2. ThereIore the saddle point is (1, 2). Game value is 2.
(iii) For row minimum, we get, max-min max 1, -11, -3} 1, and Ior column maximum, mini-max
Min 1, 13, 13} 1. ThereIore the strategies are A, row 1 and B, column 1. The saddle point is (1, 1). The
game value is 1.
(iv) Saddle point (2, 3), strategies A, row 2; and B, column 3; game value 6.



5. A sample of 100 arrivals of customers at a retail sales depot is according to the following
distribution:
Time between
Arrivals (mts.)
Frequency
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
2
6
10
25
20
14
10
7
4
2

A study of the time required to service customers by adding up the bills, receiving payment,
making change and placing packages in hand trucks, yields the following distribution.




Service time (mts.) Frequency
.5
1.0
1.5
2.0
2.5
3.0
12
21
36
19
7
5

Estimate the average percentage customer waiting time and average percentage idle time of the
server by simulation for the next 10 arrivals.

Ans:

$905 1 : Convert the Irequency distributions oI time between arrivals and service time to cumulative
probability distributions.
$905 2 : Allocate random numbers 00 to 99 Ior each oI the values oI time between arrivals and service
time, the range allocated to each value corresponding to the value oI cumulative probability. (Tables 12 -3
and 12 4) .
$905 3 : &sing random numbers Irom table, sample at random the time oI arrival and service time Ior ten
sets oI random numbers.
$905 4 : Tabulate waiting time oI arrivals and idle time oI servers.
(Table 12-5)
$905 5 : Estimate the percent waiting time oI arrivals and percent idle time oI servers corresponding to the
ten samples.
Allocation oI Random Number Time between arrivals

Allocation of Random umbers - Service Time

(Note that the upper bound oI random numbers allocated Ior each value oI the parameter is one less than
the corresponding cumulative Irequency since we have chosen a range oI random numbers Iorm 00 to
99).

The service Iacility is made available at clock time zero and the server has to be idle Ior 3.5 minutes when
the service Ior Iirst arrival starts. The service is completed at 5.0 minutes and again the server is idle Ior 2
minutes till the second arrival joins the system. The Iirst three arrivals get immediate service and they
don`t have to wait, as the server is idle when they arrive. The Iourth arrival that joins at 9.0 minutes has to
wait Ior .5 minute when the service Ior the third is completed. Similarly the waiting time and idle time
can be computed Ior Iurther arrivals.
Total elapsed time 29 minutes
Waiting time oI arrival 1 minute
Percentage oI waiting time
Idle time Ior server 14.5 minutes
Percentage oI idle time

You might also like