Linear Programming
Linear Programming
Programming
Basic Concepts
An inequality is a statement that one quantity or expression is less or greater
than another quantity or expression.
1. The Trichotomy Axiom. For any real number a and b, exactly one of the
following
is true: a < b a = b a > b
Example: a = 4 , b = 7 , c = 2 Example: a = 9 , b = 5 , c = 3
4+2<7+2 9+3>5+3
6 < 9 12 < 8
3. The Multiplication Axiom. For any real number a, b and c:
ac < bc ac > bc
8 / 4 < 12 / 4 8 / –4 > 12 / –4
2 < 3 –2 >–3
5. The Transitive Axiom. For any real number a, b and c:
a.) If a < b and b < c , then a < c
b.) If a > b and b > c , then a > c
Example: a.) a = 5 , b = 8 , c = 10
Example: b.) a = 12 , b = 7 , c = 3
16 < 49
Types of Inequalities
1. Absolute Inequality. An inequality which is true for all values of the unknown
involved.
when x = – 4 , (– 4) 2 + 9 > 0
16 + 9 > 0
25 > 0
2. Conditional Inequality. An inequality which is true for a certain values of the
unknown involved.
Example: The inequality 3 x – 10 > 2 , is only true for x > 4
when x = 2 , 3 ( 2 ) – 10 > 2
6 – 10 > 2
–4 > 2 , – 4 is not greater than 2
when x = 7 , 3 ( 7 ) – 10 > 2
21 – 10 > 2
11 > 2
Linear Inequalities
Linear inequalities are the expressions where any two values are compared by
the inequality symbols such as, ‘<’ , ‘>’ , ‘≤’ or ‘≥’.
Linear inequalities are also called first degree inequalities, as the highest power
of the variable is 1.
3x + 4y - 7z ≤ 2 + 5y Three variables ( x , y , z )
Graphing Linear Inequalities
Step 1: Change the inequality symbol to "="
Step 2: Set y = 0 and solve the equation for x, to determine the x–intercept.
Step 3: Set x = 0 and solve the equation for y, to determine the y–intercept.
Step 4: Then plot the x–intercept and the y–intercept in the cartesian plane
and connect it by a line
y
Example: Graph x ≤ –1
y
If the Shade
inequality is:
y>c
or Above the line
y>c
y<c
or Below the line
y<c
Example: Graph y > –3
y
Example: Graph y ≤ 2
y
If the Shade
inequality is:
ax + by > c
or Above the
ax + by > c line
ax + by < c
or Below the
ax + by < c line
Example: Graph x – y ≥ 2
1. When: y = 0
x–y=2
x=2
When: x = 0
x–y=2 x
y = –2
2. Since y >,
shade above
the line.
y
Example: Graph 2x – y < 4
1. When: y = 0
2x – y = 4
2x=4
2 2
x=2
When: x = 0
2x – y = 4 x
y = –4
1. When: y = 0
2x + 3y = 6
x=3
When: x = 0
2x + 3y = 6
y= 2
1. When: y = 0
x – 4y = 8
x=8
When: x = 0
x – 4y = 8
y = –2
a.) x + 2y = 4
When: x = 0 When: y = 0
x + 2y = 4 x + 2y = 4
2y = 4 x= 4
2 2
y = 2
Example: Find the solution set of the
given inequalities in a graphical Solution
method x + 2y ≥ 4 and 2x + y ≤ 6 Set
b.) 2x + y = 6
When: x = 0 When: y = 0
2x + y = 6 2x + y = 6
y = 6 2x = 6
2 2
x = 3
Linear Programming
• is a method of dealing with decision problems that can
be expressed as constrained linear models
• primary objectives are certainty of the parameters and
linearity of the objective function and all constraints
• developed by George Dantzig in the 1940s
• an American mathematical scientist
The goal of linear programming is to find the values of the variables that maximize
or minimize the objective function.
Feasible solutions: Points within and on the boundary of a feasible region denote
feasible solutions of the constraints.
Infeasible solutions: Any point which is outside the feasible region is known as
infeasible solution.
Optimal value: The highest (for maximization problem) or lowest value ( for
minimization) of the objective function.
Optimal solution: If any point in the feasible region gives minimum or maximum
value of the objective function, it is called an optimal solution.
Example 1. A local boutique produced two designs of gowns A and B and has the
materials available: 18 square meters of cotton, 20 square meters of silk, and 5
square meters of wool. Design A requires the following: 3 square meters of cotton, 2
square meters of silk, and 1 square meter of wool. Design B requires the following:
2 square meters of cotton, and 4 square meters of silk. If Design A sales for ₱1,200
and Design B for ₱1,600, how many of each garment should the boutique produce
to obtain the maximum amount of money?
Solution:
Step 1: Represents the unknown in the problem
Step 3: Formulate the objective function and constraints by restating the information
in mathematical form (LP)
a) 3x + 2y = 18
When: y = 0
3x + 2y = 18
y = 9
When: x = 0
3x + 2y = 18
x = 6
Step 4: Plot the constraints of
the LP problem on the graph
b) 2x + 4y = 20
When: y = 0
2x + 4y = 20
y = 10
When: x = 0
2x + 4y = 20
x = 10
Step 4: Plot the constraints of
the LP problem on the graph
b) 2x + 4y = 20
When: y = 0
2x + 4y = 20
y = 10
When: x = 0
2x + 4y = 20
x = 10
c) x = 5
Step 4: Plot the constraints of
the LP problem on the graph
( 4, 3 )
b) 2x + 4y = 20
( 0, 5 )
When: y = 0 ( 5, 1.5 )
2x + 4y = 20
y = 10
When: x = 0
( 5, 0 )
2x + 4y = 20
x = 10
c) x = 5
Step 5: Substitute the coordinates at the extreme points on the feasible region to
objective function.
Step 6: Formulate a decision. Since the coordinate ( 4 , 3 ) will give the highest
value of ₱ 9,600. The decision is to create 4 Design A gowns and
3 Design B gowns in order to maximize sales.
Decision: x = 4 Design A gowns
y = 3 Design B gowns
P = ₱ 9,600
3x + 2y ≤ 18 2x + 4y ≤ 20 x ≤ 5
3(4) + 2(3) ≤ 18 2(4) + 4(3) ≤ 20 4 ≤ 5
12 + 6 ≤ 18 8 + 12 ≤ 20
18 ≤ 18 20 ≤ 20
Thus, ( 4 , 3 ) is correct, since it satisfies all the constraints and the two constraints
are being maximized.
NOTE: The point of intersection of inequalities can also be determine by
Analytical Method (Elimination Method)
2 ( 3x + 2y = 18 ) 6x + 4y = 36
Subtract the 2 equations
3 ( 2x + 4y = 20 ) ( – ) 6x + 12y = 60 to eliminate x
– 8 y = – 24
–8 –8
y = 3
NOTE: The point of intersection of inequalities can also be determine by
Analytical Method (Substitution Method)
3 x = 12
3 x + 2 y = 18
3 x + 2 ( 3 ) = 18 3 x = 12
3 3
3 x + 6 = 18
x = 4
3 x = 18 – 6
∴ the intersection of the 1st and the 2nd equation is ( 4 , 3 ), it will give a highest
value of ₱ 9,600
Example 2. A Pharmacist produces a drug from two ingredients. Each ingredient
the same three antibiotics in different proportions. Each ingredient A produced
resulted in ₱80 in cost; each ingredient B produced resulted in ₱50 in cost. The
production of antibiotics is dependent on the availability of the limited resources.
The resource requirements for the production are as follows.
Resources Requirement Minimum
Antibiotic Requirements
Ingredient A Ingredient B
a) 3x + y = 6
When: y = 0
3x + y = 6
y = 6
When: x = 0
3x + y = 6
3x = 6
3 3
x = 2
Step 4: Plot the constraints of
the LP problem on the graph
b) x + y = 4
When: y = 0
x + y = 4
y = 4
When: x = 0
x + y = 4
x = 4
Step 4: Plot the constraints of
the LP problem on the graph
c) 2x + 6y = 12
When: y = 0
2x + 6y = 12
6y = 12
6 6
y = 2
When: x = 0
2x + 6y = 12
2x = 12
x = 6
Step 4: Plot the constraints of
the LP problem on the graph ( 1, 3 )
c) 2x + 6y = 12 ( 0, 6 )
When: y = 0
( 3, 1 )
2x + 6y = 12
6y = 12
6 6
y = 2
( 6, 0 )
When: x = 0
2x + 6y = 12
2x = 12
x = 6
Step 5: Substitute the coordinates at the extreme points on the feasible region to
objective function.
Step 6: Formulate a decision. Since the coordinate ( 1 , 3 ) will give the lowest
value of ₱ 230. The decision is to mix 1 unit of ingredient A and 3 units of
ingredient B to minimize the cost.
Decision: x = 1 unit of ingredient A
y = 3 units of ingredient B
P = ₱ 230
3x+ y ≥ 6 x + y ≥ 4 2 x + 6 y ≥ 12
3 (1) + 3 ≥ 6 1+ 3 ≥ 4 2 (1) + 6 (3) ≥ 12
3+3 ≥ 6 4 ≥ 4 2 + 18 ≥ 12
6 ≥ 6 20 ≥ 12
Thus, ( 1 , 3 ) is correct, since it satisfies all the constraints two of the constraints
are minimized.
NOTE: The point of intersection of inequalities can also be determine by
Analytical Method (Elimination Method)
1 ( 3x + y = 6 ) 3x + y = 6
Subtract the 2 equations
3( x + y = 4) ( – ) 3x + 3y = 12 to eliminate x
–2y = –6
–2 –2
y = 3
NOTE: The point of intersection of inequalities can also be determine by
Analytical Method (Substitution Method)
x + y = 4
x + 3 = 4
x = 4–3
x = 1
∴ the intersection of the 1st and the 2nd equation is ( 1 , 3 ), it will give a
lowest value of ₱ 230.
THANK YOU !!!