Professional Documents
Culture Documents
Admaths: Section: Linear Programming
Admaths: Section: Linear Programming
ADMATHS
SECTION: LINEAR PROGRAMMING
Linear Programming was first developed during the Second World War
(1 939 – 1 945) when allied forces had to do operations thousands of
kilometres away from their base camps. The logistics of variables such as
huge quantities of soldiers, food, ammunition, vehicles and weapons etc.
that had to be moved over long distances had to be studied.
Although most practical problems usually have many variables, we are going
to restrict ourselves in these lessons to situations with only TWO variables.
George Danzig developed the Simplex Method in 1 946 by which problems
with any amount of variables could be handled. With this method the use of
computers became very important.
Example 1
1.1 𝑦≤3
1.2 𝑥>4
1.3 2≤𝑥<5
1.4 𝑦 ≤ 2𝑥
1.5 𝑥+𝑦 ≤7
Solution
1.1
𝑦=3
𝑦≤3
Note that 𝑦 = 3
is a solid line.
1.2
𝑥>4
Note that 𝑥 = 4
is a dotted line.
𝑥=4
1.3
2≤𝑥<5
Note that 𝑥 = 2 is a
solid line while 𝑥 = 5
is a dotted line.
𝑥=2
𝑥=5
1.4
𝑦 ≤ 2𝑥
𝑦 = 2𝑥 0 2
1.5 𝑥+𝑦 ≤7
𝑦-intercept (Let 𝑥 = 0)
𝑦 = −𝑥 + 7 or 𝑥+𝑦 =7
= −0 + 7 0+𝑦 = 7
=7 𝑦=7
𝑥-intercept (Let 𝑦 = 0)
𝑦 = −𝑥 + 7 or 𝑥+𝑦 =7
0 = −𝑥 + 7 𝑥+0=7
𝑥=7 𝑥=7
𝑦 = −𝑥 + 7
𝑦𝑦≤≤ −𝑥
−𝑥 ++
7 7
Example 2
𝑥≥0
𝑦≥0
𝑥+𝑦 ≤5
Solution
The SOLUTION of a system of inequalities is the region where all the
shaded areas OVERLAP.
• 𝑥≥0
• 𝑦≥0
• 𝑥+𝑦 ≤5
∴ 𝑦 ≤ −𝑥 + 5
𝑦 = −𝑥 + 5
𝑦 = −𝑥 + 5
Solution
Example 3a
𝑥 ≥ 0; 𝑦 ≥ 0 (1)
𝑥+𝑦 ≥2 (2)
𝑥+𝑦 ≤6 (3)
Solution
(2) 𝑥+𝑦 ≥2
𝑦 ≥ −𝑥 + 2
(3) 𝑥+𝑦 ≤6
∴ 𝑦 ≤ −𝑥 + 6
SOLUTION
𝑦 = −𝑥 + 6
𝑦 = −𝑥 + 2
1 2 3 4 5 6
Example 3b
𝑥 ≥ 0 ; 𝑦 ≥ 0 (1)
𝑥+𝑦 ≥2 (2)
𝑥+𝑦 ≤6 (3)
𝑦≥1 (4)
𝑥≤3 (5)
(The only difference from example 3𝑎 is that the constraints 4 and 5 are
included here.)
Solution
(2) 𝑥+𝑦 ≥2
𝑦 ≥ −𝑥 + 2
(3) 𝑥+𝑦 ≤6
∴ 𝑦 ≤ −𝑥 + 6
SOLUTION
𝑦 = −𝑥 + 6 (3)
𝑥=3 (5)
𝑦 = 1 (4)
(2) 𝑦 = −𝑥 + 2
Example 4
𝑥 ≥ 0; 𝑦 ≥ 0
𝑥+𝑦 ≥3 (1)
𝑥 + 𝑦 ≤ 12 (2)
2𝑥 + 𝑦 ≥ 12 (3)
𝑥≤5 (4)
𝑦≥5 (5)
Solution
Draw:
(4)
𝑥=5
(3)
𝑦 = −2𝑥 + 12 𝑦=5
(5)
(1) (2) 𝑦 = −𝑥 + 12
𝑦 = −𝑥 + 3
EXERCISE 1
1. Make graphical representations of the systems of inequalities and shade
the REGION of the SOLUTION.
1.1 𝑥 ≥ 0; 𝑦 ≥ 0 1.2 𝑥 ≥ 0; 𝑦 ≥ 0
𝑥≤6 𝑦≤3
𝑦≥1 1≤𝑥≤4
𝑥+𝑦 ≤ 7 2𝑥 + 𝑦 ≤ 10
1
𝑦 ≥ 2𝑥 𝑦≥ 𝑥
2
14
13
12
11
10
9
8
7
5
4
3
2
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Example 5
Two ordinary dice are used in a gambling game. One die is red and the other
one is blue. Both dice are cast and the outcomes are used as results.
When both dice are cast simultaneously the result will be acceptable only
when it satisfies the following conditions:
The sum of the outcomes on the two dice may not exceed 10.
The rules of this game lead to a number of constraints. The outcomes have
to comply with these constraints. These constraints are written as
inequalities, represented graphically and then solved.
CONSTRAINTS
Let 𝑥 represent the outcome on the blue die and 𝑦 the outcome on the red
die.
• Inherent constraints:
These are constraints that will be applicable because of the situation itself.
We know that the numbers on an ordinary dice can only be the values
1 ; 2 ; 3 ; 4 ; 5 and 6. Therefore:
1 ≤ 𝑥 ≤ 6 and
1≤𝑦≤6
where 𝑥; 𝑦 ∈ 𝑁 (Natural numbers)
𝑥 + 𝑦 ≤ 10
𝑥≤4
𝑦≥2
𝑦 ≤ 2𝑥
1≤𝑥≤6
1≤𝑦≤6
𝑦 = −𝑥 + 10
𝑥=4
𝑥=1
𝑦=6
𝐴 𝐵
𝑅𝑒𝑑
𝑥=6
𝑦=2
𝐷 𝐶
𝑦 = 2𝑥
𝑦=1
𝐵𝑙𝑢𝑒
Example 6
She realises that with the time and equipment at her disposal she can
manufacture up to a maximum of 50 baby bags and 80 duvet covers per
month. She cannot manufacture more than 100 items per month. A small
business owner has placed a fixed order each month of 8 baby bags and
10 duvet covers for his shop.
Let 𝑥 be the number of baby bags and 𝑦 the number of duvet covers.
(a) Write down all the constraints in terms of 𝑥 and 𝑦 that are applicable
to this situation.
Solution
A Identify the VARIABLES – in this example it is indicated that 𝑥
represents the baby bags and 𝑦 the duvet covers.
B Write down the CONSTRAINTS that apply in the situation. This will
lead to inequalities in terms of 𝑥 and 𝑦
• Maximum amount
of items: 𝑥 + 𝑦 ≤ 100 (3) – maximum of 100 items
are possible
𝑥=8 𝑥 = 50
𝐴 𝐵 𝑦 = 80
Duvet
covers
𝐸 𝐷 𝑦 = 10
Baby bags
Although the entire feasible region is shaded, it is clear that the solutions can
only be part of the Natural numbers and should, therefore, be indicated by
dots. As it would be very time consuming to draw all possible answers as
dots, we simply keep in mind that our answers will have to be Natural
numbers.
EXERCISE 2
A factory that manufactures sports clothes makes golf shirts and tracksuit
pants that are exported to Mexico. To stay competitive the factory has certain
requirements to meet, but there are also constraints regarding production:
Let 𝑥 be the number of golf shirts that are manufactured each day.
(a) Write down all the constraints (inequalities) in terms of 𝑥 and 𝑦 that
are applicable in this situation.
(b) Use the graph paper given below to represent all the constraints
graphically.
HOMEWORK
Question 1
1.1 Make graphical representations of the solutions of the following sets of
inequalities.
1.1.1 𝑥≥0
𝑦≥0
𝑦≤3
𝑥+𝑦 ≤4
1.1.2 𝑥≥0
𝑦≥0
𝑥≤6
3𝑦 + 𝑥 ≤ 12
1.1.3 𝑥≥0
𝑦≥0
𝑥+𝑦 ≥3
𝑥+𝑦 ≤8
𝑦≥2
𝑦≥0
𝑥+5≥𝑦
𝑥 + 3𝑦 < 0
(6; −2)
Question 2
John does woodwork and sells handmade jewellery boxes and small coffee
tables at a market. He works over weekends and sometimes during the
night. He approximately has 63 hours per month available to pursue his
hobby.
Let 𝑥 be the number of jewellery boxes and 𝑦 be the number of coffee tables
he manufactures (sells).
2.1 Write down all the mathematical constraints that are applicable to this
situation.