Optimization
Optimization
P. Gourdel1
April 29, 2010
University of Paris 1
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 1
Presentation of Optimization
minimum of f on C). The function f is the objective function and the
set C is the set of feasible points (admissible points), it is often described
by a finite list of constraints.
We will note
Notations
n
On the
p product will be denoted by
Pneuclidean space R , the inner
hu, vi = i=1 ui vi , the norm is kuk = hu, ui. We denote by B(x, r)
and B(x, r) the closed ball and the open ball of center x and radius r.
If A is a subset of Rn , int A is the interior of A and cl A the closure of
A. We denote x y (respectively x > y, x y) if for all h = 1, . . . , n
xh yh (respectively for all h = 1, . . . , n xh yh and there exists at least
one indice for which the inequality is strict, respectively for all h = 1, . . . , n
xh > yh ).
If f is a linear form from Rn to R, there exists a unique vector u Rn
such that f (v) = hu, vi for all v Rn .
We denote
1.1.1
xC
Rn+ = {x Rn | x1 0, . . . , xn 0} = {x Rn | x 0}
Rn+ \ {0} = {x Rn | x > 0}
Rn++ = {x Rn | x1 > 0, . . . , xn > 0} = {x Rn | x 0}
1.1
Mathematical presentation
Definitions
Example 1.1
Example 1.2
2. Prove with a counter-exemple that (P1 ) and (P2 ) are not necessarily
equivalent if is only non decreasing.
(P) max
xR
x
1 + x2
Proposition 1.1 Let f : A R. Let us consider the optimization problem (P), maxxC f (x) whose value is , we have
Sol(P) = f 1 ({}) C and Sol(P) = {x A | f (x) } C.
Definition 1.4 If (P) and (Q) are two optimization problems, we say
that they are equivalent if their sets of solution are equal (but in general,
their values are not equal).
4. We assume that for all y in the set Y , there exists x X such that
f (x) f (y), show that val(PX ) = val(PY ).
max 1 x2
x ]2, 3[
(PY )
max 1 x2
xR
max ex (sin x + 2)
x [0, ]
(PY )
(PX )
max ex (sin x + 2)
xR
min x2
xR
Exercise 1.5 (*) Let X be a nonempty subset of Rn and f , g be continuous functions from X to R. Let us consider two optimization problems:
max f (x)
max f (x)
xX
(PX )
(PY )
xX
g(x) < 0
Exercise 1.8 (**) Let X be a nonempty subset of Rn , and f be a function from X to R. Let us consider the following optimization problem:
(PX )
Exercise 1.6 (**) Let (P) be the optimization problem maxxC f (x).
Let us define the set
max f (x)
xX
2. Prove that there exists a maximizing sequence (yk )k such that f (yk )
(f (yk+1 ).
1.1.2
Geometric interpretation
max u(x)
p1 x1 + . . . + p` x` w
(PX )
x1 0, . . . , x` 0
1.2.2
Producer Theory
y1 0, . . . , y`1 0
1.2.3
1.2.1
Finance theory
In finance, there are S possible states of the world tomorrow with the
corresponding probabilities 1 , . . . S . Today, we can buy or sell J assets
with price q1 , . . . , qJ . If we own one unit of asset j, we will receive if
state s occurs, the amount (possibly negative) ajs . The investor will try
to maximize the expected value of his stochastic income with respect to
his initial capital w. He will buy a portfolio (z1 , . . . , zJ ), solution of
1.2
(
R`+
P
s Jj=1 ajs zj
j=1 qj zj w
max
PJ
PS
s=1
1.2.4
Statistics
A second class of problem consists in maximizing the income. We assume that the planer owns an initial stock 1 , . . . , ` of inputs and that the
marginal income of process j is rj . The problem consists in determining
all activity levels xj solutions of
Pm
rx
max
Pm jj=1 j j
i=1 h xj h for all h = 1, . . . , `,
xj 0, for all j
In statistics, we determine an estimator using the maximum of the likehood, and we determine the regressions lines by minimizing the sum of
the squares of the distance to the line among all possible lines.
1.2.5
Transportation problems
P Pn
min m
i=1
j=1 ij xij
m
Pni=1 xij j for all j,
1.2.6
Pm
x
max
Pm jj=1 j j
i=1 h xj i for all i,
xj 0, for all j
5
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 2
Convexity of sets
2.1
2.1.1
Definition
x J, y J, z R,
x z y z J.
Exercise 2.2 (*) Use Definition 2.1 in order to show that the following
sets are convex:
[x, y] = [y, x]
by
Exercise 2.3 (**) Let A be a subset of Rn . We will introduce the following property
Forall x A, y A, 12 (x + y) A
(P)
6
2. Let y be the midpoint of the side opposite x0 and let z be the intersection of the three medians. What are the barycentric coordinates
(with respect to {x0 , x1 , x2 }) of respectively: x0 , x1 , x2 , y, z?
2.1.2
Note that the empty set is affine. It is easy to check that any translation of
a vector subspace is an affine set. Exercise 2.8 will show that the converse
is true when the set is nonempty.
Let us introduce as a complement the definition of a strictly convex
set (the definition given here is not the most general).
1. Prove that C is convex if and only if for all (x, y) C C, such that
x 6= y, and for all ]0, 1[, x + (1 )y C.
2.1.3
n
X
x=
i = 1}
n
X
i=1
i=1
! n
X i
+ n+1 xn+1
i
x
i
n
X
i=1
i
i=1
x =
2.2
First properties
n
X
i=1
X
i
xi =
i x i ,
n
X
i=1
i
i=1
convex combination
Pn of a family of n elements of C. In order to conclude,
if we let =
i=1 i , [0, 1], this allows us to see x as a convex
i=1
Exercise 2.10 (**) Let (Ci )iI be a family of convex subsets of some
vector space E.
Let us now assume that I is any set of indices and that the family of
convex subsets satisfies that for all (i, j) I I, there exists k I such
that Ci Cj Ck . then iI Ci is convex.
2.2.2
Proposition 2.4 Let E be a vector space. Let (Ci )iI , be a finite family
of convex subsets of E. Then
Y
X
X
Ci }
ci | (ci )
Ci := {
iI
iI
iI
is a convex subset of E.
The proof is left to the reader, it is worth to notice that for a convex
set 2C = C + C and that this is not true in general.
2.2.1
Stability by intersection
2.3
Exercise 2.9 (**) Let (Ci )iN (respectively (Di )i ) be a family of convex
subsets of some vector space E.
1) If for all integer i, Ci Ci+1 , then iN Ci is convex.
S
T
j
2) Show that
k=0
j=k D is a convex set.
Exercise 2.12 (**) Let A and B be two affine spaces with respective
directions E and F . Let f A B and a A.
9
(ii). The affine hull of A, denoted by Aff(A), is the intersection of all affine
subspaces of E containing A.
Remark 2.1 Note that it follows from the definition that co() = and
that Aff() = . Since E is convex (and affine), if A is nonempty, co(A)
(respectively Aff A) is well defined and nonempty. Since the set of convex subsets (respectively affine subsets) is stable by intersection, co(A)
(respectively Aff(A)) is the smallest (in the sense of inclusion) convex (respectively affine) subset containing A. this implies for example that if C
is a convex subset containing A, then co(A) C.
(ii). The set Aff(A) is the set of all affine combinations of elements
from A.
Proof of Proposition 2.8. (i) Let us denote by B (respectively D), the
set of all convex combinations of elements from A (respectively co(A)).
One has B D since A (co(A)). Moreover, we can apply Proposition
2.1 together with the convexity of co(A) (cf. the previous remark) in order
to get D = co(A). Consequently B co(A).
Let us now show that co(A) B. It is clear that A B. Hence, in
order to prove this inclusion, il suffices to prove that B is convex. Let x
and y, be two elements of B and t [0, 1]. By definition of B, there exists
two families (x1 . . . , xn ) and
(y1 , . . . , yp ) of elements
from A, S n1 and
P
P
S p1 such that x = ni=1 i xi and y = pj=1 j yj . One has
2.4
2.4.1
tx + (1 t)y =
n
X
i=1
10
ti xi +
p
X
j=1
(1 t)j yj .
ti +
i=1
p
X
Definition 2.9 Let E be a vector space which has a finite dimension, and
A be a nonempty subset, either finite or infinite. We call the dimension
of A the dimension of the affine subspace generated by A.
(1 t)j = t + (1 t) = 1
j=1
2.4.2
Definition 2.8 Let us call (convex) polytope, the convex hull of a finite
set.
Example 2.1 Let us define the simplex (denoted by S n1 ) as the subset
of Rn which is the polytope generated by the elements of the canonic
basis. The affine subspace generated by Aff(S n1 ), is the hyperplane
{x Rn | x1 + . . . + xn = 1}.
Show that E D.
Check that E is convex and contains A. Deduce that
co(A B) = {z = x + (1 )y | x A, y B, 0 1}.
More generally, prove that for a finite collection (Ai )pi=1 of convex
n
subsets
Pp
Sp of i R ,
i
)
=
{z
=
| i 0, xi Ai , i =
co( i=1 A
i=1 i x
Pp
1, . . . p,
i=1 i = 1}.
11
12
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 3
Existence results
Theorem 3.1 (Weierstrass) If the domain is compact, and if f is continuous then f is bounded and the extremum are reached.
x+
3.2.2
Exercise 3.1 (*) Let us assume that f : R R is coercive and continuous, show that f has a lower bound and that there exists at least a
minimum.
3.2
3.2.1
Let us focus on the previous problem when the domain is bounded (a and
b finite). The problem maxx[a,b] f (x) can be formulated as
max f (x)
max f (x)
x b 0 i.e (P1 )
g1 (x) 0
(P)
ax0
g2 (x) 0
Proposition 3.2 Let < a < b < , we let I = [a, b] and we consider
f : I R differentiable on I, we assume that the problem (P1 ) has a local
solution x, then there exist multipliers 1 0 and 2 0 such that
We say that the Slater condition is satisfied for this list of constraints if
there exists a point x such that x O, and for each i = 1, . . . , p,
x) 0
either gi is an affine function and gi (
or
max f (x) R
max f (x)
xb0
(x b)3 0
(P1 )
(P2 )
ax0
ax0
(3.1)
1 g1 (x) = 0
has no solution.
Even with a single variable, the optimality does not imply
the existence of multipliers, we need an additional condition
(qualification condition). Solving the previous system dealing
with the existence of multipliers at point x makes sense only if
this point is qualified.
We will now introduce a first version of the notion of qualification.
This is not the better one, though it allow to give an intuition on the
notion.
(P)
Definition 3.2 Let us consider the following set of feasible points, the
set O is open and gi are continuous on O.
Let us assume that the Slater condition is satisfied and that each function
is differentiable on a neighborhood of x, then, there exists (i )pi=1 Rp+
such that
0
f (x) = 1 g10 (x) + . . . + p gp0 (x)
i gi (x) = 0 for all i = 1, . . . , p
xO
g1 (x) 0
...
gp (x) 0
14
3.3
3.3.1
Let us now consider for example the case where f 0 (x) > 0, (a symmetric argument allows to treat the case where f 0 (x) < 0). We can introduce
the alternative problem
max f (x)
(P1 )
gi (x) 0, for all i K
Definition 3.3 The function f is convex (resp. concave) if for all (x, y)
U U and for all t [0, 1],
f (tx + (1 t)y) tf (x) + (1 t)f (y).
Step 1 Let us prove that K+ K0 is nonempty. First, one can notice that
there exists some > 0, such that for each x ]x, x + ], gk (x) < 0,
for each k K , and f (x) > f (x). The value of can be chosen such
that that x is a global solution of
max f (x)
(P2 ) gi (x) 0, for all i K
x [x , x + ]
Since f (x+) > f (x), there exists some k K such that gk (x+) > 0.
In view of the choice of , we already know that k
/ K .
Step 2 Let us know prove that K+ is nonenmpty. If K+ is empty, then k
K0 , and the convexity of gk implies that x is a global minimum for gk .
The Slater condition assumes that either gk is affine or gk (
x) < 0 =
gk (x). The second case is excluded and therefore gk is affine and more
precisely constant. This is not possible since gk (x + ) > 0 = gk (x).
i = 0
if i 6= k
0
f (x)
k = 0
gk (x)
15
E(f )
Cf
H(f )
k
k
X
X
i (xi , f (xi )) = (
i x i ,
i f (xi ))
i=1
i=1
i=1
3.3.2
is P
an element P
of epi(f ).
Then, by definition of the epigraph,
k
k
f ( i=1 i xi ) i=1 i f (xi ).
quasi-convex functions
Examples:
1. Let us recall a function R R, is an affine function if there exists
and such that for all x in R,
f (x) = x + .
Any affine function is both convex and concave, but not strictly. It
can be easily proved that if f is convex and concave on U , then it is
the restriction on U of an affine function.
b) Show that f 0 (z) = 0, and that f 00 (z) > 0. Deduce the contradiction.
When the function is continuous, we can propose another characterization of strict convexity (see exercise 3.11).
3.3.3
Proposition 3.6 if f is convex (resp. concave) and if x < x0 < x00 are
elements of I, then (figure 3.2),
f (x0 ) f (x)
f (x00 ) f (x)
f (x00 ) f (x0 )
x0 x
x00 x
x00 x0
f (x ) f (x)
f (x) f (y)
f (y) f (y + )
(x ) x
xy
y (y + )
.
b
Then
M m
f (x) f (y)
M m
xy
m |x y|.
This allows us to deduce that |f (x) f (y)| M
f (x1 ) f (x2 )
f (x2 ) f (x3 )
f (x3 ) f (x4 )
f (x4 ) f (x5 )
x1 x2
x2 x3
x3 x4
x4 x5
2) The right and left derivatives exist on the interior of U and moreover
if x1 < x2 are interior points, then
fr0 (x1 )
f (x2 ) f (x1 )
f`0 (x2 ).
x2 x1
3) The right and left derivatives are non decreasing on the interior of
U , and more over if x is an interior point, f`0 (x1 ) fr0 (x1 ).
1. Show that if x is an interior point of I, and if the right and the lef
derivatives exists at point x, then for all f (x), we have fr0 (x)
and fl0 (x).
3.3.4
Let us end this part by studying the possible characterizations when the
first (respectively the second) derivative exists.
x0 U
Proposition 3.7 Let f be a differentiable function defined on some convex set U R. The function f is convex if and only if for all (x, y)
U U , f (y) f (x) f 0 (x)(y x).
f (y) f (x)
= f 0 (c)
yx
max f (x)
xO
g1 (x) 0
...
gp (x) 0
3.4
1) Check that the Slater condition is satisfied, that the objective function
is strictly quasi-concave, that the constraint function is convexe.
2) Write the conditions for the existence of a multiplier at some feasible
point x and show that there exists two solutions: x = 0 associated to
the multiplier = 0 and x = 1 associated to the multiplier = 3.
3) Show that the point x = 0 is not a solution (even a local solution) of
our optimization problem.
When the problem is not convex, the only case where we can conclude is
the following:
Proposition 3.9 Let a < b , we let I = [a, b] R and we
consider f : I R differentiable at point a. If f 0 (a) > 0, a is a local
solution of minimization problem.
20
3.5
0
f (x) 0
0
(S ) f 0 (x)(g(x) ) = 0
g(x) 0
Let us consider in this part an optimization problem with a single inequality constraint involving one real parameter
max f (x)
(P )
g(x)
We assume that the functions f and g are C 1 on R and that for all ,
there exists a unique solution x . We denote by () the value of (P ),
we want to study the behavior of the function . Note that it is obvious
that when increases, the set of feasible points is bigger or equal, which
implies that the function will be non-decreasing.
0 0
= f 0 (x)/g 0 (x) 0
0
f (x) = g (x)
(f 0 (x)/g 0 (x))(g(x) ) = 0
(S )
(g(x)
)
=
0
g(x) 0
g(x) 0
0 () = 0 ()f 0 (()) =
1
f 0 (h()) =
g (h())
0
1
f 0 (x ) =
g (x )
0
22
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 4
Existence results
As in dimension 1, the main starting point of existence results is Weierstrasss Theorem and its corollaries.
(P)
Theorem 4.1 (Weierstrass) Let f be a function whose domain is compact, and if f is continuous then f is bounded and the extrema are reached.
min x + y
s.t. x 0
y0
(1 + x)(1 + y) 2
The proof uses the notion of maximizing sequence (cf. Definition 1.5)
and is based on the following lemma.
max
s.t.
(P)
Proposition 4.1 Let us assume that f : A R is coercive and continuous, and that A is closed, then f has a lower bound and there exists at
least a minimum.
s.t. x1 0
x2 0
(Q)
x1 2x2 = 5
2x1 + 5x2 20
3. conclude
lim
kxk+
f (x) = +.
23
4.2
4.2.1
Definitions
Definition 4.2 The function f is convex (resp. concave) if for all (x, y)
U U and for all t [0, 1],
2. Let U = R2++ = {x R2 | xp
1 > 0 and x2 > 0}, let us consider f
4
defined on U by f (x1 , x2 ) = x1 x2 ). Is f strictly quasi-concave on
U ? on U ?
2. Let U =
= {x R | p
x1 > 0 and x2 > 0}, let us consider f
defined on U by f (x1 , x2 ) = 4 x1 x2 ). Is f strictly concave on U ? on
U?
Note that x,y is differentiable (resp. twice differentiable) when f is differentiable (resp. twice differentiable) then, 0x,y (t) = hf (x+t(yx)), yxi
and 00x,y (t) = hHf (x + t(y x)))(y x), y xi.
Definition 4.5 The epigraph and the hypograph (denoted by epi(f ) and
hypo(f )) of a real-valued function f are the sets (see figure 4.1) defined
by
epi(f ) = {(x, t) U R | t f (x)}.
k1
k=0
k=0
It is easy to see that the linear (and consequently convex) is NOT continuous, where (P ) = P 0 (0).
Exercise 4.10 (*) Let U be a convex subset of R and f be a quasiconvex function. We want to study minxU f (x).
4.2.3
Let us end this part by studying the possible characterizations when the
first (respectively the second) derivative exists.
x 1 if x 1,
0
if x [1, 1],
f (x) =
x1
if x 1.
Proposition 4.4 Let f be a differentiable function defined on some convex set U Rn . The function f is convex if and only if for all
(x, y) U U ,
f (y) f (x) + hf (x), y xi.
4.2.2
1. Show that
epi(f ) =
x0 U
1. Apply Proposition 4.4 in order to show that if f is convex and differentiable at point x, then f (x) f (x).
3 0 0
M = 0 0 0
0 0 1
1 0 0
M = 0 1 0
0
0 3
Show that det M > 0 and T r(M ) > 0, and that M is not positive semidefinite.
Proposition 4.7 Let M be a symmetric matrix, then M is positive definite if and only if for all k = 1, . . . , n, k > 0, where
a11 . . . a1k
.. . .
.
.
k = .
. .
ak1 . . . akk
4.3
4.3.1
Unconstrained optimization
Classical case
Remark 4.2 Let us consider the unconstrained problem minxU f (x) and
x U . The point x is a local solution of this problem if and only if it is
an interior point of the set {x U | f (x) f (x)}.
Remark 4.3 The previous remark can only be used for unconstrained
optmization: for example, x = (0, 0) is a local solution of the problem
minxU f (x) (where U = R2+ NOT open and f (x) = x21 + x22 ), but the
corresponding set {x U | f (x) f (x)} is reduced to {x} and the
interiory property does not hold.
Proposition 4.10 Let
minxU f (x).
us
consider
the
unconstrained
problem
Exercise 4.18 We can reenforce the third result of the previous proposition. For all k strictly smaller than the smallest eigenvalue of the Hessian
matrix Hf (x) (in particular, k can be chosen positive), there exists some
> 0 such that for all x B(
x, r), f (x) f (
x) + k2 kx xk2 .
4.3.2
The set of feasible points C is {x U | Ax = b}, where A is a (n p)matrix and b Rp . This correspond to the case of p affine constraints
represented by the p rows of A and the vector b. If we denote by aj the
vector de Rn corresponding to the j-row of A, the set C is defined by:
x C if and only if haj , xi bj = 0 for all j = 1, . . . , p.
min f (x)
gj (x) = 0, j J
xU
min f (x)
Ax = b
xU
4.4
Since U is open et x U , there exists some > 0 such that for all
t ], [, x + tu U . Once again, we can consider
4.4.1
Karush-Kuhn-Tucker
Necessary condition
fi (x) = 0, i I
gj (x) 0, j J
xU
u : ], [ R
u (t) = f (x + tu)
Consequently, for all t ], [, u (t) := f (x+tu) u (0) = f (x), which
means that 0 is a minimum de u . This implies that 0u (0) = 0. We can
compute 0u (0) = f (
x) u = 0.
Let (u1 , . . . uk ) be a basis of the kernel
Note that when U is equal to Rn , we can entirely describe C which is
equal to {x} + Ker . This implies that 0 is a solution of
min f (x + 1 u1 + . . . + k uk )
1 R, . . . , k R
Among the inequality constraints, we will distinguish those that correspond to affine function. This can be formulated as J is equal to the
partition Ja Jna , where gj is affine when j Ja . The set U is open which
may hide strict inequalities.
Definition 4.7 We say that the Slater condition is satisfied if
all fi are affine,
min h()
1 R, . . . , k R
B(0, )
where h() = f (x + 1 u1 + . . . + k uk ).
This leads to h(0) = 0, and we can formulate this result as f (
x)
t
is orthogonal to Ker . It follows that f (x) is in the image of , the
transposed of de . We recall that the matrix of t is the matrix where
the rows are the columns of A, the vectors aj . We have the result, there
exists some vector in Rp (vector of Lagrange multipliers) such that:
f (
x) =
j gj (x)
j=1
p
X
p
X
min f (x)
fi (x) = 0, i I
gj (x) 0, j J
xU
j aj
j=1
30
i fi (x) +
iI
j gj (x) = 0
p
X
fi (x) = 0, i I
g (x) 0, j J
j
P
(x) = 0,
jJ j gjP
(4.1)
jJ
X
iI
i fi (x) +
j gj (x) = 0.
4.4.2
(4.2)
fi (x) = 0, i I
gj (x) 0, j J
i R, i I
j 0, j J
P
P
xU
is convex if the functions hj are affine, the functions gi are convex, and if
f is convex 1 .
When the problem is convex, we can state:
Proposition 4.11 Let
us consider the optimization problem:
min f (x)
g1 (x) 0
...
gp (x) 0
xU
z1 0,
z2 0,
z1 + z2 = 0,
min f (x)
x U,
h1 (x) = 0
...
hq (x) = 0
g1 (x) 0
...
gp (x) 0
jJ(x)
Exercise 4.19
i i = 0 i i = 0, for all i = 1, . . . , p
i=1
z1 = 0,
z2 = 0.
31
min f (x)
fi (x) = 0, i I
gj (x) 0, j J
xU
p
X
i gi (x).
i=1
1. Let us assume that there exists some feasible point y such that f (y) <
f (0), prove the existence of some > 0 such that for all z B(y, ),
f (z) < f (x).
min f (x)
xU
fi (x) = 0, i I
gj (x) 0, j J
Let us assume that x be a feasible point and that U is an open set. If the
function f is (respectively locally at point x) convex, the functions fi are
affine, if for all j J(x) functions gj are convex on U (respectively locally
J(x)
at point x), and if there exists () RI and R+ such that
P
P
f (x) iI i fi (x) + jJ(x) jgj (x) = 0
j gj (x) = 0 for all j J.
4.5
4.5.1
3. A = A := (((A ) ) )
that:
sup{y a | a A} < inf{y b | b B}
sup{y a | a A} inf{y b | b B}
4.5.2
definitions
2. A is a linear subspace,
3. A = A (A) ;
4.5.3
4. If A1 A2 , then A2 A1 and A
2 A1 ;
Farkas lemma
Theorem 4.7 (Farkas lemma) Let (ai )iI be a finite family of elements in Rn . Let
X
A={
i ai | RI+ }
iI
B = {y E | y ai 0, for all i I}
one has A = B and B = A.
1. A A := (A )
2. A = A := ((A ) )
For all y Rn
P
Prove (using the hint) that there exists RI+ such that b = iI i ai .
Hint: Prove that 0 is a solution of the following optimization problem
and write the Karush-Kuhn-Tucker conditions.
max y b y a1 0
...
y ap 0
p+1
K(a1 , . . . , ap+1 ) =
K({aj | j 6= i}).
i=1
2) show that if M and N are two closed convex cones of E, such that
M (N ) = {0} then M + N is closed.
4.6
Corollary 4.4 (Second version of Farkas lemma) Let (ai )iI and
(bj )jJ be finite families of elements in Rn . Let
X
X
A={
i ai +
j bj | RI+ , RJ }
iI
y a1 0
...
y b 0.
y ap 0
TC (c) = cl{t(c0 c) | t 0, c0 C}
The normal cone to the set C at point c denoted by NC (c) is:
jJ
NC (c) = {y E | y c y c0 c0 C}.
et
B = {y E | y ai 0, for all i I, y bj = 0, for all j J}
Exercise 4.28 (*) (i) Let C be a convex set containing c, and D denotes
is translation D := C + {c}. Show that TC (c) = TD (0) and NC (c) =
ND (0).
(ii) Let c A B, then TA (c) TB (c) and NB (c) NA (c).
Proposition 4.13 (i) For all c C, TC (c) and NC (c) are nonempty,
closed and convex cones.
(ii) TC (c) = (NC (c)) and NC (c) = (TC (c)) .
iI
and
B = {y E | y ai = 0, pour tout i I}
s.c. x1 0
x2 0
(P)
x1 2x2 = 5
2x1 + 5x2 20
s.c. x1 > 0
x2 > 0
(Q)
x1 2x2 = 5
20 2x1 5x2 0
35
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 5
Linear Programming
5.1
5.1.1
Note that in general, we can not use Weierstrass theorem neither a coercivity property of the objective function.
Proposition 5.1 Given a linear programming problem (P ) (maximization), one of the three following alternatives holds:
- either there is no feasible point for Problem (P ), the value is equal
to , Sol(P ) = .
- either the objective function is not bounded from above on the
nonempty set of feasible points, the value is equal to +, Sol(P ) = .
- either the objective function is not bounded from above on the
nonempty set of feasible points, the value is finite and the set of solutions
is nonempty.
ai x = bi , i = 1, . . . , m
x Rn .
The linear functional f (x) is called the objective function. The linear
equations and inequations are called constraints of the problem. The
set of points that satisfy these linear equations or inequations is called
feasible set. An element of this set is a feasible solution; it is an optimal
solution if it solves the maximization (resp. minimization) problem. Let
(P ) and (P 0 ) be two optimization problems, we recall that (P ) and (P 0 )
are equivalent if their sets of solutions are equal.
Note that in general, we can not use Weierstrass theorem neither a
coercivity property of the objective function.
5.1.2
(I)
(D)
Note that the Slater condition is satisfied if and only if there exists a
feasible point.
where
G() = infn L(x, )
Corollary 5.1 For a feasible solution x to be an optimal solution of Problem (I), it is both necessary and sufficient
that there
Pq
Pr existk 1 , . . . , q R
k
and 1 , . . . , r R+ such that g = k=1 k f + k=1 k h , with k = 0 if
hk (x) > k .
xR
5.3
5.2
(P )
L(x, ) = f (x) +
(P )
i fi (x).
Minimize c x subject to
Ax b
x0
x Rn .
iI
Maximize b p subject to
t
pA t c
p0
p Rm .
Writing down the dual of the dual leads to the given primal problem.
For this reason, the linear programming problems (P ) and (D) are referred
to as primal problem and dual problem in canonical form. Each one of both
problems is said to be the dual of the other one.
5.3.2
Application
lemma
to
nonhomogeneous
Farkas
(5.1)
m
X
i=1
i ai and 0
m
X
i i .
i=1
min x1 x2
s.c. x1 0, x2 0
(P)
p1 x1 + p2 x2 1
38
University Paris 1
M1QEM1
2008/2009
Mr. Gourdel
Chapter 6
6.1.2
Graphic solving
In order to determine the set of feasible points, we will draw the line D1
whose equation is x + 4y = 10, D2 whose equation is 5x + 2y = 20 and
finally D3 whose equation is x + 2y = 6. We can draw the figure 6.1.
The graphical analysis (figure 6.2) allows us to determine the optimal
point of this problem. The optimum is unique (classical case), the
point is M3 defined by the intersection of D2 and D3 . We determine its
coordinates by solving the following system:
5x + 2y = 20
x + 2y = 6
Economical motivation
Exemple 6.1 Let us consider a firm which is able to produce two kinds
of output (we do not face indivisibility problems). Each output needs to
spend some time on three workshops.
Output A requires to spend 1 hour on the first workshop P 1, 5 hours
on P 2 and 1 hour on P 3.
Output B requires to spend 4 hour on the first workshop P 1, 2 hours
on P 2 and 2 hours on P 3.
We can solve and find the production (3,5, 1,25), which corresponds to a
profit of 10, 75e.
At this point, we can determine the multipliers R5+ which are
solutions of
1 (x) = 0
2 (y) = 0
3 (x + 4y 10) = 0
4 (5x + 2y 20) = 0
+ 2y
6) = 0
5 (x
2
1
0
1
5
1
+ 2
+ 3
+ 4
+ 5
= 1
3
0
1
4
2
2
The actual renting contract for P 1 allows us to use it during 10 hours per
day, 20 hours for P 2 and 6 hours for P 3. The unit profit for output A is
(respectively B) is 2 e (respectively 3 e).
Let us denote by x and y the quantities of output A and output B.
The profit maximization can be modelled as
max 2x + 3y
s.t. x 0
y0
(P1 )
x + 4y 10
5x + 2y 20
x + 2y 6
Since the constraints 1, 2 and 3 are not binding, the associated multipliers
39
576
0123
./01
23*+
4
598
!#"%$&
')(
-./, 5;:
*+,-
59<
6.1.3
Scilab Solver
Ax b
where A is a matrix with three rows and 2 columns and b a column
vector
1 = 0
2 = 0
0
3 =
2
5
1
+ 5
= 4
3
2
2
1 4
A= 5 2
1 2
10
b = 20 .
6
In the software, we use the menu File, in order to select the file exemple1.sci. The software does not only give us the point (x, y) solution
but also the value of the problem and a vector of multipliers (which are
not necessarily unique).
41
6.1.4
Sensibility analysis
Let us consider now the modified problem (P2 ), when the workshop P 1 is available during 11 hours. How will move the production (solution of the problem) and the profit (value of the problem)
max 2x + 3y
s.t. x 0
y0
(P2 )
x + 4y 11
5x + 2y+ 20
x + 2y 6
This problem is very similar to the original one (P1 ) (same objective
function, almost same set of feasible points). On the figure 6.5, one can
understand that the domain has been transform by a translation of one
of the lines defining the original set of feasible points. On the picture 6.6,
79: 8
2345
7 ;8
0123
45,
"!$#&%'
)(+*
/01. 7=<
,-./
7?>
6.1.5
%$
#"
!
it is easy to remark that the change for the set of feasible points does
not imply a change on the coordinates of the optimal point which is still
M3 (3,5, 1,25). Consequently the profit is unchanged.
Let us consider the same problem as (P1 ) except that now, the third
workshop will be available during 6 hours and a half. How will move the
production (solution of the problem) and the profit (value of the problem)
This problem can be written as:
max 2x + 3y
s.t. x 0
y0
(P3 )
x + 4y 10
5x + 2y+ 20
x + 2y 6, 5
On the picture 6.7, we present the new set of feasible points.
On the picture 6.8, we can check that the new optimal point is the
point defined by
5x + 2y = 20
x + 2y = 6.5
Remark 6.1 For large values of the available time of Workshop 1, this
constraint is not binding, while it is binding for small enough values.
42
Each constraint has an implicit price, the shadow price, which is given
by the multiplier.
6.1.6
In order to propose several simulations without changing our scilab program, we can consider a new program
// A second program
labels=["Workshop 1";"2";"3"];
[ok,u,v,w]=getvalue("define parameters",labels,...
list("vec",1,"vec",1,"vec",1),["10";"20";"6"]);
P=-[2;3];
A=[1,4;5,2;1,2];
Z sup=[]; //max value for x, empty here which means that
there is not such constraints
Z inf=[0;0]; //min value for x
b=[u;v;w]
// -----------------------// Calcul de loptimum
// -----------------------[Zopt,lag,CA]=linpro(P,A,S,Z inf,Z sup)
"!$#&%'(*)
687
1234
6:9
6 9
/012 ; :
./0- <
5
34+,
+,-.
Alternative program
6>=
written
[f,xopt]=optim(cost,[1;2])
Let us start with initial point (1, 2).
6.2
6.3
Unconstrained optimization
Let us consider the problem (P5 ) min x2 + y 2 . We can use the following
scilab program :
function [f,g,ind]=cost(x,ind)
f=x(1)^
2+x(2)^
2, g=[2*x(1);2*x(2)]
endfunction;
6.3.1
Unconstrained Optimization
max 3x + 3y
Let us consider sous contraintes x [2, 10]
(P6 )
y [10, 10]
The scilab program will give us a 3-dimensional plotting and the solution.
// g is the gradient of f
// here, ind is an unused parameter but which has to be
44
// programme exemple3.sci
function [f,g,ind]=cost(x,ind)
f=x(1)^2+x(2)^2, g=[2*x(1);2*x(2)]
endfunction;
function [z]=C(x,y) , z=x^2+y^2, endfunction;
x=2:10;y=-10:10;
z=feval(x,y,C);
xbasc();
plot3d(x,y,z);
[f,xopt,gopt]=optim(cost,b,[2;-10],[10;10],[5;5])
// f nest pas nul
// The gradient at the opt point is normal
// to the boundary
200
180
160
140
120
100
80
60
40
20
0
10
10
!2
!4
!6
!8
!10
Contents
1 Presentation of Optimization
1.1 Mathematical presentation . . . . . . . . . . . . . . . . . .
1.2 Examples of economic problems . . . . . . . . . . . . . . .
2 Convexity of sets
2.1 Definition . . . . . . . . . . . . . . . . .
2.2 First properties . . . . . . . . . . . . . .
2.3 Stability with respect to affine functions
2.4 Convex hull, affine hull and conic hull . .
3 The
3.1
3.2
3.3
3.4
3.5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
4
.
.
.
.
6
6
8
9
10
.
.
.
.
.
13
13
13
15
20
21
46
.
.
.
.
.
.
23
23
24
28
30
32
34
5 Linear Programming
5.1 The main results . . . . . . . . . . . . . . . . . . . . . . .
5.2 Saddle point properties . . . . . . . . . . . . . . . . . . . .
5.3 The duality theorem of linear programming . . . . . . . .
36
36
37
37
39
39
44
44
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.