Qapsurvey 94
Qapsurvey 94
1. Introduction
Given a set N = f1; 2; : : : ; ng and n n matrices F = (fij ) and D = (dkl ),
the quadratic assignment problem (QAP) can be stated as follows:
n X
X n n
X
min
p2
fij dp(i)p(j ) + cip(i);
N
i=1 j =1 i=1
where N is the set of all permutations of N . One of the major applications of
the QAP is in location theory where the matrix F = (fij ) is the ow matrix,
i.e. fij is the ow of materials from facility i to facility j , and D = (dkl) is the
distance matrix, i.e. dkl represents the distance from location k to location l
[62, 67, 137]. The cost of simultaneously assigning facility i to location k and
facility j to location l is fij dkl . The objective is to nd an assignment of all
facilities to all locations (i.e. a permutation p 2 N ), such that the total cost of
the assignment is minimized. Throughout this paper we often refer to the QAP
in the context of this location problem.
In addition to its application in facility location problems, the QAP has been
found useful in such applications as scheduling [88], the backboard wiring prob-
lem in electronics [240], parallel and distributed computing [24], and statistical
data analysis [118]. Other applications may be found in [77, 138, 159].
The term "quadratic" comes from the reformulation of the problem as an
optimization problem with a quadratic objective function. There is a one-to-
one correspondence between N and the set of n n permutation matrices
1 This paper and a separate bibliography le (bib le) is available by anonymous ftp at
orion.uwaterloo.ca in the directory pub/henry/qap.
1991 Mathematics Subject Classi cation. Primary 90B80, 90C20, 90C35, 90C27; Secondary
65H20, 65K05.
Key words and phrases. Combinatorial optimization, quadratic assignment problem, graph
partitioning, survey, exact algorithms, heuristics, algorithms, test problems, bibliography.
c 0000 American Mathematical Society
0000-0000/00 $1.00 + $.25 per page
1
2 P.M. PARDALOS, F. RENDL, AND H. WOLKOWICZ
X = (xij )nn. The entries of each such matrix must satisfy:
n
X
(1.1) xij = 1; i = 1; : : : ; n;
j =1
n
X
(1.2) xij = 1; j = 1; : : : ; n;
i=1
Then
X 2 E;
X 2 N () V Y V t ?vvt ;
X 2 On () Y 2 On?1 :
Conversely, if X 2 E ; then there is a Y such that ( 2.2) holds.
The above relaxation provides lower bounds for QAP. Thus, for each pertur-
bation de ned in Section 2.2, with the above convexity assumption on the span
of D, the dual problem provides lower bounds for QAP because we can e ectively
characterize global optimality for it. This is no longer true if we do not make
the convexity assumptions on the objective function.
Statements about global optimality for nonconvex problems, such as QAP
itself, are much harder to make. A characterization for general problems can be
found in [114].
2.4.4. Local Optimality. For the general quadratic programming relaxation,
even in the nonconvex case, i.e. for a general objective function constrained
to D, we still get necessary and sucient local optimality conditions. This is
due to the quadratic nature of the problem, i.e. the second order optimality
conditions are necessary and sucient. However, this is not the case for problems
with nonnegativity constraints. It has been shown in [191] that the problem of
8 P.M. PARDALOS, F. RENDL, AND H. WOLKOWICZ
checking local optimality (and the problem of checking if a local minimum is
strict) in quadratic programming with linear constraints is NP-hard. Pardalos
and Vavasis [192] have also shown that quadratic programming with one negative
eigenvalue (all others zero) remains an NP-hard problem.
2.5. Nonsymmetric QAP. Applications for QAP usually involve symmet-
ric matrices A; B . If one of A or B is symmetric, then we can still get an equiv-
alent symmetric QAP by symmetrizing the other, e.g. replace B by (B + B t )=2:
If both A and B are not symmetric, then we can still symmetrize the quadratic
form by using the Kronecker product, but we then lose the trace structure of the
problem.
However, even if both A and B are not symmetric, we can still obtain mean-
ingful bounds by moving into the space of Hermitian matrices. See [103].
3. Applications, Generalizations and special cases
Applications for QAP are many and varied. Several are mentioned in the
introduction above. We also point out that [33] summarizes recently published
applications of quadratic assignment problem.
We will describe now rst some generalizations of the quadratic assignment
problem, and then discuss some interesting special cases.
3.1. The 3-index Assignment Problem. The three-index (or 3-dimensional)
assignment problem of order n can be stated as a (0,1)-programming problem of
the following form:
P
min P
fcijkxijk : i 2 I; j 2 J; k 2 K g;
s:t: P
fx ijk : j 2 J; k 2 K g = 1; 8i 2 I;
(3.1) P
fx ijk : i 2 I; k 2 K g = 1; 8j 2 J;
fxijk : i 2 I; j 2 J g = 1; 8k 2 K;
xijk 2 f0; 1g; 8i; j; k;
where I , J and K are disjoint index sets with jI j = jJ j = jK j = n. Note that
the number of variables of the three-dimensional assignment problem of order n
is n3.
From the complexity point of view, it has been shown that the three-dimensional
assignment problem is NP-hard [131]. Most ot the proposed algorithms for this
problem are implicit enumeration methods. Some of the proposed algorithms
include those of Vlach [247], Pierskalla [196, 197] and Leue [145]; a primal-
dual algorithm described by Hansen and Kaufman [106]; a branch and bound
algorithm using a Lagrangian dual and subgradient optimization implemented
by Frohlich [83] and discussed by Burkard and Frohlich [38]. Also see Burkard
and Rudolf [42]. More recently, Balas and Saltzman [11] developed a branch
and bound algorithm that also uses facet-de ning inequalities in a Lagrangian
fashion with subgradient optimization.
THE QUADRATIC ASSIGNMENT PROBLEM 9
Let A be the coecient matrix of the constraint set of (3.1). Then R =
I [ J [ K is the row index set of A. Let S be the column index set of A. Let GA
be the intersection graph of A, i.e., the graph that has a vertex for every column
of A and an edge for every pair of non-orthogonal columns. Let
P = fx 2 Rn : Ax = e; x 0g;
3
X
min min
H 2M (G;G ) 2(G;H )
aij b(i)(j ) :
ij 2E
0
3.
(v) Select k, such that G(k) is maximum for 0 k i.
(vi) If k > 0 then set p0 = pk and go to 2.
(vii) We have reached a local optimum for the QAP. Set p = p0 and output
p and C (p).
Now let us review the (KL) heuristic algorithm for the GP for an undirected
graph G(V; E ) (assuming jV j = 2n) with edge weights w(e), e 2 E . For conve-
nience, a partition of the set V always means a partition into two sets (A; B )
with jAj = jB j = jV j=2 in the rest of the paper. Then, the problem GP is
to nd a partition (A; B ) of the set V with the minimum cost C (A; B ), which
is de ned to be the sum of the weights of all edges between A and B . As
one of the most successful heuristic algorithms for the GP, the Kernighan-Lin
heuristic starts with a random partition of the set V . A sequence of partitions,
(A1 ; B1); : : : ; (Al ; Bl ), is constructed for a current partition (A0 ; B0 ) in a greedy
sense. Each partition (Ak ; Bk ); 1 k l, in the sequence is obtained from the
previous one (Ak?1; Bk?1) by swapping one vertex in Ak?1 with one vertex in
Bk?1 and has cost lower than the current partition. A local search is performed
in the set of partitions of this sequence, replacing the current partition by the
partition with the lowest cost in the sequence (the algorithm stops if the sequence
is empty for the current partition). Similar to the description of Algorithm 1,
we use the cumulative gain G(k) for a partition pk .
THE QUADRATIC ASSIGNMENT PROBLEM 15
3.
(v) Choose k, such that G(k) is maximum for 0 k i.
(vi) If k > 0 then set A0 = Ak and B0 = Bk and go to 2.
(vii) We have reached a local optimum for the GP; set A = A0 and B = B0 .
Output A; B and C (A; B ).
Comparing the above algorithm with the local search algorithm for the QAP,
one can easily see the similarity between them. Instead of working with partitions
in the GP, we work with permutations in the QAP. The reduction from the GP to
the QAP in the next section reveals why the adaptation of (KL) algorithm to the
QAP can be e ective. Furthermore, extensive computational results in section
3 indicate that the proposed local search algorithm (Algorithm 1) performs very
well.
sequence of partitions, each of which is a swap of the one preceding it, starting
from (A0 ; B0). We call it monotonic, if the di erences of Ai ? A0 and Bi ? B0
are monotonically increasing (that is, no vertex is switched back to its original
set (A0; B0 )). Finally, we say that a partition (A ; B ) is a neighbor of (A; B ) if
0 0
Next, we provide the proof of correctness of the above algorithm [165]. Be-
fore applying Step #8, the identity permutation is an optimal permutation
for the P
QAP
P
with input data, the matrices F and D and the optimal cost,
C = w( dij ).
>
:
w if i = l and j = m;
0 otherwise.
It is obvious that
THE QUADRATIC ASSIGNMENT PROBLEM 29
Next, we provide two test problems constructed using the above generator.
6
39 3 38 3 77
6 27 2 9 15 16 3 9 2 16 3 77
6
6 33 9 0 3 40 0 18 9 15 17 77
6
4 16 2 3 15 15 3 17 2 9 25 5
30 9 0 29 18 1 3 0 9 9
2
0 1 1 2 2 3 3 4 4 53
6 1 0 2 1 3 2 4 3 5 4 7
6 7
6 1 2 0 1 1 2 2 3 3 4 7
6 7
6 2 1 1 0 2 1 3 2 4 3 7
6 7
D = 666 32 23 21 12 10 01 21 12 32 23 777
6 7
6 7
6 3 4 2 3 1 2 0 1 1 2 7
6 7
6 4 3 3 2 2 1 1 0 2 1 7
6 7
4 4 5 3 4 2 3 1 2 0 1 5
5 4 4 3 3 2 2 1 1 0
For this problem, the known optimal cost is 1890 and the optimal permutation
of the facilities in relation to the locations is (8 2 1 10 5 9 7 4 3 6). The results
obtained by our algorithm are: cost due to our algorithm is 1890, which is
30 P.M. PARDALOS, F. RENDL, AND H. WOLKOWICZ
same as the optimal value and the corresponding permutation of the facilities is
(7 10 1 4 5 2 3 9 6 8).
Example 2: The grid for this example is r = 2, s = 5 and n = 10. The input
parameters to the generator are: w = 9 and z = 5. The generated ow matrix
F is given below.
2
9 21 29 17 1 17 20 16 2 1 3
6 9 9 18 34 2 2 34 14 0 4 77
6
6 5 13 9 15 3 2 16 24 18 2 77
6
6 5 26 20 9 9 4 2 2 27 3 77
6
6
1 77
6 1 24 22 2 3 9 9 9 24 5 7
6 7
6 1 0 16 4 1 17 18 9 21 17 7
6 7
4 5 0 5 18 0 5 33 13 9 18 5
2 0 0 26 9 4 2 41 35 9
2
0 1 2 3 4 1 2 3 4 53
6 1 0 1 2 3 2 1 2 3 4 7
6 7
6 2 1 0 1 2 3 2 1 2 3 7
6 7
6 3 2 1 0 1 4 3 2 1 2 7
6 7
D = 666 14 23 32 41 50 05 14 23 32 41 777
6 7
6 7
6 2 1 2 3 4 1 0 1 2 3 7
6 7
6 3 2 1 2 3 2 1 0 1 2 7
6 7
4 4 3 2 1 2 3 2 1 0 1 5
5 4 3 2 1 4 3 2 1 0
Optimal cost for this example is also 1890. Our algorithm cost is the same as the
optimal cost and the corresponding permutation in both the cases is the identity
permutation.
6.2. Li & Pardalos Generator for QAPs with a Known Solution. Li
and Pardalos [150] have generalized the results of Palubetskis and constructed
test problems for more general types of QAPs. Their generator includes Palubet-
skis' procedure [175] as a special case, in which the distance matrix is taken from
a grid graph. The fortran generator described in [150] is available by e-mail from
the authors (the fortran code can also be obtained by sending an e-mail message
to \coap@math.u .edu", and in the body of the message put \send 92006").
6.3. QAP-LIB. Finally we point out that a collection of more than 130 in-
stances of quadratic assignment problems is contained in a library called the
"QAP-LIB", [39]. This library consists of two parts. The data part contains
various instances given by the input matrices A, B and C , if C 6= 0. Then
THE QUADRATIC ASSIGNMENT PROBLEM 31
there is a documentation, corresponding to [39]. This documentation is updated
regularly, the last update being from February 1994. The documentation con-
tains the following information on each of the instances: the best known feasible
solution value is given, along with some information on who found it and by
which method. Secondly the best currently available lower bounds on the objec-
tive function is provided. The two parts are available via anonymous ftp from
ftp.tu-graz.ac.at in the directory /pub/papers/qaplib.
6.4. OR-Library. QAP instances can be also obtained from the OR-Library
(o.rlibrary@ic.ac.uk) - see the le qapinfo. For details see [123]. Information
about test problems for quadratic assignment problems as well as other combi-
natorial problems can be obtained by sending email to o.rlibrary@ic.ac.uk with
the email message being the le name for the problem areas you are interested
in.
7. Concluding Remarks
In this paper we gave a survey regarding the most recent results and applica-
tions on QAP. In addition, an up-to-date bibliography is included which includes
papers on QAP and realted problems as well as applications in diverse areas.
32 P.M. PARDALOS, F. RENDL, AND H. WOLKOWICZ
Appendix A. Notations
n The size of an instance of the QAP
e The column vector of ones
A The ow matrix
B The distance matrix
QAP (A; B ) An instance of the QAP with ow matrix A and distance matrix B
m The set of permutations
f (p) The objective function value of QAP (A; B ) corresponding to p
0
fA;B The maximum objective function value of QAP (A; B )
fA;B The minimum objective function value of QAP (A; B )
GLB (A; B ) A permutation yielding the maximum objective function value of QAP (A; B )
EV B (A; B ) The Eigenvalue bound for the QAP (A; B )
hx; yi The inner product of vectors x and y
hx; yi+ The maximum permuted inner product of vectors x and y
hx; yi? The minimum permuted inner product of vectors x and y
x+ The vector obtained by reordering the components of x ascendingly
x? The vector obtained by reordering the components of x descendingly
At The transpose of the matrix A
trace A The trace of the matrix A
diag (A) The vector formed from the diagonal elements of A
diag (v) The diagonal matrix formed from the vector v
The set of permutation matrices
P The set of positive semide nite symmetric matrices
D The set of doubly stochastic matrices
O The set of orthogonal matrices
N The set of nonnegative (elementwise) matrices
E The set of matrices with row and column sums 1
S The set of matrices with the sum of the squares of all elements equal to n
References
1. E. Aarts and J. Korst, Simulated annealing and Boltzman machines: A stochastic ap-
proach to combinatorial optimization and neural computing, John Wiley and Sons, 1989.
2. W.P. Adams and H.D. Sherali, A tight linearization and an algorithm for zero-one
quadratic programming problems, Management Science 32 (1986), no. 10, 1274{1290.
3. R.K. Ahuja, T.L. Magnanti, and J.B. Orlin, Some recent advances in network ows,
SIAM Review 33 (1991), no. 2, 175{219.
4. G.C. Armour and E.S. Bu a, Heuristic algorithm and simulation approach to relative
location of facilities, Management Science 9 (1963), 294{309.
5. A.A. Assad and W. Xu, On lower bounds for a class of quadratic f0 1g programs, Oper-
;