A POLYNOMIAL-TIME PARAMETRIC SIMPLEX

1 downloads 0 Views 840KB Size Report
Sloan W.P, No. 1484-83. September 1983. -(a·RISlfU-XXIL71. --. _-. ______ .... create a strongly feasible basis (or prove that none exist) is at least t and at most ...
A POLYNOMIAL-TIME PARAMETRIC SIMPLEX ALGORITHM FOR THE MINIMUM COST NETWORK FLOW PROBLEM

James B. Orlin

Sloan W.P, No. 1484-83

-(a·RISlfU-XXIL71

--

_-

______

September 1983

A Polynomial-Time Parametric Simplex Algorithm for the Minimum Cost Network Flow Problem by James B. Orlin Sloan School of Management MIT

Abstract In this paper we consider the minimum cost network flow problem: min(cx : Ax = b, x matrix.

0), where

A is an m x n vertex-edge incidence

We show how to solve this problem as a parametric linear

program with

0(m b*) pivots, where

binary representation of

b.

b*

is the number of l's in the

The parametric formulation is non-linear and

is based on Edmonds-Karp scaling technique.

sai·igrs31--l

a

____

In this paper we consider the minimum cost network flow problem (1).

where

Minimize

cx

Subject to

Ax

= b

x

0,

A

(1)

matrix in which there is at most one

m x n

is a full row'rank

1 and at most one -1 in each column and the remaining entries are all 0. Moreover,

is an integral m-vector, and

b

c

is a real n-vector.

Zadeh (1978) showed that the simplex procedure as applied to (1) may take an exponentially large number of pivots.

Edmonds and Karp (1972)

developed a scaling procedure in conjunction with the out-of-kilter method that solves the minimum-cost network flow problem in a polynomial number The purpose of this note is to provide a parametric simplex

of steps.

procedure that solves the minimum-cost network flow problem in polynomial time. Recently, Ikura and Nemhauser (1983) have independently developed a similar parametric procedure for the transshipment problem. Strongly Feasible Bases

Preliminaries:

2.

As before, we assime that

A

is the full row rank constraint matrix of We assume without loss of

the minimum cost network flow problem (1). generality that no two columns of matrix where (2.1)

A

the directed graph

V = {0, ..., m If a column of component

(2.2)

0

are the same.

G = (V, E)

, and the edge set A

We associate with

has a

1

E

is constructed as follows.

in component

i

and a

, then we associate an edge (i, j) of

If a column of a

A

A

has a

1

-1

in

E.

[resp, -1] in component

i

and

in the remaining components then we associate an edge

(i, 0) [resp., (0, i)] of

E.

III

2.

As is well known, each basis is a tree.

downward edge of

A

induces a subgraph

G, we say that the edge

T of T

GB

of

G

e

are two vertices of PT(i, i')

e = (i, j) of

is an upward edge of and that

T

e

be the simple path in

whose terminal vertex is

i'.

T

e

whose initial edge is

and T

T.

e'

T

Suppose that

i

are two edges of

PT(e, e')

is a to j.

whose initial vertex is

Similarly

that

0.

if (i, j) is on the unique simple path from

Otherwise, we say that

let

of

We assume henceforth that the tree is rooted at vertex

For each tree

i'

B

and We

T. i

and

is the simple path in

and whose terminal edge is

e'.

We define

PT(i, e) and PT(e, i) analogously. e

We say that

e'

on

PT(O,

e'

in

T

e

if

is a descendent of

e.

We say that

(and that e' is the son of e)

if

e

also say that of

is an ancestor of

e').

spanning tree

e'

For each vertex

v

V

e

e').

We

is the father

is the second to last edge

and for each edge

ei

of the basic

T, we associate the colors red, green and yellow as follows.

(3.1)

If

x.i > 0, then we color edge

(3.2)

If

xi = 0

ei

is colored "red".

If

xi = 0

(3.3)

PT(,

E

and if

ei

and if

ei

ei "green".

is an upward edge of

T

is a downward edge of

then

T

then

ei

is colored "yellow". (3.4)

For each vertex red edge then

(3.5)

v v

For each vertex yellow edges then

We say that a red edge red and

j

is green.

V, if

PT(O,

v)

has at least one

is colored "red". v

solely of green and

V, PT(O, v) v

is colored "green".

e = (i, j) in

Thus the ancestors of

T

is maximum in e

in

T

T

if

i

is

are green.

As per Cunningham (1976), we say that a basic feasible flow is strongly

3.

feasible if no edge of the corresponding tree is red.

(Orlin (1983)

showed that a basic feasible flow is strongly feasible if and only if it is lexico-positive.) In general, the dual simplex pivot rule that we adopt will pivot out For each red (and hence upward) edge

red edges.

the vertices of vertex 0.

Let

e = (i, j), let

that are in the same connected component of

V

be the fundamental cutset of

F(T, e)

Te T - e

induced by

T

be as e

and defined as follows. F(T, e) = {e' = (i', j')

G - T

i'

Te and j'

We illustrate these terms in Figure 1 and in Tables 1 and 2. the only maximal red edge is by

e

is

e = (4, 2).

In Figure 1,

The fundamental cutset induced

6)}

F(T, e) = {(1,

Tree Edge

Edge

T - T }

Reduced Cost

Flow

Color

(0, 1)

Yes

3

green

(0, 2)

Yes

0

yellow

(1, 6)

No

5

0

(2, 1)

No

2

0

(2, 3)

Yes

4

green

(4, 2)

Yes

0

red

(4, 5)

Yes

2

green

(4, 6)

Yes

6

green

(5, 3)

No

Table 1.

1 2 3 4 5 6

_

0

The data for the edges of the graph of Figure 1.

Vertex

Table 2.

6

Supply/Demand

Color

-3 4 -4 8 -2 -6

green green green red red red

The data for the vertices of the graph in Figure 1.

slll

11

0

3

0

/0

Figure 1.

A basic feasible solution that is not strongly feasible. Edge (4,2) is red. The edge numbers refer to the edge flows.

4. 3.

Dual Pivoting to Reach Strong Feasibility In Section 4 we will develop a parametric procedure in which the

parameter decreases whenever strong feasibility is obtained.

Our parametric

algorithm relies on the efficient procedure developed below for moving from feasibility to strong feasibility using dual pivots. The dual simplex pivoting procedure is well-known; see for example Dantzig (1963).

Here we describe it using the terminology developed in the

previous section.

Moreover, we specialize it for our purposes.

Dual Simplex Pivoting (4.0).

Start with an optimal basic solution x = (xi) feasible.

(4.1).

Let

ck

denote the reduced cost of variable

Select a maximum red edge edge

e

that is not strongly

e

in the basis tree

exists, then quit because

T

T.

xk.

If no such

is strongly feasible.

Otherwise, continue. (4.2).

Select an edge If

e'

in

F(T, e)

whose reduced cost is minimum.

F(T, e) = 0, then quit as there is no strongly feasible

basis.

Otherwise, let the new basic tree consist of

T + e' - e.

Return to (4.1). REMARK.

A special case of the dual simplex pivot rule (4) is the rule of

pivoting out the lexicographically most infeasible edge.

See Orlin (1983)

for more details. We illustrate the dual simplex pivot rule in Figure 2. pivoted out corresponds to edge (2, 3), the only red edge. pivoted in corresponds to the edge (1, 6).

--1IIIII

DDil

-

-

-·^

The variable

The spanning tree obtained

subsequent to the pivot is given in Figure 2.

I'0--

The variable

.I_._.....

3

0

2

Figure 2.

A strongly feasible spanning tree solution obtained from Figure 1 by a dual pivot.

5.

We say that of T

j

and if

PT(i, j)

PT(i, j)

has no yellow edges.

induce a partial order e and e'

is a red-green chain in

ST

as follows.

are red and if

T

We write that

if edges

T.

We illustrate these concepts in Figures 3 and 4. Suppose that

problem (1) but that

B

B

PT(e, e')

T.

e

e'

in

is a red-green chain in

is not strongly feasible.

Let

T

be the

be the partial order on the red

ST

edges induced by the red-green chains. S

is an ancestor

is an optimal basis for the network flow

corresponding spanning tree, and let

elements in

i

The red-green chains in

ST

THEOREM 1.

if

Let

t

be the number of minimal

Then the number of dual pivots using procedure (4) to

create a strongly feasible basis (or prove that none exist) is at least t

and at most PROOF.

tm.

Let

dual pivots, where

T,

T TO

,

...

,

Tr

be the sequence of trees obtained by

is the tree corresponding to the original basis.

In

addition, we define the following notation. vk = set of green vertices in

Tk.

Ek = set of maximum red edges in

Tk.

Sk = partial order on the red edges induced by k

t

= number of minimal red edges in

k s = dilworth number of

Tk

k

S

k Sk, i.e., the minimum number of k

red-green chains to cover the red edges of pk(i, j) = PTk(i,

) = the path on

Tk

from

i

T to

j.

To complete the proof, we will prove the following relations, all of which are valid for integers

L

I

j,

k

[O..r-l].

+l,...,k.

Here the notation [j..k] refers to the set of

0

0

0

2

Q Figure 3.

010 0

A tree with its corresponding feasible flow.

I 1 Figure 4.

I-i-----L-

The partial order induced by the red-green chains of the tree of Figure 3. Elements (2,0) and (3,1) are maximum. Elements (2,0), (7,5) and (8,6) are minimal.

_ iBrl 8. sl_

__

6. l Vk+ 1

vk

(5)

Vk + l =V

If !Ekl


1 .).

k

Vk+

[..r]. = Vk

is at most

Since the number of iterations

by (5), the total number of iterations is

m

t °m = tm.

To prove (5) - (9) we consider tree is the edge that is pivoted in at the Suppose that edge

e = (i5, i4)

Tk.

Suppose that

k-th pivot, and thus

e' = (i2, i3) e'

is the edge pivoted out of tree

Tk+l - Tk. T . Now

let us consider Figure 5, which represents the circuit created upon adding edge (i2, i3 ) to

Tk.

In Figure 5, i0

"edges" in Figure 5 represent paths in

is the source vertex T .

0, and the

Since we will often refer to

the paths in Figure 5 we will sometimes drop the superscript

k.

We do not assume that the vertices in Figure 5 are distinct. example,

i = i4

then

If, for

is the trivial path consisting of a

P(il, i4)

single vertex. The colors of the edges in

Tk + l

(10.1) Edge

is yellow in

e' = (i2, i3)

(10.2) If edge e

e

b P(i5, i3 )

may be summarized as follows.

and

is colored the same in

Tk

e

T

k+1

T - e, then and in

Tk+ l

7.

(10.3) If edge

e P(i5, i3 )

e

orientations in

Tk

then

and

e

Tk+l.

has different (Switching orientation

changes red edges to yellow and changes yellow edges to red.) We are now ready to prove (5). Tk . in

i5 i pk(o, v).

Then k+1.

T

Otherwise k+1

Since *

Let

*

P

that

k+(0, v)

V k + l = Vk .

e

e

e

E

k

is green in

and

v

is green

*

Ek+l c Ek

i2 *

pk(O, e ), and

i2

is red in

Tk.

We will now prove that

k+1 - Ek + l , this will complete the proof of (6).

be a maximum red edge in

is maximum,

k

We first claim that

yk+l _-V k , contrary to assumption.

i3

k c E.

Since

pk(O, v) =

v

Thus (5) is true.

.

Suppose now that

E

Thus

Suppose that vertex

e

P .

k+1 Tk

In fact

P

*

Let

P

*

k+l

=P

(O, e ).

n P(i5, i3) = 0. Thus k T.

is a maximal red edge in

We have thus shown

and thus (6) is true.

Relation (7) is immediate since the set of maximum red edges forms an Sk . (An anti-chain is a set of unrelated elements in

anti-chain in

To see that relation (8) is valid, we first note that Sk .

since the minimal red edges are an anti-chain in ei

let

Ri

denote the maximal red-green chain of

We claim that each red edge sk < tk

show that minimal in Pk(e', e)

k P .

e' of Tk is in some chain

and complete the proof.

Then

e'

Tk

ei

ei

tk

For each red edge containing ei. Ri, and this will

Suppose that

for some red edge

sk

Sk).

e'

k in Sk.

is not Then

c Ri, and thus (8) is true.

We now consider relation (9). edges of

Tk.

Mk

Let

denote the set of minimal red

Our proof first takes into consideration the set

Mk n Mk+l

We state the result as Lemma 1. LEMMA 1. Then

__s_l

e*

E

Mk

_r

Suppose that if and only if

* T

e

e*

T

u

Tk+ T1

and that

M+l.

______

*

e

P(i4 , i3 ).

III

8.

PROOF.

Suppose that

e

is a maximum red edge in

Mk

E

Tk,

and

e*

since

Tk+l

is yellow.

P(i5 , i3 )

contradicts that

Mk

e

and that

=

e*

P

e* ~ P(i0 , i4 ). kl T

(10)

P(e*, e')

e'.

e*

Mk+l

be a red-green (i2 , i3) i P

Then P

does not contain k T.

*

it follows that

P

= P(e*, e') e'.

e* I P(i3, i5 ).

and

E 1Mk+l

This

Suppose further that

is a red-green chain in Since

Thus no edge of .

(i5 , i4)

M.

E

terminates at the red edge

a path in

P

Since

We suppose that

Therefore, the chain

and by

Suppose now that e*

Let

terminating at the red edge

(i2 , i3)

any edge of

P(i4 , i3).

P(i0 , i4 ).

and we will derive a contradiction. chain in

e*

P*

(i4 , i5 )

*

e

that

is maximum, we know that

is in (i5, i3 )

Thus contradicts that

Tk

k+l E

and thus

P*

is also

, completing the proof of

the Lemma.

O

To complete the proof of (9) we will define a into (but not necessarily onto) at most one element of

Mk

Mk .

1:1

M k+ l

mapping of

However, we will show that there is

that is not in the range of the mapping, and

this will complete the proof. Let

f

M

k+l +

k Mk

be defined as follows.

let

f(e*) = e .

For

e* E P(i 3 , i5 ) n Mk+l

P(i3, i5 ) then let

For

*

e

E

By Lemma 1, we are left with edges on the path let

that is closest to

f(e*)

e .

If

P(i3,

be the unique yellow edge

Pk+l (e*, i5)

we

e'

i5 ). in

has no yellow edges,

f(e*) = (i5 , i4 ).

We first note that

f(e*)

is red in

Tk

by relation (10).

note that the mapping is

1:1.

such that

In such a case, one can show that

f(e*) = f(et).

Pk+l(e', e*) Mk+l

k k+ l Mk n Mk+,

Otherwise there are two edges

is a red-green chain and thus at most one of

We also

e P

and

e'

(e*, e') or

e*, e'

is in

i5

i2

Figure 5.

The circuit created by adding edge (i2 , i 3 ) to Tk.

ir_*___DII__·___1_111______

-

9.

in

Tk

chain in of

Pk+l(e

We claim that

P(i5 , i3 ).

be on the path

(Otherwise, P(e,

e

*

than is

that

Pk+l(e*, i')

edge

e

e".)

Tk+ l

e"

e

But then

is a

P

f(e*) k+l

e"

since

(i',

P

must

e")

is

We now claim

e".

e

than is

e',

This completes the proof of the

Pk(i, i

such that

Mk - f(Mk+l).

P(i5, i3 )

attention to the path

Let

i

'tk+l

tk - 1", we show that

By Lemma 1, we may restrict

e'

i*

e* r Mk n P(i*, i4 ), then

We claim first that if

P(i3, i5)

be the vertex on

is a red-green chain and such that

3)

To see this, we let e .

and

P(i5 , i3 ),

is closer to

f(e*).

e"

tk+lt