Linear programming study
Linear programming study
LINEAR
PROGRAMING
SELF STUDY
MATERIAL
Concise Approach
Terminology
1 Decision Variables.
These are the quantities we need to determine in order to optimize (maximize or
minimize) the objective.
Or the variables that represent the choices available to the decision maker.
Example:
A company makes chairs and tables.
Let x be the number of chairs.
Let y be the number of tables.
Here, x and y are the decision variables.
2 Objective Function
A mathematical expression that defines what we want to optimize/maximized or
minimized. (maximize profit or minimize cost).
Example (Maximization):
A business earns:
$50 per chair
$70 per table
Maximize P = 50x + 70y
Example (Minimization):
A company wants to minimize costs:
$20 per chair
$30 per table
Minimize C = 20x + 30y
3 Constraints
These are the restrictions or limits on resources/decision variables.
Example:
A factory has 100 hours available.
Each chair takes 5 hours.
Each table takes 10 hours.
5x + 10y ≤100
4 Feasible Region
The set of all possible points that satisfy all the constraints and sign restrictions.
1
©Irony studies KYU 2025
Example:
If we plot constraints on a graph, the feasible region is the unshaded area where all
conditions are met.
5 Non-Negativity Constraint
Decision variables cannot be negative because negative production doesn't make sense.
x≥0, y≥0
8 Redundant Constraint.
A constraint that does not affect the feasible region.
NB a non-redundant constraint is a constraint is the one that affects the feasible
region.
Example:
If a factory has only 80 hours but another constraint already limits it to 50 hours, the 80-
hour constraint is redundant.
Surplus Variable – Subtracted from ≥ (greater than or equal to) constraints to show
excess.
Example:
If a factory has 100 available hours but only 90 hours are used, the slack = 10 hours.
2
©Irony studies KYU 2025
11 Alternative Optimal Solutions
Sometimes, there are multiple solutions that give the same optimal value.
*check in note 1 at the bottom of the document.
12 Infeasible Solution
If no solution satisfies all constraints, the problem has no feasible solution.
Or its obtained if the feasible region does not exist.
13 Degeneracy
When multiple constraints meet at a single point, causing uncertainty in the solution.
Or This is when one or more basic variables take a value of zero in the optimal solution.
14 Simplex Method
A method used to solve LP problems with many variables. It moves along the edges of
the feasible region to find the best solution.
15 Duality in LP
Every LP problem (Primal) has a corresponding Dual Problem, which can sometimes be
easier to solve.
Graphical Method for Solving Linear Programming Problems.
16 Optimal solution; It’s a point in the feasible region that optimizes the objective
function.
17 Half-space; it’s a set of all points that satisfy a given inequality where at least one of
the inequality coefficients is a non-zero.
18 Hyper plane; it’s a set of all points that satisfy a given equality where at least one of
the equality coefficients is a non-zero.
19 polyhedron; it’s the intersection of a finite number of half spaces and/or hyper planes.
NB; A boundary point is a point that lies in the polyhedron and on one or more of
the half-spaces or hyper planes.
An interior point is a point that lies in the polyhedron and its not a boundary point.
20 Convex polygon/space; It’s a set of points for each any two distinct points, a line
segment joining them lies entirely within this set.
The objective function represents what we want to maximize (profit) or minimize (cost).
Example:
4
©Irony studies KYU 2025
The highest value (for maximization) or lowest value (for minimization) gives the
optimal solution.
For more than two variables, we use the Simplex Method (next topic).
Summary of Steps
1 Define decision
variables.
2 Write the objective
function.
3 Write constraints.
4 Convert inequalities
into equations and plot
them.
5 Identify the feasible
region.
6 Find corner points. Trial Questions
7 Evaluate the objective Question 1: Maximizing Profit
function at each corner. A company produces pens and notebooks.
8 Select the best Each pen gives a profit of $3.
solution. Each notebook gives a profit of $5.
The company can produce at most 200 items in total.
There are only 150 hours available:
Each pen requires 1 hour.
Each notebook requires 2 hours.
Example:
Maximize Z = 3x₁ + 5x₂
Subject to:
1. x₁ + 2x₂ ≤ 6
2. 2x₁ + 3x₂ ≤ 12
3. x₁, x₂ ≥ 0
For "≤" (less than or equal to) constraints, add slack variables (s₁, s₂, ...).
For "≥" (greater than or equal to) constraints, introduce surplus variables and
artificial variables (Big M Method).
1. x₁ + 2x₂ + s₁ = 6
2. 2x₁ + 3x₂ + s₂ = 12
7
©Irony studies KYU 2025
Construct a tableau with the coefficients of the equations.
x₁ x₂ s₁ s₂ z RHS
1 2 1 0 0 6
2 3 0 1 0 12
-3 -5 0 0 1 0
If there are negative values in the Z-row, the solution is not optimal.
Select the most negative coefficient in the Z-row (this is the entering variable).
In our example, -5 (corresponding to x₂) is the most negative → x₂ enters the basis.
Use the minimum ratio test to decide which variable will leave the basis.
Divide RHS by the corresponding column values of the entering variable (ignore
negatives and zeros).
For x₂:
Row 1: 6 ÷ 2 = 3
Row 2: 12 ÷ 3 = 4
x₁ x₂ s₁ s₂ Z RHS
0.5 1 0.5 0 3
8
©Irony studies KYU 2025
x₁ x₂ s₁ s₂ Z RHS
0.5 0 -1.5 1 3
-0.5 0 2.5 0 15
Summary of Simplex If all values in the Z-row (except for RHS) are ≥ 0, the
solution is optimal.
Method Steps
If there are negative values, repeat Steps 4–6 until
optimality is reached.
1. Formulate the
LP problem
(write the
objective Step 8: Read the Solution
function &
constraints). The basis variables in the final tableau give the optimal
solution.
2. Convert
Non-basis variables are zero.
constraints to
Optimal values:
equations
o x₁ = 3, x₂ = 3, Z = 24
(introduce
slack/surplus/ar
tificial variables).
3. Set up the initial
simplex tableau.
4. Check for Trial questions
optimality
(identify the Question 1
entering variable
with the most Maximize Z = 4x₁ + 3x₂
negative Z-row Subject to:
value).
5. Determine the 1. 2x₁ + x₂ ≤ 8
leaving variable 2. x₁ + 2x₂ ≤ 6
(use the
3. x₁, x₂ ≥ 0
minimum ratio
test).
6. Pivot (perform (Answer:x₁ = 3, x₂ = 1.5, Z = 15)
row operations
to update the
tableau). Question 2
7. Repeat until
optimality Maximize Z = 5x₁ + 6x₂
(when all Z-row Subject to:
values are non-
negative). 1. 3x₁ + 2x₂ ≤ 18
8. Extract the final 2. 2x₁ + x₂ ≤ 8
solution (values
of decision 9
variables and Z). ©Irony studies KYU 2025
3. x₁, x₂ ≥ 0
(Answer:x₁ = 4, x₂ = 3, Z = 38)
Question 3
1. x₁ + 4x₂ ≥ 8
2. 2x₁ + x₂ ≥ 6
3. x₁, x₂ ≥ 0
Question 4
1. 4x₁ + 2x₂ ≤ 12
2. 3x₁ + x₂ ≤ 8
3. x₁, x₂ ≥ 0
(Answer:x₁ = 2, x₂ = 2, Z = 22)
Question 5
1. 2x₁ + x₂ ≥ 10
2. x₁ + 3x₂ ≥ 15
3. x₁, x₂ ≥ 0
(Answer:x₁ = 3, x₂ = 4, Z = 57)
10
©Irony studies KYU 2025
DUALITY IN LINEAR PROGRAMMING
In Linear Programming (LP), every maximization problem (called the Primal problem)
has a corresponding minimization problem (called the Dual problem). Duality helps us
analyze LP problems from a different perspective and sometimes makes solving them
easier.
Step 3: Solve the Dual Problem Using the Simplex or Dual Simplex Method
Construct the initial simplex tableau for the dual problem.
Apply the Simplex Method:
Identify the entering and leaving variables.
11
©Irony studies KYU 2025
Perform pivoting to reach an optimal solution.
Stop when all coefficients in the objective row satisfy the optimality condition.
If the dual problem is infeasible, apply the Dual
Summary of the
Simplex Method (fix infeasibility first while
Duality Method in
maintaining optimality).
Linear
Programming
Step 4: Interpret the Final Answer
1. Express the
Extract the optimal values of the dual variables.
Primal in Standard
Use Complementary Slackness to find the primal
Form – Ensure the
solution from the dual solution.
objective function
The optimal values of primal and dual variables satisfy
and constraints are
the Strong Duality Theorem (i.e., the optimal value of
properly formatted.
the primal objective function equals that of the dual).
2. Formulate the
Dual Problem –
Step 5: Final Outcome
Convert the max
The optimal solution of the dual provides the optimal
problem to a min
solution of the primal.
problem (or vice
The final optimal value of the objective function is the
versa), transpose
same for both the primal and dual problems.
coefficients, and
If no feasible solution exists for the dual, the primal has
reverse inequalities.
no feasible solution (or vice versa)..
3. Solve the Dual
Using Simplex or
Dual Simplex –
Apply the simplex BIG M METHOD
method to find the
optimal solution. The Big M Method is a technique used to handle binary (0-
4. Interpret the 1) variables in Mixed-Integer Programming (MIP)
Solution – Use problems. We use a large constant M to penalize the
Complementary solution when certain constraints are violated, especially
Slackness to find the when dealing with binary variables in optimization
primal solution from problems.
the dual and verify
optimality. Basic Idea:
Binary Variables: We have variables that can only take
5. Obtain the Final
values of either 0 or 1.
Answer – The
optimal values of the
primal and dual
12
match, confirming
©Irony studies KYU 2025
the solution.
Big M: The value M is a very large number that we introduce to force certain conditions
to be satisfied in the problem.
Example:
13
©Irony studies KYU 2025
Step 4: Perform the Simplex Algorithm
Trial questions
Question 1
1. 2x₁ + 3x₂ ≥ 6
2. 4x₁ + x₂ = 5
3. x₁, x₂ ≥ 0
(Answer:x₁ = 1, x₂ = 1, Z = 10)
14
©Irony studies KYU 2025
Question 2
1. x₁ + 2x₂ = 4
2. 3x₁ + x₂ ≥ 3
3. x₁, x₂ ≥ 0
Question 3
1. x₁ + x₂ ≥ 5
2. 2x₁ + x₂ = 6
3. x₁, x₂ ≥ 0
(Answer:x₁ = 2, x₂ = 3, Z = 13)
Question 4
1. 2x₁ + x₂ ≥ 8
2. x₁ + 3x₂ = 9
3. x₁, x₂ ≥ 0
(Answer:x₁ = 3, x₂ = 2, Z = 29)
Question 5
1. x₁ + 2x₂ = 10
15
©Irony studies KYU 2025
2. 3x₁ + x₂ ≥ 9
3. x₁, x₂ ≥ 0
2. Simplex Method
No Solution (Infeasible LP):
The initial basic feasible solution (BFS) does not exist.
Constraints contradict each other, making the feasible region
empty.
Detectable if an artificial variable remains in the basis at a
nonzero value at the end of Phase 1.
4. Big-M Method
No Solution (Infeasible LP):
If an artificial variable remains in the basis at a nonzero value
after optimization, the problem is infeasible
The penalty forces infeasibility detection.
6. Two-Phase Method
No Solution (Infeasible LP):
If Phase 1 does not find a feasible solution (i.e., the sum of
artificial variables does not become zero), the problem is
infeasible.
NOTES
1. An alternative optima exists when the objective function is parallel to the non-
redundant binding constraint. (a condition for multiple solutions in graphical
approach.)
2. Unboundedness vs. No Solution
17
©Irony studies KYU 2025
END
18
©Irony studies KYU 2025