Study Unit 3 - Linear Programming - LP
Study Unit 3 - Linear Programming - LP
There exists an n-dimensional cost vector 𝒄𝒄 = 𝑐𝑐1 , 𝑐𝑐2 , … , 𝑐𝑐𝑛𝑛 ⊤ exerting costs (or
weights) on the n-dimensional 𝐱𝐱 = 𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ⊤ variable vector.
The 𝑚𝑚 × 𝑛𝑛 matrix 𝑨𝑨 contains constraint coefficients, with the m-dimensional vector
𝒃𝒃 the constraint requirements.
LINEAR PROGRAMMING (MINIMIZATION)
minimise 𝑐𝑐1 𝑥𝑥1 + 𝑐𝑐2 𝑥𝑥2 + ⋯ + 𝑐𝑐𝑛𝑛 𝑥𝑥𝑛𝑛
subject to 𝑎𝑎11 𝑥𝑥1 + 𝑎𝑎12 𝑥𝑥2 + ⋯ + 𝑎𝑎1𝑛𝑛 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏1
𝑎𝑎21 𝑥𝑥1 + 𝑎𝑎22 𝑥𝑥2 + ⋯ + 𝑎𝑎2𝑛𝑛 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏2
⋮
𝑎𝑎𝑚𝑚1 𝑥𝑥1 + 𝑎𝑎𝑚𝑚𝑚 𝑥𝑥2 + ⋯ + 𝑎𝑎𝑚𝑚𝑚𝑚 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏𝑚𝑚
𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≥ 0.
LINEAR PROGRAMMING
In matrix form:
minimise 𝑐𝑐 𝑇𝑇 𝑥𝑥
subject to 𝐴𝐴𝐴𝐴 ≥ 𝑏𝑏
𝑥𝑥 ≥ 0
LINEAR PROGRAMMING
Note that this is a ‘neat’ generalisation and that you have been following this all
along:
LINEAR PROGRAMMING (MINIMIZATION)
minimise 𝑐𝑐1 𝑥𝑥1 + 𝑐𝑐2 𝑥𝑥2 + ⋯ + 𝑐𝑐𝑛𝑛 𝑥𝑥𝑛𝑛
subject to 𝑎𝑎11 𝑥𝑥1 + 𝑎𝑎12 𝑥𝑥2 + ⋯ + 𝑎𝑎1𝑛𝑛 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏1
𝑎𝑎21 𝑥𝑥1 + 𝑎𝑎22 𝑥𝑥2 + ⋯ + 𝑎𝑎2𝑛𝑛 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏2
⋮
𝑎𝑎𝑚𝑚1 𝑥𝑥1 + 𝑎𝑎𝑚𝑚𝑚 𝑥𝑥2 + ⋯ + 𝑎𝑎𝑚𝑚𝑚𝑚 𝑥𝑥𝑛𝑛 ≥ 𝑏𝑏𝑚𝑚
𝑥𝑥1 , 𝑥𝑥2 , … , 𝑥𝑥𝑛𝑛 ≥ 0.
LINEAR PROGRAMMING
Note that all the inequalities in the previous example were “≥”. You have to
ensure this hold in order to write out the general matrix format as provided.
Therefore if one of the inequalities was “≤”; the constraint should firstly have been
multiplied by “-1” throughout.
LINEAR PROGRAMMING
For maximisation the following must hold:
maximise 𝑐𝑐 𝑇𝑇 𝑥𝑥
subject to 𝐴𝐴𝐴𝐴 ≤ 𝑏𝑏
𝑥𝑥 ≥ 0
EXAMPLES
Now that the rules are provided, formulate the following linear problems:
EXAMPLE
Company A places advertisements. A budget of 8000 is available and the
maximum audience number must be reached.
The following information is available:
EXAMPLE
Given that at least 5 radio spots should be placed and radio advertisements may
not exceed 1800 in cost.
What is the maximum number of audience that could be reached?
EXAMPLE FORMULATION
𝑋𝑋1 = number of TV.
𝑋𝑋2 = number of newspaper.
𝑋𝑋3 = number of radio I.
𝑋𝑋4 = number of radio II.
EXAMPLE FORMULATION
max(5000𝑋𝑋1 + 8500𝑋𝑋2 + 2400𝑋𝑋3 + 2800𝑋𝑋4 )
subjected to
𝑋𝑋1 ≤ 12
𝑋𝑋2 ≤ 5
𝑋𝑋3 ≤ 25
𝑋𝑋4 ≤ 20
800𝑋𝑋1 + 925𝑋𝑋2 + 290𝑋𝑋3 + 380𝑋𝑋4 ≤ 8000
𝑋𝑋3 + 𝑋𝑋4 ≥ 5
290𝑋𝑋3 + 380𝑋𝑋4 ≤ 1800
𝑋𝑋1 , 𝑋𝑋2 , 𝑋𝑋3 , 𝑋𝑋4 ≥ 0
OIL EXAMPLE
An oil company produces 2 grades of gasoline; R (regular) and E (economy) by
mixing oils I and II.
Oil Ingredient Ingredient Cost/barrel
A% B%
I 35 55 30.00
II 60 25 34.80