




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
These are the important key points of solved exam of Introduction to Operations Research are:Operations Research, Painting Machine, Optimal Solution, Travelling Salesman Problem, Decision Variables, Time of Switching, Weak Duality Theorem, Standard Primal, Respective Objective Functions, Simplex Tableaus
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Page 1 out of 9
Introduction to Operations research
Solution of Final Exam
1.(15%) Six jobs are to be processed on a painting machine. The machine can process only one job
at a time. When a new job is processed the machine must be adjusted and this set-up process is
time consuming. The set-up times (hours) for the four jobs are as follows:
The set-up time associated with switching from job x to job y is given by the (x,y) entry of the
table: for example, the set-up time of switching from job B with job D is equal to 5 hours. There
is no set-up time for the first job processed. The Manager is interested in a scheduling policy that
will process the jobs in an order that will minimize the total set-up time (sum of all the individual
set-up times). Formulate a model for this problem. Do not compute the optimal solution.
Solution :
This problem is similar to the travelling salesman problem.
Decision variables:
Let x denote the sequence in which the machines are processed so x(1) is the first job processed,
x(2) is the second job processed, and so on, up to x(6).
Objective function:
Let t(i,j) denote the set up time of switching from job i to job j. The values of t(i,j) are provided by
the table. The objective is to minimize the function
g(x) = t(x(1),x(2)) + t(x(2),x(3)) + t(x(3),x(4))
Constraints:
Clearly x(j) must be an element of {A,B,C,D} and the sequence x must be a permutation of the
elements of this set. Hence,
{x(1),…,x(4)} = {A,B,C,D}
The problem is then as follows:
Minimize g(x) := t(x(1),x(2)) + t(x(2),x(3)) + t(x(3),x(4))
Subject to
{x(1),…,x(6)} = {A,B,C,D}
2.(10%) State the Weak Duality Theorem (2%) and use it to show the following: if x* is a feasible
solution to the standard primal LP problem, y* is a solution to its dual problem and both yield the
same value for the respective objective functions, then x* and y* are in fact optimal solutions of
the respective problems.
Solution : This is Theorem 7.4.1 and Lemma 7.4.3 in the lecture Notes.
Page 2 out of 9
3.(15%) Consider the LP problem whose first and final simplex tableaus are as follows:
B.V. Eq. # x 1
x 2
x 3 x 4
x 5
x 4
x 5
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 2
x 1
3.1 Use the information contained in the final tableau to determine the optimal solution and
optimal value of the objective function of the associated dual problem (2%).
3.2 Determine the range of values of c 1
, c 3
, and b 1
for which the final basis does not change
(one range at a time!) (10%).
3.3 What will be the new basis if the value of c 3
is increased just a bit above the upper bound
found in 3.2 (3%).
Solution :
3.1 The optimal solution of the dual problem is the vector of reduced costs of the slack variables in
the final tableau. Hence y=((2,1) and w=y*b=2,1 = 140.
3.2 Changes in c1: Suppose that the new cost is c1+d, where d>0. Then the final tableau would be
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 2
x 1
Z Z - d 0 8 2 1 140
We conduct a row operation to change d to zero. This yields
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 2
x 1
Z Z 0 0 8 2 - d 1+d 140+20d
To make sure that all the reduced costs are not negative, we require that
2 - d >= 0 ; 1+d > =
that is,
d <= 2 ; d>= - 1
Hence the range of d for which the basis remains optimal is [-1,2]. The range of c1 is then [3,6].
Changes in c3: Since x3 is not in the final basis, the condition for the current basis to remain
optimal is r3-d >= 0, or in our case, 8-d >= 0, namely d<=8. Thus, the range of c3 is [-infinity,9].
Changes in b1: If we change b1 to b1+d then the final RHS values would be equal to
b’ = B
(b+(d,0) = B
b + dB
1
=(20,20)+d(2,-1) = (20+2d,20-d).
Page 4 out of 9
Solution :
The dual problems are as follows:
min
y
s. t. yA = c
max
y
y ( b , d ) = yb + yd
s. t. y
c
y ≥ 0
min
y
2 y 1
s. t. 2 y 1
1 y 1
3 y 2
3 y 3
1 y 1
0 y 2
0 y 3
0 y 1
0 y 2
0 y 3
y 1
, y 2
matrix is as follows:
You are expected to write down the DP function equation for this problem (4%), solve it (8%) and
then recover an optimal solution for the problem (3%).
Solution :
The DP functional equation for the TSP is as follows:
f(v,c) = min { d(c,x) + f(v\c,x): x in v} , v is not empty and c is not in v.
where
v = set of cities yet to be visited
c = current city
d(i,j) = travel timetween city i and city j.
Also, by definition f({},c) = d(c,h), where h denotes the home city. In our case we shall let A
denote the home city.
We solve the functional equation iteratively by increasing the cardinality of set v.
|v| = 0:
f({},B) = d(B,A) = 2; f({},C) = d(C,A) = 3; f({},D) = d(D,A) = 4
|v| = 1:
f({B},C) = d(C,B) + f({},B) = 2 + 2 = 4 ; X*{{B},C) ={B}
f({B},D) = d(D,B) + f({},B) = 1 + 2 = 3 ; X*({B},D) = {B}
f({C},B) = d(B,C) + f({},C) = 3 + 3 = 6 ; X*({C},B) = {C}
f({C},D) = d(D,C) + f({},C) = 2 + 3 = 5 ; X*({C},D) = {C}
f({D},B) = d(B,D) + f({},D) = 3 + 4 = 7 ; X*({D},B) = {D }
f({D},C) = d(C,D) + f({},D) = 4 + 4 = 8 ; X*({D},C) = {D }
Page 5 out of 9
|v| = 2:
f({B,C},D) = min {d(D,B) + f({C},B) , d(D,C) + f({B},C)}
= min {1 + 6 , 2 + 4} = 6 ; X*({B,C},D)={C}
f({B,D},C) = min {d(C,B) + f({D},B) , d(C,D) + f({B},D)}
= min {2 + 7 , 4 + 3} = 7 ; X*({B,D},C)={D}
f({C,D},B) = min {d(B,C) + f({D},C) , d(B,D) + f({C},D)}
= min {3 + 8 , 3 + 5} = 8 ; X*({C,D},B)={D}
|v| = 3:
f({B,C,D},A) = min{d(A,B) + f({C,D},B) , d(A,C) + f({B,D},C), d(A,D) + f({B,C},D) }
= min {3+8, 4 + 7, 5 + 6} = min {11, 11, 11} = 11 ;
So the shortest distance is f(({B,C,D},A) =11.
Recovery of optimal solution:
x = (A)
Selecting B from X*({B,C,D},A) = {B,C,D} yields state {{C,D},B} and x=(A,B)
Selecting D from X*({C,D},B)={D} yields state {{C},D} x=(A,B,D).
Selecting C from X*({C},D) = {C} yields state {{},C} and x=(A,B,D,C)
Adding A to x yields x=(A,B,D,C,A).
Checking: d(A,B) + d(B,D) + d(D,C) + d(C,A) = 3 + 3 + 2 + 3 = 11 = f(({B,C,D},A).
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 5
x 6
Note that x 5
and x 6
are artificial variables, x 4
is a slack variable and x 3
is a surplus variable
associated with x6. Fill in the missing entry represented by “?” in this tableau, as well as the
missing values in the following tableau obtained after a number of pivot operations. Briefly
explain how you computed the missing entries.
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 3
x 2
Solution:
Observation 1 : Given the description of x3,x4,x5 and x6, we can fill in their respective columns
in the initial tableau:
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 5
Page 7 out of 9
1 u 0
0 v - 1
0 w 0
where u,v,w represent the missing entries in B
Thus, we obtain the following system of linear equations:
4 = 16 + 36 u
2 = 36 v - 10
12 = 36 w
Hence (u,v,w)=(-1/3,1/3,1/3) so we can update the final tableau as folllows:
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 3
x 2
Observation 7 : Given B
, we can now compute the missing x1 column in the final tableau as
follows: New x1 column = B
initial x1 column. This yields the following:
a 1
Hence,
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 3
x 2
Observation 8 : Because the final tableau is in Phase 1 and all the artificial variables are out of the
basis, it follows that c B = (0,0,0), hence the famous formula for the reduced costs yields r=c B
D-c
D – c = - c. Therefore r j
= - c j
for j=1 and j=5, hence r 1
=0 and r 5
=-1. Filling in these two
values in the final tableau yields
B.V. Eq. # x 1
x 2
x 3
x 4
x 5
x 6
x 4
x 3
x 2
cost of operating the machine over a period of t years is given by
Page 8 out of 9
Time,t (years) 1 2 3
Total cost(t) 260 540 760
and the life of the project is T = 8 years. You are expected to (a) write down the generic DP
functional equation for this type of problems (2%) (b) solve this functional equation for the
problem instance given above (4%) and (c) recover an optimal solution for the problem (4%).
Solution :
The generic functional equation for this type of equipment replacement problems is of the form
f(t) = min {c(x) + f(t-x): x in {1,2,…,min(L,T-t)}} , t=1,2,…,T with f(0) = 0,
where L is the life-time of the machine. Note that here t is the time left till the end of the project.
Solving this functional equation for the problem under consideration we obtain
f(0) =
f(1) = c(1) = 260, X*(1)={1}
f(2) = min {c(1) + f(2-1) , c(2) + f(2-2) } = min {260 + 260, 540 + 0} = 520, X*(2)={1}
f(3) = min {c(1) + f(3-1) , c(2) + f(3-2) , c(3) + f(3-3)}
= min {260+520 , 540+260, 760+0} = min {780, 800,760} = 760, X*(3)={3}
f(4) = min { c(1) + f(4-1) , c(2) + f(4-2) , c(3) + f(4-3)}}
= min {260+760,540+520,760+260} = min {1020,1060,1020} = 1020, X*(4)={1,3}
f(5) = min { c(1) + f(5-1) , c(2) + f(5-2) , c(3) + f(5-3)}
= min {260+1020,540+760,760+520} = min {1280,1300,1280}=1280 , X*(5)={1,3}
f(6) = min { c(1) + f(6-1) , c(2) + f(6-2) , c(3) + f(6-3)}
= min {260+1280,540+1020,760+760} = min {1540,1560,1520}=1520 , X*(6)={3}
f(7) = min { c(1) + f(7-1) , c(2) + f(7-2) , c(3) + f( 7 - 3)}
= min {260+1520,540+1280,760+1020} = min {1780,1820,1780}=1780 , X*(7)={1,3}
f(8) = min { c(1) + f(8-1) , c(2) + f(8-2) , c(3) + f(8-3)}
= min {260+1780,540+1520,760+1280} = min {2040,2060,2040}=1780 , X*(8)={1,3}
Thus, the minimal cost is f(8) = 1780. To recover the optimal solution we set x1 to be an element
of X(8), say x1=1. Then we set x2 to be an element of X(8-x1)=X*(7), say x2=1. Then we set x
to be an element of X(T-x1-x2) =X(8-2)=X*(6). So x3 =3. Then we set x4 to be an element of
X(T-x1-x2-x3) =X(3). So x4=3.
So the optimal solution recovered is x=(1,1,3,3). Checking: x1+x2+x3+x4 = 8 = T (OK), c(x1) +
c(x2) + c(x3) + c(x4) = f(8) =1780 (OK).