0% found this document useful (0 votes)
4 views

Linear programming study

The document provides a comprehensive overview of Linear Programming (LP) concepts, including decision variables, objective functions, constraints, feasible regions, and methods for solving LP problems such as the Graphical Method and the Simplex Method. It outlines key terminology and steps for formulating and solving LP problems, along with examples and trial questions for practice. Additionally, it introduces the concept of duality in LP, explaining its significance and the process of converting a primal problem to its dual.

Uploaded by

Baptist
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Linear programming study

The document provides a comprehensive overview of Linear Programming (LP) concepts, including decision variables, objective functions, constraints, feasible regions, and methods for solving LP problems such as the Graphical Method and the Simplex Method. It outlines key terminology and steps for formulating and solving LP problems, along with examples and trial questions for practice. Additionally, it introduces the concept of duality in LP, explaining its significance and the process of converting a primal problem to its dual.

Uploaded by

Baptist
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

DOROTHY K. DEVINA & NAKYANZI E.

IRONY STUDIES 2025

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

6 Bounded and Unbounded Solutions


Bounded Solution – If the feasible region is enclosed (has limits), the solution exists.
Unbounded Solution – If the feasible region extends infinitely, the solution might not be
practical.

7 Corner Point Theorem


In LP, the optimal solution always lies at a corner (vertex) of the feasible region.

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.

9 Slack and Surplus Variables


Slack Variable – Added to ≤ (less than or equal to) constraints to show unused resources.

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.

10. Binding and Non-Binding Constraints


Binding Constraint – A constraint that directly affects the optimal solution.
Or it’s a constraint that on substitution with the optimal solution, the LHS=RHS.
Non-Binding Constraint – A constraint that does not affect the final outcome.
Or it’s a constraint that on substitution with an optimal solution, the LHS≠RHS.

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 GRAPHICAL METHOD


3
©Irony studies KYU 2025
The Graphical Method is a simple way to solve Linear Programming (LP) problems
when there are only two decision variables. It involves plotting constraints on a graph and
identifying the feasible region, then finding the optimal solution at a corner point.

Steps to Solve an LP Problem Using the Graphical Method

Step 1: Define the Decision Variables

Decide what the variables represent.


Example:
A factory makes chairs and tables.

Let x = Number of chairs.

Let y = Number of tables.

Step 2: Write the Objective Function

The objective function represents what we want to maximize (profit) or minimize (cost).
Example:

Profit per chair = $50

Profit per table = $70

Maximize P = 50x + 70y

Step 3: Write the Constraints


Constraints define the limitations (materials, labor, storage, etc.).

Step 4: Plot the Constraints on a Graph


 Convert each inequality into an equation (replace ≤ or ≥ with =).
 Find two points for each equation (let x=0 to find y, then let y=0 to find x ).
 Draw the lines on a graph.
 Identify the feasible region (where all constraints overlap).

Step 5: Identify the Corner Points


The optimal solution will always be at one of the corner points of the feasible region.
Find where the constraint lines intersect.

Step 6: Evaluate the Objective Function at Each Corner Point


Calculate the objective function value at each corner point.

4
©Irony studies KYU 2025
The highest value (for maximization) or lowest value (for minimization) gives the
optimal solution.

Step 7: Choose the Best Solution


Pick the point with the best (maximum or minimum) value.
This gives the optimal number of chairs and tables to produce.

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.

a) Formulate the LP Problem


b) Define variables.
c) Write the objective function.
d) Write the constraints.
e) Find the optimal number of pens and notebooks to maximize profit.

Question 2: Minimizing Cost

A furniture company makes desks and chairs.


A desk costs $30 to produce.
5
©Irony studies KYU 2025
A chair costs $20 to produce.
The company must produce at least 10 desks and 20 chairs.
It cannot produce more than 80 items in total due to space limits.
The company wants to minimize total production cost.

a) Define decision variables.


b) Write the objective function.
c) Write constraints.
d) Use the graphical method to find the minimum cost.

Question 3: Resource Allocation


A factory produces two products, A and B.
Each unit of A needs 3 kg of material.
Each unit of B needs 2 kg of material.
The company has 60 kg of material available.
Each unit of A takes 2 hours to produce.
Each unit of B takes 3 hours to produce.
The factory has 48 hours available.
Each unit of A gives a profit of $40.
Each unit of B gives a profit of $50.

a) Find the best production plan


b) Define the decision variables.
c) Write the objective function.
d) Write the constraints.
e) Find the maximum profit using the Graphical Method.

THE SIMPLEX METHOD


The Simplex Method is a systematic way to find the optimal solution for Linear
Programming (LP) problems with more than two variables or when the Graphical Method
is not practical.
When Do We Use the Simplex Method?
When there are more than two decision variables (Graphical Method works only
for two variables).
When there are many constraints, making a graphical solution difficult.

Basic Idea of the Simplex Method


1. Convert the LP problem into standard form.
6
©Irony studies KYU 2025
2. Set up the Simplex Table.
3. Use row operations to improve the solution step by step.
4. Stop when the optimal solution is reached.

Steps of the Simplex Method

Step 1: Formulate the LP Problem

 Identify the objective function (maximize or minimize).


 Write down the constraints in the form of linear inequalities or equations.
 Ensure all variables are non-negative (x₁, x₂, ... ≥ 0).

Example:
Maximize Z = 3x₁ + 5x₂
Subject to:

1. x₁ + 2x₂ ≤ 6
2. 2x₁ + 3x₂ ≤ 12
3. x₁, x₂ ≥ 0

Step 2: Convert Constraints into Equations (Standard Form)

To convert inequalities (≤) into equations, introduce slack variables:

 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).

For our example:


Introduce s₁ and s₂ for the constraints:

1. x₁ + 2x₂ + s₁ = 6
2. 2x₁ + 3x₂ + s₂ = 12

Now, the objective function remains:


Maximize Z = 3x₁ + 5x₂

Step 3: Set Up the Initial Simplex Tableau

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

Step 4: Check Optimality (Identify Entering Variable)

 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.

Step 5: Determine the Leaving Variable

 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

Smallest ratio is 3 (Row 1), so s₁ leaves the basis.

Step 6: Pivot (Perform Row Operations)

 Transform the pivot element (intersection of entering and leaving variable) to 1.


 Make all other values in the entering column zero by row operations.

New tableau after pivoting:

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

Step 7: Check for Optimality Again

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

Minimize Z = 2x₁ + 3x₂


Subject to:

1. x₁ + 4x₂ ≥ 8
2. 2x₁ + x₂ ≥ 6
3. x₁, x₂ ≥ 0

(Answer:x₁ = 2, x₂ = 1.5, Z = 8.5)

Question 4

Maximize Z = 6x₁ + 5x₂


Subject to:

1. 4x₁ + 2x₂ ≤ 12
2. 3x₁ + x₂ ≤ 8
3. x₁, x₂ ≥ 0

(Answer:x₁ = 2, x₂ = 2, Z = 22)

Question 5

Minimize Z = 7x₁ + 9x₂


Subject to:

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.

Why is Duality Important?


1. Gives deeper insight into the original problem.
2. Sometimes easier to solve than the Primal problem.
3. Provides sensitivity analysis (how changes in constraints affect the solution).
4. Helps in economic interpretation of LP problems.

Steps to Convert a Primal Problem to a Dual Problem

Step 1: Express the Primal Problem in Standard Form


Ensure the objective function is in maximization form.
Express all constraints in ≤, ≥, or = form.
Ensure all decision variables are non-negative (if needed, introduce unrestricted
variables).
Step 2: Formulate the Dual Problem
Convert the maximization problem into a minimization problem (or vice versa).
Introduce a dual variable for each primal constraint.
The RHS values of the primal become the objective coefficients in the dual.
The coefficients of the primal constraints are transposed into the dual constraint
matrix.
The objective function coefficients of the primal become the RHS values in the
dual.
Reverse the inequalities:
If the primal constraint is ≤, the dual constraint is ≥.
If the primal constraint is ≥, the dual constraint is ≤.
If the primal constraint is =, the dual constraint is =.

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.

Furthermore, the Big M Method is a technique used in linear programming to solve


optimization problems with artificial variables in the Simplex Method. It helps deal
with constraints that are ≥ (greater than or equal to) or = (equality constraints) by
introducing artificial variables and assigning them a very large penalty (M) in the
objective function.

Steps for Using the Big M Method

Step 1: Formulate the Linear Program

 Identify the objective function (maximize or minimize).


 Write down the constraints in standard form (≤, =, or ≥).
 Identify slack, surplus, and artificial variables:
o Slack variables (+s) for ≤ constraints.
o Surplus variables (-s) + artificial variables (+a) for ≥ constraints.
o Artificial variables (+a) for = constraints.

Step 2: Modify the Objective Function

 If you introduce artificial variables, modify the objective function:


o Assign a large penalty (M) to artificial variables (M is a very large positive
number).
o For Maximization: Subtract M × (artificial variables) in the objective
function.
o For Minimization: Add M × (artificial variables) in the objective
function.

Example:

o Original: Max Z = 3x₁ + 5x₂


o After Big M adjustment: Max Z = 3x₁ + 5x₂ - M(a₁ + a₂)

Step 3: Set Up the Initial Simplex Table

 Include all variables (decision, slack, surplus, and artificial).


 Place M-coefficients in the objective row for artificial variables.

13
©Irony studies KYU 2025
Step 4: Perform the Simplex Algorithm

1. Check optimality condition:


o If there are negative values in the objective row (Z-row), continue.
2. Choose the entering variable:
o Pick the column with the most negative value in the Z-row.
3. Choose the leaving variable:
o Use the minimum ratio test to decide which row to remove.
4. Pivot and update the table:
o Perform row operations to make the entering variable a basic variable.

Step 5: Continue Until Optimality

 Keep iterating until:


o All entries in the Z-row (except for artificial variables) are non-negative.
o Artificial variables are removed from the basis (if an artificial variable
remains in the basis with a nonzero value, the problem is infeasible).

Step 6: Interpret the Results

 If the optimal solution is reached, read the values of decision variables.


 If artificial variables still exist in the final solution with nonzero values, the
problem is infeasible.

Trial questions

Question 1

Maximize Z = 4x₁ + 6x₂


Subject to:

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

Minimize Z = 5x₁ + 8x₂


Subject to:

1. x₁ + 2x₂ = 4
2. 3x₁ + x₂ ≥ 3
3. x₁, x₂ ≥ 0

(Answer:x₁ = 1, x₂ = 1.5, Z = 17)

Question 3

Maximize Z = 2x₁ + 3x₂


Subject to:

1. x₁ + x₂ ≥ 5
2. 2x₁ + x₂ = 6
3. x₁, x₂ ≥ 0

(Answer:x₁ = 2, x₂ = 3, Z = 13)

Question 4

Minimize Z = 7x₁ + 4x₂


Subject to:

1. 2x₁ + x₂ ≥ 8
2. x₁ + 3x₂ = 9
3. x₁, x₂ ≥ 0

(Answer:x₁ = 3, x₂ = 2, Z = 29)

Question 5

Maximize Z = 5x₁ + 7x₂


Subject to:

1. x₁ + 2x₂ = 10

15
©Irony studies KYU 2025
2. 3x₁ + x₂ ≥ 9
3. x₁, x₂ ≥ 0

(Answer:x₁ = 3, x₂ = 3.5, Z = 41.5)

CONDITIONS FOR NO SOLUTION AND MULTIPLE SOLUTIONS IN LINEAR


PROGRAMMING (LP)

1. Graphical Method (For 2-variable problems)


No Solution (Infeasible LP):
The feasible region is empty (i.e., no common region satisfies all
constraints).
This happens when constraints contradict each other.

Multiple Solutions (Alternative Optima):

The objective function is parallel to a constraint forming an edge


of the feasible region.
Any point along this edge gives the same optimal value.
(Read note 1 at the bottom for more)

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.

Multiple Solutions (Alternative Optima):


The optimal solution is degenerate, meaning one of the non-basic
variables has a zero coefficient in the objective row at optimality.
This occurs when there’s a tie in the entering variable during the
simplex iterations.
Can be detected when the optimal tableau has a zero in the
reduced cost row for a non-basic variable

3. Dual Simplex Method


No Solution (Infeasible LP):
If at some stage a negative RHS persists with no possible pivot
column to drive it to feasibility
16
©Irony studies KYU 2025
This implies that the original LP has no feasible solution.
Multiple Solutions (Alternative Optima):
Same as in the primal simplex method: If the final tableau has a
zero in the objective row for a non-basic variable, an alternative
optimal solution exists.

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.

Multiple Solutions (Alternative Optima):


If a non-basic variable has a zero coefficient in the final row of the
objective function, multiple solutions exist.

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.

Multiple Solutions (Alternative Optima):


Same as in the Simplex Method: A tie in the choice of entering
variable at optimality suggests multiple solutions.

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

A problem is unbounded if the objective function can improve indefinitely (e.g.,


maximizing without an upper constraint). Unbounded problems are different
from infeasible ones, as they have solutions, but no finite optimum.

17
©Irony studies KYU 2025
END

18
©Irony studies KYU 2025

You might also like