Linear Programming (Optimization)

Report
Chapter 1 Introduction
 Mathematical Programming Problem:
min/max
()
subject to
 () ≤ 0,  = 1, … , ,
(ℎ  = 0,  = 1, … , )
( ∈  ⊂  )
,  , ℎ :  → 
 If ,  , ℎ linear (affine) function  linear programming problem
If ,  , ℎ (or part of them) nonlinear function  nonlinear programming
problem
If solution set (or some of the variables) restricted to be integer points 
integer programming problem
Linear Programming 2012
1
 Linear programming: problem of optimizing (maximize or minimize) a linear
(objective) function subject to linear inequality (and equality) constraints.
 General form:
{max, min}  ′ 
subject to
′  ≥  ,  ∈ 1
′  ≤  ,  ∈ 2
′  =  ,  ∈ 3
 ≥ 0,  ∈ 1 ,
 ≤ 0,  ∈ 2
,  ,  ∈ 
(There may exist variables unrestricted in sign)
 inner product of two column vectors ,  ∈  :
 ′  = =1  
If  ′  = 0, ,  ≠ 0, then ,  are said to be orthogonal. In 3-D, the angle
between the two vectors is 90 degrees.
( vectors are column vectors unless specified otherwise)
Linear Programming 2012
2
 Big difference from systems of linear equations is the existence of objective
function and linear inequalities (instead of equalities)
 Much deeper theoretical results and applicability than systems of linear
equations.
 1 , 2 , … ,  : (decision) variables
 : right-hand-side
′  { , ,  }  : i th constraint
 { ,  } 0 : nonnegativity (nonpositivity) constraint
 ′  : objective function
 Other terminology:
feasible solution, feasible set (region), free (unrestricted) variable, optimal
(feasible) solution, optimal cost, unbounded
Linear Programming 2012
3
Important submatrix multiplications
 Interpretation of constraints: see as submatrix multiplication.
A:  ×  matrix


A

 
Ax  
a1 '
am '
n
j 1
  |
 
 A
  1
   |
| 

An

| 
A j x j   i 1 a i ' xe i , where  is i-th unit vector
m
y ' A   i 1 y i a i '  
m
n
j 1
y' A je j '
denote constraints as  { , ,  } 
Linear Programming 2012
4
 Any LP can be expressed as min  ′ ,  ≥ 
max  ′   min (− ′ ) and take negative of the optimal cost
 ′ ≤   −′  ≥ −
′  =   ′  ≥  , −′  ≥ −
nonnegativity (nonpositivity) are special cases of inequalities which will be
handled separately in the algorithms.
Feasible solution set of LP can always be expressed as  ≥  (or  ≤ )
(called polyhedron, a set which can be described as a solution set of finitely
many linear inequalities)
 We may sometimes use max  ′ ,  ≤  form (especially, when we study
polyhedron)
Linear Programming 2012
5
Standard form problems
 Standard form : min  ′ ,  = ,  ≥ 0
Ax  
n
j 1
m
A j x j   i 1 a i ' xe i
Two view points:
Find optimal weights (nonnegative) from possible nonnegative linear
combinations of columns of A to obtain b vector
Find optimal solution that satisfies linear equations and nonnegativity
 Reduction to standard form
Free (unrestricted) variable   + − − ,
+ , − ≥ 0
  
≤ 

  
+  =  ,
 ≥ 0 (slack variable)
  
≥ 

  
−  =  ,
 ≥ 0 (surplus variable)
Linear Programming 2012
6
 Any (practical) algorithm can solve the LP problem in equality form only
(except nonnegativity)
 Modified form of the simplex method can solve the problem with free
variables directly (without using difference of two variables).
It gives more sensible interpretation of the behavior of the algorithm.
Linear Programming 2012
7
1.2 Formulation examples
 See other examples in the text.
 Minimum cost network flow problem
Directed network  = (, ), (  =  )
arc capacity  , (, ) ∈ , unit flow cost  , (, ) ∈ 
 : net supply at node i ( > 0: supply node,  < 0: demand node), (We
may assume ∈  = 0)
Find minimum cost transportation plan that satisfies supply, demand at each
node and arc capacities.
minimize
(,)∈  
subject to
{:(,)∈} 
−
: , ∈
 =  ,
i = 1, …, n
(out flow - in flow = net flow at node i)
(some people use, in flow – out flow = net flow)
 ≤  ,
(, ) ∈ 
 ≥ 0,
Linear Programming 2012
(, ) ∈ 
8
 Choosing paths in a communication network ( (fractional)
multicommodity flow problem)
 Multicommodity flow problem: Several commodities share the network.
For each commodity, it is min cost network flow problem. But the
commodities must share the capacities of the arcs. Generalization of min
cost network flow problem. Many applications in communication,
distribution / transportation systems
Several commodities case
Actually one commodity. But there are multiple origin and destination pairs
of nodes (telecom, logistics, ..). Each origin-destination pair represent a
commodity.
 Given telecommunication network (directed) with arc set A, arc capacity
 bits/sec, (, ) ∈ , unit flow cost  /bit , (, ) ∈ , demand  
bits/sec for traffic from node k to node l.
Data can be sent using more than one path.
Find paths to direct demands with min cost.
Linear Programming 2012
9
Decision variables:


: amount of data with origin k and destination l that
traverses link (, ) ∈ 
Let  =  
if  = 
− 
if  = 
0
otherwise
 Formulation (flow based formulation)






minimize
(,)∈
subject to

{:(,)∈} 

−
: , ∈
 =  ,
, ,  = 1, … , 
(out flow - in flow = net flow at node i for
commodity from node k to node l)


 
≤  ,
(, ) ∈ 
(The sum of all commodities should not exceed the
capacity of link (i, j) )


≥ 0,
Linear Programming 2012
,  ∈ ,
,  = 1, … , 
10
 Alternative formulation (path based formulation)
Let K: set of origin-destination pairs (commodities)
  : demand of commodity  ∈ 
P(k): set of all possible paths for sending commodity kK
P(k;e): set of paths in P(k) that traverses arc eA
E(p): set of links contained in path p
Decision variables:
 : fraction of commodity k sent on path p
minimize
subject to
 
∈()  

∈()  = 1,
∈
∈
0
where  = 
 
∈(;)  
≤  ≤ 1,
for all  ∈ 
≤  , for all  ∈ 
for all  ∈   ,  ∈ ,
∈() 
 If  ∈ {0,1}, it is a single path routing problem (path selection problem,
integer multicommodity flow problem).
Linear Programming 2012
11
 path based formulation has smaller number of constraints, but enormous
number of variables.
can be solved easily by column generation technique (later).
Integer version is more difficult to solve.
 Extensions: Network design - also determine the number and type of facilities
to be installed on the links (and/or nodes) together with routing of traffic.
 Variations: Integer flow. Bifurcation of traffic may not be allowed. Determine
capacities and routing considering rerouting of traffic in case of network failure,
Robust network design (data uncertainty), ...
Linear Programming 2012
12
 Pattern classification (Linear classifier)
Given m objects with feature vector  ∈  ,  = 1, … , .
Objects belong to one of two classes. We know the class to which each
sample object belongs.
We want to design a criterion to determine the class of a new object using the
feature vector.
Want to find a vector (, +1 ) ∈ +1 with  ∈  such that, if  ∈ , then
′  ≥ +1 , and if  ∉ , then ′  < +1 . (if it is possible)
Linear Programming 2012
13
 Find a feasible solution (, +1 ) that satisfies
′  ≥ +1 ,
∈
′  < +1 ,
∉
for all sample objects i
Is this a linear programming problem?
( no objective function, strict inequality in constraints)
Linear Programming 2012
14
 Is strict inequality allowed in LP?
consider min x, x > 0  no minimum point. only infimum of objective
value exists
 If the system has a feasible solution (, +1 ), we can make the difference of
the values in the right hand side and in the left hand side large by using
solution (, +1 ) for M > 0 and large. Hence there exists a solution that
makes the difference at least 1 if the system has a solution.
Remedy: Use ′  ≥ +1 ,
∈
′  ≤ +1 − 1,
∉
 Important problem in data mining with applications in target marketing,
bankruptcy prediction, medical diagnosis, process monitoring, …
Linear Programming 2012
15
 Variations
What if there are many choices of hyperplanes? any reasonable criteria?
What if there is no hyperplane separating the two classes?
Do we have to use only one hyperplane?
Use of nonlinear function possible? How to solve them?
• SVM (support vector machine), convex optimization
More than two classes?
Linear Programming 2012
16
1.3 Piecewise linear convex objective functions
 Some problems involving nonlinear functions can be modeled as LP.
 Def: Function :  →  is called a convex function if for all ,  ∈  and
all [0, 1]
  + 1 −   ≤   + 1 −  ().
( the domain may be restricted)
f called concave if − is convex
(picture: the line segment joining (,   ) and (,   ) in +1 is not
below the locus of () )
Linear Programming 2012
17
 Def: ,  ∈  , 1, 2  0, 1+ 2 = 1
Then 1x + 2y is said to be a convex combination of x, y.
Generally, =1    , where =1  = 1 and  ≥ 0,  = 1, … ,  is a convex
combination of the points  1 , … ,   .
 Def: A set  ⊆  is convex if for any ,  ∈ , we have 1  + 2  ∈  for
any 1 , 2 ≥ 0, 1 + 2 = 1.
Picture:
1  + 2  = 1  + 1 − 1 ,
0 ≤ 1 ≤ 1
=  + 1 ( − ),
0 ≤ 1 ≤ 1
(line segment joining ,  lies in )
x (1 = 1)
( − )
( − )
Linear Programming 2012
y (1 = 0)
18
 If we have 1  + 2 , 1 + 2 = 1 (without 1 , 2 ≥ 0), it is called an affine
combination of x and y.
Picture:
1  + 2  = 1  + 1 − 1 ,
=  + 1 ( − ),
(1 is arbitrary)
(line passing through points , )
Linear Programming 2012
19
Picture of convex function
( x , f ( x ))  R
f ( x)
n 1
( y , f ( y ))
(  x  (1   ) y ,  f ( x )  (1   ) f ( y ))
 f ( x )  (1   ) f ( y )
f (  x  (1   ) y )
x
Linear Programming 2012
 x  (1   ) y
y
x R
20
n
 relation between convex function and convex set
 Def: :  → . Define epigraph of  as epi() = { ,  ∈ +1 :  ≥   }.
 Then previous definition of convex function is equivalent to epi() being a
convex set. When dealing with convex functions, we frequently consider
epi() to exploit the properties of convex sets.
 Consider operations on functions that preserve convexity and operations on sets
that preserve convexity.
Linear Programming 2012
21
 Example:
Consider   = =1,…, (′  +  ),  ∈  ,  ∈ 
(maximum of affine functions, called a piecewise linear convex function.)
f ( x)
1′  + 1
2′  + 2
3′  + 3
x R

Linear Programming 2012
22
n
 Thm: Let 1 , … ,  :  →  be convex functions. Then
  = =1,…,  () is also convex.
pf)
  + 1 −   = =1,…,  ( + 1 −  )
 =1,…, (  + (1 − ) ()
 =1,…,   + =1,…, (1 − ) ()
=   + 1 −  ()

Linear Programming 2012
23
 Min of piecewise linear convex functions
Minimize =1,…, (′  +  )
Subject to
 ≥ 
Minimize
Subject to
Linear Programming 2012

 ≥ ′  +  ,
 ≥ 
 = 1, … , 
24
 Q: What can we do about finding maximum of a piecewise linear convex
function?
maximum of a piecewise linear concave function (can be obtained as
minimum of affine functions)?
Minimum of a piecewise linear concave function?
Linear Programming 2012
25
 Convex function has a nice property such that a local minimum point is a
global minimum point. (when domain is  or convex set) (HW later)
Hence finding the minimum of a convex function defined over a convex set is
usually easy. But finding the maximum of a convex function is difficult to
solve. Basically, we need to examine all local maximum points.
Similarly, finding the maximum of a concave function is easy, but finding the
minimum of a concave function is difficult.
Linear Programming 2012
26
 Suppose we have () ≤ ℎ in constraints, where () is a piecewise linear
convex function   = =1,…, ′  +  .
 ′  +  ≤ ℎ,
 = 1, … , 
Q: What about constraints () ≥ ℎ? Can it be modeled as LP?
 Def: :  → , is a convex function,  ∈ 
The set  = {: () ≤ } is called the level set of .
 level set of a convex function is a convex set. (HW later)
solution set of LP is convex (easy)  non-convex solution set can’t be
modeled as LP.
Linear Programming 2012
27
Problems involving absolute values
 Minimize
subject to

=1  | |
 ≥ 
(assume  ≥ 0)
More direct formulations than piecewise linear convex function is possible.
(1)
Min =1  
subject to
 ≥ 
 ≤  ,  = 1, … , 
− ≤  ,  = 1, … , 
Linear Programming 2012
(2)
Min =1  (+ + − )
subject to
 + −  − ≥ 
+, − ≥ 0
(want + =  if  ≥ 0, − = − if
 < 0 and + − = 0, i.e., at most one
of + , − is positive in an optimal
solution.
 ≥ 0 guarantees that.)
28
Data Fitting
 Regression analysis using absolute value function
Given m data points  ,  ,  = 1, … , ,  ∈  ,  ∈ .
Want to find  ∈  that predicts results  given  with function  = ′ .
Want  that minimizes prediction error | − ′ | for all .
minimize
subject to

 − ′  ≤ ,
− + ′  ≤ ,
Linear Programming 2012
 = 1, … , 
 = 1, … , 
29
 Alternative criterion
′
minimize 
=1 | −  |
minimize
subject to
1 + … + 
 − ′  ≤  ,
− + ′  ≤  ,
 = 1, … , 
 = 1, … , 
Quadratic error function can't be modeled as LP, but need calculus method
(closed form solution)
Linear Programming 2012
30
 Special case of piecewise linear objective function : separable piecewise
linear objective function.
function :  → , is called separable if   = 1 1 + 2 2 + … +
 ( )
 ( )
1 < 2 < 3 < 4
4
Approximation of
nonlinear function.
3
slope: 
2
1
0
Linear Programming 2012
1
1
2
2
3
3
4

31
 Express variable  in the constraints as  ≡ 1 + 2 + 3 + 4 , where
0 ≤ 1 ≤ 1 , 0 ≤ 2 ≤ 2 − 1 , 0 ≤ 3 ≤ 3 − 2 , 0 ≤ 4
In the objective function, use :
min 1 1 + 2 2 + 3 3 + 4 4
Since we solve min problem, it is guaranteed that we get
 > 0 in an optimal solution implies  ,  <  have values at their
upper bounds.
Linear Programming 2012
32
1.4 Graphical representation and solution
 Let  ∈  ,  ∈ .
Geometric intuition for the solution sets of
{: ′ 
{: ′ 
{: ′ 
{: ′ 
{: ′ 
{: ′ 
= 0}
≤ 0}
≥ 0}
= }
≤ }
≥ }
Linear Programming 2012
33
 Geometry in 2-D
{: ′  ≥ 0}

0
{  ∶ ’  0 }
Linear Programming 2012
{  ∶ ’ = 0 }
34
 Let  be a (any) point satisfying ′  = . Then
: ′  =  = : ′  = ′  = {: ′  −  = 0}
Hence  −  = , where  is any solution to ′  = 0, or  =  + .
Similarly, for {: ′  ≤ }, {: ′  ≥ }.
{: ′  ≥ }


{: ′  ≤ }
0
{: ′  = }
{: ′  = 0}
Linear Programming 2012
35
 min 1 1 + 2 2
s.t. −1 + 2 ≤ 1, 1 ≥ 0, 2 ≥ 0
2
 = (1, 0)
 = (−1, −1)
 = (1, 1)
 = (0, 1)
1
{: 1 + 2 = 0}
Linear Programming 2012
{: 1 + 2 = }
36
 Representing complex solution set in 2-D
(  variables,  equations (coefficient vectors are linearly independent),
nonnegativity, and  −  = 2 )
3
1 = 0
2
2 = 0
3 = 0
1
 See text sec. 1.5, 1.6 for more backgrounds
Linear Programming 2012
37

similar documents