Math 1 Module 7 Linear Programming

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

MODULE 7

Linear Programming

LEARNING OUTCOMES

At the end of the lesson, students should be able to:

Determine the solution set for linear equations in one or two variables;

Apply the different system of linear equations in one or two variables;


Graph the system of inequalities in one or two variables;
Formulate linear programming models;
Use graphical method for solving both maximization and minimization linear programming
problems.

Definition of Linear Equations


A linear equation in one variable can be written in the form ax + b = 0, where a and b are
real numbers, where a ≠ 0.
A linear equation in two variables can be written in the form ax + by + c = 0, where a, b and c
are real numbers, where a or b ≠ 0.
Two Kinds of Equation
1. Identical/Identity Equation is an equation which holds true for all permissible
values of the unknown.

Examples: 1. 2(x+ 5) = 2x + 10
2. (x+2) (x-2) = x2 – 4

2. Conditional Equation is an equation which holds true for a specific value of the
unknown.

Examples: 1. 2x – 5 = 5
2. 5x – 4 = 3x + 2
Linear Programming

Solving Linear Equations in One and in Two Variables

Example 1: Solve and sketch the graph of 5x + 20 = 45.


Solution: 5x + 20 = 45
5x = 45 – 20
5x = 25, dividing both sides of the equation by 5
x=5

Example 2: Solve and sketch the graph of -y = -3y + 8.


Solution: -y = -3y + 8
-y + 3y = 8
2y = 8, dividing both sides of the equation by 2
y=4
Linear Programming

Example 3: Find the solution set of 4x + 3y = 12 and sketch the graph.


This is an example of a linear equation in two variables and there are two ways/methods
to solve this type of an equation as follows:
1. By assigning values to either x or y;

In this case. We assign values to x to be able to find for the values of y

x -2 -1 0 1 2
y 6 2/3 5 1/3 4 2 2/3 1 1/3

Solution: 4x + 3y = 12 , at x = -2
4(-2) + 3y = 12
-8 +3y = 12 + 8
3y = 20, dividing both sides of the equation by 3
y = 6 2/3
Do the same in the remaining values of x.

2. By finding the x-intercept and the y-intercept


Solution: 4x + 3y = 12
To find for the x-intercept, set y = 0.
4x + 3(0) = 12
4x = 12
x = 3, therefore the x-intercept is (3,0).

To find for the y-intercept, set x = 0


4(0) + 3y = 12
3y = 12
y = 4, therefore the x-intercept is (0,4).
Linear Programming

System of Equations
A system of equations is composed of a set of two or more equations and a system
consisting of linear equations is called a linear system. There are different ways in finding the
common solution set for a linear system of two equations in two variables such as elimination
method, substitution method, graphical method and comparison method.
Example 1: Solve and graph the system
2x +y = 4
2x + 3y = 8

By Elimination Method:
2x +y = 4
2x + 3y = 8
Let us eliminate x by subtraction in order to solve for y as follows:
2x +y = 4
2x + 3y = 8
-2y = -4, dividing both sides of the equation by -2
y=2
Linear Programming

This time let us eliminate y by addition in order to solve for x as follows but let us multiply first
equation 1 by -3:
(2x +y = 4)-3 -6x -3y = -12
2x + 3y = 8 2x + 3y = 8
-4x= -4, dividing both sides of the equation by -4
x=1

Therefore, the common solution set for the system is the ordered pairs (1,2). That is, if we
substitute (1,2) in the both equations, both will hold true.
2x +y = 4 2x + 3y = 8
2(1) + 2 = 4 2(1) + 3(2) = 8
2+2=4 2+6=8
4 = 4, True 8 = 8, True
By Substitution Method:
2x +y = 4 Eq 1 2x + 3y = 8 Eq 2
Let us solve for x and y of the given system as follows:
2x +y = 4 2x + 3y = 8
x = 4 - y /2 x = 8 – 3y / 2
y = 4 – 2x y = 8 – 2x / 3
Let me solve for x using 2x +y = 4 which means I will have to substitute the value of y in Eq 2.
That is,
2x + y = 4
2x + (8 – 2x/3) = 4, we then multiply both sides of the equation by 3 to clear the fraction.
6x + (8 – 2x) = 12)
6x – 2x = 12 - 8
4x = 4
x=1

This time let us solve for y using the same equation which also means that I will have to
substitute the value of x in Eq 2.
2x + y = 4
2(8 – 3y / 2) + y = 4, we then multiply both sides of the equation by 2 to clear the
fraction.
2(8 – 3y) + y = 4
16 – 6y + 2y = 8
-6y + 2y = 8 – 16
-4y = -8
y=2
Notice that we obtained the same ordered pairs (1,2).
Linear Programming

By Graphical Method:
2x +y = 4 Eq 1 2x + 3y = 8 Eq 2
In this case, we will find the x and the y intercepts of the two equations and graph them of the
Cartesian plane.
2x +y = 4 2x + 3y = 8
x-intercept: (2, 0) x-intercept: (4, 0)
y-intercept: (0, 4) y- intercept: (0, 2 2/3)

Notice that by graphical method, the lines of the equations 2x +y = 4 and 2x + 3y = 8 met
a common point (1, 2) which is their common solution. That means, when you substitute (1, 2)
in the equations simultaneously both equations hold true for the ordered pair (1, 2).
Linear Programming

By Comparison Method:
2x +y = 4 2x + 3y = 8
x = 4 - y /2 x = 8 – 3y / 2
y = 4 – 2x y = 8 – 2x / 3
In this method, we will compare the values of x in the two equations to be able to solve for y.
Similarly, we compare the values of y to solve for x as follows:
4 - y /2 = 8 – 3y / 2, multiplying both sides of the equation by 2
4 – y = 8 – 3y, combining similar terms
-y + 3y = 8 - 4
2y = 4
y=2

4 – 2x = 8 – 2x / 3, we multiply both sides of the equation by 3


3(4 – 2x) = 8 - 2x
12 – 6x = 8 – 2x, combining similar terms
-6x + 2x= 8 – 12
-4x = -4
x=1
Linear Programming

Linear Inequalities
An inequality is a mathematical statement formed by placing <, >, ≤ or ≥ symbol.

Example 1: Solve and graph the linear inequality 4x ≤ -2x + 12.

4x ≤ -2x + 12, combining similar terms


4x + 2x ≤ 12
6x ≤ 12, dividing both sides of the inequality by 6
x≤2

Therefore, the solution set contains x such the x is less than or equal to 2. In graph, it would be:

Example 2: Solve and graph the linear inequality -2y – 4 ≥ 3y + 6.

-2y – 4 ≥ 3y + 6, combining similar terms


-2y – 3y ≥ 6 + 4
-5y ≥ 10, dividing both sides of the inequality by -5 the order of the inequality
reverses resulting to
y ≤ -2
Therefore, the solution set contains x such the x is less than or equal to -2. In graph, it would
be:
Linear Programming

Example 3: Solve and graph the linear inequality 2x + 3y ≥ 6.

The solution set for this inequality can be found by finding the intercepts (x and y). But
we need to change first the inequality into equation as follows:

2x + 3y = 6
x-intercept: (3, 0)
y-intercept: (0, 2)

Then, test a point in each half-plane to see which half-plane is the graph of the
inequality. This could be above or below the line. We choose the origin, which is at point (0,0)
as our basis.
Linear Programming

Below the line: at point (0,0)


Substitute (0,0) in 2x + 3y ≥ 6
0 ≥ 6?
0 ≥ 6, False
Therefore, (0,0) is not a solution, so we shade the upper part of the line. This shaded
portion is known as the feasible region and it contains all the points that will satisfy the given
inequality. But if it holds true, this means that the origin is part of the solution set, so we can
shade the lower portion of the line.

System of Linear Inequalities


In this case, we will follow the procedure on how to solve for the common solution of a
system of linear equation to solve for the system of linear inequalities. However, the relation
symbols used in the system of linear inequalities should be changed to equal to symbol. Then,
you may now follow any of the four (4) methods discussed above. Meanwhile, in tracing the
feasible region, which is the common solution of the given system of linear equations, we will
use the original order of the inequalities.
Example 1: Solve the following system of inequalities by shading the feasible region:
-x + y ≤ 1
x+y≤3
x, y ≥ 0
Solution: We will apply the graphical method specifically the finding of the x-
intercept and the y-intercept as follows:

Inequality converted into x-intercept y-intercept


Equation
-x + y = 1 (-1, 0) (0, 1)
x+y =3 (3, 0) (0, 3)

Then, graph the intercepts for each of the inequalities.


Linear Programming

At point (0, 0), substitute in -x + y ≤ 1 and in x + y ≤ 3. Notice that the left side of the
inequality will be 0 for both inequalities which will lead to a true statement. Therefore, we
shade the lower portion of the line which includes (0, 0). That means, all the points lying on the
shaded region are solutions to the given system of inequalities.

LINEAR PROGRAMMING
A linear programming model or LP Model is a particular type of mathematical model in which
relationships involving the variables are linear. This model uses a mathematical technique
called linear programming which determines the best or optimal decision even there are
thousands of variables and relationships.
Linear programming has been applied to a wide variety of decision problems in business
and the public sector. The linear programming model is designed to maximize or minimize an
objective function of the form:
f = C1X1 +C2X2 + C3X3 + …+CnXn
where f is same economic objective such as profit, production cost, workweeks or tons
shipped.
Linear programming is two characteristics namely components and assumptions.
Components of Linear Programming Model
1. Objective Function is either maximize or minimize.
Linear Programming

2. Decision Variables are assigned to unknown quantities or to the given products/items in the
problem.
3. Constraints are mathematical limitations, relationships expressed in terms of a linear equation
or linear inequalities.
4. Parameters are composed of constants and variables defined in the model.
Assumptions in Linear Programming Model
1. Linearity. This means that the degree of the variable in all linear programming problems
should be always linear.
2. Certainty. This means that you should be certain in all the values that you used to represent
the unknown quantities.
3. Divisibility. This means that non-integer values of the decision values are acceptable.
4. Non-Negativity. This means that non-negative values of the decision variables are not
acceptable.
Formulation of Linear Programming Models
1. Define the specific decision variables.
2. Identify the objective functions which is either to maximize or to minimize.
3. List down the constraints that affect the decision. There are different types of constraints
which can be found on a given word problem such as capacity, market, availability, quality or
blending, production technology or material balance and definitional constraints.
4. Define the specific constraint using the decision variable.
Example 1:
A clock maker makes two types of wood clock to sell at various malls. It takes him three
hours to assemble a pine clock which requires two ounces of varnish. It takes four hours to
assemble a molave clock which takes 4 ounces of varnish. He has eight ounces of varnish
available in stock and he can work for 12 hours. If he makes P100.00 profit on each pine clock
and P120.00 profit on each molave clock, how many of each type should he make to maximize
his profit? Formulate the linear program.
Solution:
1. Decision Variables
Let x be the number of pine clock
y be the number of molave clock

2. Objective Function: Maximize (Profit): P100x + P120y

3. Constraints
Raw materials and process requirements like
- Varnish Requirement
- Processing or Assembly Time
Linear Programming

Varnishing : 3x + 4y ≤12
Processing Time : 2x + 4y ≤16
Non-Negativity : x, y ≥ 0

Thus, the linear program would be:


Maximize (Profit): P100x + P120y

Subject to:
Varnishing : 3x + 4y ≤12
Processing Time : 2x + 4y ≤16
x, y ≥ 0
4. Find the feasible region using the x-intercepts and the y-intercepts and make a decision.

Linear Inequalities converted x-intercept y-intercept


into Linear Equations
3x + 4y =12 (4, 0) (0, 3)
2x + 4y =16 (8, 0) (0, 4)

5. Trace the feasible region from the graph.


Linear Programming

6. Use the vertices of the feasible region to answer the problem and come up with a
decision.

Vertices of the MAXIMIZE (Profit): P100x + P120y Profit


Feasible Region
(0,3) P100(0) + P120(3) P360
(4,0) P100(4) + P120(0) P400

Decision: Therefore, a clock should make 4 pine clock and 0 molave clock in one production
period in order to maximize its profit.

Example 2
Linear Programming

A biologist is developing two new strains of bacteria. Each sample of Type A


bacteria produces five new viable bacteria and each Type B bacteria produces six new
viable bacteria. Altogether, at least 150 new viable bacteria must be produced. At least
10 but not more than 20 of the original sample must be Type A and not more than 60 of
the samples must be Type B. A sample of Type A costs P500 and a sample of Type B
costs P700. If both types are to be used, how many surplus of each type should be
used to minimize the cost?
Solution:
1. Decision Variables
Let x be the number of Type A bacteria
y be the number of Type B bacteria

2. Objective Function
Minimize (Cost): P500x + P700y
3. List of Constraints
-amount of new viable bacteria
- limitation on the original Type A and Type B samples of bacteria

Specific Constraints
New Viable Bacteria : 6x + 5y ≥ 150
Original Type A Bacteria : x ≥ 10
Original Type A Bacteria : x ≤ 20
Original Type B Bacteria : y ≤ 60
Non-Negativity : x, y ≥ 0

Thus, the complete linear program would be:


Minimize (Cost): P500x + P700y
Subject to:
New Viable Bacteria : 6x + 5y ≥ 150
Original Type A Bacteria : x ≥ 10
Original Type A Bacteria : x ≤ 20
Original Type B Bacteria : y ≤ 60
Non-Negativity : x, y ≥ 0

4. Find the feasible region using the x-intercepts and the y-intercepts and make a decision.

Linear Inequalities converted x-intercept y-intercept


into Linear Equations
Linear Programming

6x + 5y = 150 (25, 0) (0, 30)


x = 10 (10, 0)
x = 20 (20, 0)
y =60 (0, 60)

5. Trace the feasible region from the graph.

6. Use the vertices of the feasible region to answer the problem and come up with a
decision.

Vertices of the MINIMIZE (Cost): P500x + P700y Profit


Feasible Region
(0, 60) P500(0) + P700(60) P42000
(20, 10) P500(20) + P700(10) P17000
(25, 0) P500(25) + P700(0) P12500

Decision: Therefore, a biologist should produce 25 Type A bacteria and 0 Type B bacteria to in
one production period in order to minimize the cost.

ACTIVITY No. 1

Answer the following linear programming problems


1. The SHANIA NICOLE Furniture Company manufactures dining room tables and chairs.
Each table requires 50 board feet and 3 hours of labor. Each chair takes 20 board feet and
4 hours of labor. The manufacturer has 3,000 board feet of lumber available and a staff
Linear Programming

SELF ASSESSMENT QUESTION No. 1

Make a linear program to answer the problem below. Show your complete solution.
ALLYXANDRA KHAMILLE Tailoring Services has the following materials available: 18 sq meter
cotton, 20 sq meter silk, 5 sq meter wool. A gown requires the following: 3 sq meters cotton, 2
sq meters silk and 1 sq meter wool. A suit requires the following: 2 sq meter cotton, 4 sq meter
SELF ASSESSMENT
silk. If a gown sells for P1,200.00 QUESTIONhow
and a suit for P1,600.00, No. many
2 of each garment should
the tailor make to obtain the maximum amount of money?
Linear Programming

Make a linear program to answer the problem below. Show your complete solution.
BIANCA MICHAELA Pharmaceutical Company produces a drug from two ingredients. Each
ingredient contains the same three antibiotics in different proportions. Each ingredient 1
produced results in P80 in cost; each ingredient 2 results in P50 in cost . The production of the
antibiotics is dependent on the availability of limited resources. The resources requirements for
the production are as follows:

Antibiotic Resources Requirement Minimum


Ingredient 1 Ingredient 2 Requirement
1 3 units 1 unit 6
2 1 unit 1 unit 4
3 2 units 6 units 12

The company wants to determine the number of grams of each ingredient 1 and
ingredient 2 that must go in to drug in order to meet the antibiotic minimum requirements at the
minimum cost.

ANSWERS TO SELF ASSESSMENT QUESTION No. 1

1. Let x be the number of gowns


y be the number of suits

2. Objective Function: MAXIMIZE (Profit): P1200x + P1600y

3. Constraints

Cotton: 3x + 2y ≤ 18
Silk: 2x + 4y ≤ 20
Wool: x≤5

Non-Negativity: x, y ≥ 0

4. Plot the constraints in the problem on a graph using the intercept method:

Linear Inequalities converted x-intercept y-intercept


into Linear Equations
3x + 2y = 18 (6, 0) (0, 9)
Linear Programming

ANSWERS TO SELF ASSESSMENT QUESTION No. 2

1. Let x be the quantity of Ingredient 1


y be the quantity of Ingredient 2

2. Objective Function: MINIMIZE (Cost): P80x + P50y

3. Constraints

Antibiotic 1: 3x + y ≥ 6
Antibiotic 2: x+ y ≥4
Antibiotic 3: 2x + 6y ≥ 12

Non-Negativity: x, y ≥ 0

4. Plot the constraints in the problem on a graph using the intercept method:

Linear Inequalities converted x-intercept y-intercept


into Linear Equations
3x + y = 6 (2, 0) (0, 6)
Linear Programming

References: Quantitative Approaches in Decision-Making With Computer Application. Arao,


Rosalia R., et. al. Rex Printing Company Inc., Quezon, City. 2006.ISBN-978-971-23-5498-4

Quantitative Techniques for Business (Operations Research/Management Science


Quantitative/Decision Science. Sirug, Winston S.,Mindshapers Co. Inc., Intramuros Manila.2009
ISBN-978-971-0445-00-4

St:
Write the left most column d
Linear Programming

hen three or more numbers must


be
added, the chances of making a
mistake

You might also like