• Non ci sono risultati.

Linear Programming:

N/A
N/A
Protected

Academic year: 2021

Condividi "Linear Programming:"

Copied!
31
0
0

Testo completo

(1)

Claudio Arbib

Università di L’Aquila

Operations Research

Linear Programming:

geometric issues

(2)

Contents

• Hyperplanes of IR

n

• Linear Programming: a geometric intuition

– a dynamic system viewed as an LP – the geometry of the dual problem – a more prosaic problem

– direction of improvement

• Directions of a polyhedron

– the recession cone and its features

• Weyl’s Theorem

• Fundamental Theorem of Linear Programming

(3)

Hyperplanes of IR n

3x

1

+ 4x

2

= 12 (3, 4) ⋅ (x

1

, x

2

) = 12

(3, 4)

x

1

x

2

(x

1

, x

2

)

Vector (3, 4) is orthogonal to the line 3x

1

+ 4x

2

= 12

An example

(4)

Hyperplanes of IR n

a

1

x

1

+ a

2

x

2

= b

2A

= b

2

/a

1

a

2

= dp

= √(b/a2)2 + (b/a1)2 = b√a1

2 + a22 a1a2 b2 a1a2

a1a2 b√a12 + a22

d = 2A/p

b

√a12 + a22

=

(a

1

, a

2

)⋅(x

1

, x

2

) = d|(a

1

, a

2

)|

b/a

2

b/a

1

d

p

d√a

12

+ a

22

=

x

1

x

2

In general

(5)

d

p

In generale

Hyperplanes of IR n

a

1

x

1

+ a

2

x

2

= b

= √(b/a2)2 + (b/a1)2 = b√a1

2 + a22 a1a2 b2 a1a2

a1a2 b√a12 + a22

d = 2A/p

b

√a12 + a22

=

(a

1

, a

2

)⋅(x

1

, x

2

) = d|a|

b/a

2

b/a

1

d√a

12

+ a

22

=

x

1

x

2

The hyperplane is the locus of all vectors x = (x

1

, …, x

n

) of IR

n

whose projection on the direction of versor u = (u

1

, …, u

n

) equals d (distance of the hyperplane from 0)

(x

1

, x

2

)

(u

1

, u

2

)

2A

= b

2

/a

1

a

2

= dp ( , )⋅(x

a1 a2 1

, x

2

) = d

|a| |a|

(u

1

, u

2

)

(6)

Galileiana

• Where does a point-shaped mass subject to gravity end, in a constrained space?

a11x

1 + a

12x

2 >

b1

a 21 x 1+ a 22

x 2

> b 2

min P = mgx

2

a

11

x

1

+ a

12

x

2

> b

1

a

m1

x

1

+ a

m2

x

2

> b

m

x

1

x

2

potential energy

( analysis of a dynamic system )

active constraints

(7)

min P = mgx

2

a

11

x

1

+ a

12

x

2

> b

1

a

m1

x

1

+ a

m2

x

2

> b

m

min P = mgx

2

u

11

x

1

+ u

12

x

2

> d

1

u

m1

x

1

+ u

m2

x

2

> d

m

u1

Galileiana

x

1

x

2

a11x

1 + a

12x

2 >

b1

a 21 x 1+ a 22

x 2

> b 2

first active

constraint reaction

• What is the value of the reaction forces expressed by the constraints to withstand the force of gravity?

(u11, u12)

|force of gravity| = mg

u 21 x 1+ u 22

x 2

> d 2

u11x

1 + u

12x

2 >

d1

Let us normalize constraints by dividing inequalities by |a1|, …, |am|: their

expression contains versors u1, …, um

and the distances d1, …, dm of hyperplanes from the origin 0

(8)

x

2

|force of gravity| = mg

Galileiana

x

1

u11x

1 + u

12x

2 >

d1

min P = mgx

2

u

11

x

1

+ u

12

x

2

> d

1

u

m1

x

1

+ u

m2

x

2

> d

m u 21

x 1+ u 22 x 2

> d 2

second a ctive constra

int reac tion (u21, u22)

• What is the value of the reaction forces expressed by the constraints to

withstand the force of gravity?

(9)

x

2

Galileiana

x

1

min P = mgx

2

u

11

x

1

+ u

12

x

2

> d

1

u

m1

x

1

+ u

m2

x

2

> d

m

(u11, u12)

The horizontal components of the reaction counterwork:

y

1

u

11

+ y

2

u

21

+ … + u

m1

y

m

= 0

• y

i

= intensity of the reaction force of constraint i

• y

i

= 0 for i = 3, …, m

(non-active constraints)

(u21, u22)

(10)

(u21, u22)

x

2

Galileiana

x

1

min P = mgx

2

u

11

x

1

+ u

12

x

2

> d

1

u

m1

x

1

+ u

m2

x

2

> d

m

(u11, u12)

The vertical components of reaction balance gravity:

y

1

u

12

+ y

2

u

22

+ … + y

m

u

m2

= mg

• y

i

= intensity of the reaction force of constraint i

• y

i

= 0 for i = 3, …, m

(non-active constraints)

(11)

(u21, u22)

x

2

Galileiana

x

1

min P = mgx

2

u

11

x

1

+ u

12

x

2

> d

1

u

m1

x

1

+ u

m2

x

2

> d

m

(u11, u12)

y

1

u

11

+ y

2

u

21

+ … + y

m

u

m1

= 0 y

1

u

12

+ y

2

u

22

+ … + y

m

u

m2

= mg y

1

, y

2

, …, y

m

> 0

max y

1

d

1

+ y

2

d

2

+ … + y

m

d

m

• y

i

= intensity of the reaction force of constraint i

• y

i

= 0 for i = 3, …, m

(non-active constraints)

labor done by the constraints

potential energy d2

equilibrium of the forces involved

Strong duality and

energy conservation

(12)

A more prosaic problem

Because the prices per kilogram are 24 € for a milfoil cake and 28€ for a profiterol, he wonders what amount of each cake would be convenient to make in order to maximize income

200 0

5 250

Profiterol 250

1000 100

20 3000

Ambry 1500

0 20

2 100

Milfoil 300

Cocoa (g) Vanilla (g)

Eggs (n.) Sugar (g)

Flour (g)

Ingredients per kg Cake

A confectioner prepares two types of cakes using some set of ingredients.

He finds in the ambry 1.5 kg of flour, 3.0 of sugar, 1.0 of cocoa, 20 eggs and

100 g of vanilla.

(13)

A more prosaic problem

200 0

5 250

Profiterol 250

1000 100

20 3000

Ambry 1500

0 20

2 100

Milfoil 300

Cocoa (g) Vanilla (g)

Eggs (n.) Sugar (g)

Flour (g)

Ingredients per kg Cake

The flour necessary to prepare x

1

kg of milfoil and x

2

kg of profiterol, expressed in grams, is given by:

300x1

+

250x2

Such an amount must not exceed flour availability:

300x1

+

250x2

< 1500

(14)

A more prosaic problem

For a feasible production one must then ensure:

300x

1

+ 250x

2

< 1500 100x

1

+ 250x

2

< 3000 2x

1

+ 5x

2

< 20

20x

1

< 100

200x

2

< 1000 with x

1

, x

2

> 0.

The objective of income maximization is then written as:

max 24x

1

+ 28x

2

(15)

A more prosaic problem

The problem constraints can be rewritten as follows:

6x

1

+ 5x

2

< 30 2x

1

+ 5x

2

< 60 2x

1

+ 5x

2

< 20

x

1

< 5

x

2

< 5 with x

1

, x

2

> 0.

Notice that the second inequality is dominated by the third, and therefore can be suppressed.

Let us draw the polyhedron of this LP in IR

2

.

(16)

x

1

x

2

A more prosaic problem

0 < x1, x2 < 5

6x1

+ 5x

2 <

30 2x1 + 5x

2 < 20

P

(17)

x

1

x

2

Direction of improvement

P

The locus of the points of IR

2

such that the objective function

f(x) = 24x

1

+ 28x

2

attains a given value k are represented by the line (isogram) having equation

x

2

= –

6

x

1

+

7

k

28

The intersection of the isogram and P collects the solutions with the same value k

140

112 84 56 28

k = 0

(18)

x

1

x

2

Direction of improvement

P

Since P is limited and non-empty the problem certainly has an

optimal finite-valued solution

In the present case, an optimal solution lies at the intersection of the lines

2x

1

+ 5x

2

= 20 6x

1

+ 5x

2

= 30

140

112 84 56 28

k = 0

It corresponds to the point x* having coordinates 5/2, 3 and its value is f(x*) = 144.

(19)

x

1

x

2

Direction of improvement

If the polyhedron P is not limited, then the problem can have a finite optimum or not, depending on

whether the objective function value increases along every half-line contained in P, or there exists a half- line contained in P along which the objective function gets an indefinite improvement

P

direction of improvement

To better specify this concept, let us introduce the notion of direction of a

polyhedron P

(20)

Direction of a polyhedron

Let P = P(A, b) ⊆ IR

n

be a polyhedron.

Definition: A vector d ∈ IR

n

is said to be a direction of P if for any x ∈ P and any λ ∈ IR one has

x + λ d ∈ P Example 1: Let P be defined by inequalities

x

1

+ 3x

2

< 6 3x

1

+ 2x

2

< 6

x

2

> 0

P

The vector d = (–1, 1) is not a

direction of P, whereas vector

d° = (–1, ¼)

is

(21)

Direction of a polyhedron

Definition: The set of all the vectors that are directions of P is called the recession cone of P, and is denoted as rec(P).

Example 2:

3x

1

+ 2x

2

< 6 x

2

> 0 Let P be defined by inequalities

rec(P) P

(22)

3x

1

+ 2x

2

< 6 x

2

> 1

Direction of a polyhedron

Example 3: Let P be defined by inequalities

rec(P)

Note: rec(P) does not change and is not contained in P

P

(23)

Direction of a polyhedron

x

1

> 0 3x

1

+ 2x

2

< 6 x

2

> 1 Example 4: Let P be defined by inequalities

Note: rec(P) boils down to the set {0}

rec(P)

P

(24)

Features of the recession cone

Theorem 1 ∀ polyhedron P, rec(P) ≠ ∅

Proof: For any λ > 0 and x ∈ P one has x + λ 0 = x ∈ P. Hence 0 ∈ rec(P).

Theorem 2 Let P = {x ∈ IR

n

: Ax < b}. Then

rec(P) = {z ∈ IR

n

: Az < 0}

Proof: If z is such that Az < 0, then z is a direction of P:

Ax < b, Az < 0 Ax + λ Az = A(x + λ z) < b ∀ λ > 0 Vice-versa, if z is a direction of P, then Az < 0:

(abs.) let A(x + λ z) < b ∀ λ > 0, but ∃i for which (Az)

i

> 0

then choosing λ > [b

i

– (Ax)

i

]/(Az)

i

one gets out of P

(25)

Weyl’s Theorem

Notation: Let us denote as Ext(P) the set of the extreme points (vertices) of polyhedron P.

Theorem 2 (Weyl, 1936)

Any x in a polyhedron P = P(A, b) with Ext(P) ≠

can be expressed as the sum of a point u ∈ conv(Ext(P)) and a direction d ∈ rec(P):

P = conv(Ext(P)) + rec(P) Exercise:

P = {x ∈ IR

3

: – x

1

+ 2x

2

> 2, x

1

– x

2

> –2, 5x

1

+ 3x

2

> 15}

Ext(P) = {(

24/13

,

25/13

), (

9/8

,

25/8

)}

rec(P) = {x ∈ IR

3

: – x

1

+ 2x

2

> 0, x

1

– x

2

> 0, 5x

1

+ 3x

2

> 0}

• verify that (3, 3) ∈ P

• find u ∈ conv(Ext(P)), d ∈ rec(P) such that (3, 3) = u + d

(26)

2x

1

+ x

2

> 4

x

1

, x

2

> 0 Example 5: Let P be defined by inequalities x

1

+ x

2

> 3

rec(P) = {x∈IR2: x1, x2 > 0}

conv(Ext(P))

P

Ext(P) = {(0, 4), (1, 2), (3, 0)}

Weyl’s Theorem

(27)

Fundamental Theorem of LP

Consider the problem in general form

P: max cx

Ax < b

Theorem 3

Let P = {x ∈ IR

n

: Ax < b}, and x° ∈ P. Then 1) ∃d ∈ rec(P): cd > 0 P unbounded

2) ∀d ∈ rec(P), cd < 0 if Ext(P) ≠

, then P has an optimal

solution x* ∈ Ext(P).

(28)

2x

1

+ x

2

> 4

x

1

> 0, x

2

> 0 x

1

+ x

2

> 3

rec(P)

Example 6: Consider the problem P) max 3x

1

+ 2x

2

–2x

1

– x

2

< –4

–x

1

< 0, –x

2

< 0 – x

1

– x

2

< –3

P

For d = (1, 1) one has cd = 3⋅1 + 2⋅1 = 5 > 0

Hence P is unbounded

Fundamental Theorem of LP

i.e., max 3x

1

+ 2x

2

(29)

For any d ∈ rec(P) one now has cd < 0

2x

1

+ x

2

> 4

x

1

> 0, x

2

> 0 x

1

+ x

2

> 3

rec(P)

Example 7: Consider the problem P) min 4x

1

+ x

2

–2x

1

– x

2

< –4

–x

1

< 0, –x

2

< 0 – x

1

– x

2

< –3

P

Hence one of the red points is an optimal solution

Ext(P)

Teorema fondamentale della PL

i.e., max –4x

1

– x

2

(30)

Fundamental Theorem of LP

Proof:

1) ∃d ∈ rec(P): cd > 0 P unbounded

By definition of direction, x° ∈ P, d ∈ rec(P) x° + λ d ∈ P for any λ > 0.

By contradiction, let x* be optimal for P.

Then cx* > c(x° + λ d).

But since cd > 0, this is clearly not true for every λ > 0: for instance, for λ > (cx* – cx°)/cd

Hence P is unbounded.

(31)

Fundamental Theorem of LP

2) ∀d ∈ rec(P), cd < 0 P has an optimal solution x* ∈ Ext(P)

Let E = Ext(P) = {v

1

, …, v

p

} and let k be such that cv

k

> cv

i

i = 1, …, p.

By Weyl’s Theorem, every x ∈ P can be written as x = u + d, with u ∈ conv(E) and d ∈ rec(P). Clearly

cx = cu + cd < cu (in fact by assumption cd < 0) Moreover

cu = c( λ

1

v

1

+ … + λ

p

v

p

)

with λ

1

+ … + λ

p

= 1, λ

1

, …, λ

p

> 0 (in fact u ∈ conv(E)) Thus

cx < c( λ

1

v

1

+ … + λ

p

v

p

) = λ

1

cv

1

+ … + λ

p

cv

p

<

< ( λ

1

+ … + λ

p

)cv

k

= cv

k

This then implies that v

k

∈ Ext(P) is an optimal solution for P.

Riferimenti

Documenti correlati

The main result of the paper says that in the generic situation of a linear ODE with a diagonalizable matrix having a real eigenvalue of multiplicity one, or a complex conjugate pair

One of the most prominent of these is the p-curve method (Simonsohn, Nelson, and Simmons 2014a), which uses the p values of published research works to assess their

One of the most prominent of these is the p-curve method (Simonsohn, Nelson, and Simmons 2014a), which uses the p values of published research to assess their “evidential value.”

The aim of the present paper is to prove that the value function in an infinite-horizon optimal con- trol problem for piecewise deterministic Markov processes (PDMPs) can be

[r]

Impact between rigid bodies (*) (*) having a rotation, an angular vel, etc.  So far, we only considered collision between particles (no rotation, no

A first CMOS sensor featuring 752 × 480 pixels, 6 µm × 6 µm pixel size, has been mounted and successfully tested as bi-dimensional beam profile monitor at the pulsed proton

The &#34;interactive whiteboards at the University of Modena and Reggio Emilia&#34; funded by MIUR (Ministero dell’Innovazione, Università e Ricerca), began in 2008, when