You are on page 1of 40

Mathematics of Decision Making

Lorenzo Lampariello

a.a. 2019-20

Abstract See https://www.theorsociety.com/about-or/.

... Nothing at all takes place in the


universe in which some rule of
maximum or minimum does not appear
L. Euler

1 The whole picture: insights from an illustrating example

1.1 Formulate and understand the real-world problem

The Superwood Co. manufactures wooden products such as tables and chairs.
Because of declining earnings, top management has decided to develop a new
management policy aiming at
determining what the production (daily) quantities should be for the two
products in order to maximize their total profit, subject to the restrictions
imposed by the limited production capacities available in the plant.
Profit per unit produced was chosen as an appropriate measure after the mar-
keting division concluded that the incremental profit from each additional
unit produced would be roughly constant regardless of the total number of
units produced. As a consequence, the accounting department developed the
estimates reported in Table 1.
The manufacturing division, as detailed in Table 2, has made available the
data concerning hours of assembly and conditioning time available (per day)
for the products, as well as the number of hours (per day) of assembly and
conditioning time used for each unit produced of each product.
Department of Business Studies, University of RomaTre, Italy E-mail:
lorenzo.lampariello@uniroma3.it
2 Lorenzo Lampariello

Table 1: Superwood Co. (daily) data

objective table [#] chair [#]


profit [¤/#] 4 1

Table 2: Superwood Co. (daily) data

constraints table [#] chair [#] resources availability


assembly time [h/#] 3 2 12
conditioning time [h/#] 0,5 1 4

1.2 Construct a (mathematical programming) model

In view of the problem definition above, one has to decide the number of units
of tables and chairs to be produced (daily) so as to maximize their total profit.
(i) Define the decision variables, i.e. unknown quantities to be controlled by
the decision-maker in order to achieve the objective. In this case, one can
naturally set
x1 = units of tables produced (daily)
x2 = units of chairs produced (daily)
(ii) Define the objective (function). As for this example, it is simply the total
profit, depending in turn on the units of tables and chairs produced
(daily):
f (x1 , x2 ) = 4x1 + 1x2
(iii) Identify the constraints, i.e. the restrictions imposed on the values of the
decision variables, due to the limited resources (assembly and condition-
ing hours) available. In particular, Table 2 indicates that 3 (daily) hours
of assembly are used to manufacture each table, and 2 (daily) hours of
conditioning are required to manufacture each chair. Hence, the number
of (daily) hours of assembly used to produce x1 units of tables and x2
units of chairs is 3x1 +2x2 . This amount of time, in turn, must not exceed
the total number of available assembly (daily) hours, that is 12. Similarly,
the number of (daily) hours of conditioning used to produce x1 units of
tables and x2 units of chairs is 0, 5x1 + 1x2 . But only 4 (daily) hours of
conditioning are available and this limit must be taken into account. In
summary, the resources limitations constrain the feasible values for the
production quantities x1 and x2 according to the following relations:
g1 (x1 , x2 ) = 3x1 + 2x2 ≤ 12
g2 (x1 , x2 ) = 0, 5x1 + 1x2 ≤ 4
Of course, we also have the so-called logical constraints, such as:
x1 ≥ 0
x2 ≥ 0
Mathematics of Decision Making 3

The considerations above translate in the following model, which is constructed


along the lines of the language of mathematical programming.
Choose values of x1 and x2 so as to

maximize 4x1 + 1x2


x1 ,x2
s.t. 3x1 + 2x2 ≤ 12
0, 5x1 + 1x2 ≤ 4 (1)
x1 ≥ 0
x2 ≥ 0.

This essentially consists in addressing two problems:

feasibility i.e. the problem of finding feasible values for x1 and x2 , that is
the values (if any) of the production quantities that comply with the con-
straints. Actually, this is the problem introduced by subject to (s.t.) in
(1);
optimality i.e. the problem of picking out (if any), among all the feasible values
for x1 and x2 , the ones that maximize the objective.

E What about the integrality requirements?


E Consider the possibility to launch a new product having large sales potential
such as libraries. Observe that no substantial costs will be incurred to initiate
the production and marketing of libraries. Top management has also decided
to no longer rely on prefabricated parts to manufacture the products and, thus,
the firm provides directly carpentry services. Address the resulting modified
problem in the light of the following data:

Table 3: Superwood Co. (daily) data

objective table [#] chair [#] library [#]


profit [¤/#] 4,5 2 12

Table 4: Superwood Co. (daily) data

constraints table [#] chair [#] library [#] resources availability


assembly time [h/#] 3 2 4 12
conditioning time [h/#] 0,5 1 1,5 4
wood panel [#/#] 6 1 8 48
4 Lorenzo Lampariello

1.3 Solve the (mathematical programming) problem

1.3.1 The graphical solution

Small problems with only two decision variables can be solved by means of
a simple graphical procedure. First, one has to construct a two-dimensional
graph with x1 and x2 as the axes: the horizontal axis shows the range of values
for x1 , while the vertical axis the range of values for x2 . Then, recalling that
actually we are facing two problems (feasibility and optimality), follow these
steps:
(I) (feasibility) Identify the feasible values of x1 and x2 , i.e. the values that
are permitted by the constraints (see point (iii) in Section 1.2). This is
done by drawing each line that borders the range of permissible values
for each restriction (see Figure 1). To begin, note that the nonnegativity
restrictions x1 ≥ 0 and x2 ≥ 0 require x1 and x2 to lie on the positive
side of the axes, i.e., in the first quadrant. The constraint, 3x1 +2x2 ≤ 12,
requires plotting the values of x1 and x2 such that 3x1 + 2x2 = 12
(a line) to complete the boundary; the values of x1 and x2 such that
3x1 + 2x2 ≤ 12 are those that lie either underneath or on the line
3x1 + 2x2 = 12, so this is the limiting line above which the values of
x1 and x2 do not satisfy the inequality. An analogous reasoning applies
to the constraint 0, 5x1 + 1x2 ≤ 4. Finally, considering altogether the
zones individuated above, i.e. intersecting them, one gets the so-called
feasible region (see Figure 2), that is the area which the values of x1
and x2 must belong to in order to comply with problem’s constraints.
(II) (optimality) Draw the (contour lines of the) objective function (see point
(ii) in Section 1.2). Remember that the aim is to pick out the values of
x1 and x2 in the feasible region that maximize the value of the objec-
tive function f . One can follow a trial procedure, see Figure 3. Set, for
example, a value equal to 0. Then, recalling that the objective function
f (x1 , x2 ) = 4x1 + x2 , drawing the line 4x1 + x2 = 0 simply corresponds
to identifying all the values of x1 and x2 that yield a corresponding
value of the objective function f as large as 0. Even more, one can see
that there is a single point on this line that also lies within the feasible
region, specifically x1 = 0 and x2 = 0. Having gained perspective by
trying this arbitrarily chosen value of 0, one should next try a larger
(we are maximizing!) arbitrary value for f , say 4, and draw the line
4x1 + x2 = 4: this corresponds to identifying all the values of x1 and x2
that yield a corresponding value of the objective function f as large as
4. Observe also that there are plenty of points on this line that lie within
the feasible region, so that the maximum permissible value for f must
be at least 4. Hence, try further the value 18.5: can one obtain such
value for the objective, given the problem’s constraints? The answer is
clearly no. Now notice in Figure 3 that the lines constructed are parallel.
This is no coincidence, since any such line has the form 4x1 + x2 = k
Mathematics of Decision Making 5

x2 x2

20 20

x1 x1
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8

−20 −20

x2 x2
3x1 + 2x2 = 12 0.5x1 + x2 = 4

20 20

x1 x1
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8

−20 −20

Fig. 1: How to draw the constraints

x2

20

x1
−8 −6 −4 −2 2 4 6 8

−20

Fig. 2: How to depict the feasible region


6 Lorenzo Lampariello

x2

20

x1
−8 −6 −4 −2 2 4 6 8

4x1 + x2 = 0
4x1 + x2 = 4
4x1 + x2 = 11 −20
4x1 + x2 = 16
4x1 + x2 = 18.5

Fig. 3: How to depict the (contour lines of the) objective function

for the chosen value of k (0, 4, or 18.5 for the analysis above), and, in
turn,

x2 = k − 4x1 ,

which shows that, independent from k, the slope of the line is 4, whereas
the intercept of the line with the x1 axis is equal to k. Moreover, com-
paring the lines in Figure 3, it is clear that the line giving a larger
value of k is farther up and away from the origin (note also that the
intercept with the x1 axis increases when the value chosen for f , i.e.
k, is increased). In view of these considerations, in the end one has to
draw a family of parallel lines containing at least one point in the fea-
sible region and selecting the line that corresponds to the largest value
k of the objective f . Figure 3 shows that this line passes through the
point x1 = 4, x2 = 0, which is the optimal solution. The equation
4x1 + x2 = 4 ∗ 4 + 1 ∗ 0 = 16 of this line indicates that the optimal value
for f is k = 16. The point x1 = 4, x2 = 0 lies at the intersection of the
two lines x2 = 0 and 3x1 + 2x2 = 12, so that it can be calculated as the
simultaneous solution of these two equations.
Summing up, construct a single line with a ruler to establish the slope.
Then, when maximizing, move the ruler with fixed slope through the
feasible region in the direction of improving k. Stop moving the ruler at
the last instant that it still passes through a point in this region. This
point is the desired optimum.

E What if the objective function is f (x1 , x2 ) = 6x1 + 4x2 ?


Mathematics of Decision Making 7

Fig. 4: Excel spreadsheet model

1.3.2 Computer-aided solution: how to resort to the Excel software

Once data are reported onto a spreadsheet, follow the same steps as in Section
1.2. (i) The decision variables, i.e. (daily) production quantities of tables and
chairs (x1 and x2 ), are placed in cells C15 and D15 to locate them in the
columns for these products just under the data cells. Since we don’t know yet
what these quantities should be, they are just entered as ones at this point.
Later, these numbers will be changed while seeking the optimal production
mix.
(ii) The objective, i.e. the total (daily) profit from the two products, is
entered in cell G4: it is the sum of products
G12 = SUMPRODUCT(C4:D4, C15:D15).
The total profit (G12) is an output cell depending on the changing cells C15
and D15: it has to be made as large as possible when choosing the production
quantities.
(iii) As for the constraints, the total number of hours of assembly and
conditioning time used per day for the production of tables and chair is entered
in cells E9 and E10, just to the right of the corresponding data cells. The Excel
equations for these cells are
E9 = SUMPRODUCT(C9:D9, C15:D15)
E10 = SUMPRODUCT(C10:D10, C15:D15).
Finally, ≤ signs are entered only as reminders in cells E9, E10 to indicate that
each total value to their left cannot be allowed to exceed the corresponding
number in column G. The nonnegativity constraints (x1 ≥ 0, x2 ≥ 0) could
be added in a later stage of the implementation.
To practically find a solution of the problem at hand, once the model has
been correctly reported onto the spreadsheet, one has to resort to the Excel
8 Lorenzo Lampariello

Fig. 5: Excel spreadsheet model and Solver dialog box

built-in Solver. To install the Solver, click the Office Button, choose Excel
Options, then click on Add-Ins on the left side of the window, select Manage
Excel Add-Ins at the bottom of the window, and then press the Go button.
Make sure Solver is selected in the Add-Ins dialog box, and then it should
appear on the Data tab. For Excel 2011 (for the Mac), choose Add-Ins from
the Tools menu and make sure that Solver is selected. To provide the Solver
with a starting point, an arbitrary trial solution has been entered in Figure 4
by placing ones in the changing (variables) cells. Solver will then change these
to the optimal values after solving the problem. This procedure is started by
clicking on the Solver button on the Data tab and by filling in the dialog box
(see Figure 5): the Solver clearly needs to know where each aspect of the model
is located on the spreadsheet. Once all the fields in the dialog box are filled in,
the Solver will indicate the outcome. Typically, it will indicate that it has found
an optimal point. If the model has no feasible points or no optimal points, the
dialog box will state that “Solver could not find a feasible solution” or that
“The Objective Cell values do not converge”. The dialog box also presents the
option of generating various reports. After solving the model, Solver replaces
the original numbers in the changing cells with the optimal numbers, as shown
in Figure 6.
E Solve all the problems in Section 1.2.
Mathematics of Decision Making 9

Fig. 6: Excel spreadsheet model and Solver results dialog box

2 Generalizing from the specific example

2.1 The linear programming model

The example in Section 1 belongs to the category of resources allocation: in


particular, it involves allocating resources (e.g., money, kinds of machines,
equipment, vehicles, and personnel, ...) to activities (e.g., investing in particu-
lar projects, advertising in particular media, shipping goods, ... ). The amount
available of each resource is limited, so a careful allocation of resources to ac-
tivities must be made. Determining this allocation involves choosing the levels
of the activities that achieve the best possible value of the overall measure of
performance, i.e. the objective.
Consider the following general data: let q be the number of resources and
n be the number of activities, and
• pj be the contribution in terms of measure of performance (i.e. objective
value) that would result from each unit increase in level of activity j, with
j = 1, . . . , n;
• bi be the amount of resource i, with i = 1, . . . , q, that is available for
allocation to activities;
• aij be the amount of resource i, with i = 1, . . . , q consumed by each unit
of activity j, with j = 1, . . . , n.
The values of the quantities above are the input parameters of the model.
E What are resources and activities in the case study in Section 1? Establish
correspondences between Table 5 and Tables 1 and 2.
Following the same line of reasoning in Section 1,
(i) x1 , . . . , xn ∈ R, with xj representing the (unknown) level of activity j
for j = 1, . . . , n, are the decision variables;
(ii) f (x1 , . . . , xn ) = p1 x1 + p2 x2 + . . . + pn xn , being the value of the overall
measure of performance, is the objective;
(iii) gi (x1 , . . . , xn ) = ai1 x1 + ai2 x2 + . . . + ain xn , with i = 1, . . . , q, be-
ing the amount of resource i consumed to obtain x1 , . . . , xn levels for
the activities 1, . . . , n, is the generic constraint function. For every i =
10 Lorenzo Lampariello

Table 5: Resources allocation data

activities
objective 1 2 ... n
contribution to obj. val. per unit of activity p1 p2 ... pn

activities
constraints 1 2 ... n resources availability
1 a11 a12 ··· a1n b1
resources

2 a21 a22 ··· a2n b2


.. .. .. .. .. ..
. . . . . .
q aq1 aq2 ··· aqn bq

1, . . . , q, this quantity cannot exceed the corresponding resource i avail-


ability, i.e. bi . Hence, for every i = 1, . . . , q, we get the generic constraint
gi (x1 , . . . , xn ) = ai1 x1 + ai2 x2 + . . . + ain xn ≤ bi .
One has to establish the levels of activities x1 , . . . , xn so as to
maximize p1 x1 + p2 x2 + · · · + pn xn
x1 ,...,xn
s.t. a11 x1 + a12 x2 + · · · + a1n xn ≤ b1
a21 x1 + a22 x2 + · · · + a2n xn ≤ b2
..
.
aq1 x1 + aq2 x2 + · · · + aqn xn ≤ bq (2)
x1 ≥ 0
x2 ≥ 0
..
.
xn ≥ 0.

Model (2) can be equivalently written in the following more synthetic form:
n
X
maximize p j xj
xj , j=1,...,n
j=1
Xn
s.t. aij xj ≤ bi , i = 1, . . . , q
j=1
xj ≥ 0, j = 1, . . . , n,
which in turn, considering the vectors
     
p1 b1 x1
 p2  b2   x2 
p ,  .  ∈ Rn , b ,  .  ∈ Rq , x ,  .  ∈ Rn
     
 ..   ..   .. 
pn bq xn
Mathematics of Decision Making 11

and the matrix


 
a11 a12 ··· a1n
a21 a22 ··· a2n 
q,n
A, . ..  ∈ R ,
 
.. ..
 .. . . . 
aq1 aq2 · · · aqn

is equivalent to the compact version

maximize pT x
x
s.t. Ax ≤ b (3)
x ≥ 0,

where
n
X
pT x , p1 x1 + p2 x2 + · · · + pn cn = cj xj
j=1

is a number, i.e. pT x ∈ R, denoting the scalar product of the equal-length


vectors p and x, and

    T 
a11 a12 ··· a1n x1 a1 x
a21 a22 ··· a2n   x2   aT2 x 
Ax =  . ..   ..  ,  .. 
    
.. ..
 .. . . .   .   . 
aq1 aq2 · · · aqn xn aTm x
   Pn
a1j xj

a11 x1 + a12 x2 + · · · + a1n xn Pj=1
a21 x1 + a22 x2 + · · · + a2n xn   nj=1 a2j xj 
= =
   
.. .. 
 .  
Pn .

aq1 x1 + aq2 x2 + · · · + aqn xn j=1 aqj xj ,

being ai the ith row vector, the matrix product belonging to Ax ∈ Rm of


A ∈ Rq,n and x ∈ Rn .
It is worth remarking that the n non negativity constraints (xj ≥ 0,
j = 1, . . . , n) can be “included” among the generic constraints gi s. In fact,
denoting gq+j (x1 , . . . , xn ) = −xj , for j = 1, . . . , n, one gets the following fur-
ther equivalent form of problem (3):

maximize pT x
x
e ≤ eb, (4)
s.t. Ax
12 Lorenzo Lampariello

where
 
a11 a12 ··· a1n  
b1
a21 a22 ··· a2n  b2 
 .. .. .. 
 
..  .. 
 
 .
 . . . 
 .
aq1 aq2 · · · aqn 
 ∈ Rq+n,n , eb , bq  ∈ Rq+n .
 
A=
e
 −1
 0 ··· 0 
 
0
 0 −1 · · · 0   
.
 .. 
 
.
0 ..
 
 0 0 
0
0 0 ··· −1

The preceding model (in any of its equivalent versions) might happen not to
fit the natural form of other problems. For example, one could have to
• minimize rather than maximize the objective function;
• consider constraint functions gi s with a greater-or-equal-to inequality or
with an equality for some i ∈ {1, . . . , q};
• take into account decision variables xj , for some j ∈ {1, . . . , n} unrestricted
in sign.
The question arises if model (2) (or, equivalently, (3) or (4)) is sufficiently
general to encompass other cases of interest. The answer is yes: by simple
manipulations, cases as those described above can be reduced to the general
form (2) (or, equivalently, (3) or (4)). In fact, suffice it to observe that:
• minimizing fe is equivalent to maximizing f = −fe;
• any constraint of the type gei (x) ≥ ebi is equivalent to gi (x) ≤ bi , where
gi = −egi and bi = −ebi ; an equality constraint gei (x) = ebi can be recast as
the couple of inequality constraints

gi (x) ≤ bi
gi+1 (x) ≤ bi+1

where gi = gei , bi = ebi , and gi+1 = −e


gi and bi+1 = −ebi .
• in order to take into account a decision variables xej unrestricted in sign, one
has to substitute both in the objective and in the constraints any occurrence
of x ej = xn+j − xn+j+1 where xn+j ≥ 0 and xn+j+1 ≥ 0.
ej setting x

2.1.1 Underlying assumptions of the linear model

The underlying assumption of model (2) is that the objective and the con-
straints must be linear.

Definition 1 A function f : Rn → R is linear if


• f (b x, x ∈ Rn
x) + f (x), ∀b
x + x) = f (b
• f (λx) = λf (x), ∀x ∈ Rn , λ ∈ R
Mathematics of Decision Making 13

It is useful top observe that a function f is linear if and only if f (x) = p1 x1 +


p2 x2 + · · · + pn xn for some parameters p1 , p2 , . . . , pn ∈ R.
E Show that the functions involved in problem (1) satisfy the properties in
Definition 1.
E Is the function f (x1 , x2 ) = 4x1 + x2 + 2 linear?
From a more practical viewpoint, the mathematical properties above require in
turn certain (implicit) assumptions to hold about the activities and data of the
problem being modeled, including assumptions about the effect of varying the
levels of the activities. Highlighting these assumptions allows one to evaluate
how well a linear model applies to a given problem.
• Proportionality or constant returns of scale: the contribution of each ac-
tivity to the value of the objective function is proportional to the level of
the activity xj , as represented by the cj xj term in the objective function.
Similarly, the contribution of each activity to the left-hand side of each con-
straint is proportional to the level of the activity xj , as represented by the
aij xj term in the constraint.
• Additivity: every function in a linear model (whether the objective function
or the constraint functions) is the sum of the individual contributions of the
respective activities.
• Divisibility: decision variables are allowed to have any values, including non-
integer values, that satisfy the constraints: hence, the activities can be run
at fractional levels.
• Certainty: each parameter (cj s, aij s, bi s) is assumed to be a known con-
stant. Actually, parameter values used would be based on a prediction of
future conditions, which inevitably introduces some degree of uncertainty.
For this reason it is usually important to conduct a sensitivity analysis after
a solution is found that is optimal under the assumed parameter values.

2.2 The general model

The straightforward generalization of a linear model leads to the following


general form of a mathematical programming problem:

maximize f (x)
x
(5)
s.t. gi (x) ≤ bi , i = 1, . . . , m

where f : Rn → R, gi : Rn → R with i = 1, . . . m are the objective and the


constraints functions, respectively, and bi ∈ R.
The feasible set of problem (5) is

S , {x ∈ Rn : gi (x) ≤ bi , i = 1, . . . , m}.
14 Lorenzo Lampariello

2.2.1 Basic terminology

Referring to the general model (5), a point x is


• infeasible if x ∈
/ S, i.e. ∃ ı̄ ∈ {1, . . . , m} such that gı̄ (x) > bı̄ ;
• feasible if x ∈ S, i.e. ∀i ∈ {1, . . . , m} gi (x) ≤ bi ;
• (global) optimal if x ∈ S and
f (x) ≥ f (x), ∀ x ∈ S;
moreover, in this case f (x) is the (unique) optimal value.
E Find an infeasible point in the example addressed in Section 1.
E Concerning the definition of optimal point, what if the problem, given the
constraints, is to minimize the objective?
E Modify the objective in the example in Section 1 so as to have more than a
single optimal point.
Given a point x, an inequality constraint ı̄ ∈ {1, . . . , m} is
• violated at x if gı̄ (x) > bı̄ ;
• satisfied at x if gı̄ (x) ≤ bı̄ ;
• active at x if gı̄ (x) = bı̄ ;
• redundant at x if gı̄ (x) < bı̄ ; moreover, if the ı̄th inequality constraint is
redundant at any feasible point, then it can be removed from the problem.
E Are some constraints active at the optimal point in the example in Section
1? Are some constraints redundant at the optimal point in the example in
Section 1?
E Add to the feasible set in the example in Section 1 a constraint that is
redundant at any feasible point.
E What about equality constraints?
Problem (5) is termed
• infeasible if S = ∅, i.e. the problem has no feasible points;
• unbounded if, for any M > 0, there exists x ∈ S such that f (x) > M .
E Modify the feasible set in the example in Section 1 so as to make the problem
infeasible.
E Modify the feasible set in the example in Section 1 so as to make the problem
unbounded.
E Concerning the definition of unbounded problem, what if the problem, given
the constraints, is to minimize the objective?
E Establish if the following problems are infeasible, unbounded, or admit op-
timal points:
minimize −3x1 + 6 minimize −3x1 + 6 minimize −πx1
x1 x1 x1
s.t. x1 ∈ R s.t. x1 ≥ 0 s.t. x1 ≥ −1
x1 ≤ 106
Mathematics of Decision Making 15

1
minimize 7x1 + 45 minimize 10 maximize 27 x1
x1 x1 x1
s.t. x1 ≥ 10−6 s.t. x1 ≥ 2
3 s.t. x1 ≥ −1000
x1 ≤ 0

minimize 3x1 + 2x2


x1    
10 0
s.t. Ax = x≥b=
01 0

E Show that, letting d ∈ R, the following problems are equivalent:

maximize f (x) + d maximize f (x)


x x
s.t. gi (x) ≤ bi , i = 1, . . . , m s.t. gi (x) ≤ bi , i = 1, . . . , m

E Solve (graphically) the following problems:


minimize 2x1 + x2 − 3 minimize 2x1 + 2x2
x1 , x 2 x 1 , x2
s.t. x2 − 3x1 − 2 ≤ 0 s.t. x1 ≥ 0
−2x2 ≥ −6x1 − 4 x2 ≥ 0
x1 + x2 ≥ 1
(unbounded) (inf. opt. points)

minimize −(1/3) x1 + x2
minimize x1 + x2 x1 , x2
x1 , x2
s.t. −x1 + x2 + 1 ≤ 0
s.t. x1 ≥ 0
x2 ≤ 0
x2 ≥ 0
x1 + x2 + 3 ≥ 0
−2x1 + x2 + 8 ≥ 0
(x1 = x2 = 0)
(x1 = 5/3, x2 = −14/3)

maximize −x1 + x2 minimize −x1 + x2


x1 , x 2 x1 , x 2
s.t. x2 ≤ x1 s.t. x2 ≤ x1
x1 ≤ 5 x1 ≤ 5
x2 ≥ 0 x2 ≥ 0

(inf. opt. points) (x1 = 5, x2 = 0)

maximize x1 − x2
x1 , x 2
s.t. x2 ≤ x1
x1 ≤ 5
x2 ≥ 0
(x1 = 5, x2 = 0)
16 Lorenzo Lampariello

3 Some remarks about theory of linear programming

The simple two-dimesional example analyzed in Section 1.3.1 has a straight-


forward geometric interpretation. In this section we generalize these concepts.
Consider from now on, without loss of generality, the linear programming
problem
Xn
maximize p j xj
xj , j=1,...,n
j=1
n
X (6)
s.t. aij xj ≤ bi , i = 1, . . . , m.
j=1

E Why can we consider the linear problem form (6) without loss of generality?

3.1 On the nature of the feasible set

Preliminarily, it is appropriate to recall that, given a ∈ Rn and d ∈ R,


• H , {x ∈ Rn : aT x = d} is an hyperplane;
• S ≤ , {x ∈ Rn : aT x ≤ d} is an half-space;
• S ≥ , {x ∈ Rn : aT x ≥ d} is an half-space;
and we have H ⊆ S ≤ , H ⊆ S ≥ , H = S ≤ ≥
P∩n S .
n
The feasible set S = {x ∈ R : j=1 aij xj ≤ bi , i = 1, . . . , m} of a
linear programming problem, resulting from the intersection of finitely many
half-spaces, is a convex polyhedron.
It may seem that optimal points for any linear programming problem must
lie on the boundary of the feasible region, and in fact, this is a general property.
Because boundary is a geometric concept, it is useful to observe that the
boundary of the feasible region contains just those feasible points for which one
or more of the constraints are active. Moreover, as evident from the examples
in the previous sections, corners have a key position among boundary points.
According the following definition, a corner, or vertex, is nothing else but
a feasible point that does not lie on any line segment connecting two other
feasible points.
Definition 2 A point x ∈ S is a vertex of S if there not exist two distinct
points x b ∈ S such that x 6= x
e, x e, x 6= x b ∈ [e
b and x x, x
b].
E Find the vertices of the feasible region in Figure 2.
When the number of decision variables n is greater than 2 or 3, we can no
more rely on a simple visual inspection to find the vertices, if any, of S. Hence,
one has to resort to the algebraic characterization of such points.
Look again at the example in Section 1: each vertex in Figure 2 lies at the
intersection of two (n = 2) constraint lines; i.e., it is the simultaneous solution
of a system of two (n = 2) constraint relations satisfied with the equality sign.
In other equivalent terms, each corner in Figure 2 is such that two (n = 2)
constraint relations are active at it.
Mathematics of Decision Making 17

Generalizing this simple observation, for any linear programming problem


with n decision variables, each vertex lies at the intersection of n constraint
lines; i.e., it is the simultaneous solution of a system of n constraint relations
satisfied with the equality sign.
However, this is not to say that every (sub)set of n constraint relations
satisfied with the equality sign yields a vertex! In fact,
(i) the simultaneous solution of such a system of equations might violate
one or more of the other constraints not chosen, in which case it is an
infeasible vertex;
(ii) a system of n constraint relations satisfied with the equality sign might
have no solution at all;
(iii) a system of n constraint relations satisfied with the equality sign might
have infinite solutions.
It also should be mentioned that it is possible for more than one system of n
constraint relations satisfied with the equality sign to yield the same vertex.
This would happen if a vertex that lies at the intersection of n constraint lines
also happens to have one or more other constraint lines that pass through this
same point. In summary, one can show the following result.
Pn
Theorem 1 Given the polyhedron S = {x ∈ Rn : j=1 aij xj ≤ bi , i =
1, . . . , m}, a point x is a vertex of S if and only if
1. x ∈ S;
2. x is the unique solution of a system of n constraint relations satisfied with
the equality sign.

Theorem 1 indicates how to compute the vertices of a polyhedron, as further


detailed in the following example: given the polyhedron

S = {(x1 , x2 ) ∈ R2 : −3x1 + 2x2 ≤ 30, −2x1 + x2 ≤ 12, x1 ≥ 0, x2 ≥ 0},

find (if any) its vertices.


In the light of Theorem 1, this amounts to search for feasible points that
are the unique solutions of systems composed by n = 2 among the m = 4
constraint relations satisfied with the equality sign. Hence, one is left to do a
simple case analysis.
• Consider the first and the second constraints. The corresponding system of
relations satisfied with the equality sign is

3x1 − 2x2 = −30
2x1 − x2 = −12

whose unique solution is easily seen to be the point P1 = (6, 24), which in
turn is feasible. Hence, P1 is a vertex.
18 Lorenzo Lampariello

• Then, consider the first and the third constraints: the corresponding system
is 
3x1 − 2x2 = −30
x1 = 0
whose unique solution is P2 = (0, 15), which in turn is not feasible (in
particular, it does not satisfy the second constraint).
• And so on...
In summary, one has to compute two by two (since n = 2) the possible inter-
sections of the m = 4 constraints lines −3x1 + 2x2 = 30, −2x1 + x2 = 12, x1 =
0, x2 = 0, and verify if the computed solutions (if any) are unique and feasible.

E What if the number of constraints m is less than n?


A straightforward consequence of Theorem 1 is that there is only a finite
number of vertices in a polyhedron. More precisely, since vertices comes from
the simultaneous solution of a system of n out  of the m constraints (satisfied
with the equality sign), they are at most m n .
Note also that, if an equality constraint is present, then suffice it to consider
only the systems of constraint relations that include it.
E Find the vertices of the following polyhedra:
{(x1 , x2 ) ∈ R2 : x1 + 2x2 + x3 ≤ 3, 3x1 − x2 + x3 ≤ 2} (no vert.)
{(x1 , x2 ) ∈ R2 : x1 − x2 ≥ 0, x1 ≤ 5, x1 ≥ 0, x2 ≥ 0} ((0, 0), (5, 0), (5, 5))
{(x1 , x2 ) ∈ R2 : x1 − 3x2 ≤ 15} (no vert.)
{(x1 , x2 , x3 ) ∈ R3 : x1 + 2x2 + x3 ≤ 3, 3x1 − x2 + x3 ≤ 2,
2x1 + x2 + x3 ≤ 3, 4x1 + x2 + 2x3 ≤ 4} ((2, 2, −3), (3, 2, −5))
{(x1 , x2 , x3 ) ∈ R3 : 2x1 − x2 + x3 ≤ 4, x1 − x3 = 1,
x1 , x2 , x3 ≥ 0} (( 35 , 0, 23 ), (1, 0, 0))
{(x1 , x2 ) ∈ R2 : x2 ≥ 0, x2 ≤ x1 , x2 ≥ −2x1 + 4, x2 ≥ 2x1 − 6} ((2, 0), (3, 0), ( 43 , 43 ), (6, 6))
{(x1 , x2 ) ∈ R2 : x1 + x2 ≤ 0, x1 + x2 ≥ 4, x1 ≥ 0} (no vert.)
{(x1 , x2 ) ∈ R2 : 3x1 − 3x2 ≤ 0, x1 − x2 ≤ 0} (no vert.)

E Verify if the points P1 = (0, 0, 0), P2 = (0, 0, 1/2), P3 = (0, 0, 1) are ver-
tices of {(x1 , x2 , x3 ) ∈ R3 : x1 +2x2 +2x3 ≤ 2, x1 +4x2 +2x3 ≤ 3, x1 , x2 , x3 ≥
0}. (P1 and P3 are vertices)

3.2 On the possible outcomes of any linear programming problem

It is actually because of the very nature of the feasible set (as well as of the
objective function) that the so-called fundamental theorem of linear program-
ming holds.
Theorem 2 (Fundamental Theorem of Linear Programming) For a
linear programming problem, one and only one of the following alternatives
holds:
Mathematics of Decision Making 19

• the problem is infeasible;


• the problem is unbounded;
• the problem has optimal points. In this case, at least an optimal point is a
vertex, if any.

Properties stated in Theorem 2 pave the way for algorithmic developments.


Actually, they provide the theoretical basis of the well-known simplex method
for the solution of linear programming problems. In fact, the above results
suggest that, in principle, an optimal point can be obtained by exhaustive
enumeration; i.e., find and compare all the finite number of vertices. Unfor-
tunately, this could turn out to be impractical: for example, a rather small
problem with only m = 50 and n = 50 would require 100!/(50!)2 = 1029
systems of equations to be solved! By contrast, as detailed next, the simplex
method, allowing for a “smart” inspection of the vertices set, would need to
examine only a subset of approximately 100 vertices for problems of this size.

3.3 An efficient solution procedure: the geometry of the simplex method

The simplex method is an iterative procedure that is aimed at establishing


if a linear problem is solvable and at computing an optimal point, if any. It
essentially consists in the following steps:
• initialization: choose an initial vertex to examine (possibly, the origin);
• stopping criterion: if none of the adjacent vertices is better (w.r.t. the ob-
jective’s value), the current point is optimal;
• generic iteration: if the current point is not optimal, move along an edge to
a better (w.r.t. the objective’s value) adjacent vertex.
The stopping criterion provides an easy-to-implement way of checking if a
vertex is optimal. It relies on a property that holds for any linear programming
problem that possesses at least one optimal solution. In fact, in this case one
can show that if a vertex has no adjacent vertices that are better (as measured
by the corresponding objective’s value), then it must be optimal. One of the
key aspects of the simplex method is that, as a consequence of Theorem 2,
focuses solely on vertices. For any problem with at least a optimal point,
finding one requires only finding a best vertex. Moreover, given a vertex, it
is much efficient computationally to gather information about its adjacent
vertices than about other vertices: each time the simplex method performs an
iteration to move from the current vertex to a better one, it always chooses
a vertex that is adjacent to the current one. No other vertices are considered:
the path followed to eventually reach an optimal point is along the edges of the
feasible region. Consider the Superwood Co. example. Among the 6 possible
systems of n = 2 out of the m = 4 constraints (satisfied with the equality
sign), the vertices of the feasible region are: (0, 0), (0, 4), (2, 3), (4, 0). Figure
7 helps to visualize the possible sequence of the iterative steps of the simplex
method when applied to the problem in Section 1.
20 Lorenzo Lampariello

Fig. 7: Path followed and vertices examined by the simplex method for the
Superwood Co. problem
x2 x2

20 20

x1 x1
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8

−20 −20

(b) Consider the adjacent vertices: does at


(a) Iteration 0: choose a vertex to be examined
least one of them entail a better value for the
objective?
x2 x2

20 20

x1 x1
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8

−20 −20

(c) Iteration 1: the answer is yes. Move to a (d) Again, moving from the current point to
better adjacent vertex an adjacent vertex, can one obtain a better
value for the objective?
x2 x2

20 20

x1 x1
−8 −6 −4 −2 2 4 6 8 −8 −6 −4 −2 2 4 6 8

−20 −20

(e) Iteration 2: the answer is yes. Move to a (f) Again, moving from the current point to
better adjacent vertex an adjacent vertex, can one obtain a better
value for the objective?
x2

20

x1
−8 −6 −4 −2 2 4 6 8

−20

(g) The answer is no: stop, the current vertex


is optimal
Mathematics of Decision Making 21

3.4 Duality

Duality is a core aspect of the theory of mathematical programming. It comes


from the observation that any mathematical programming problem is associ-
ated with a dual mathematical programming problem. The latter is kind of a
twin problem with respect to the original one (the so-called primal problem):
it provides a different point of view, which is full of deep consequences, on
the same content. In particular, the relationships between primal and dual
problems prove to be extremely useful in a variety of ways:
• giving estimates on primal problem’s optimal value;
• getting optimality conditions;
• providing sensitivity and stability analysis;
• devising solutions methods;
and, in the end, they help assisting with further decision support.
In order to grasp right away the qualitative rationale of duality, go back
once again to the example of Superwood Co. in Section 1. Given the primal
(original) problem, the dual one reads as shown to the right:
maximize 4x1 + 1x2 minimize 12u1 + 4u2
x1 ,x2 u1 ,u2
s.t. 3x1 + 2x2 ≤ 12 s.t. u1 ≥ 0
0, 5x1 + 1x2 ≤ 4 u2 ≥ 0 (7)
x1 ≥ 0 3u1 + 0, 5u2 ≥ 4
x2 ≥ 0 2u1 + 1u2 ≥ 1.

E Solve graphically and by means of the Excel solver the dual problem in (7).
(u1 = 43 , u2 = 0, obj. function optimal value = 16)
Suppose now that another company (from now on referred as the dual com-
pany) wants to take over the Superwood Co. (from now on referred as the
primal company). So, let the nonnegative quantities u1 , u2 be the unitary val-
ues accorded to the resources owned by the Superwood Co., i.e. assembly time
and conditioning time, respectively. While the aim of the primal company is
to maximize the profit as given by 4x1 + 1x2 , the goal of the dual company
is to minimize the costs incurred to obtain from the primal company all the
available resources, i.e. 12u1 + 4u2 (recall that 12 and 4 hours are available
for assembly and conditioning, respectively). Of course, in order to finalize
the take-over, the amount to be obtained (by the primal company) by selling
the resources needed to manufacture a product unit must be not less than the
profit coming from the sale of the product unit itself. This is clearly reflected in
the dual constraints: see for example the inequality 3u1 + 0, 5u2 ≥ 4, recalling
that in order to manufacture a table, 3 and 0, 5 hours (per unit) of assem-
bly and conditioning time are needed, and the (unitary) profit is 4. Hence,
one gets the dual problem that consists in determining the unitary values to
be accorded to the resources so as to minimize the total cost incurred to re-
alize the take-over, with the constraint that the amount to be spent to get
22 Lorenzo Lampariello

the resources needed to manufacture a product unit, for every product, must
be not less than the profit coming from the sale of the product unit itself.
Primal and dual problems are two sides of the same coin: in the Superwood
Co. example, the primal is the problem of maximizing the profit (under some
production constraints) assuming the costs of the production resources to be
known quantities. On the other hand, the dual is the problem of establishing
the minimal value for which it is profitable to sell the business rather than
producing, assuming the production quantities to be known a priori.

3.4.1 How to construct the dual problem

Before entering the detailed discussion on the theoretical properties of the


primal-dual couple from both quantitative (mathematical) and qualitative
(economic) standpoints, in this section the rules on how to construct the dual
problem from a primal one are laid down. Let, from now on, the primal prob-
lem involve n decision variables.

(i) Separate primal constraints into two groups. First, identify the n sign
constraints, one for each primal decision variables: a sign constraint could
be only of three types, xj ≥ 0, xj ≤ 0 or xj unrestricted in sign. Note
that if nothing is specified about a decision variable, then that decision
variable must be intended to be unrestricted in sign.
All the remaining q constraints are the so-called functional (or generic)
constraints.
(ii) Focus on the primal functional constraints. Depending on the nature of
the primal problem (is it a maximization or a minimization problem?)
and on if a functional constraint is either a ≥, a ≤, or an = relation,
label it (as ‘direct’, ‘indirect’, or ‘equality’ constraint) according to the
following rules.

Table 6: How to label a functional constraint

problem type ≤ ≥ =
maximize direct indirect equality
minimize indirect direct equality

(iii) Define the q dual decision variables with their sign constraints. For each
primal functional constraint, one has a corresponding dual decision vari-
able. The sign of each dual decision variable depends on the label of the
corresponding primal functional constraint. In particular, if a dual de-
cision variable comes from a direct primal function constraint, then it
must be ≥ 0; if it originates from an indirect primal function constraint,
then it must be ≤ 0; finally, if it has as its source an equality primal
function constraint, then it must be unrestricted in sign.
Mathematics of Decision Making 23

(iv) Define the nature of the dual problem. If the primal problem is to max-
imize, then the dual one is to minimize; if the primal problem is to
minimize, then the dual one is to maximize.
(v) Define the n dual functional constraints. Each dual functional constraint
is attached to a corresponding primal decision variable. More specifically,
if a dual functional constraint comes from a ≥ 0 primal decision variable,
then it must be direct; if it originates from a ≤ 0 primal decision vari-
able, then it must be indirect; finally, if it has as its source a primal
decision variable which is unrestricted in sign, then it must be an equal-
ity constraint. Suppose that a dual functional constraints is linked to the
primal decision variable xj : then, the coefficients in the expression in the
left-hand side of the dual functional constraint will be the coefficients
that appear multiplied times the primal decision variable xj in the pri-
mal functional constraints; the right-hand side (constant) quantity in the
dual functional constraint will be the coefficient that appears multiplied
times the primal decision variable xj in the primal objective function.
(vi) Define the dual objective function. The coefficients in the dual objec-
tive function are the right-hand side (constant) quantities in the primal
functional constraints.

Table 7: Rules to construct the dual problem

primal (dual) problem dual (primal) problem


maximize minimize
variables, sign

constraint i: variable i:
functional

≤ direct ui ≥ 0
constr.

constr.

≥ indirect ui ≤ 0
= equality ui unr. in sign
variables, sign

variable j: constraint j:
functional

xj ≥ 0 ≥ direct
constr.

constr.

xj ≤ 0 ≤ indirect
xj unr. in sign = equality

The following example illustrates how to apply the rules above.


minimize 3x1 − x2 + 10x3 maximize −u1 − 3u2
x1 ,x2 ,x3 u1 ,u2
s.t. s.t.
(direct) 5x1 + x2 ≥ −1 ←−−−−−−→ u1 ≥ 0
(equality) 0.1x1 + 0.3x2 + x3 = −3 ←−−−−−−→ u2 unr. in sign
x1 ≥ 0 ←−−−−−−→ (direct) 5u1 + 0.1u2 ≤ 3
x2 ≤ 0 ←−−−−−−→ (indirect) u1 + 0.3u2 ≥ −1
x3 unr. in sign ←−−−−−−→ (equality) u2 = 10
24 Lorenzo Lampariello

Consider now without loss of generality the general form (3) of a linear pro-
gramming problem. In the light of the practical rules that one has to follow
to construct the dual problem, one gets the following compact version for the
primal-dual couple:

maximize pT x minimize bT u
x u
s.t. Ax ≤ b s.t. u≥0 (8)
x≥0 A u ≥ p.
T

So, in principle, rather than following the general rules (i)-(vi), one can always
reduce the problem at hand to the general form (see subsection 2.1) and get
readily the dual problem as indicated in (8).
E Construct the dual for the following problems:
maximize x1 + 2x2 + 3x3
x1 ,x2 ,x3 minimize 5x1 + x2 + x3 + x4
x1 ,x2 ,x3 ,x4
s.t. 4x1 + 5x2 + 6x3 ≤ 7
s.t. x1 + x2 + x5 ≥ 1
8x1 + 9x2 − 3x3 ≥ 10
x2 + x3 + x4 ≤ 1
11x1 − 2x2 + 12x3 = −3
x1 + x2 + x3 + x5 = 2
x1 ≥ 0, x2 ≤ 0
x1 ≥ 0, x2 ≥ 0, x5 ≥ 0

minimize x1 − x2 + 3x3 + 2x4 maximize 2x1 + x2


x1 ,x2 ,x3 ,x4 x1 ,x2
s.t. −x1 − x2 + 2x3 + 2x4 ≤ 3 s.t. −x1 + x2 ≤ 2
x1 + x2 + 4x3 + x4 ≥ 5 x1 − 2x2 ≤ 2
−2x1 + 3x2 − x3 + x4 = −1 x1 + x2 ≤ 6
x1 ≤ 0, x3 ≥ 0, x4 ≥ 0 x1 ≥ 0, x2 ≥ 0

E Construct the dual for every linear programming problem that is contained
in these notes.

3.4.2 Primal-dual relationship

Here, referring without loss of generality to (8), the key links between the
primal and the dual problems are summarized. These results, along with the
economic interpretation, provide the motivation for the rules one has to follow
in order to construct the dual from a primal problem and help to understand
why the dual is the way it is.
The first property is referred to as “weak duality” and provides a bound
on the optimal value of the objective function of either the primal or the dual.
Simply stated, the value of the objective function for any feasible point to
the primal maximization problem is bounded from above by the value of the
objective function for any feasible point to its dual. Similarly, the value of
the objective function for its dual is bounded from below by the value of the
objective function of the primal.
Mathematics of Decision Making 25

Theorem 3 (Weak duality) If x e is feasible for the primal problem in (8)


and u
e is feasible for the dual problem in (8), then

pT x
e ≤ bT u
e. (9)

The following results are direct consequences of the weak duality property.

Corollary 1 If x e is feasible for the primal problem in (8), u e is feasible for


the dual problem in (8), and, further, pT xe = bT u
e, then x
e is an optimal point
for the primal problem in (8) and u e is an optimal point for the dual problem
in (8).

Corollary 1 follows from it since a dual feasible point provides an upper bound
on the optimal primal value and this bound is attained by the given primal
feasible point. As for Corollary 2, the claim is easily seen to hold since any fea-
sible point to the dual would provide an upper bound on the primal objective
function by the weak duality theorem; this contradicts the fact that the primal
problem is unbounded. The argument for the dual problem is analogous.

Corollary 2 If the primal (dual) problem is unbounded, then the dual (primal)
problem is infeasible.

It should be pointed out that it is not true that if the primal problem is
infeasible, then the dual problem is unbounded. In this case the dual problem
may be either unbounded or infeasible.
E In order to shed a light on the latter observation, construct and solve the
dual for the following two problems:

maximize 2x1 + x2 maximize 2x1 + x2


x1 , x 2 x1 , x 2
s.t. −x1 − x2 ≤ −4 s.t. −x1 + x2 ≤ −4
x1 + x2 ≤ 2 x1 − x2 ≤ 2
x1 ≥ 0 x1 ≥ 0
x2 ≥ 0, x2 ≥ 0.

The strong duality property, as clearly stated in Theorem 4, indicates that


one might in fact solve the dual problem in place of or in conjunction with the
primal problem.

Theorem 4 (Strong duality) If the primal (dual) problem has an optimal


point x, then the dual (primal) problem has an optimal point u, and

pT x = bT u. (10)

In view of the previous results and considerations, relations between primal


and dual problems are summed up in the following table.
26 Lorenzo Lampariello

dual
optimal solutions unbounded infeasible
primal optimal solutions 3 7 7
unbounded 7 7 3
infeasible 7 3 3

E What if both the primal and the dual problem are known to be feasible?
3.4.3 Shadow prices and sensitivity analysis

The following relevant result, which comes as a corollary of Theorem 4, lays


the theoretical foundation for the economic interpretations of duality.
Corollary 3 Let x and u be feasible for the primal and the dual problems in
(8), respectively. Then, x and u are optimal points for the primal and the dual
problems in (8), respectively, if and only if the following relations hold:
Pn
ui (bi − j=1 aij xj ) = 0, i = 1, . . . , q
Pq (11)
xj ( i=1 ui aij − pj ) = 0, j = 1, . . . , n.
In view of the claim of the previous theorem, it is worth remarking that the so-
called complementarity conditions (11) are referred to as optimality conditions.
For the sake of brevity, focus now only on the first relation in (11): the
meaning is that if, at an optimal point of a linear program, the value of the
dual variable associated with a constraint is nonzero, then that constraint
must be satisfied with equality. Further, if a constraint is satisfied with strict
inequality, then its corresponding dual variable must be zero. Hence, more
precisely,
Xn
ui > 0 ⇒ aij xj = bi ,
j=1

i.e., if the value attributed to the ith resource (constraint) is strictly positive at
the optimal solution (ui > 0), then we should require that all of this resource
be consumed; also,
Xn
aij xj < bi ⇒ ui = 0,
j=1

i.e., the ith resource is not fully used, then its value should be zero (ui =
0). Hence, in a sense, dual variables can be viewed as shadow prices for the
corresponding resources, which are the values imputed to these resources at
the margin (see also the introductory remarks in this very section). Referring
again, e.g., to the Superwood Co. case in Section 1, and taking into account the
strong duality result, dual variables represent the resources’ values that would
allow the firm to break even, in the sense that its total contribution would
exactly equal the total value of its resources. However, the firm in fact owns
its resources, and so the shadow prices are interpreted as the breakeven rates
Mathematics of Decision Making 27

for getting additional capacity: with an eye to the Superwood Co. example,
they indicate, respectively, how much an additional hour of assembly time and
an additional hour of conditioning time are worth.
The above straightforward economic interpretation of duality opens the
door to sensitivity analysis issues: since there is always some uncertainty in
the data, the question arises naturally on what happens to the optimal value of
the objective function (e.g. the optimal profit in the Superwood Co. case) when
the right-hand side value for a particular constraint (i.e., the corresponding
resource availability) varies. Further, the sensitivity of the optimal value to
changes in the data gives insight into possible technological improvements in
the process being modeled: it could be essential, rather than computing the
optimal solution of a problem, to investigate what additional resources should
be acquired to achieve more efficient results.
More specifically, varying the availability for a particular resource alters
the optimal value of the objective function in a way that allows one to impute
a per-unit value, or shadow price, to that very resource. In turn, such shadow
prices do not change even though some of the resource availabilities are varied:
hence, it is useful to know over what range and under what conditions the
components of a particular (dual) optimal solution, i.e. the shadow prices,
remain unchanged.
In order to have an insight on this matter, consider again the Superwood
Co. case primal-dual couple (7). Recall that the optimal value of both the
primal and the dual problems is 16. Focus now on the first resource, namely
(daily) assembly time hours. What if we modify the corresponding resource
availability? What happens, as a consequence, to the optimal value we can
attain for both problems? And, finally, what about the shadow prices, i.e., the
components of the dual optimal point?
E Why is it not interesting to increase the (daily) number of conditioning time
hours?
Passing from 12 (the original second resource availability) to 12 + δ1 , we get
the following modified primal-dual couple:

maximize 4x1 + 1x2 minimize (12 + δ1 )u1 + 4u2


x1 ,x2 u1 ,u2
s.t. 3x1 + 2x2 ≤ 12 + δ1 s.t. u1 ≥ 0
0, 5x1 + 1x2 ≤ 4 u2 ≥ 0 (12)
x1 ≥ 0 3u1 + 0, 5u2 ≥ 4
x2 ≥ 0 2u1 + 1u2 ≥ 1.

In view of all the previous considerations, it is convenient to concentrate on


the dual problem: it is worth remarking that the (modified) resource availabil-
ity 12 + δ1 appears there as (modified) first coefficient in the dual objective
function.
28 Lorenzo Lampariello

30
u2

20

10

u1
−4 −2 2 4 6 8
δ1 = 0 → 12u1 + 4u2 = 0
δ1 = 1 → (12 + 1)u1 + 4u2 = 0
δ1 = 12 → (12 + 12)u1 + 4u2−10
= 0
δ1 = 48 → (12 + 48)u1 + 4u2 = 0

Fig. 8: Graphical solution for the Superwood Co. case dual: zero-level objective
contour lines for different positive values of δ1 are depicted

30
u2

20

10

u1
−4 −2 2 4 6 8
δ1 = 0 → 12u1 + 4u2 = 0
δ1 = −1 → (12 − 1)u1 + 4u2 = 0
δ1 = −12 → (12 − 12)u1 + 4u−10
2 = 0
δ1 = −48 → (12 − 48)u1 + 4u2 = 0

Fig. 9: Graphical solution for the Superwood Co. case dual: zero-level objective
contour lines for different negative values of δ1 are depicted

It is not difficult to observe (see Figures 8 and 9) that if the perturbation


of the first resource availability δ1 is within a suitable range, then the dual
optimal point remains unchanged. More precisely, if −12 ≤ δ1 ≤ 12, then the
dual optimal point is stuck at ( 43 , 0). As a result, if −12 ≤ δ1 ≤ 12, the optimal
value is (12 + δ1 ) 34 + 4 ∗ 0 = 16 + 34 δ1 . Therefore, thanks to the strong duality
Theorem, the quantity 43 associated with the first resource (constraint) is the
change in the optimal value of the primal objective function (profit increase,
in this case) per unit increase in that resource availability (i.e., the right-hand
side value for the corresponding constraint), all other problem data remaining
unchanged. Thus, once again, the dual optimal variable 43 is nothing else but
Mathematics of Decision Making 29

the marginal value, or shadow price, for the corresponding resource, that is
assembly hours.
For the sake of completeness, it is worth remarking that when δ1 > 12,
the optimal point moves to (0, 8), while whenever δ1 < −12, then the dual
problem turns out to be unbounded.
E In the latter case, what is the outcome of the corresponding primal problem?
Of course, every resource availability, that is the right-hand side for every
constraint, can be analyzed this way.
E What about the analysis concerning a modification δ2 for the second resource
availability (see Figures 10 and 11)?

30
u2

20

10

u1
−4 −2 2 4 6 8

δ2 = 0 → 12u1 + 4u2 = 0
δ2 = 1 → 12u1 + (4 + 1)u2 −10
= 0
δ2 = 44 → 12u1 + (4 + 48)u2 = 0

Fig. 10: Graphical solution for the Superwood Co. case dual: zero-level objec-
tive contour lines for different positive values of δ2 are depicted

30
u2

20

10

u1
−4 −2 2 4 6 8
δ2 = 0 → 12u1 + 4u2 = 0
δ2 = −1 → 12u1 + (4 − 1)u2 = 0
δ2 = −2 → 12u1 + (4 − 2)u2−10
= 0
δ2 = −6 → 12u1 + (4 − 6)u2 = 0

Fig. 11: Graphical solution for the Superwood Co. case dual: zero-level objec-
tive contour lines for different negative values of δ2 are depicted
30 Lorenzo Lampariello

Summarizing, the shadow prices are associated with the constraints: they are
in fact the marginal worth of an additional unit of a particular resource avail-
ability (i.e. the right-hand side value for that constraint).

3.5 A quick introduction to linear integer programming

When it comes to construct proper mathematical programming models for


real-world problems, decision variables could be required to be integer: see
examples in Section 4 such as the assignment problem or the investment se-
lection problem. Also, as for the Superwood Co. case, decision variables, i.e.
the number of tables and chairs to be produced, should be required a pri-
ori, in the mathematical model, to be integer quantities. With an eye to the
mathematical models for the assignment and the investment selection prob-
lems, in general, an Integer Linear programming Problem (ILP) is a linear
programming problem in which, in addition, decision variables are required to
be integer numbers. So, one gets right away the following general form for any
integer linear programming problem:
n
X
maximize pj xj
xj , j=1,...,n
j=1
Xn
s.t. aij xj ≤ bi , i = 1, . . . , q (13)
j=1
xj ≥ 0, j = 1, . . . , n
xj ∈ Z, j = 1, . . . , n.

In general, solving an ILP is not as easy as solving a “simple” linear problem.


In fact, with respect to linear programs, ILPs have pretty different properties:
enough to observe the lack of convexity of the feasible set (see, e.g. Figure 13).
Connected to any ILP, the so-called linear relaxation for an ILP is nothing
else but the linear programming problem that is obtained by simply ignoring
the integrality constraints in the original ILP:
n
X
maximize pj xj
xj , j=1,...,n
j=1
n
X (14)
s.t. aij xj ≤ bi , i = 1, . . . , q
j=1
xj ≥ 0, j = 1, . . . , n.

It is not difficult to show that if an optimal point of the linear relaxation (14)
has integer components, then it is also optimal for the ILP (13).
Proposition 1 Let the ILP (13) and the corresponding linear relaxation (14)
be given and assume the linear relaxation (14) to have an optimal point x with
integer components. Then, x is an optimal point also for the ILP (14).
Mathematics of Decision Making 31

x2

x1
−8 −6 −4 −2 2 4 6 8

4x1 + x2 = 0
−5
4x1 + x2 = 4
4x1 + x2 = 11
4x1 + x2 = 16

Fig. 12: The Superwood Co. problem (16) with integrality constraints: the
feasible region is composed only by the points that are highlighted in black
(i.e. the ones with integer components and such that the linear constraints are
satisfied)

Focus again on the Superwood Co. case (see Figure 3): the unique optimal
point for the linear problem (1), that is (x1 = 4, x2 = 0), has integer com-
ponents. Hence, in the light of Proposition 1, (x1 = 4, x2 = 0) is an optimal
point also for the following ILP, see Figure 12:
maximize 4x1 + 1x2
x1 ,x2
s.t. 3x1 + 2x2 ≤ 12
0, 5x1 + 1x2 ≤ 4
(15)
x1 ≥ 0
x2 ≥ 0
x1 , x2 ∈ Z,
which should be the proper mathematical model for the Superwood Co. real-
world problem. Observe further that, in this case, not only the optimal point
but also each vertex of the feasible set of the linear problem (1) has integer
components. Thus, as for this specific example, solving the “simple” linear
problem (without the explicit requirement of integrality for the decision vari-
ables) (1) by e.g. the simplex method is exactly the same as solving the ILP
counterpart (with the explicit constraints for x1 and x2 to be integer) (16).
Without imposing it, we obtain the integrality requirement (for the optimal
values of the decision variables) as a consequence of the very nature of the
“simple” linear problem’s feasible set.
Clearly, in general, things are more complicated: think, e.g., about the
modified Superwood Co. example (see page 3 in these notes): in that case, if
32 Lorenzo Lampariello

6
x2

x1
−6 −4 −2 2 4 6

−2

3x1 + x2 = 0
3x1 + x2 = 4.5 −4
3x1 + x2 = 9

3x1 + x2 = 59
6
−6

Fig. 13: The more complicated picture of example (16)

one addresses the “simple” linear problem, the integrality of the optimal point
components does not come as a consequence. It has, rather, to be imposed as
an a priori condition, that is as additional constraints in the mathematical
model.
One could be led to think that, in order to compute a solution of any ILP,
suffice it, ignoring the integrality requirement, to solve the corresponding linear
relaxation and, then, possibly to round the computed non integer solution. In
general, unfortunately, this is not the case.
E Solve graphically the following ILP and the corresponding linear relaxation
(see Figure 13, (x1 = 3, x2 = 0), while, as for the linear relaxation, (x1 =
7 17
3 , x2 = 6 )):
maximize 3x1 + x2
x1 ,x2
s.t. 7x1 + 2x2 ≤ 22
−2x1 + 2x2 ≤ 1
(16)
x1 ≥ 0
x2 ≥ 0
x1 , x2 ∈ Z.
On the positive side, if the ILP at hand is such that its corresponding linear
relaxation provides one with an optimal point that has integer components,
then an optimal solution can be computed by addressing, rather than the “dif-
ficult” original ILP, its linear relaxation. More precisely, if all the vertices of
the feasible set for a solvable linear relaxation of an ILP have integer com-
ponents, computing a solution of the original ILP is the same as solving the
corresponding linear relaxation by e.g. the simplex method: in the end, an
Mathematics of Decision Making 33

optimal point with integer components is provided that is optimal also for the
original ILP thanks to Proposition 1. In particular, there exist classes of ILPs
for which this property can be shown to hold in general: for example, this is
the case for assignment problems, indeed.
On the negative side, more in general, as the example above clearly shows,
solving the linear relaxation normally ends up in a non integer optimal point;
rounding (down or up) the computed non integer solution might, in turn,
provide with a point that could be far away from the actual solution of the
ILP, or, even worse, infeasible (see also the exercise at page vi)! Thus, in
general one cannot rely on the linear relaxation in order to solve an ILP and
specific algorithms for integer programming (such as, e.g., branch & bound, or
cutting planes methods), whose description is out of the scope of this course,
must be called for.
Mathematics of Decision Making i

4 Some real-world problems

E(Diet or blending problem) Jacopino has decided to go on a diet of only foie


gras and caviar (plus some liquids and vitamin supplements) for all his meals.
Nevertheless, he wants to make sure that he eats the right quantities of the two
foods to satisfy some nutritional requirements. He has obtained the following
cost and nutritional information:

Table 8: Cost data

objective foie gras [#] caviar [#]


cost [¤/#] 4 8

Table 9: Nutritional data

constraints foie gras [#] caviar [#] requirements


carbohydrates [g/#] 5 15 (≥) 50
protein [g/#] 20 5 (≥) 40
fat [g/#] 15 2 (≤) 60

The aim is to determine the number of daily portions (may be fractional) of


foie gras and caviar that will meet these requirements at a minimal cost. (foie
gras = 1,27 #, caviar = 2,91 #, cost = 28,36 ¤)
• Construct a linear programming model for this problem.
• Use the graphical method to solve this model.
• Use Excel to solve this model.

E The Divided Colors Co. produces two colorants, C1 and C2, using three
kinds of powders, P1, P2 and P3. Profits entailed by producing and selling C1
and C2 are detailed next:

Table 10: Divided Colors Co. (daily) data

objective C1 [l] C2 [l]


profit [¤/l] 7 10

Different concentrations of powders give rise to different types of colorants


according to Table 11.
The aim is to develop the optimal production strategy so as to maximize the
total profit, subject to the restrictions imposed by the limited resources avail-
ability. (C1 = 500 l, C2 = 250 l, profit = 6000 ¤)
ii Lorenzo Lampariello

Table 11: Divided Colors Co. (daily) data

constraints C1 [l] C2 [l] resources availability [hg]


P1 [hg/l] 1 1 750
P2 [hg/l] 1 2 1000
P3 [hg/l] - 1 400

E (Capital budgeting) The Pecunia Co. plans a ¤1 million investment for the
next three years. In particular, two investment plans, which guarantee (for
every ¤ that has been spent) the income flows reported in Table 12, have
been identified. To avoid liquidity problems, the company has decided that

Table 12: Income flows

plan A plan B
year 1 0.2 0.4
year 2 0.4 0.4
year 3 0.9 0.6

the revenues cannot be reinvested, and that, at the end of the first and of
the second year, the available cash must be at least ¤300000 and ¤400000,
respectively.
Taking into account the company’s liquidity constraints, the aim is to deter-
mine how much of the investment has to be allocated to each plan so as to
obtain the maximum net present value of the revenues, given a discount rate
of 0.005 . (investment on A = 500000 ¤, investment on B = 500000 ¤, revenues
NPV = 1433398,833 ¤)
• Construct a linear programming model for this problem.
• Use Excel to solve this model.
E (Transportation problem) The Clean Water Co. ships water by truck from
three plants (located at Bellingham, Washington; Eugene, Oregon; and Albert
Lea, Minnesota) to four bottling sites (Sacramento, California; Salt Lake City,
Utah; Rapid City, South Dakota; and Albuquerque, New Mexico). Because the
shipping costs are a major expense, management is initiating a study to reduce
them as much as possible. Hence, an estimate has been made of the output
from each plant, and each bottling site has been allocated a certain amount
from the total supply of water. This information (in units of truckloads), along
with the shipping cost per truckload for each plant-bottling site combination,
is given in Table 13.
The problem now is to determine which plan for assigning these shipments to
the various plant-bottling site combinations would minimize the total shipping
cost. (total shipping cost = 152535 $)
E The Rainbow Co. produces acrylic paints mixing the products V1, V2, V3
and V4. Each product contains substances S1, S2 and S3 in the proportions
Mathematics of Decision Making iii

Table 13: Shipping data

shipping cost [$/#]


site 1 site 2 site 3 site 4 supply [#]
plant 1 464 513 654 867 75
plant 2 352 416 690 791 125
plant 3 995 682 388 685 100
demand [#] 80 65 70 85

given in Table 14, where also the minimal proportions of S1, S2, S3 that are
required for each paint can are reported.

Table 14: Rainbow Co. data

constraints V1 V2 V3 V4 requirements
S1 0.10 0.12 0.16 0.28 0.26
S2 0.05 0.15 0.25 0.30 0.20
S3 0.12 0.20 0.25 0.22 0.22

For every paint can, production costs of V1, V2, V3 and V4 are

Table 15: Rainbow Co. data

objective V1 V2 V3 V4
cost [¤] 6 4 8 9

Given the prescribed requirements, determine the share of each product to be


employed in each can so as to minimize the total production cost. (V1 = 0, V2
= 0.083, V3 = 0.056, V4 = 0.861, cost = 8.528 ¤)
E (Portfolio selection) Suppose that n stocks (securities) are being considered
for inclusion in a portfolio. The aim is to choose the fractions of a given capital
invested in each of the n stocks, such that the resulting portfolio return satisfies
specific criteria. Starting with the seminal work of Markowitz, the key problem
in asset allocation is to select a portfolio with appropriate features in terms of
gain and risk .
Now, consider the following securities: Autostrade, Banca Popolare di Mi-
lano, Bulgari, Luxottica, RCS Media Group. Given the monthly returns time
series of assets belonging to S&P (1/2004-11/2006) provided in the attached
table,
determine the shares to be invested in the 5 securities that have been considered
so as to achieve an expected value for the PTF return equal to 0.023 and to
minimize the risk (as measured by the variance of the PTF return). (x1 = 0.19,
x2 = 0.64, x3 = 0, x4 = 0.17, x5 = 0, Var(RP ) = 0.00223)
iv Lorenzo Lampariello

E Consider the following securities: Banca Fideuram, Enel, Finmeccanica,


Arnoldo Mondadori Editore, STMicroelectronics and Unicredit. Given the
monthly returns time series of assets belonging to S&P (1/2004-11/2006) pro-
vided in the attached table,
determine the shares to be invested in the 6 securities that have been considered
so as to achieve an expected value for the PTF return equal to 0.008 and to
minimize the risk (as measured by the variance of the PTF return). (x1 = 0,
x2 = 0.45, x3 = 0, x4 = 0.29, x5 = 0.03, x6 = 0.23, Var(RP ) = 0.000489)
E (Assignment problem) The Trovalavoro Co. has purchased four new ma-
chines of different types. There are four available locations in the shop where
a machine could be installed. Some of these locations are more desirable than
others for particular machines, e.g., because of their proximity to work centers.
The objective is to assign the new machines to the available locations to
minimize total costs. (x14 = 1, x23 = 1, x31 = 1, x42 = 1, cost= 29 $)
The estimated costs in dollars are given in Table 16 for the respective locations.

Table 16: Trovalavoro Co. data

costs [$]
site 1 site 2 site 3 site 4
M1 13 16 12 11
M2 15 - 13 20
M3 5 7 10 6
M4 0 0 0 0

E (Investment selection) The Pecunia Co. has identified seven investment


plans, whose corresponding cash flows schedule is reported in Table 17 (in
thousands of Euros). There, the limitations that, for budget reasons, the total
amount of invested money (in thousands of Euros) cannot exceed (in each time
period, from t1 to t7 ) are also indicated.
The objective is to determine the investment plans to be activated in order
to maximize the net present value of the revenues, given a discount rate of
0.04. (x1 , x2 , x3 , x5 , x7 = 1, x4 , x6 = 0, revenues NPV = 353491¤)
Then, consider also the case in which plan 5 cannot be activated if plan
3 and 4 are not activated as well. (x1 , x2 , x3 , x4 , x5 = 1, x6 , x7 = 0, revenues
NPV = 305706¤)
E Consider seven investment plans, whose corresponding cash flows schedule is
reported in Table 18 (in thousands of Euros). There, the limitations that, for
budget reasons, the total amount of invested money (in thousands of Euros)
cannot exceed (in each time period, from t1 to t7 ) are also indicated. Also,
maximum two plans out of plan 1, plan 2 and plan 3 can be activated.
The objective is to determine the investment plans to be activated in order
to maximize the net present value of the revenues, given a discount rate of
0.05. (x1 , x2 , x3 , x5 , x7 = 1, x4 , x6 = 0, revenues NPV = 353491¤)
Mathematics of Decision Making v

Table 17: Pecunia Co. data

cash flows [1000¤]


plan 1 plan 2 plan 3 plan 4 plan 5 plan 6 plan 7 bdg. limitations
t1 -200 -100 -200 -200 -50 -120 -160 800
t2 250 -100 -150 250 -100 -120 180 600
t3 -100 -100 100 -120 -100 200 -160 400
t4 150 120 200 100 150 150 180 500
t5 200 120 50 -50 200 -100 -150 400
t6 -250 70 200 100 -100 150 160 300
t7 50 100 -100 -50 150 -100 50 300

Table 18: Pecunia Co. data (2)

cash flows [1000¤]


plan 1 plan 2 plan 3 plan 4 plan 5 plan 6 plan 7 bdg. limitations
t1 -50 +40 -10 -75 -80 +20 -10 100
t2 +60 -50 -20 +100 +85 -30 -10 150
t3 -20 +30 +10 +50 -20 +20 +30 80
t4 +30 +100 +10 +50 -20 +20 +30 50
t5 -30 +20 +50 -10 +85 -30 -10 40
t6 +50 -10 -40 +20 +85 +20 -10 100
t7 -10 +20 +10 +30 -100 +20 +30 30

E The Health Department plans the blood transport. Blood bags must be
transported from four collection centers to three hospitals. The shipping dis-
tances and costs in Euros per Kilometer (per blood bag) for each center-
hospital combination, are given in Table 19.

Table 19: Shipping data

shipping distances [Km]


H1 H2 H3 supply [#] costs [¤/Km]
CC 1 14 19 54 34 0.2
CC 2 12 31 45 38 0.26
CC 3 16 45 60 35 0.19
CC 4 21 44 46 22 0.29
demand [#] 28 58 25

The problem now is to determine which plan for assigning these shipments
to the various center-hospital combinations would minimize the total shipping
cost. (total shipping cost = 152535 $)
E Consider the following securities: Banca Popolare di Milano, Eni, Luxottica,
Gruppo l’Espresso. Given the monthly returns time series of assets belonging
to S&P (1/2004-11/2006) provided in the attached table,
vi Lorenzo Lampariello

determine the shares to be invested in the 6 securities that have been considered
so as to achieve an expected value for the PTF return equal to 0.018 and to
minimize the risk (as measured by the variance of the PTF return). (x1 = 0,
x2 = 0.45, x3 = 0, x4 = 0.29, x5 = 0.03, x6 = 0.23, Var(RP ) = 0.000489)
E Ten different investment plans are available, whose corresponding cash flow
at time t1 is reported below. Given the problem data, suppose that each plan
can be activated only once and must be paid just at the beginning of the
investment period (no leverage allowed).
Choose the investment plans to activate in order to get as much money as
possible. (xD , xG , xH , xI = 1, revenues= 166 ¤)

INVESTMENTS

YOU PAY

YOU GET

YOUR CHOICE

E New stringent air quality standards require that a company producing steel
reduces its annual emission of particulate matter, sulfur oxides, and hydrocar-
bons by the amounts shown in Table 21. The most effective types of abatement
methods are: increasing the height of the smokestacks, using filter devices in
the smokestacks, and including cleaner materials among the fuels for the fur-
naces. Each of these methods has a technological limit on how heavily it can
be used (e.g., a maximum feasible increase in the height of the smokestacks).
Total annual cost estimates (in millions of dollars) for using the methods
at their full abatement capacities are given in the following table.

Table 20: Cost data

height incr. [%] filter use [%] clean mater. use [%]
objective BF OF BF OF BF OF
cost [$/%] 8 10 7 6 11 9
Mathematics of Decision Making vii

The next table shows how much emission (in millions of pounds per year) can
be eliminated from each type of furnace by fully using any abatement method
to its technological limit. But each method also can be used less fully to achieve
any fraction of the emission-rate reductions shown in the table. Furthermore,
the fractions can be different for blast furnaces and for open-hearth furnaces.

Table 21: Emission-rate reductions


height incr. [%] filter use [%] clean mater. use [%] required
constraints BF OF BF OF BF OF reduction
partic. [#/%] 12 9 25 20 17 13 60
sulfur ox. [#/%] 35 42 18 31 56 49 150
hydroc. [#/%] 37 53 28 24 29 20 125

The aim is to elaborate a plan specifying which types of abatement methods will
be used and at what fractions of their abatement capacities (for blast furnaces
and open-hearth furnaces) to satisfy the requirements with the smallest possible
cost.
• Construct a linear programming model for this problem.
• Use Excel to solve this model.

You might also like