Sei sulla pagina 1di 34

LINEAR

PROGRAMMING
I. Objectives
At the end of the lesson, must be able to;
1. graph systems of linear inequalities,
2. solve real life problems involving maximization, and
3. appreciate how linear programming being used in
different fields such as manufacturing, business
operation, etc.
We will start our class with a Prayer.

First we will be
playing a game called
“Equal or Not?”
Tell me if the situations are Equal or Not.

1. There are 40 feet but only 15 heads ( or )

in the farm. The farmer owns 10 Chickens and 5 Pigs. Equal or not?

2. There are 35 wheels but only 13 vehicles ( or )

in the shop. The seller has 8 Tricycles and 5 Motorcycles. Equal or


not?
3. There are 23 heads but only 38 horns ( or )

in the safari. In the wild lives 15 Bulls and 8 Indian Rhinos. Equal
or not?

4. There are 70 legs but only 10 insects ( or )

in the house. There are 6 Spiders and 4 Cockroaches in the house.


Equal or not?
Activity
Graph me if you can (Graphing systems of linear inequalities)

a. The class will be divided into 4 groups.


b. Each will be given a marker, cartolina and problem set (to
graph the systems of linear inequalities).
c. Each group must select their reporter to report their
answers.
d. The activity is good for 10 minutes.
e. The activity will be then checked by the class.
In continuation of our previous topic, we
will now be learning Linear Programming.
Analysis

Linear programming - is a mathematical technique for


finding optimal solutions to problems that can be expressed using
linear equations and inequalities.

- is an optimization technique for a system of linear constraints


and a linear objective function. An objective function defines the
quantity to be optimized, and the goal of linear programming is to
find the values of the variables that maximize or minimize the
objective function.
A mathematical method to allocate scarce resources to competing
activities in an optimal manner when the problem can be expressed
using a linear objective function and linear inequality constraints.

A linear program consists of a set of variables, a linear objective


function indicating the contribution of each variable to the desired
outcome, and a set of linear constraints describing the limits on the
values of the variables. The “answer” to a linear program is a set of
values for the problem variables that results in the best — largest or
smallest — value of the objective function and yet is consistent with
all the constraints.
Example:

A factory manufactures doodads and whirligigs. It costs $2 and takes 3


hours to produce a doodad. It costs $4 and takes 2 hours to produce a
whirligig. The factory has $220 and 150 hours this week to produce
these products. If each doodad sells for $6 and each whirligig sells for
$7, then how many of each product should be manufactured this week in
order to maximize profit?

This kind of problem is perfect to use linear programming techniques on.


•All of the quantifiable relationships in the problem are linear.
•The values of variables are constrained in some way.
•The goal is to find values of the variables that will maximize some
quantity.
Linear programming is useful for many problems that require
an optimization of resources. It could be applied to
manufacturing, to calculate how to assign labor and machinery
to minimize cost of operations. It could be applied in high-level
business operations, to decide which products to sell and in
what quantity in order to maximize profit. It could also be
applied in logistics, to decide how to apply resources to get a
job done in the minimum amount of time.
When to use Linear Programming?

Linear programming can be used to solve a problem


when the goal of the problem is to maximize some
value and there is a linear system of inequalities
that defines the constraints on the problem.
Definition:

A constraint is an inequality that defines how the


values of the variables in a problem are limited. In
order for linear programming techniques to work, all
constraints should be linear inequalities.
Returning to the example in the introduction:

Note that there is a cost associated with producing each part. Each
doodad costs $2 to make and each whirligig costs $4 to make. The
factory only has $220 available to spend on these costs, so the
production is limited by cost. Let x be the number of doodads produced,
and let y be the number of whirligigs produced. Then this constraint can
be written as an inequality:

 
𝟐 𝒙 +𝟒 𝒚 ≤ 𝟐𝟐𝟎
There is also the limitation on how much time the factory has to produce
these parts. Each doodad requires 3 hours to make and each whirligig
requires 2 hours to make. The factory only has 150 hours available this
week, so production is also limited by time. This constraint can be
written as an inequality:
 
𝟑 𝒙+𝟐 𝒚 ≤ 𝟏𝟓𝟎
In addition to these constraints, there is also a couple of "common
sense" constraints. It's not possible to produce less than 0 of any part,
so these constraints are also written:
 
These are called non-negative constraints.
Altogether, the constraints form a system of
inequalities:
 
Graphing these inequalities in the coordinate plane creates a polygon
shape.

The shaded region above is the feasible region of this problem.


Definition:
The region that is bound by the system of constraints is
called the feasible region. It represents the possible values
of the variables that satisfy all of the constraints. In order
for linear programming techniques to work, it should be a
convex polytope (in 2 dimensions, a convex polygon; in 3
dimensions, a convex polyhedron; and so on).

Finding the feasible region is only sufficient to give the


possible solutions of a problem. The goal of linear
programming is to find the best solution to a problem. This is
done by maximizing or minimizing the objective function.
Definition:

The objective function is a function that defines


some quantity that should be minimized or
maximized. The arguments of the objective
function are the same variables that are used in the
constraints. In order for linear programming
techniques to work, the objective function should
be linear.
Returning to the example in the introduction:

Each doodad costs $2 to make and sells for $6. This gives
a profit of $4 per doodad. Each whirligig costs $4 to
make and sells for $7. This gives a profit of $3 per
whirligig. The profit function can be defined as:
 
𝑷 ( 𝒙 , 𝒚 )=𝟒 𝒙+𝟑 𝒚
This is the objective function of this problem, and the
goal is to maximize it.
We will maximize the example problem.

 
𝑷 ( 𝒙 , 𝒚 )=𝟒 𝒙+𝟑 𝒚
 

(0,55)
𝑷 ( 𝟎 ,𝟓𝟓 )=𝟒 𝒙+𝟑 𝒚
 
 ¿ 𝟒 (𝟎)+𝟑 (𝟓𝟓)
(20,45)
¿ 𝟎+𝟏𝟔𝟓
 
¿ 𝟏𝟔𝟓
 
 𝑷 ( 𝟐𝟎 , 𝟒𝟓 ) =𝟒 𝒙 +𝟑 𝒚
 ¿ 𝟒 (𝟐𝟎)+𝟑 (𝟒𝟓)
¿ 𝟖𝟎+𝟏𝟑𝟓
 
¿ 𝟐𝟏𝟓
 

𝑷 ( 𝟓𝟎 ,𝟎 )=𝟒 𝒙+𝟑 𝒚
 
 ¿ 𝟒 (𝟓𝟎)+𝟑 (𝟎)
¿ 𝟐𝟎𝟎+𝟎
 

(50,0)
¿ 𝟐𝟎𝟎
 

To maximize the profit, the factory


must manufactures 20 doodads and
45 whirligigs.
Abstraction

We must understand well the given example.

This time we will be generalizing the steps in solving real life


problems involving maximization
Question:
What are the steps in solving real life problems involving
maximization?
Step 1: Identify the unknown quantities.
Step 2: Identify and formulate the constraints
Step 3: Graph the constraints and locate the feasible region
Step 4: Formulate the objective function
Step 5: Locate the corner points
Step 6: Substitute every corner points to the objective
function
Step 7: Find the corner points with largest value for P(x,y)
Application
Let’s have another example.
A company produces two types of tables, T1 and T2. It takes
2 hours to produce the parts of one unit of T1, 1 hour to
assemble and 2 hours to polish. It takes 4 hours to produce
the parts of one unit of T2, 2.5 hour to assemble and 1.5
hours to polish. Per month, 7000 hours are available for
producing the parts, 4000 hours for assembling the parts
and 5500 hours for polishing the tables. The profit per unit
of T1 is $90 and per unit of T2 is $110. How many of each
type of tables should be produced in order to maximize the
total monthly profit?
Let:
 

Constraints
It takes 2 hours to produce the parts of one unit of T1. It
 

takes 4 hours to produce the parts of one unit of T2. Per


month, 7000 hours are available for producing the parts.

It takes 1 hour to assemble the parts of one unit of T1. It


 

takes 2.5 hour to assemble the parts of one unit of T2. Per
month, 4000 hours for assembling the parts.
It takes 2 hours to polish T1. It takes 1.5 hours to polish T2.
 

Per month, 5500 hours for polishing the tables.


Feasible Region
Objective Function

The profit per unit of T1 is $90 and per unit of T2 is $110.


 
𝑷 ( 𝒙 , 𝒚 )=𝟗𝟎 𝒙 +𝟏𝟏 𝟎 𝒚
 
( 𝟎 , 𝟏𝟔𝟎 𝟎 )
 𝑷 ( 𝟎 ,𝟏 𝟔𝟎 𝟎 ) =𝒙 𝟗𝟎+𝟏𝟏 𝟎 𝒚
 ¿ 𝟗𝟎(𝟎)+𝟏𝟏𝟎 (𝟏 𝟔𝟎 𝟎)
¿ 𝟎+𝟏𝟕𝟔𝟎𝟎 𝟎
 

( 𝟏𝟓𝟎 𝟎 ,𝟏 𝟎𝟎 𝟎 ) ¿ 𝟏𝟕𝟔 𝟎𝟎𝟎


 

𝑷 ( 𝟏𝟓𝟎𝟎 ,𝟏𝟎𝟎𝟎 )=𝟗𝟎 𝒙 +𝟏𝟏 𝟎 𝒚


 
 ¿ 𝟗𝟎(𝟏𝟓𝟎𝟎)+𝟏𝟏𝟎(𝟏𝟎𝟎𝟎)

( 𝟐𝟑𝟎 𝟎 , 𝟔𝟎𝟎 ) ¿ 𝟏𝟑𝟓 𝟎𝟎𝟎+𝟏𝟏𝟎 𝟎𝟎𝟎


 
¿ 𝟐𝟒𝟓 𝟎𝟎𝟎
 

𝑷 ( 𝟐𝟑𝟎𝟎 , 𝟔𝟎𝟎 )=𝟗𝟎 𝒙 +𝟏𝟏 𝟎 𝒚


 
 ¿ 𝟗𝟎(𝟐𝟑𝟎𝟎)+𝟏𝟏𝟎 (𝟔𝟎𝟎)
( 𝟐𝟕𝟓 𝟎 , 𝟎 ) ¿ 𝟐𝟎𝟕𝟎𝟎𝟎+𝟔𝟔𝟎𝟎𝟎
 
¿ 𝟐𝟕𝟑𝟎𝟎𝟎
 
𝑷 ( 𝟐𝟕𝟓𝟎 , 𝟎 )=𝟗𝟎 𝒙 +𝟏𝟏 𝟎 𝒚
 
 ¿ 𝟗𝟎(𝟐𝟕𝟓𝟎)+𝟏𝟏 𝟎(𝟎)
The company should produce 2300
table 1 and 600 table 2 in order to
¿ 𝟐𝟒𝟕𝟓 𝟎𝟎+𝟎
 
¿ 𝟐𝟒𝟕𝟓 𝟎𝟎
 
maximize profits.
Evaluation
Solve the given maximization problem.
Consider a chocolate manufacturing company that produces only two
types of chocolate – A and B. Both the chocolates require Milk and
Choco only.  To manufacture each unit of A and B, the following
quantities are required:
- Each unit of A requires 1 unit of Milk and 3 units of Choco
- Each unit of B requires 1 unit of Milk and 2 units of Choco
The company kitchen has a total of 5 units of Milk and 12 units of
Choco. On each sale, the company makes a profit of
- Rs 6 per unit A sold
- Rs 5 per unit B sold.
Now, the company wishes to maximize its profit. How many units of
A and B should it produce respectively?
Okay class let’s check your work

Who got perfect?


Assignment
Solve the given maximization problem.
A store sells two types of toys, A and B. The store owner
pays $4 and $7 for each one unit of toy A and B
respectively. One unit of toys A yields a profit of $2 while a
unit of toys B yields a profit of $3. The store owner
estimates that no more than 20 toys will be sold every
month and he does not plan to invest more than $80 in
inventory of these toys. How many units of each type of toys
should be stocked in order to maximize his monthly total
profit?
That’s all for today’s lesson. See you
and goodbye class.

Potrebbero piacerti anche