Linear Programming 1
Linear Programming 1
Linear programming
Section One: Basic Information:
This section refers to key learning outcomes as per the Education and Training Assessment
Document.
Requires a description of at least three full lines, outlining key themes, objectives, and scope.
Linear programming is a mathematical method used to determine the best possible outcome in a
given mathematical model with linear relationships. This unit covers the foundational concepts,
including objective functions, constraints, decision variables, and feasible regions. Students will
learn how to model real-world problems, such as resource allocation and production planning,
using linear programming. The unit also introduces solution techniques like the graphical method
and the simplex algorithm, emphasizing their applications in industrial engineering.
States that the content developer should ensure comprehensiveness, organization, and clarity.
3. Formulating LP Problems
Steps:
1. Define Decision Variables (What needs to be decided?).
2. Write the Objective Function (What is the goal?).
3. List Constraints (What limitations exist?).
4. Ensure Non-Negativity (Variables cannot be negative).
Example Problem:
A company produces two products, A and B. Each unit of A gives a profit of $3, and each unit of
B gives $5. Production requires:
• 2 hours of labor for A and 1 hour for B (total labor ≤ 100 hours).
• 1 hour of machine time for A and 3 hours for B (total machine time ≤ 90 hours).
Formulation:
• Variables: 𝑥1 = units of A, 𝑥2 = units of B.
• Objective: Maximize 𝑍 = 3𝑥1 + 5𝑥2 .
• Constraints:
2𝑥1 + 𝑥2 ≤ 100 (Labor)
𝑥1 + 3𝑥2 ≤ 90 (Machine)
𝑥1 , 𝑥2 ≥ 0
4. Solving LP Problems
(a) Graphical Method (for 2 Variables)
• Plot constraints on a graph to find the feasible region.
• The optimal solution lies at a corner point of the feasible region.
Steps:
1. Plot each constraint as an equation (equality).
2. Identify the feasible region (area satisfying all constraints).
3. Find corner points (intersection of constraints).
4. Evaluate the objective function at each corner point.
5. Select the point that maximizes/minimizes the objective.
(b) Simplex Method (for Multiple Variables)
• An iterative algorithm for solving larger LP problems.
• Moves from one feasible solution to another, improving the objective value each time.
Key Steps:
1. Convert inequalities to equations using slack/surplus variables.
2. Set up the initial simplex tableau.
3. Perform pivoting to improve the solution.
4. Repeat until the optimal solution is found.
6. Solved Problems
1- For the following mathematical linear programming model,
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟏𝟐
𝟖 𝒙𝟏 + 𝟏𝟎 𝒙𝟐 ≤ 𝟖𝟎
𝒙𝟏 ≤ 𝟒
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
A. Write the problem in standard form for simplex method.
B. Solve the linear programming model graphically.
C. Determine the optimal solution if the coefficient of objective function becomes
Z = 10x1 + 8 x2.
Solution
A. Write the problem in standard form for simplex method.
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝟐𝒙𝟏 + 𝒙𝟐 + 𝒔𝟏 = 𝟏𝟐
𝟖 𝒙𝟏 + 𝟏𝟎 𝒙𝟐 + 𝒔𝟐 = 𝟖𝟎
𝒙𝟏 + 𝒔𝟑 = 𝟒
𝒙𝟏 , 𝒙𝟐 , 𝒔𝟏, 𝒔𝟐, 𝒔𝟑 ≥ 𝟎
12 0, 12
11
10 4, 10
8 0, 8
0 4, 0 6, 0 10, 0
0 1 2 3 4 5 6 7 8 9 10 11
2- The Omega Manufacturing Company has discontinued the production of a certain unprofitable
product line. This act created considerable excess production capacity. Management is
considering devoting this excess capacity to one or more of three products; call them products 1,
2, and 3. The available capacity on the machines that might limit output is summarized in the
following table:
Available Time
Machine Type (Machine Hours per Week)
Milling machine 500
Lathe 350
Grinder 150
The number of machine hours required for each unit of the respective products is Productivity
coefficient (in machine hours per unit)
The sales department indicates that the sales potential for product 3 is at most 20 units per week.
The unit profit would be $50, $20, and $25, respectively, on products 1, 2, and 3. The objective is
to determine how much of each product Omega should produce to maximize profit.
Max Z= 50x1+20x2+25x3
S.t
x3 ≤ 2 0
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0
C. How many basic variables will be equal to zero in the initial solution?
M=7
N=4
D. Develop the portion of the simplex tableau involving the objective function coefficients,
the coefficients of the variables in the constraints, and the constants for the right-hand sides.
Cj 50 20 25 0 0 0 0
CB R.H.S Ratio
B.V X1 X2 X3 S1 S2 S3 S4
0 S1 9 3 5 1 0 0 0 500
0 S2 5 4 0 0 1 0 0 350
0 S3 3 0 2 0 0 1 0 150
0 S4 0 0 1 0 0 0 1 20
0 S1 200 50
4 8 1 1 0 0
0 S2 300 -
0 2 1 0 1 0
0 S3 400 12.5
32 4 2 0 0 1
Zj 0 0 0 0 0 0 0
Cj - Zj 24 19 3 0 0 0
0 S1 150 20
0 15/2 3/4 1 0 -1/8
0 S2 300 150
0 2 1 0 1 0
24 X1 12.5 100
1 1/8 1/16 0 0 1/32
Cj - Zj 0 17 1.5 0 0 -0.75
19 X2 20
0 1 0.1 2/15 0 -1/60
0 S2 260
0 0 0.8 -4/15 1 1/30
24 X1 10
1 0 0.05 -1/60 0 1/30
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝟒𝒙𝟏 + 𝟖 𝒙𝟐 + 𝒙𝟑 ≤ 𝟐𝟎𝟎
𝟐𝒙𝟐 + 𝒙𝟑 ≤ 𝟑𝟎𝟎
𝒙𝟏 , 𝒙𝟐, 𝒙𝟑 ≥ 𝟎
c- Find the optimal solution using the simplex method.
X1= 10
X2= 20
X3= 0
Z= 24*10+20*19 = 620
4- Write the dual for each of the following primal problems
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝟐𝒙𝟏 + 𝒙𝟐 ≥ 𝟏𝟐
𝟖 𝒙𝟏 + 𝟏𝟎 𝒙𝟐 ≥ 𝟖𝟎
𝟐𝒙𝟏 + 𝒙𝟐 ≥ 𝟏𝟎
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝒚𝟏 + 𝟏𝟎 𝒚𝟐 + 𝒚𝟑 ≤ 𝟏𝟖
𝒚𝟏 , 𝒚𝟐, 𝒚𝟑 ≥ 𝟎
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
−𝟒𝒙𝟏 + 𝒙𝟐 ≤ −𝟏𝟔
𝟑 𝒙𝟏 + 𝟓 𝒙𝟐 ≤ 𝟐𝟓
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
−𝟒𝒚𝟏 + 𝟑𝒚𝟐 ≥ 𝟔𝟔
𝒚𝟏 + 𝟓 𝒚𝟐 ≥ 𝟐𝟏
𝒚𝟏 , 𝒚𝟐, ≥ 𝟎
5- Five jobs are to be assigned to 5 machines to minimize the total time required to process the
jobs on machines. The times in hours for processing each job on each machine are given in the
matrix below. By using assignment algorithm make the assignment for minimizing the time of
processing.
Jobs A B C D E
V 12 11 18 19 11
W 9 14 13 16 12
X 19 10 12 21 13
Y 12 21 19 11 14
Z 12 16 15 21 12
Solution
Jobs A B C D E
V 1 0 7 8 0
W 0 5 4 7 3
X 9 0 2 11 3
Y 1 10 8 0 3
Z 0 4 3 9 0
Jobs A B C D E
V 1 0 5 8 0
W 0 5 2 7 3
X 9 0 0 11 3
Y 1 10 6 0 3
Z 0 4 1 9 0
6- A delivery company in Paris (1) has to make a food delivery to Orleans (9) and has various
possibilities to reach its final destination.
a- formulation
Minimize Z = 47x12 + 35x13 + 71x14 + 89x26 + 65x25 + 30x34 + 67x35 + 89x38 + 85x47 + 45x58 +
80x59 + 95x69 + 85x89
x47 - x78 = 0
x26 - x69 = 0
xij = 0 or 1
𝑺𝒖𝒃𝒋𝒆𝒄𝒕 𝒕𝒐
𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟒𝟎
𝟐 𝒙𝟐 + 𝒙𝟑 ≤ 𝟑𝟎
𝟔𝒙𝟏 − 𝟏𝒙𝟑 ≤ 𝟑𝟎
𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ≥ 𝟎
Cj 5 20 25 0 0 0
CB R.H.S Ratio
B.V X1 X2 X3 S1 S2 S3
0 S1 2 1 0 1 0 0 40 --
0 S2 0 2 1 0 1 0 30 30
0 S3 6 0 -1 0 0 1 30 ---
Cj 5 20 25 0 0 0
CB R.H.S Ratio
B.V X1 X2 X3 S1 S2 S3
Zj 0 0 0 0 0 0 0
Cj - Zj 5 20 25 0 0 0
0 S1 2 1 0 1 0 0 40 20
25 X3 0 2 1 0 1 0 30 --
0 S3 6 2 0 0 1 1 60 10
Zj 0 50 25 0 25 0 750
Cj - Zj 5 -30 0 0 -25 0
0 S1 0 1/3 0 1 -2 -2 20
25 X3 0 2 1 0 1 0 30
Solution
Destinations
Sources Capacities
A B C
X 14 13 15 500
Y 16 15 12 400
Z 20 15 16 400
Requirements 550 300 450
Quiz:
Requires the content developer to prepare a short quiz consisting of four multiple-choice
questions.
2. Decision variables
a. tell how much or how many of something to produce, invest, purchase, hire,
etc.
b. represent the values of the constraints.
c. measure the objective function.
d. must exist for each constraint.
3. Which of the following is a valid objective function for a linear programming problem?
a. Max 5xy
b. Min 4x + 3y + (2/3)z
c. Max 5x2 + 6y2
d. Min (x1 + x2)/x3
4. Slack
a. is the difference between the left and right sides of a constraint.
b. is the amount by which the left side of a < constraint is smaller than the right
side.
c. is the amount by which the left side of a > constraint is larger than the right side.
d. exists for each variable in a linear programming problem.
6. The improvement in the value of the objective function per unit increase in a right-hand side is
the
a. sensitivity value.
b. shadow price.
c. constraint coefficient.
d. slack value.
7. Infeasibility means that the number of solutions to the linear programming models that
satisfies all constraints is
a. at least 1.
b. 0.
c. an infinite number.
d. at least 2.
9. All of the following statements about a redundant constraint are correct EXCEPT
a. A redundant constraint does not affect the optimal solution.
b. A redundant constraint does not affect the feasible region.
c. Recognizing a redundant constraint is easy with the graphical solution method.
d. At the optimal solution, a redundant constraint will have zero slack.
10. All linear programming problems have all of the following properties EXCEPT
a. a linear objective function that is to be maximized or minimized.
b. a set of linear constraints.
c. alternative optimal solutions.
d. variables that are all restricted to nonnegative values.
11. What is the primary purpose of linear programming?
a) To solve quadratic equations
b) To perform statistical regression
c) To optimize a linear objective function under constraints
d) To plot nonlinear graphs
12. Which of the following is NOT a component of an LP model?
a) Decision variables
b) Objective function
c) Random sampling
d) Constraints
17. A diet is being developed which must contain at least 100 mg of vitamin C. Two fruits are
used in this diet. Bananas contain 30 mg of vitamin C and Apples contain 20 mg of
vitamin C. The diet must contain at least 100 mg of vitamin C. Which of the following
constraints reflects the relationship between Bananas, Apples and vitamin C?
a) 20 A + 30 B ≥ 100
b) 20 A + 30 B ≤100
c) 20 A + 30 B = 100
d) 20 A = 100
18. The objective function for a LP model is 3 X1 + 2 X2. If X1 = 20 and X2 = 30, what is the
value of the objective function?
a) 0
b) 50
c) 60
d)120