final exam linear programming, math 331 25/2/1434 ... university college of science, dept. of...
TRANSCRIPT
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Final Exam Linear Programming, MATH 33125/2/1434- Duration 120Minutes
Problem 1. Given the following Linear Program:
(P) :
max x1 + 2x2
s.t. x1 + x2 ≤ 252x1 + x2 ≤ 40x1 + 2x2 ≤ 40x1, x2 ≥ 0
1. Draw the feasible region and solve graphically the LP problem.2. Find the five corners of the feasible region!3. Evaluate the objective function at each corner point!4. Deduce the optimal solution of the LP problem!5. Is the solution unique! Justify your answer!
Solution
1. Draw the feasible region and solve graphically the LP problem.First, we draw the lines (see figure bellow)
x1 + x2 = 252x1 + x2 = 40x1 + 2x2 = 40
then, we determine the intersection region between the corresponding half-spaces. Thus thefeasible solution set is given as shown in the figure bellow: To graphically solve the LPproblem, we draw the objective function for a constant for example
x1 + 2x2 = 30
and we translate it to the boundary of the polyhedral (the corners). We remark that theintersection between the objective function and the feasible solution set is the section definedby
x1 + 2x2 = 40x1 + 2x2 ≤ 40
The solution corners are (10, 15) and (0, 20) solution of the following systems:
x1 + x2 = 252x1 + x2 ≤ 40
andx1 = 0x1 + 2x2 ≤ 40
1
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
x1+x
2=25
x1+2x
2=40
2x1+x
2=40
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
2x1+x
2=40
x1+x
2=25
Objective function x1+2x
2=30
x1+2x
2=40
Optimal Solution Set x1+2x
2=40
2. Find the five corners of the feasible region!The five corners of the feasible region are:
(0, 0) The trivial solution.
(0, 20) The intersection of the lines x2−axis and x1 + 2x2 = 40.
(20, 0) The intersection of the lines x1−axis and 2x1 + x2 = 40.
(15, 10) The intersection of the lines x1 + x2 = 25 and 2x1 + x2 = 40.
(10, 15) The intersection of the lines x1 + x2 = 25 and x1 + 2x2 = 40.
3. Evaluate the objective function at each corner point!
(0, 0) x1 + 2x2 = 0.
A := (0, 20) x1 + 2x2 = 40.(Optimal)
(20, 0) x1 + 2x2 = 20.
(15, 10) x1 + 2x2 = 35.
B := (10, 15) x1 + 2x2 = 40. (Optimal)
2
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
4. Deduce the optimal solution of the LP problem!See the table above.
5. Is the solution unique! Justify your answer!The solution of the LP is not unique.Since the LP-Problem admits to optimal solution A := (10, 15) and B := (0, 20) all convexcombination of A and B are also solution of the LP-Problem, namely
λA + (1 − λ)B; λ ∈ [0, 1].
This convex combination determine the section already shown in question 1.
3
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 2. Given the following Dual Linear Program:
(D) :
min x1 + 2x2 + 3x3
s.t. x1 + x2 ≥ 4x2 + x3 ≥ 5x1 + x3 ≥ 6x1, x2, x3 ≥ 0
with optimal solution x1 = 2.5, x2 = 1.5, x3 = 3.5.
1. Write the Primal program (P) associated to the Dual program (D).2. Write the strong duality theorem for (P) and (D).3. Write the complementary slackness theorem.4. Solve the program (P).
Solution
1. Write the Primal program (P) associated to the Dual program (D).
(P) :
max 4y1 + 5y2 + 6y3
s.t. y1 + y3 ≤ 1y1 + y2 ≤ 2y2 + y3 ≤ 3y1, y2, y3 ≥ 0
2. Write the strong duality theorem for (P) and (D).Since the optimal solution of (P) is x1 = 2.5, x2 = 1.5, x3 = 3.5, then
∑
ai,jyi =∑
ai,jxj = 1(2.5) + 2(1.5) + 3(3.5) = 16.
3. Write the complementary slackness theorem.The conditions given by the complementary slackness theorem are:
y1 + y3 ≤ 1 : x1 6= 0 ⇒ y1 + y3 = 1
y1 + y2 ≤ 2 : x2 6= 0 ⇒ y1 + y2 = 2
y2 + y3 ≤ 3 : x3 6= 0 ⇒ y2 + y3 = 3
4. Solve the program (P).By solving the system above, we get y1 = 0, y2 = 2, y3 = 1.
4
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 3. Given the following Primal Linear Program:
(P) :
max x1 + x2 + x3
s.t. x1 + 2x2 + x3 ≤ 302x1 + 2x2 + x3 ≤ 50x1, x2, x3 ≥ 0
1. Write the initial simplex tableau for (P).2. Find the pivot element and give the Basis Variable Solution.3. Compute the second Simplex tableau and give the Basis Variable Solution.4. Compute the third Simplex tableau and give the Basis Variable Solution.5. Deduce the optimal solution of (P).
Solution
The simplex Tableau should contain:
BV x1 x2 x3 x4 x5 b Ratiox4 a1,1 a1,2 a1,3 a1,4 a1,5 b1
x5 a2,1 a2,2 a2,3 a2,4 a2,5 b2
−c1 −c2 −c3 0 0 z = c1x1 + c2x2 + c3x3
1. Write the initial simplex tableau for (P).
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30x5 2 2 1 0 1 50
-1 -1 -1 0 0 0
2. Find the pivot element and give the Basis Variable Solution.Since the minimum of the objective function are equal, we chose first column as pivot columnand it follows that the pivot row is also the second one because of the minimum property50/2 < 30/1 therefore the pivot element is a2,1 = 2
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30 30/1
x5 2 2 1 0 1 50 50/2-1 -1 -1 0 0 0
5
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (0, 0, 0, 30, 50).
3. Compute the second Simplex tableau and give the Basis Variable Solution.The pivot column is the third column (because of (-1/2)) and the pivot row is also the firstone because of the minimum property 10 < 50 therefore the pivot element is a1,3 = 1/2
BV x5 x2 x3 x4 x5 b Ratio
x4 0 1 1/2 1 -1/2 5 5/(1/2)
x1 1 1 1/2 0 1/2 25 25/(1/2)0 0 -1/2 0 1/2 25
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (25, 0, 0, 5, 0).
4. Compute the third Simplex tableau and give the Basis Variable Solution.
BV x4 x2 x4 x4 x5 b Ratiox3 0 2 1 2 -1 10x1 1 0 0 -1 1 20
0 1 0 1 0 30
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (20, 0, 10, 0, 0).
5. Since the objective function is positive, the optimal solution is then
(x1, x2, x3) = (20, 0, 10).
Where the maximum of the objective function is: z = 30.
6
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Final Exam Linear Programming, MATH 33125/2/1434- Duration 120Minutes
Problem 4. Given the following Linear Program:
(P) :
max 2x1 + x2
s.t. x1 + x2 ≤ 252x1 + x2 ≤ 40x1 + 2x2 ≤ 40x1, x2 ≥ 0
1. Draw the feasible region and solve graphically the LP problem.2. Find the five corners of the feasible region!3. Evaluate the objective function at each corner point!4. Deduce the optimal solution of the LP problem!5. Is the solution unique! Justify your answer!
Solution
1. Draw the feasible region and solve graphically the LP problem.First, we draw the lines (see figure bellow)
x1 + x2 = 252x1 + x2 = 40x1 + 2x2 = 40
then, we determine the intersection region between the corresponding half-spaces. Thus thefeasible solution set is given as shown in the figure bellow: To graphically solve the LPproblem, we draw the objective function for a constant for example
x1 + 2x2 = 30
and we translate it to the boundary of the polyhedral (the corners). We remark that theintersection between the objective function and the feasible solution set is the section definedby
x1 + x2 = 252x1 + x2 ≤ 40
The solution corners are (15, 10) and (20, 0) solution of the following systems:
x1 + x2 = 252x1 + x2 ≤ 40
andx2 = 02x1 + x2 ≤ 40
1
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
x1+x
2=25
x1+2x
2=40
2x1+x
2=40
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x1
F.S. x1+2x
2=40
2x1+x
2=40
x1+x
2=25
Objective function 2x1+x
2=30
x2 Optimal Solution Set 2x
1+x
2=40
OptimalSolution
2. Find the five corners of the feasible region!The five corners of the feasible region are:
(0, 0) The trivial solution.
(0, 20) The intersection of the lines x2−axis and x1 + 2x2 = 40.
(20, 0) The intersection of the lines x1−axis and 2x1 + x2 = 40.
(15, 10) The intersection of the lines x1 + x2 = 25 and 2x1 + x2 = 40.
(10, 15) The intersection of the lines x1 + x2 = 25 and x1 + 2x2 = 40.
3. Evaluate the objective function at each corner point!
(0, 0) 2x1 + x2 = 0.
(0, 20) 2x1 + x2 = 20.
A := (20, 0) 2x1 + x2 = 40.(Optimal)
B := (15, 10) 2x1 + x2 = 40.(Optimal)
(10, 15) 2x1 + x2 = 35.
2
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
4. Deduce the optimal solution of the LP problem!See the table above.
5. Is the solution unique! Justify your answer!The solution of the LP is not unique.Since the LP-Problem admits to optimal solution A and B all convex combination of A andB are also solution of the LP-Problem, namely
λA + (1 − λ)B; λ ∈ [0, 1].
This convex combination determine the section already shown in question 1.
3
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 5. Given the following Dual Linear Program:
(D) :
min 3x1 + 2x2 + x3
s.t. x1 + x3 ≥ 4x1 + x2 ≥ 5x2 + x3 ≥ 6x1, x2, x3 ≥ 0
with optimal solution x1 = 1.5, x2 = 3.5, x3 = 2.5.
1. Write the Primal program (P) associated to the Dual program (D).2. Write the strong duality theorem for (P) and (D).3. Write the complementary slackness theorem.4. Solve the program (P).
Solution
1. Write the Primal program (P) associated to the Dual program (D).
(P) :
max 4y1 + 5y2 + 6y3
s.t. y1 + y2 ≤ 3y2 + y3 ≤ 2y1 + y3 ≤ 1y1, y2, y3 ≥ 0
2. Write the strong duality theorem for (P) and (D).Since the optimal solution of (P) is x1 = 1.5, x2 = 3.5, x3 = 2.5, then
∑
ai,jyi =∑
ai,jxj = 3(1.5) + 2(3.5) + (2.5) = 14.
3. Write the complementary slackness theorem.The conditions given by the complementary slackness theorem are:
y1 + y2 ≤ 3 : x1 6= 0 ⇒ y1 + y2 = 3
y2 + y3 ≤ 2 : x2 6= 0 ⇒ y2 + y3 = 2
y1 + y3 ≤ 1 : x3 6= 0 ⇒ y1 + y3 = 1
4. Solve the program (P).By solving the system above, we get y1 = 1, y2 = 2, y3 = 0.
4
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 6. Given the following Primal Linear Program:
(P) :
max x1 + x2 + x3
s.t. x1 + 2x2 + x3 ≤ 302x1 + 2x2 + x3 ≤ 50x1, x2, x3 ≥ 0
1. Write the initial simplex tableau for (P).2. Find the pivot element and give the Basis Variable Solution.3. Compute the second Simplex tableau and give the Basis Variable Solution.4. Compute the third Simplex tableau and give the Basis Variable Solution.5. Deduce the optimal solution of (P).
Solution
The simplex Tableau should contain:
BV x1 x2 x3 x4 x5 b Ratiox4 a1,1 a1,2 a1,3 a1,4 a1,5 b1
x5 a2,1 a2,2 a2,3 a2,4 a2,5 b2
−c1 −c2 −c3 0 0 z = c1x1 + c2x2 + c3x3
1. Write the initial simplex tableau for (P).
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30x5 2 2 1 0 1 50
-1 -1 -1 0 0 0
2. Find the pivot element and give the Basis Variable Solution.Since the minimum of the objective function are equal, we chose first column as pivot columnand it follows that the pivot row is also the second one because of the minimum property50/2 < 30/1 therefore the pivot element is a2,1 = 2
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30 30/1
x5 2 2 1 0 1 50 50/2-1 -1 -1 0 0 0
5
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (0, 0, 0, 30, 50).
3. Compute the second Simplex tableau and give the Basis Variable Solution.The pivot column is the third column (because of (-1/2)) and the pivot row is also the firstone because of the minimum property 10 < 50 therefore the pivot element is a1,3 = 1/2
BV x5 x2 x3 x4 x5 b Ratio
x4 0 1 1/2 1 -1/2 5 5/(1/2)
x1 1 1 1/2 0 1/2 25 25/(1/2)0 0 -1/2 0 1/2 25
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (25, 0, 0, 5, 0).
4. Compute the third Simplex tableau and give the Basis Variable Solution.
BV x4 x2 x4 x4 x5 b Ratiox3 0 2 1 2 -1 10x1 1 0 0 -1 1 20
0 1 0 1 0 30
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (20, 0, 10, 0, 0).
5. Since the objective function is positive, the optimal solution is then
(x1, x2, x3) = (20, 0, 10).
Where the maximum of the objective function is: z = 30.
6
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Final Exam Linear Programming, MATH 33125/2/1434- Duration 120Minutes
Problem 7. Given the following Linear Program:
(P) :
max x1 + 2x2
s.t. x1 + x2 ≤ 252x1 + x2 ≤ 40x1 + 2x2 ≤ 40x1, x2 ≥ 0
1. Draw the feasible region and solve graphically the LP problem.2. Find the five corners of the feasible region!3. Evaluate the objective function at each corner point!4. Deduce the optimal solution of the LP problem!5. Is the solution unique! Justify your answer!
Solution
1. Draw the feasible region and solve graphically the LP problem.First, we draw the lines (see figure bellow)
x1 + x2 = 252x1 + x2 = 40x1 + 2x2 = 40
then, we determine the intersection region between the corresponding half-spaces. Thus thefeasible solution set is given as shown in the figure bellow: To graphically solve the LPproblem, we draw the objective function for a constant for example
x1 + 2x2 = 30
and we translate it to the boundary of the polyhedral (the corners). We remark that theintersection between the objective function and the feasible solution set is the section definedby
x1 + 2x2 = 40x1 + 2x2 ≤ 40
The solution corners are (10, 15) and (0, 20) solution of the following systems:
x1 + x2 = 252x1 + x2 ≤ 40
andx1 = 0x1 + 2x2 ≤ 40
1
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
x1+x
2=25
x1+2x
2=40
2x1+x
2=40
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
2x1+x
2=40
x1+x
2=25
Objective function x1+2x
2=30
x1+2x
2=40
Optimal Solution Set x1+2x
2=40
2. Find the five corners of the feasible region!The five corners of the feasible region are:
(0, 0) The trivial solution.
(0, 20) The intersection of the lines x2−axis and x1 + 2x2 = 40.
(20, 0) The intersection of the lines x1−axis and 2x1 + x2 = 40.
(15, 10) The intersection of the lines x1 + x2 = 25 and 2x1 + x2 = 40.
(10, 15) The intersection of the lines x1 + x2 = 25 and x1 + 2x2 = 40.
3. Evaluate the objective function at each corner point!
(0, 0) x1 + 2x2 = 0.
A := (0, 20) x1 + 2x2 = 40.(Optimal)
(20, 0) x1 + 2x2 = 20.
(15, 10) x1 + 2x2 = 35.
B := (10, 15) x1 + 2x2 = 40. (Optimal)
2
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
4. Deduce the optimal solution of the LP problem!See the table above.
5. Is the solution unique! Justify your answer!The solution of the LP is not unique.Since the LP-Problem admits to optimal solution A := (10, 15) and B := (0, 20) all convexcombination of A and B are also solution of the LP-Problem, namely
λA + (1 − λ)B; λ ∈ [0, 1].
This convex combination determine the section already shown in question 1.
3
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 8. Given the following Dual Linear Program:
(D) :
min 3x1 + 2x2 + x3
s.t. x1 + x3 ≥ 4x1 + x2 ≥ 5x2 + x3 ≥ 6x1, x2, x3 ≥ 0
with optimal solution x1 = 1.5, x2 = 3.5, x3 = 2.5.
1. Write the Primal program (P) associated to the Dual program (D).2. Write the strong duality theorem for (P) and (D).3. Write the complementary slackness theorem.4. Solve the program (P).
Solution
1. Write the Primal program (P) associated to the Dual program (D).
(P) :
max 4y1 + 5y2 + 6y3
s.t. y1 + y2 ≤ 3y2 + y3 ≤ 2y1 + y3 ≤ 1y1, y2, y3 ≥ 0
2. Write the strong duality theorem for (P) and (D).Since the optimal solution of (P) is x1 = 1.5, x2 = 3.5, x3 = 2.5, then
∑
ai,jyi =∑
ai,jxj = 3(1.5) + 2(3.5) + (2.5) = 14.
3. Write the complementary slackness theorem.The conditions given by the complementary slackness theorem are:
y1 + y2 ≤ 3 : x1 6= 0 ⇒ y1 + y2 = 3
y2 + y3 ≤ 2 : x2 6= 0 ⇒ y2 + y3 = 2
y1 + y3 ≤ 1 : x3 6= 0 ⇒ y1 + y3 = 1
4. Solve the program (P).By solving the system above, we get y1 = 1, y2 = 2, y3 = 0.
4
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 9. Given the following Primal Linear Program:
(P) :
max x1 + x2 + x3
s.t. x1 + 2x2 + x3 ≤ 302x1 + 2x2 + x3 ≤ 50x1, x2, x3 ≥ 0
1. Write the initial simplex tableau for (P).2. Find the pivot element and give the Basis Variable Solution.3. Compute the second Simplex tableau and give the Basis Variable Solution.4. Compute the third Simplex tableau and give the Basis Variable Solution.5. Deduce the optimal solution of (P).
Solution
The simplex Tableau should contain:
BV x1 x2 x3 x4 x5 b Ratiox4 a1,1 a1,2 a1,3 a1,4 a1,5 b1
x5 a2,1 a2,2 a2,3 a2,4 a2,5 b2
−c1 −c2 −c3 0 0 z = c1x1 + c2x2 + c3x3
1. Write the initial simplex tableau for (P).
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30x5 2 2 1 0 1 50
-1 -1 -1 0 0 0
2. Find the pivot element and give the Basis Variable Solution.Since the minimum of the objective function are equal, we chose first column as pivot columnand it follows that the pivot row is also the second one because of the minimum property50/2 < 30/1 therefore the pivot element is a2,1 = 2
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30 30/1
x5 2 2 1 0 1 50 50/2-1 -1 -1 0 0 0
5
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (0, 0, 0, 30, 50).
3. Compute the second Simplex tableau and give the Basis Variable Solution.The pivot column is the third column (because of (-1/2)) and the pivot row is also the firstone because of the minimum property 10 < 50 therefore the pivot element is a1,3 = 1/2
BV x5 x2 x3 x4 x5 b Ratio
x4 0 1 1/2 1 -1/2 5 5/(1/2)
x1 1 1 1/2 0 1/2 25 25/(1/2)0 0 -1/2 0 1/2 25
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (25, 0, 0, 5, 0).
4. Compute the third Simplex tableau and give the Basis Variable Solution.
BV x4 x2 x4 x4 x5 b Ratiox3 0 2 1 2 -1 10x1 1 0 0 -1 1 20
0 1 0 1 0 30
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (20, 0, 10, 0, 0).
5. Since the objective function is positive, the optimal solution is then
(x1, x2, x3) = (20, 0, 10).
Where the maximum of the objective function is: z = 30.
6
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Final Exam Linear Programming, MATH 33125/2/1434- Duration 120Minutes
Problem 10. Given the following Linear Program:
(P) :
max 2x1 + x2
s.t. x1 + x2 ≤ 252x1 + x2 ≤ 40x1 + 2x2 ≤ 40x1, x2 ≥ 0
1. Draw the feasible region and solve graphically the LP problem.2. Find the five corners of the feasible region!3. Evaluate the objective function at each corner point!4. Deduce the optimal solution of the LP problem!5. Is the solution unique! Justify your answer!
Solution
1. Draw the feasible region and solve graphically the LP problem.First, we draw the lines (see figure bellow)
x1 + x2 = 252x1 + x2 = 40x1 + 2x2 = 40
then, we determine the intersection region between the corresponding half-spaces. Thus thefeasible solution set is given as shown in the figure bellow: To graphically solve the LPproblem, we draw the objective function for a constant for example
x1 + 2x2 = 30
and we translate it to the boundary of the polyhedral (the corners). We remark that theintersection between the objective function and the feasible solution set is the section definedby
x1 + x2 = 252x1 + x2 ≤ 40
The solution corners are (15, 10) and (20, 0) solution of the following systems:
x1 + x2 = 252x1 + x2 ≤ 40
andx2 = 02x1 + x2 ≤ 40
1
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x2
x1
F.S.
x1+x
2=25
x1+2x
2=40
2x1+x
2=40
0 5 10 15 20 25 30 35 400
5
10
15
20
25
30
35
40
x1
F.S. x1+2x
2=40
2x1+x
2=40
x1+x
2=25
Objective function 2x1+x
2=30
x2 Optimal Solution Set 2x
1+x
2=40
OptimalSolution
2. Find the five corners of the feasible region!The five corners of the feasible region are:
(0, 0) The trivial solution.
(0, 20) The intersection of the lines x2−axis and x1 + 2x2 = 40.
(20, 0) The intersection of the lines x1−axis and 2x1 + x2 = 40.
(15, 10) The intersection of the lines x1 + x2 = 25 and 2x1 + x2 = 40.
(10, 15) The intersection of the lines x1 + x2 = 25 and x1 + 2x2 = 40.
3. Evaluate the objective function at each corner point!
(0, 0) 2x1 + x2 = 0.
(0, 20) 2x1 + x2 = 20.
A := (20, 0) 2x1 + x2 = 40.(Optimal)
B := (15, 10) 2x1 + x2 = 40.(Optimal)
(10, 15) 2x1 + x2 = 35.
2
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
4. Deduce the optimal solution of the LP problem!See the table above.
5. Is the solution unique! Justify your answer!The solution of the LP is not unique.Since the LP-Problem admits to optimal solution A and B all convex combination of A andB are also solution of the LP-Problem, namely
λA + (1 − λ)B; λ ∈ [0, 1].
This convex combination determine the section already shown in question 1.
3
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 11. Given the following Dual Linear Program:
(D) :
min x1 + 2x2 + 3x3
s.t. x1 + x2 ≥ 4x2 + x3 ≥ 5x1 + x3 ≥ 6x1, x2, x3 ≥ 0
with optimal solution x1 = 2.5, x2 = 1.5, x3 = 3.5.
1. Write the Primal program (P) associated to the Dual program (D).2. Write the strong duality theorem for (P) and (D).3. Write the complementary slackness theorem.4. Solve the program (P).
Solution
1. Write the Primal program (P) associated to the Dual program (D).
(P) :
max 4y1 + 5y2 + 6y3
s.t. y1 + y3 ≤ 1y1 + y2 ≤ 2y2 + y3 ≤ 3y1, y2, y3 ≥ 0
2. Write the strong duality theorem for (P) and (D).Since the optimal solution of (P) is x1 = 2.5, x2 = 1.5, x3 = 3.5, then
∑
ai,jyi =∑
ai,jxj = 1(2.5) + 2(1.5) + 3(3.5) = 16.
3. Write the complementary slackness theorem.The conditions given by the complementary slackness theorem are:
y1 + y3 ≤ 1 : x1 6= 0 ⇒ y1 + y3 = 1
y1 + y2 ≤ 2 : x2 6= 0 ⇒ y1 + y2 = 2
y2 + y3 ≤ 3 : x3 6= 0 ⇒ y2 + y3 = 3
4. Solve the program (P).By solving the system above, we get y1 = 0, y2 = 2, y3 = 1.
4
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa Zahri
Problem 12. Given the following Primal Linear Program:
(P) :
max x1 + x2 + x3
s.t. x1 + 2x2 + x3 ≤ 302x1 + 2x2 + x3 ≤ 50x1, x2, x3 ≥ 0
1. Write the initial simplex tableau for (P).2. Find the pivot element and give the Basis Variable Solution.3. Compute the second Simplex tableau and give the Basis Variable Solution.4. Compute the third Simplex tableau and give the Basis Variable Solution.5. Deduce the optimal solution of (P).
Solution
The simplex Tableau should contain:
BV x1 x2 x3 x4 x5 b Ratiox4 a1,1 a1,2 a1,3 a1,4 a1,5 b1
x5 a2,1 a2,2 a2,3 a2,4 a2,5 b2
−c1 −c2 −c3 0 0 z = c1x1 + c2x2 + c3x3
1. Write the initial simplex tableau for (P).
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30x5 2 2 1 0 1 50
-1 -1 -1 0 0 0
2. Find the pivot element and give the Basis Variable Solution.Since the minimum of the objective function are equal, we chose first column as pivot columnand it follows that the pivot row is also the second one because of the minimum property50/2 < 30/1 therefore the pivot element is a2,1 = 2
BV x1 x2 x3 x4 x5 b Ratiox4 1 2 1 1 0 30 30/1
x5 2 2 1 0 1 50 50/2-1 -1 -1 0 0 0
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (0, 0, 0, 30, 50).
3. Compute the second Simplex tableau and give the Basis Variable Solution.The pivot column is the third column (because of (-1/2)) and the pivot row is also the firstone because of the minimum property 10 < 50 therefore the pivot element is a1,3 = 1/2
5
TAIBAH UNIVERSITY
College of Science, Dept. of MathematicsAl Madinah Al Munawwarah
Linear Programming, MATH 331First Term 1433/1434 (2012/2013)
Dr. Mostafa ZahriBV x5 x2 x3 x4 x5 b Ratio
x4 0 1 1/2 1 -1/2 5 5/(1/2)
x1 1 1 1/2 0 1/2 25 25/(1/2)0 0 -1/2 0 1/2 25
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (25, 0, 0, 5, 0).
4. Compute the third Simplex tableau and give the Basis Variable Solution.
BV x4 x2 x4 x4 x5 b Ratiox3 0 2 1 2 -1 10x1 1 0 0 -1 1 20
0 1 0 1 0 30
The Basis variable according to the simplex tableau above is
(x1, x2, x3, x4, x5) = (20, 0, 10, 0, 0).
5. Since the objective function is positive, the optimal solution is then
(x1, x2, x3) = (20, 0, 10).
Where the maximum of the objective function is: z = 30.
6