Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Fourth Stage Asst.

Lecturer Ahmed Razzaq

Lecture Two
Linear Programming and Application in Linear
Programming

2.1 Introduction
In business, it is often desirable to find the production levels that will produce
the maximum profit or the minimum cost. The production process can often be
described with a set of linear inequalities called constraints. The profit or cost
function to be maximized or minimized is called the objective function. The
process of finding the optimal levels with the system of linear inequalities is
called linear programming (as opposed to non-linear programming).

2.2 Definitions
Objective Function
The linear function (equal sign) representing cost, profit, or some other
quantity to be maximized of minimized subject to the constraints.
Constraints
A system of linear inequalities.
Problem Constraints
The linear inequalities that are derived from the application, For example,
there may be only 40 hours a machine can be used in a week, so the total time it
is used would have to be <= 40. The problem constraints are usually stated in
the story problem.
Non-Negativity Constraints
The linear inequalities x >= 0 and y >= 0. These are included because x and y
are usually the number of items produced and you cannot produce a negative

1
Fourth Stage Asst. Lecturer Ahmed Razzaq

number of items, the smallest number of items you could produce is zero. These
are not (usually) stated, they are implied.
Feasible Region
The solution to the system of linear inequalities. That is, the set of all points
that satisfy all the constraints. Only points in the feasible region can be used.
Corner Point
A vertex of the feasible region. Not every intersection of lines is a corner
point. The comer points only occur at a vertex of the feasible region. If there is
going to be an optimal solution to a linear programming problem, it will occur at
one or more corner points, or on a line segment between two comer points.
Bounded Region
A feasible region that can be enclosed in a circle. Abounded region will have
both a maximum and minimum values.
Unbounded Region
A feasible region that cannot be enclosed in a circle.

2.3 Linear programming


Linear programming (LP for short) is by far the most successful technique of
Operations research. It permits the computation of the optimum (maximum or
Minimum) of a linear function of n variables subject to a set of constraints
defined by linear equations and in-equations involving these n variables.
LP is one technique in the larger domain of mathematical programming.
Nowadays LP codes permit a fast solution of problems involving thousands of
variables and constraints.
The success of LP is due to the fact that it lends itself to the modeling of a
large variety of economic activities like
 Production from scarce resources (optimal allocation of resources)
 Logistics (many aspects of transportation and resource deployment)

2
Fourth Stage Asst. Lecturer Ahmed Razzaq

 Scheduling (assignment of people and machines to tasks)


 Economic equilibrium (supply/demand equilibrium on a competitive
market)
 Regional economic analysis (supply/demand equilibrium on a network)
 Risk hedging (portfolio analysis)
 etc…

2.3.1 Solving a Linear Programming Problem


1) Define the variables. Usually, a good choice for the definition is the
quantity they asked you to find in the problem.
2) Write the problem by defining the objective function and the system of
linear inequalities. Don't forget about the non-negativity constraints where
necessary.
3) Sketch the system of linear inequalities to obtain the feasible region.
4) Identify each corner point of the feasible region. You can find the corner
points by forming a 2 * 2 system of linear equations from the two lines
that intersect at that point and solving that system.
5) Evaluate the objective function at each comer point.
6) Choose the point yielding the largest value or smallest value depending on
whether the problem is a maximization or minimization problem.
Be careful how you give the answer. The answer should give not only the
maximum or minimum value (the value of the objective function), but it should
also give the location where that extremum occurs.
Example: The maximum value is 9 when x=2 and y=3. If it is a story problem,
then give the answer in terms of the original definitions of x and y.

3
Fourth Stage Asst. Lecturer Ahmed Razzaq

Geometric Approach
If the slope of the objective function is negative and you take a line with that
slope passing through the origin and move it to the right through the feasible
region, the last corner point hit by that moving line will be the maximum value.
In the example shown, the last line with slope m = - 4/3 that touches the feasible
region touches at the corner point (6, 3).
Since z=4(6) + 3(3) = 24+9 = 33, the maximum value is 33 when: x= 6 and y=3.

Algebraic Approach
Now, to verify the solution non-geometrically, since we know the optimal
solution has to occur at one or more comer points, we make a table listing all the
corner points and evaluate the objective function at those points.

As you can see, the corner point with the maximum value is at (6, 3).

4
Fourth Stage Asst. Lecturer Ahmed Razzaq

We can also determine the minimum value from that table. A suitable answer,
assuming the problem had asked for both the maximum and minimum is:
The minimum value is 0 when x = 0 and y = 0.
The maximum value is 33 when x = 6 and y = 3

Example 2.1:

Consider the problem of a toy company that produces toy planes and toy boats.
The toy company can sell its planes for $10 and its boats for $8 dollars. It costs
$3 in raw materials to make a plane and $2 in raw materials to make a boat. A
plane requires 3 hours to make and 1 hour to finish while a boat requires 1 hour
making and 2 hours to finish. The toy company knows it will not sell any more
than 35 planes per week. Further, given the number of workers, the company
cannot spend any more than 160 hours per week finishing toys and 120 hours
per week making toys, the company wishes to maximize the profit it makes by
choosing how much of each toy to produce .

Solution:

We can represent the profit maximization problem of the company as a linear


programming problem. Let x1 be the number of planes the company will
produce and let x2 be the number of boats the company will produce. The profit
for each plane is $10 - $3 = $7 per plane and the profit for each boat is $8 - $2 =
$6 per boat. Thus the total profit the company will make is:
Z (x1, x2) = 7x1 + 6x2
The company can spend no more than 120 hours per week making toys and
since a plane takes 3 hours to make and a boat takes 1 hour to make we have:
3x1 + x2 ≤ 120
Likewise, the company can spend no more than 160 hours per week finishing
toys and since it takes 1 hour to finish a plane and 2 hour to finish a boat we
have:

5
Fourth Stage Asst. Lecturer Ahmed Razzaq

x1 + 2x2 ≤ 160
Finally, we know that x1 ≤ 35, since the company will make no more than 35
planes per week. Thus the complete Linear Programming problem is given as:

Max Z (x1, x2) = 7x1 + 6x2


St: 3x1 + x2 ≤ 120
x1 + 2x2 ≤ 160
x1 ≤ 35

x1 ≥ 0

x2 ≥ 0

Example 2.2:
A furniture company that makes tables and chairs, a table requires 40 board feet
of wood and a chair requires 30 board feet of wood. Wood costs $1 per board
foot and 40,000 board feet of wood are available. It takes 2 hours of skilled
labor to make an unfinished table or an unfinished chair. Three more hours of
labor will turn an unfinished table into a finished table; two more hours of labor
will turn an unfinished chair into a finished chair. There are 6000 hours of labor
available. (Assumed that do not need to pay for this labor). The prices of output
are given in the table below:
Product Price
Unfinished Table $70
Finished Table $140
Unfinished Chair $60
Finished Chair $110
We want to formulate an LP that describes the production plans that the firm can
be use to maximize its profits.

6
Fourth Stage Asst. Lecturer Ahmed Razzaq

Solution:
The relevant variables are number of finished and unfinished tables and chairs.
Let TF and TU be the number of finished and unfinished tables. Let CF and CU
be the number of finished and unfinished chairs.
The revenue (using the table):
70 TU + 140 TF + 60 CU + 110 CF
While the Cost is:
40 TU + 40 TF + 30 CU + 30 CF (because lumber costs $1 per board foot).
Profit (Revenue - Cost):
30 TU + 100 TF + 30 CU + 80 CF
The constraints are:
40 TU + 40 TF + 30 CU + 30 CF ≤ 40000
2 TU + 5 TF + 2 CU + 4 CF ≤ 6000
 The first constraint says that the amount of lumber used is no more than
what is available.
 The second constraint states that the amount of labor used is no more than
what is available.

Example 2.3:

A factory can produce four products denoted by P1, P2, P3 and P4 each product
must be processed in each of two workshops. The processing times (in hours per
unit produced) are given in the following table:

P1 P2 P3 P4
Workshop 1 3 4 8 6
Workshop 2 6 2 5 8

7
Fourth Stage Asst. Lecturer Ahmed Razzaq

400 hours of labor are available in each workshop. The profit margins are 4, 6,
10, and 9 dollars per unit of Pl, P2, P3, and P4 produced, respectively. Everything
that is produced can be sold.

Solution:

Thus maximizing profits, the following linear program can be used:

Maximize 4 x1 + 6 x2 +l0 x3 + 9 x4

S.t. 3 x1 + 4 x2 + 8 x3 + 6 x4 ≤ 400

6 x1 + 2 x2 + 5 x3 + 8 x4 ≤ 400

x1, x2, x3, x4 ≥ 0

Example 2.4:
A manufacturing firm produces two machine parts wing lathes, milling
machines, and grinding machines. The different machining times required for
each part, the machining times available on different machines and the profit on
each machine part are given in the following table.

Machining Time Required (min)


Machine Part Machine Part Maximum Time Available
Type of Machine
I II per Week (min)
Lathes 10 5 2500
Milling machines 4 10 2000
Grinding machines 1 1.5 450
profit per unit 50$ 100$

Determine the number of parts I and II to be manufactured per week to


maximize the profit.

8
Fourth Stage Asst. Lecturer Ahmed Razzaq

Solution:

Let the number of machine parts I and II manufactured per week be denoted by
x and y respectively.
The total profit is given by 50 x + 100 y and the resulting algebraic formulation
is:
Maximize: Z = 50 x + 100 y
Subject to: 10 x + 5 y ≤ 2500
4 x + 10 y ≤ 2000
x + 1.5 y ≤ 450
x≥0
y≥0

You might also like