Linear-Programming1
Linear-Programming1
Definition:
Linear Programming (LP) is a mathematical technique used to optimize an objective function
subject to a set of linear constraints. It is widely used in operations research, economics,
engineering, and business for resource allocation, scheduling, and decision-making.
1. Decision Variables:
o These are the variables that determine the outcome of the problem.
o Example: In a production problem, x1x_1x1 and x2x_2x2 could represent the number of
two different products manufactured.
2. Objective Function:
o This is the function to be maximized or minimized.
o Example: Maximizing profit or minimizing cost.
o It takes the form:
Z = c1x1+c2x2+⋯+cnxn
where ci are the coefficients representing profit, cost, etc.
3. Constraints:
a1x1+a2x2≤b
where ai are resource coefficients and b is the available resource.
Non-Negativity Restriction:
• Variables must be non-negative (xi≥0) since negative values may not be meaningful in
real-world scenarios.
Formulation of an LP Problem:
LP Formulation:
1. Decision Variables:
o Let x1 = number of units of A
o Let x2 = number of units of B
2. Objective Function:
Maximize Z=5x1+4x2
3. Constraints:
Material constraint:
3x1+2x2≤18
Labor constraint:
2x1+2x2≤12
Non-negativity:
x1,x2≥0
Solution Methods:
2. Simplex Method:
An iterative algebraic approach for solving LP problems with multiple variables.
Efficient for large-scale problems.
4. Interior-Point Methods:
Alternative to simplex, often used in modern optimization software for large problems.
Conclusion:
Linear programming is a powerful tool for decision-making in various fields. By modeling real-
world problems as linear equations and inequalities, it helps find optimal solutions that maximize
efficiency and minimize costs.
Simplex Method
We will solve the following linear programming problem using the Simplex Method:
Problem Statement:
Maximize Z=3x1+5x2
Subject to the constraints:
x1+2x2≤4
3x1+2x2≤6
x1 ,x2 ≥ 0
Step 1: Convert to Standard Form
x1+2x2+s1=4
3x1+2x2+s2=6
The new objective function (in standard form) remains:
Z=3x1+5x2+0s1+0s2
Now, our basic variables are s1 and s2, and our non-basic variables are x1 and x2.
Basis x1 x2 s1 s2 RHS
S1 1 2 1 0 4
S2 3 2 0 1 6
Z-row -3 -5 0 0 0
• The most negative value in the Z-row indicates the entering variable.
• The most negative coefficient is -5 under x2, so x2 enters.
6
= 3
2
• Divide the pivot row by the pivot element (to make it 1).
• Use row operations to make other values in the pivot column zero.
Basis x1 x2 s1 s2 RHS
x2 0.5 1 0.5 0 2
s2 2 0 -1 1 2
Z-row -0.5 0 2.5 0 10
Conclusion
Using the Simplex Method, we found that the maximum value of Z = 10 occurs at x1=0,
x2=2
We will solve the following linear programming problem using the Simplex Method.
Problem Statement
Maximize: