Linear Programming and Network Optimization Zongpeng Li Department - - PowerPoint PPT Presentation

linear programming and network optimization
SMART_READER_LITE
LIVE PREVIEW

Linear Programming and Network Optimization Zongpeng Li Department - - PowerPoint PPT Presentation

Linear Programming and Network Optimization Zongpeng Li Department of Computer Science University of Calgary Zongpeng Li p.1/28 Outline Hello World linear program The power of LP LP models in network optimization LP duality


slide-1
SLIDE 1

Linear Programming and Network Optimization

Zongpeng Li Department of Computer Science University of Calgary

Zongpeng Li – p.1/28

slide-2
SLIDE 2

Outline

  • Hello World linear program
  • The power of LP
  • LP models in network optimization
  • LP duality
  • Solving LPs
  • Beyond LP

Zongpeng Li – p.2/28

slide-3
SLIDE 3

Hello World

maximize 2x + y s.t. : x ≤ 2 y ≤ 2 x + y ≤ 3 x, y ≥ 0

Zongpeng Li – p.3/28

slide-4
SLIDE 4

Hello World x y 2 1 1 2

Zongpeng Li – p.4/28

slide-5
SLIDE 5

The power of LP

But we all know the world is nonlinear.

— Harold Hotelling, 1948

Zongpeng Li – p.5/28

slide-6
SLIDE 6

The power of LP

But we all know the world is nonlinear.

  • 1. If you have a problem that satisfies the axioms (of LP), then

use it. If it does not, then don’t. — John von Neumann, 1948

  • 2. Much more problems can be modelled using LPs than

suggested by intuition.

  • 3. LP constitutes building blocks for nonlinear programming

Zongpeng Li – p.6/28

slide-7
SLIDE 7

LP model: max-flow

S A B C D T 5/5 8/10 0/4 5/10 3/3 5/8 0/6 8/9 5/5

  • Maximum rate we can push flows from S to T in a given

capacitied flow network.

  • flow-rate/link-capacity

Zongpeng Li – p.7/28

slide-8
SLIDE 8

LP model: max-flow

Maximize χ = f(

TS) Subject to:

  • f(

uv) ≤ C(uv) ∀

uv=

TS

  • v∈N(u) f(

uv) =

v∈N(u) f( →

vu) ∀u f(

uv) ≥ 0 ∀

uv

Zongpeng Li – p.8/28

slide-9
SLIDE 9

Totally unimodular LPs

  • Totally unimodular: every square sub-matrix of the

coefficient matrix has determinant of 1 or -1.

  • Totally unimodular LPs always have integral optimal

solutions.

  • The node-arc incidence matrix of a directed network is

totally unimodular!

Zongpeng Li – p.9/28

slide-10
SLIDE 10

LP model: min-cut

Minimize

uv C(uv)y( →

uv) Subject to:

  • y(

uv) + p(v) ≥ p(u) ∀

uv=

TS p(T) − p(S) ≥ 1 y(

uv) ≥ 0 ∀

uv

  • Max-cut cannot be modelled as a simple LP; it is NP-hard.
  • Elegant approximation algorithm of max-cut based on

semidefinite programming.

Zongpeng Li – p.10/28

slide-11
SLIDE 11

LP model: min-cost flow

Minimize

uv w( →

uv)f(

uv) Subject to:        f(

TS) = d f(

uv) ≤ C(uv) ∀

uv=

TS

  • v∈N(u) f(

uv) =

v∈N(u) f( →

vu) ∀u f(

uv) ≥ 0 ∀

uv

Zongpeng Li – p.11/28

slide-12
SLIDE 12

LP model: shortest path

Minimize

uv w( →

uv)f(

uv) Subject to:

  • f(

TS) = 1

  • v∈N(u) f(

uv) =

v∈N(u) f( →

vu) ∀u f(

uv) ≥ 0 ∀

uv

Zongpeng Li – p.12/28

slide-13
SLIDE 13

LP model: the assignment problem

  • Assign n objects to n persons, 1-to-1 mapping
  • Each object o worths v(i, o) to each person i
  • Goal: maximize “total happiness”

Maximize

  • i
  • f(i, o)v(i, o)

Subject to:

  • f(i, o) = 1

∀i

  • i f(i, o) = 1

∀o f(i, o) ≥ 0 ∀i, ∀o

  • Totally unimodular LP

, integral optimal solution

  • primal-dual algorithm design, the celebrated auction

algorithm

Zongpeng Li – p.13/28

slide-14
SLIDE 14

LP model: max-rate multicast with network coding

Given network coding, a multicast rate x is feasible in a directed network iff it is feasible as an independent unicast to every

  • receiver. [Ahlswede et al. IT 2000][Koetter and M´

edard TON 2003]

T1 T2 S T1 T2 S T b a

1

T2 a b a+b a+b a+b a b S T1 T2 S T1 T2 S T1 T2 S a a a

replication point encoding point

Zongpeng Li – p.14/28

slide-15
SLIDE 15

LP model: max-rate multicast with network coding

Maximize χ Subject to:            χ ≤ fi(

TiS) ∀i (1) fi(

uv) ≤ c(

uv) ∀i, ∀

uv=

TiS (2)

  • v∈N(u) fi(

uv) =

v∈N(u) fi( →

vu) ∀i, ∀u (3) c(

uv) + c(

vu) ≤ C(uv) ∀uv = TiS (4) c(

uv), fi(

uv), χ ≥ 0 ∀i, ∀

uv

Zongpeng Li – p.15/28

slide-16
SLIDE 16

LP model: max-rate multicast without network coding

Minimize

  • t f(t)

Subject to:

  • t:e∈t

f(t) ≤ c(e) ∀e f(t) ≥ 0 ∀t

  • Don’t be misguided by the seeming simplicity of the LP

.

  • It has exponentially many variables.
  • We know a network instance with 16 nodes only, having

∼ 50 million different trees.

  • But, what else can we do? It’s an NP-hard problem.

Zongpeng Li – p.16/28

slide-17
SLIDE 17

Primal and dual LPs

Minimize c1x1 + c2x2 + c3x3 Subject to:        a11x1 + a12x2 + a13x3 ≥ b1 ↔ y1 a21x1 + a22x2 + a23x3 ≥ b2 ↔ y2 a31x1 + a32x2 + a33x3 ≥ b3 ↔ y3 x1, x2, x3 ≥ 0 Maximize b1y1 + b2y2 + b3y3 Subject to:        a11y1 + a21y2 + a31y3 ≤ c1 ↔ x1 a12y1 + a22y2 + a32y3 ≤ c2 ↔ x2 a13y1 + a23y2 + a33y3 ≤ c3 ↔ x3 y1, y2, y3 ≥ 0

  • Poor student vs. greedy drug store owner
  • Student: satisfying vitamin intaking needs with minimal

budget

  • Store owner: maximizing revenue while maintaining

competitiveness

Zongpeng Li – p.17/28

slide-18
SLIDE 18

LP duality

  • Every feasible solution in the primal (minimization) provides

a lower-bound for the dual (maximization) and vice versa.

  • If the primal is feasible and has optimal solutions, then so

does the dual; furthermore, their optimal objective function values must be the same.

  • Every max-min theorem (that I know of) in graph theory,

combinatorial optimization and game theory can be derived as a corollary of the LP duality theorem and/or the matroid union theorem.

Zongpeng Li – p.18/28

slide-19
SLIDE 19

Complementary slackness

  • Let x∗ and y∗ be a pair of corresponding optimal primal and

dual solutions

  • y∗

1 > 0 ⇒ a11x∗ 1 + a12x∗ 2 + a13x∗ 3 = b1, and so on

  • The shadow price is nonzero only if the resource supply is

tight

  • Generalization into nonlinear programming: the

Karush-Kuhn-Tucker (KKT) conditions

Zongpeng Li – p.19/28

slide-20
SLIDE 20

An example application of LP duality and CS

Enforcing minimum-cost multicast routing, Li and Williamson, 2007.

  • Min-cost multicast, flows selfishly route themselves through

cheapest paths available

  • Formulate primal and dual LPs
  • Use shadow prices to allocate edge costs and set edge

taxes

  • Each optimal flow can be thus enforced; proof of Nash

Equilibrium based on CS conditions

Zongpeng Li – p.20/28

slide-21
SLIDE 21

Solving LPs: the simplex method

  • Walk along a sequence of vertice, on the polyhedron

boundary

  • with improved objective value at each step
  • multiple “better neighbors”, which to choose?
  • The pivot rule

Zongpeng Li – p.21/28

slide-22
SLIDE 22

Solving LPs: the interior-point method

  • Walk within the polytope
  • Each step, walk towards a new feasible solution in the

polytope

  • which had better not be too close to the boundary
  • being close to the optimum is naturally good
  • Model the above concerns using barrier functions and

potential functions

Zongpeng Li – p.22/28

slide-23
SLIDE 23

Solving LPs: the ellipsoid method

  • Solve optimization by solving feasibility, through binary

search.

  • Enclose the feasibility polytope using an ellipsoid
  • either verify feasibility using a separation oracle
  • or cut the ellipsoid into two halves and enclose the feasible

half using a smaller ellipsoid

  • Claim infeasibility when the ellipsoid becomes small

enough.

  • Why ellipsoid? Why not a sphere? What about other

geometric shapes?

Zongpeng Li – p.23/28

slide-24
SLIDE 24

Solving LPs: problem specific methods

  • Tailor the simplex algorithm: the network simplex algorithm
  • Lagrange relaxation and subgradient optimization
  • Assume a network flow LP with an extra side constraint
  • Can relax the side constraint and solve the smaller

network flow LP using highly optimized algorithms

  • Trade-off: need to solve a sequence of these
  • Can help in distributed protocol design

Zongpeng Li – p.24/28

slide-25
SLIDE 25

Solving LPs: realworld experiences

  • 1000 variables/constraints ? — that’s easy
  • 1 million variables/constraints ? — that’s OK
  • 1 billion variables/constraints ? — no way
  • For general LPs: simplex and interior-point algorithms can

compete with each other

  • For LPs with a network background: interior-point

algorithms might perform much better (personal experience)

  • Ellipsoid algorithms are of theoretical interest mostly

Zongpeng Li – p.25/28

slide-26
SLIDE 26

Solving LPs: software available

  • GNU glpk, http://www.gnu.org/software/glpk/
  • free
  • simplex, interior-point, branch-and-cut
  • CPLEX, http://www.ilog.com/products/cplex/
  • simplex, interior-point, integer programming, quadratic

programming

  • CVX, http://www.stanford.edu/ boyd/cvx/
  • free
  • Matlab library
  • solves “disciplined” convex programs

Zongpeng Li – p.26/28

slide-27
SLIDE 27

Liner integer programming: layered multicast

Maximize

  • i
  • k lk.xi

k

(9) Subject to:           

  • v∈N(u)[fi

k( →

uv) − fi

k( →

vu)] = 0 ∀k, ∀i, ∀u fi

k( →

uv) ≤ fk(

uv) ∀k, ∀i, ∀

uv

  • k fk(

uv) ≤ C(

uv) ∀

uv xi

k+1 ≤ xi k ≤ f i

k( →

TiS) lk

∀k = 1..L − 1, ∀i fk(

uv), fi

k( →

uv) ≥ 0, xi

k ∈ {0, 1}

∀k, ∀i, ∀

uv

Zongpeng Li – p.27/28

slide-28
SLIDE 28

Semidefinite/Vector programming: max cut

Quadratic formulation of max cut (x(u) = 1 if u is in the source component; otherwise x(u) = −1): Maximize

  • uv∈E

1 2(1 − x(u)x(v))

Subject to: x(u) ∈ {1, −1}, ∀u Vector programming relaxation: Maximize

  • uv∈E

1 2(1 − x(u)x(v))

Subject to: ||x(u)||n = 1, ∀u x(u) ∈ Rn, ∀u; n ∈ Z+

Zongpeng Li – p.28/28