Operations Research Letters 10 (1991) 303-308 North-Holland
July 1991
Lexicographic bottleneck problems R a i n e r E. B u r k a r d
and Franz Rendl
Technische Universitgit Graz, lnstitut fiir Mathematik, Kopernikusgasse 24, A-8010 Graz, Austria Received October 1989 Revised October 1990
We study combinatorial optimization problems with bottleneck objective function, where any feasible solution has the same number of elements. In addition to minimizing the largest element of a feasible solution we are interested in minimizing also the second largest element, the third largest element, and so on. For this version of the bottleneck problem two generic solution procedures are developed and analyzed. The first is based on scaling the cost elements. In the second approach an optimal solution is constructed iteratively. Both methods have polynomial running time, provided the underlying s u m optimization problem is polynomially solvable.
bottleneck problem; lexicographic solution
1. Introduction
Bottleneck problems minimize the m a x i m u m cost of a feasible solution. For practical purposes this is sometimes too crude. Often one is not only interested in the largest cost coefficient of a solution, but also in the second largest, third largest and so on. This leads to a lexicographic version of bottleneck problems which cannot be solved in a straightforward way. In the following we develop two different generic solution procedures for lexicographic bottleneck problems. The basic idea consists in modelling the problem as a sum optimization problem where the costs are appropriately redefined. The first approach is based on scaling the coefficients. As an alternative we propose an iterative approach. For problems with a large number of different cost elements the computational complexity of the iterative approach is better than that of scaling the coefficients. Moreover it allows also to determine a partially lexicographic minimal solution, i.e. a solution where, say, the first r components are lexicographically minimal. Both approaches however show that the lexicographic bottleneck problem can be solved in polynomial time, provided the associated sum optimization problem is polynomial. Let E = {e 1. . . . . era} be the ground set and
Y = { F 1, F 2. . . . } where F , _ E be the class of feasible solutions of a combinatorial optimization problem. We assume throughout that the feasible solutions F ~ ~ have the same size n, i.e. I F I = /'/.
Combinatorial optimization problems of this type include among m a n y others the assignment problem, the travelling salesman problem and problems having the bases of a matroid as feasible solutions. Each element e ~ E has a given weight w(e) ~ N. (Adding a constant to all weights does not change the relative order of feasible solutions, because each feasible solution has the same size n. Thus we can assume without loss of generality that the weights are nonnegative.) Classically one can define the weight w(F) of a feasible solution F in two ways: we can set w(F) equal to the sum of costs of elements in F,
w(F):= E w(e), eGF
or we can set w(F) equal to the maximum of costs of elements in F,
w(F)'.=max{w(e): e ~ F } . The optimization problem now has the form (OP) Find F ~ o ~ G~-.
0167-6377/91/$03.50 © 1991 - Elsevier Science Publishers B.V. (North-Holland)
such that w(F) < w(G) for all
303
Volume 10, N u m b e r 5
O P E R A T I O N S R E S E A R C H LETTERS
In the first case we get a sum optimization problem (SOP), in the second a bottleneck optimization problem (BOP). In this note we study special bottleneck problems where in addition to minimizing the largest element of a feasible solution, we try to minimize the second largest element, if the largest element is as small as possible and the third-largest element, if the two largest are as small as possible, and so on.
For F ~ " we define w j ( F ) as cost of the j-largest element of F, i.e. w ( F ) : = ( % ( F ) . . . . . wn ( F ) ) contains the costs of the elements of F in decreasing order. We say a vector a ~ R" is lexicographically smaller than b ~ R", a < b, if there exists an index i ~ { 1 . . . . . n) such that a / = bj for j < i
and a i < b i.
The lexicographic bottleneck optimization problem (LBOP) is now defined as follows:
(LBOP) Find F ~ such that w ( F ) -< w ( G ) for all G ~ with w ( G ) --/=w ( F ) .
For optimization problems over the set of bases of a matroid it is well known that the Greedy algorithm solves (SOP), (BOP) and (LBOP) at the same time, see e.g. [2]. It is the purpose of this Note to investigate solution procedures for (LBOP) in the general case. Specifically we show that (LBOP) can be modeled by one or several (SOP) with specially defined new costs for the elements of the ground set. We propose two different approaches.
2. Approach 1: scaling the cost coefficients In a direct attempt to solve (LBOP) as a special case of (SOP) we make use of cost scaling. Note first that the solution of (LBOP) is completely determined by the order of the costs (independent of the actual size of costs). Let k denote the number of different cost coefficients of an (LBOP). Then we partition E into k (disjoint) sets Ej where e ~ Ej if w ( e ) is the j-smallest cost coefficient. Let w ( E j ) denote the j-smallest cost coeffi304
July 1991
cient. Instead of working with the original costs w we define new costs u by u(e)=j-1
if e ~ E a .
(1)
Thus the new costs u are contained in {0 . . . . . k - 1}. It is clear that the relative order of solutions of (LBOP) with costs w and u is identical, thus we can replace w by u. In the following we solve an (LBOP) with costs u by an (SOP) with costs t u, where t will be chosen appropriately. Suppose 0 < a < b < k - 1 are two given cost elements. Then, for the (SOP), t b is a lower bound for the cost of any feasible solution F containing an element from Eb+ x. Similarly, nt a is an upper bound on the cost of any feasible solution G having the largest element in E,+ 1. Since w ( F ) < w(G), t has to satisfy nt~ < t h for all O < a < b < k - 1 ,
(2)
so that for the (SOP) with costs t u solution F is preferred to solution G. The smallest possible integer choice for t to satisfy (2) clearly is t .'= n + 1.
Theorem 1. Let an (LBOP) with weights w( e ) ~ N be given where k is the number of different cost coefficients and n is the size of the feasible solutions. Moreover, let u denote the costs defined by (1). Then F is optimal for (LBOP) if and only if F is optimal for (SOP) with costs (n + 1) uul(F
) > ... > u , ( F ) > O ,
and similarly k-l
>_ul(G ) > ... > u . ( G ) > O .
Suppose u ( F ) < u(G). Thus there exists an i {1 . . . . . n} such that u j ( F ) = u j ( G ) for j < i and u i ( F ) < ui(G ). For (SOP) the cost s ( F ) of F is given by ?7
s ( F ) = Y'~ t u ' ( F ) , j=l
t =
n + 1.
Volume 10, Number 5
O P E R A T I O N S R E S E A R C H LETTERS
Thus we get i--1
s ( G ) >_ Y': j
+ t
1
(since t > 1) i
1
rithm of the largest number involved is bounded by O(k log n). Note that k < n 2, therefore we get an overall bound of the running time of O(n s log n ) time. As an illustration consider the lexicographic bottleneck assignment problem with cost matrix,
> Y" t"gF)+ (n + 1 -- i)t +IF) j--1
C=
(by (2) and using
u j ( G ) = u I ( F ) for j < i) n
July 1991
9
9
12
9
12 9 3
6 7 3
7 6 1
6 8 1
After the cost transformation we get the new cost matrix,
> E t"'(F>=S(F) j- 1
U=
(since u,( r ) >_u/+,( F ) ) . Thus if G is nonoptimal for (LBOP), G is nonoptimal for (SOP). On the other hand we can have two different feasible solutions F and G with u ( F ) = u ( G ) . This implies s ( F ) = s ( G ) which completes the proof. [] Using Theorem 1 we can solve (LBOP) by solving an (SOP) with integer costs t u(e). The largest cost coefficient t "u'> of (SOP) satisfies
2 3 1
3 2 0
2 4 0
"
Since there are 7 different cost coefficients, we have to solve a linear assignment problem where the largest cost coefficient is of size 5 ~= 15625. The transformed cost matrix is given by 3125 15625 3125 5
3125 25 125 5
15625 125 25 1
3125 25 625 1
This allows us to bound the running time to solve (LBOP) as follows. Throughout let T(m, n) denote the worst-case running time to solve (SOP) where each elementary operation (e.g. addition) is assumed to take constant time. Remember that m is the cardinality of the ground set E while n is the number of elements in a feasible solution.
The identity is easily seen to be the (unique) optimal solution to the linear (sum) assignment problem and therefore yields the (unique) optimal solution to the !exicographic bottleneck assignment problem. Since the numbers constructed in Approach 1 'explode' for large k, we describe now another solution approach, where an optimal solution of (LBOP) is constructed iteratively. In this case the numbers involved grow much slower.
Corollary 1. (LBOP) can be solved in T(m, n)O(k log n) time.
3. Approach 2: an iterative algorithm
log(t u''>) = O ( k log t) = O(k log n).
Proof. Since the numbers involved in the cost transformation described in Theorem 1 grow exponentially, an elementary operation has to be considered proportional to the logarithm of the largest incurred cost element, yielding the given multiplicative factor. [] Example. Consider the linear assignment problem of size n. The worst case running time to find an optimal solution is O(n3). Therefore the complexity to solve the lexicographic bottleneck assignment problem following the approach outlined above amounts to O(n3k log n) since the loga-
In the following we describe an alternative way for solving lexicographic bottleneck problems, where an optimal solution is constructed iteratively. Let F be an arbitrary optimal solution to (LBOP). Let c 1 > . . . > cp be the different cost coefficients in w ( F ) . Each of these cost coefficients C/ appears a certain number of times, say r / times in w ( F ) , where 52+'/=lrJ = n and ri ~ N. Now we show how to find the ci's and the corresponding r / s iteratively, thus solving (LBOP).
Initial step ( i = 1). First we find the set E t containing c 1. To do this we solve an ordinary 305
V o l u m e 10, N u m b e r 5
OPERATIONS RESEARCH LETTERS
(BOP) with costs u. Clearly the largest entry in the optimal solution to (BOP) is equal to c~. Suppose c 1 ~ Ej for some j. To find r I we define an (SOP) with costs d, where
! e ej,
d(e) =
The value of its optimal solution is by the definition of d equal to q. So we get c~ and r~ by solving a (BOP) with integral costs and largest cost coefficient of size k and by solving an (SOP) with cost coefficients either 0 or 1. Iterative step (i ~ i + 1). Suppose we know Q, r 1. . . . . ci, r i. We have to find c~+ 1 and r/+ 1. Let us define tg by c j = w ( E t ) for j = l . . . . . i; thus t I > t 2 > "'" > t i. Clearly ci+ 1 = w ( E j ) < c i = w ( E , i ) for some j < t i. Thus we need to 'test' the sets E j for j < t i in order to find out which of these sets contains Ci+l. For this purpose we define an (SOP) with appropriately chosen costs d. We define d to guarantee that any feasible solution not having the right number r t of cost elements c t (1 < l < i) will not be optimal for (SOP). For j < t~ fixed we define the new costs d as follows:
d(e)=l
!
e~Ej, e~Eh,
~rldl+
n-
rt .
/=1
otherwise.
e~E,,
Similarly, a feasible solution having r 1 elements of cost c~, but more than r2 elements of cost c 2 has cost at least rid 1 + (r 2 + 1)d 2. Thus the following relation must hold: rldl+(r2+l)dz>
e~E i fori
dr,
July 1991
l = 1 . . . . . i,
In general, the cost coefficients d t have to satisfy the following inequalities to preserve optimality of the partial solution found so far. Note that these inequalities rule out as nonoptimal all solutions not having the 'right' number of elements of costs C1, • . . , Ci:
Ertdt+(rj+l)dj>
rid,+
1=1
n-
rt
1=1
1=1
j = 1 . . . . . i.
(3)
The inequalities (3) are equivalent to i
dj>
Y'.
rtdt+(n-R),
j=i
1,
.....
l=j+l
with R := F~=lr I. An integral solution of i
dj>
Y'~ r t d , + ( n - R + l ) ,
j=i
. . . . . 1,
I=j+ 1
is given by di:=n-R+l.
The remaining coefficients can be found recursively by backsubstitution:
h
otherwise.
i
F r o m the previous iteration we know that there exists a feasible solution F having r~ elements of size ct, 1 < l < i, and all the remaining elements have costs smaller than c~. Thus
d i=
E
r, d t + ( n - R + l )
l=j+ 1
= (rj+, + 1)dj+, = (rj+, + 1) . . . ( r / + 1)
rldl + /=1
n-
Y'~ r I
×(n-R+
1),
is an upper bound on the cost of F for (SOP) under the new cost function d. Suppose G is a feasible solution containing more than r 1 elements of size c 1. Then (r 1 + 1)d I is a lower bound on the cost of G. In order to rule out G as optimal solution for (SOP), the following inequality has to hold: Y'~rtdt+ l=1
306
. . . . . 1.
Any feasible solution satisfying the constraints (3) is called a candidate solution. Summarizing, the inequalities (3) guarantee that an optimal solution of (SOP), if it exists, uses precisely r t elements from Et, for l = 1 . . . . . i. Three cases can occur if we test Ej. Case 1 (no candidate solution exists). The cost of the optimal solution of (SOP) is greater than i
(rl+l)dl>
j=i-1
l=l
n-
rt .
Y', r i d / + ( n -- R ) , l=1
V o l u m e 10, N u m b e r 5
OPERATIONS
RESEARCH
or no feasible solution exists. I n this case c~+ 1 >
w(E,).
LETTERS
Final step. In the last step we test w h e t h e r c 3 ~ E2, i.e. c 3 2. N o t e that d I = 6 a n d d 2 = 2, so the cost m a t r i x is given b y =
Case 2 (cj does n o t a p p e a r in a n y o p t i m a l solution to (LBOP). T h e o p t i m a l s o l u t i o n has value
2~=lrldt. In this case ci+ 1 < w(Ej). Case 3 (an o p t i m a l s o l u t i o n to ( L B O P ) uses cj). T h e o p t i m a l solution F has cost s ( F ) with i
i
y'rjt+(n-R)>s(F)>
~_,rtd `.
l=1
l=1
In this case c,+1 = w ( E j ) a n d ri+ 1 = s ( F ) Y71=lrldl. M o r e o v e r F is a solution of ( L B O P ) where the first r 1 + - - . + r i cost e l e m e n t s are as small as possible. A b i n a r y search yields b o t h c,+ 1 a n d ri+ 1 in O ( l o g ( k - t ~ ) ) calls to a s u b r o u t i n e solving an (SOP) with integer costs in the range (0 . . . . . d 1 }.
E x a m p l e (continued). W e use the a s s i g n m e n t matrix U from a b o v e to illustrate the iterative app r o a c h j u s t described.
667 )
Initial step. U-----
7 6 2
4 3 1
4 4 2
"
T h e elements in an o p t i m a l s o l u t i o n to (BOP) are p r i n t e d boldface. T h u s c 1 = 6. T o find an assignm e n t with a m i n i m u m n u m b e r of e l e m e n t s o f size 6 we have to solve (SOP) with cost m a t r i x
01
J u l y 1991
1 0
0 0 0
0 0 0
"
W e see that r 1 = 1 a n d the initial step is finished. Second step. T o find c 2 a n d r 2 we ( a r b i t r a r i l y ) test w h e t h e r c 2 ~ E3, i.e. c 2 = 3. N o t e that in this case d l = 4 - 1 + 1. T h u s we have to solve (SOP) with cost m a t r i x D 2 where
9 3
6 oo 6 1
6 2 o¢ 1
oo oo 2 0
6 2 oo 0
Since the cost of the o p t i m a l a s s i g n m e n t is 10 = r2d2, w e are in C a s e 2, thus c 3 < 2, which i m p l i e s c 3 = 1. T h u s the (unique) o p t i m a l assignm e n t with cost m a t r i x U is the i d e n t i t y id with w(id) = (6, 3, 3, 1).
qd I +
T h e o r e m 2. The iteratioe approach described above finds an optimal solution to ( L B O P ) and has worstcase running time T(m, n ) O ( m a x ( l o g n, log k } m i n { n 2, k2}).
Proof. T h e discussion a b o v e shows the correctness of the a p p r o a c h . T o b o u n d the r u n n i n g time we c o n s i d e r the cases k < n a n d k > n. I n the first case the n u m b e r of different cost coefficients is n o t larger t h a n the size of a feasible solution. T h e r e f o r e we use the following m o d i f i c a tion of the steps d e s c r i b e d above. T o test the sets Ej we start with E k a n d e x a m i n e the sets in d e c r e a s i n g order, r a t h e r t h a n a p p l y i n g b i n a r y search. N o t e that in this situation we e x a m i n e each of the sets at m o s t once. T h u s there are at m o s t k calls to solve a n (SOP). In the s e c o n d case ( k > n ) we use b i n a r y search as described. T h e r e are at m o s t n iterations, b e c a u s e in each i t e r a t i o n at least one new cost e l e m e n t of an o p t i m a l solution is d e t e r m i n e d . In each i t e r a t i o n there are at m o s t log k calls to solve (SOP), giving a total of n l o g k calls. T o b o u n d the c o m p u t a t i o n time for a specific call to solve (SOP), s u p p o s e there are p iterations, a n d c o n s i d e r s o m e i t e r a t i o n i. T h e n the largest cost coefficient is d~ ~). N o t e that
d~i'=(r2+l)(r3+l)...(r,+l) 0 2
4
4
~
4~
4 0
1 ~ 0
~ 1 0
! ~ 0
/
"
T h e o p t i m a l a s s i g n m e n t has weight 6, so we are in case 3 a n d c 2 = 3, r 2 = 6 - 4 = 2. A n o p t i m a l ass i g n m e n t of ( L B O P ) therefore c o n t a i n s o n e elem e n t of cost 6 a n d 2 e l e m e n t s of cost 3.
n-
r,+-I
.
Thus p
log d(i) < log n + Y'. l o g ( r s + 1). s=2
F u r t h e r n o t e that - T . s l o g ( rs + 1) is Schur convex, see [1], thus its g l o b a l m i n i m u m over r~ > 1, g~sr~ = 307
Volume 10, Number 5
OPERATIONS RESEARCH LETTERS
n/p,
n is attained for rs = conclude that
log d~')< log n + p log(1 + < 2 p log(1 +
see [1]. Therefore we
n/p)
n/p).
In the first case the running time can be bounded by
T(m, n)O(kp
log(l +
n/p))
= T(m, n ) O ( k 2 log(1 + n / k ) ) ,
July 1991
favourable to use Approach 1. Approach 2 is better for k >> n and has the following advantage. If the procedure is stopped after some iteration i, i > 1, then the solution obtained has the following property: the first r 1 + - - - + r i largest cost elements are already as small as possible. Nonoptimality can only be violated by the remaining cost elements. In particular, the first i elements certainly are as small as possible. This allows for more flexibility, as compared to Approach 1.
since p < k. In the second case the time bound is
T(m, n)O(n l o g ( k ) p = T(m, n)O(n 2 log
log(1 +
n/p))
k),
since p < n. This proves the claimed complexity. [] Remarks. (1) As an application of Theorem 2 note that the lexicographic bottleneck assignment problem can again be solved in O(n 5 log n) time, as in Approach 1. (2) Theorems 1 and 2 show that (LBOP) where the feasible solutions have constant cardinality can be solved in polynomial time, provided the associated (SOP) is polynomial. (3) Comparing Approaches 1 and 2 we see that for small values of k as compared to n it is
308
Acknowledgement We thank an anonymous referee for the constructive comments that helped to improve and simplify an earlier version of this paper. Partial support by the Austrian Science Foundation, Project $32/01 is gratefully acknowledged.
References [1] A.W. Marshall and I. Olkin, Inequalities: Theory of Majorization and its Applications, Academic Press, New York, 1979. [2] U. Zimmermann, "Some partial orders related to Boolean optimization and the Greedy algorithm", Ann. of Discrete Math. 1, 539-550 (1977).