374
A heuristic for quadratic Boolean programs with applications to quadratic assignment problems Rainer
E. BURKARD
Institut fiir Mathematik,
Tilman
Technische Uniuersitiit Grar, A-8010 Grar, Austria
BONNIGER
Rechenrentrum
der Unioersitiit zu K&I, D-5000 Ktiln 41, Germany, Fed. Rep
Received August 198 1 Revised April 1982
A heuristic for quadratic Boolean programs is presented. Computational tests with quadratic assignment problems (QAP) showed that it finds very good suboptimal solutions in moderate time and behaves computationally stable. In the appendix a FORTRAN-program for QAP is listed which improves an earlier code published by Burkard and Derigs.
1. Introduction Quadratic assignment problems (QAP) play an important role in many applications as e.g. location theory, scheduling, backboard wiring, and many others. QAP are known to be NP-hard and until now no efficient algorithm exists which solves QAP with a dimension n > 15 optimally. But nearly all applications in practice have a larger dimension. Therefore there is a great demand for good heuristics. A computational survey (Burkard and Stratmann [7]) revealed that most of the proposed suboptimal methods are as good as the random choice of an arbitrary solution (in fact, it can be proven that asymptotically random choice gives a solution with an arbitrary small relative error, cf. Burkard and Fincke [6]). Only a few, recently developed heuristics yield nearly optimal solutions of high quality. One of these heuristics, a cutting plane method, was proposed by Bazaraa and Sherali [3], the other, a similar method based, however, on a different linearization, is described in Burkard and Derigs [5]. Both methods use Benders’ decomposition for QAP. In this paper it &ill be shown that suitable cutting planes can be obtained directly without Benders’ decomposition by a linearization technique, which was originally proposed by Balas and Mazzola [2]. This linearization is independent of the special form of QAP and can therefore be applied to any quadratic 0- 1 program with sum or bottleneck objective (cf. Section 2). In Section 2 we describe this linearization and show, how the found cutting planes can be used heuristically to find a good solution. In Section 3 we shall apply the new heuristic to QAP and report on computational tests. The new heuristic needs a storage capacity of only 6n2 + lln, the storage requirements being now independent of the number of iterations and cuts. Its running time is in addition 30% less than the running time of the procedure ‘QAPH2’, described in [5, Chapter 91. Computational tests showed further a stable behaviour: independent from the starting solution the suboptimal solution deviated from the best known solution by less than 5% in the
North-Holland European Journal
0377-2217/83/$3.00
of Operational
Research
13 (1983) 374-386
0 1983, Elsevier Science Publishers
B.V. (North-Holland)
R. E. Burkard,
315
T. BBnmger / A heurrstic for quadraric Boolean pmgrums
worst case, and in average less than 1%. Note that the best known values have not been found by applying a fixed method just once, but turned out more or less incidentally in long series of tests with different methods.
2. Heuristic
for quadratic
Boolean
programs
(n X n)-matrix
Let a nonnegative
D = (d, ,) be given. We consider
the quadratic
Boolean
min xTDx
program
(1)
x Es
for a constraint set S c B”. This quadratic O-1 program can be linearized in the following way (cf. Balas and Mazzola [2], Kaufman and Broeckx [9]). Let S= {u’. u2 ,...,u~} in the unit hypercube. For any i be the (finite) set of feasible solutions (1 G i G n) we define a constant c, fulfilling ~,a Furthermore
for all x E S.
i d,,x, /‘I
(2)
we define for every feasible &.
~
d,,ul‘ + c/u;
,.-i
solution
uh the values
forlGjGn;uhES,
I-: I bl‘:=
i
c,u;.
(3)
1-I
Now we can prove
Theorem 1 (Balas and Mazzola solution (z*, x*) of
[2]). Every
optimal solution x* of (1) corresponds
unique&
to an optimal
n
s.t. z 2 2 a;x,-bh /=I
minz. YES
yielding the same objective function
(l
(4)
value and vice versa
Proof. n
2 a;x,-bh= /=I
i /=I
i i
d,,u,k+c,u; I
1=l
x,-
2n c,u: I=1
with
v,(x):=
i
d,,x,+c,(x,-
1)
(1 Gisn).
/=I Therefore
we can rewrite (4) by min max 5 D,(x)u,. xts uts ,=,
(5)
376
R.E. Burkard, T Biinniger/ A heurrstic for quadraticBooleun programs
For fixed x: = 7, an optimal
solution
of
(6) is given by u : = X, since
x,=O*v,(x)=
I The so defined Furthermore,
d,,x,>O,
/=I
f: d,,X,-c,GO ]=I
and we get an optima1 solution
.= U,.
i
i d ,,x,+c,(x,-l)= /=I
x,=l*v,(x)=
of (6), if we define u by
l,
if v,(X) >O,
0, x,,
if v,(X) (0, if v,(X) =O.
u is feasible,
i,++,
= i l=l
since x E S.
4, x,x,-
i J=l
i
c~x,(1-x,)=x%x,
1=l
since x, E {0, 1 }. Therefore min max i D,(x)u, XES uts ,=,
An analogue
= tnn;xTDx
result can be shown for quadratic
min max ICES
bottleneck
problems
of the form
(1’)
d,,x,xJ,
l
In this case we define
(2’)
c, a max d,, I =SJG?l
and
a::= l
d,,u,! + c,u:
forlGjGn,u’ES,
max c,uf.
(3’)
lG!Gfl
Now we prove Theorem
1’. Every optimal solution x* of(1’)
min z X ES
s.t.z>
max afx,-b”
considerations
max a,kx,l
(l
IGjGn
yielding the same objective function
Proof. Analogue
corresponds uniquely to an optimul solution (z*, x*) of
value and vice versa
as before yield
b” = max v,(x)uF ISIS??
(4’)
R. E. Burkard,
T. Bdnniger / A heuristic
377
for quadratic Boolean progrum
with c,(x):=
Therefore
,tmannd,,x,+c,(x,-
1)
for 1 GiGn.
we can rewrite (4’) by min max max u,(x)u,. \-ES UES IGrGn
For fixed x : = x again u : = x is an optimal
solution
of (5’) yielding
max U,(X) = max d,,x,x, I Gl,./=sfl l
of problems
(1’) and (4’).
By means of Theorem 1 the quadratic Boolean program (1) is transformed to problem (4). Solving (4) optimally would require tremendous storage capacity and time. Therefore we propose the following heuristic for solving (4). The heuristic is an iterative procedure starting with a feasible solution U’ E S and an arbitrary direction for search. h”. In the k th step of the algorithm (k = 1, 2,. . . ) the problem n min z s.t. z k c a;x, - bl‘, k fixed, (7) j=l
is solved, which is a relaxation of (4) as taking into account only one constraint, and which depends on uh. A new direction of search, hk, is now determined from the feasible solution uh, normalized by the objective function value of (7):
The normalization constant Pk is chosen either as optimal objective function value of (7) or, if this value is less than 1, it is defined to be 1, such avoiding numerical difficulties. The rationale behind the choice of p, lies in the fact that the correction term in (8) should have a small weight, if the underlying feasible solution uk is not near-optimal, which is the case if the optimal objective function value of (7) is large. By solving a linearized problem of the form II
a new feasible
point
u “’
is now determined.
More formally
Algorithm. 1. Initialize k:= 1, hy:=O for 1
we propose
the following
algorithm:
U’ E S and the corresponding
objective
3. Solve n z:=min x a:~,. uES,=, 4. Compute ,GX:=max(l,
Iz-b”J),
h;:=h;p’+&”
(1 GjGn). P”
’
function
378
R.E. Burkard,
T. BBnniger / A heuristic for quadratic Boolean progrmns
5. Solve
Let ux+’ be the solution of this problem and z ‘-’ the corresponding objective quadratic Boolean program. 6. If zk+‘
function
value of the
In the bottleneck case the definitions of u,~ and bk have to be changed in step 2 according to (3’) and in step 3 and 5 (linear) bottleneck problems have to be solved. Note that the two linear problems, which arise in step 3 and 5, can be solved efficiently by combinatorial algorithms, if the corresponding problem lies in the complexity class P. This is e.g. the case, when S describes the class of all permutations of a set (assignment problem).
3. Application to quadratic assignment
problems
We apply now the algorithm of Section 2 to quadratic assignment problems, such simplifying and improving the earlier procedure described in Burkard and Derigs [5]. For a similar method see also Bazaraa and Sherali [3]. The quadratic assignment problem (in Koopmans-Beckmannform) can be formulated as
Ei
min i i r=l
s.t.
j=l
p=l
a,pb,9xI,xpq,
q=l
ix,,=1
(j=1,2
,..., n),
(9)
,=l
C x,,=l
(i=1,2
,..., n),
j=l x,~E{O,
I}
(i,j=
1,2 ,..., ti).
Every feasible solution x of this problem is an assignment matrix (x,,). We define the permutation 9, corresponding to x by cp(i) =j
e
x,,=
1
(i=
which can be represented
by a permutation
1,2 ,..., n)
The linear problems in step 3 and 5 of our heuristic algorithm become now linear assignment problems (respectively linear bottleneck assignment problems in the bottleneck case). We can improve the heuristic by the following considerations, which specifically apply for assignment problems: Start with a good starting solution which is improved by pairwise and triple exchange algorithms (cf. Burkard and Stratmann [7] for a detailed description of such algorithms and Burkard and Derigs [5] for FORTRAN-codes). We can furthermore apply the pairwise exchange algorithm to the solution uhi’ found in step 5. (It is too expensive to apply here the triple exchange routine.) Computational experiments showed that the determination of c,, (defined according to (2)) did not have a great influence on the performance of the algorithm. Therefore we chose c,,: = n
(Imax
a,p
in our code.
. max b,, 1 1 t 1sq=sn
for 1 Gi, j
R. E. Burkard,
319
T. Biinniger / A heuristic for quadratrc Boolean programs
The steps l-6 of the algorithm are iterated a fixed number (‘MITER’) of times. Thereafter u’ is replaced by a new, randomly generated feasible solution and new iterations are started. In total ‘REP’ such restarts are performed. The storage requirements for the FORTRAN IV code, listed in the appendix, is 6n’ + 1In, thus essentially less than for the code described in Burkard and Derigs [5, Chapter 91. All necessary subroutines are taken from the above mentioned book [5]. The heuristic, described above, was computationally tested on the following examples with n 2 19, taken from the literature: Elshafei [S], Nugent, Vollmann and Rum1 [ 111, Armour and Buffa [ 11, Krarup [lo] and Steinberg [ 121. In our computational tests the parameters MITER and REP were chosen as REP:=
10 15
fornG20, forn>20,
MITER
: = 3n.
Table 1 compares the suboptimal solutions found in a series of 10 independent tests with the best known objective function values. The deviation of the objective function values is measured in percent of the best known value. Column A gives the average deviation in this series of tests, column B the worst deviation and in column C the best reached deviation of the 10 tests is given. Table 1 reveals some favorable features of the heuristic: columns A and B show a stable behaviour with respect to its computation, namely independent from the start a good solution (in almost all cases with a relative error of less than 1% to the best known solution) is found. Considering this table one has to bear in mind that the best known solutions were not obtained by applying one single method just once, but have been found during long periods of testings of different methods. While performing our independent tests. the best known solutions have been obtained in all but two cases. Compared with the heuristics tested in Burkard and Stratmann [7], this new method yields much better results, both in the quality of the solutions as well as in computational expense. The quality of the solutions is comparable to the quality of Bazaraa and Sherali’s method [3] and QAPH2 (cf. [5]), but as pointed out earlier, the new method needs less storage capacity and saves running time. Figure 1 shows that after 6 restarts already a good suboptimal solution has been found. In Fig. 1 the deviation of the suboptimal solution from the best known objective function value is depicted, depending on the number of restarts. Again, the deviation is measured as a percentage of the best known objective function value. Table2 shows the running time per restart. All tests were performed on a CDC CYBER 76M in the Computer Center. University of Cologne.
Table 1 Comparison
of suboptimal
to best known solution
n
Example
19 20 20 20 30 30 30 36 36 36
Elshafei Nugent Armour-Buffa R.D Armour-Buffa E.D. Nugent Krarup 1 Krarup 2 Steinberg R.D. Steinberg S.E.D. Steinberg E.D. (R.D. = rectangular
solutions
distance;
E.D. = Euclidean
Best known value
8606274 1285 2715.910 2338.418 3062 88900 91420 4714 1926 4119.555 distance;
S.E.D. = squared
A
B
C
(S)
(SJ,)
(W
0.70 0.18 0.55 0.02 0.34 1.41 0.29 1.01 0.77 0.61
4.2 1 0.72 1.97 0.22 0.52 2.13 0.54 1.73 1.91 I .02
Euclidean
distance)
0 0 0 0
0.07 0 0.08 0 0 0
380
R.E. Burkard,
T. Btinniger / A heumtrc for quadratic Boolean programs
1-
1
N = 36 N=30 N=i!O I I
.
.
I
Fig.
.
10
5
I
-
I5
??
Restarts
1.Average deviation (10 tests) of objective function values depending
Table 2 Running times on CDC CYBER n
CPU-time
19 20 30 36
4.40 5.03 25.94 58.49
on the number
of restarts
(N = dimension
of test problems).
76M pro restart
(sec.)
Appendix The following procedure for solving quadratic assignment problems suboptimally consists of a MAINprogram for INPUT and OUTPUT and the subroutines QAPH3, ZUFALL, REIHEN, HEIDER, DREIER and LZOPR. The subroutines ZUFALL, REIHEN, HEIDER, DREIER and LZOPR are listed and described in [5]. The subroutine QAPH3 is an improved version of QAPH2, described in [5]. It is shorter and needs considerably less storage capacity and less time than its forerunner. In MAIN all arrays and vectors are specified in DIMENSION statements for the test problem given below. They may be changed for the particular problem. INPUT: As input data the dimension N of the problem, the two nonnegative (integer) matrices A and B, a large machine number UNENDL (integer), the number of restarts REP (integer), the number of iterations MITER (integer) and the machine accuracy EPS (real) are required. Besides the user can choose the start permutation OPE( Z), if he puts the logical STARTP = .TRUE.. OUTPUT: The main program prints out the best permutation found by the procedure in the form i-q(i),
i= l,...,N
and the corresponding objective value. The program requires a storage capacity 6N*+ Running
11N.
times are given in Table 2.
of
R. E. Burkard, T. Btinniger / A heuristic
C C C C C C
SUBROUTINE QAPH3 (N,A,B,MITEK,REP,UNENDL,EPS,OPE,STARTP,OL,C, * Hl,HZ,H3,H4,AP,OP,AREAL,LAMBDA,U,V,DD,HR, * BOOL) x*x *****************k******X***************~***~*****~~***********~**** * * * * HEUKISTIC PROCEDURE FOK SOLVING QUADRATIC ASSIGNMENT * * PROBLEMS * * *x* *x*xx**x*************xxx**xxx*xxx*x***x*~~~~~~~~~~~*~~~~~~~~~~~~
C C C C C C C C
c C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C
C C C C C c *xx C
for quadratic Boolean progrums
ii * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * 1. CALL: SUBROUTINE QAPH3 (N,A,B,MITER,REP,UNENDL,EPS,OPE,STARTP * .OL,C,Hl,H2,H3,H4,AP,OP,AREAL,LAMBDA,U,V,DD, * * &BOOL)2. COMPUTER CODE: FORTRAN IV 3. METHOD: HEURISTIC CUTTING PLANE AND EXCHANGE METHOD
* * * * * * * * * * * * * * * * * * * * * * * * * *
4. PARAMETEKS: INPUT: DIMENSION OF THE PROBLEM N DISTANCE MATRIX (INTEGEK) I,J=~,...,N A(I,J) CONNECTION MATRIX (INTEGER) I,J=~,...,N B(I,J) UNENDL LARGE MACHINE NUMBER (INTEGEK) MITEK NUMBER OF ITERATIONS (INTEGER) REP NUMBER OF RESTARTS MACHINE ACCURACY (REAL) EPS START PERMUTATION, IF STARTP=.TKUE. OPE(I) (INTEGER) I=l,...,N STARTP = .TRUE. THE PERMUTATION OPE(I) IS THE START PERMUTATION = .FALSE. A RANDOM START PERMUTATION IS DETERMINED BY THE ROUTINE ZUFALL (LOGICAL) OUTPUT: BEST PEKMUTATION FOUND BY THE PROCEDURE OPE(I) (INTEGER) I=~,...,N OL OBJECTIVE FUNCTION VALUE OF OPE(1) (INTEGER) * * INTEGER ARRAYS OF DIMENSION N*N * c(I), Hi(I) * INTEGER ARRAYS OF DIMENSION N * H2(I), H3(I), H4(I), Ap(I), OP(I) * REAL ARRAYS OF DIMENSION N*N * AREAL( LAMBDA(I) * REAL ARRAYS OF DIMENSION N * U(I), V(I), DD(I), HR(I) * LOGICAL ARRAY OF DIMENSION N * BOOL(I) 5. EXTEKNAL SUBROUTINES: SUBROUTINE ZUFALL SUBROUTINE REIHEN SUBROUTINE HEIDER SUBROUTINE DREIER SUBROUTINE LSAPR 6. COMMENT: THE ELEMENTS OF THE MATRICES A AND B HAVE TO BE NONNEGATIVE. 7. AUTHOR: T. BOENNIGEK
***********************x**********~******************~******~******
* * * * * * * * * * * * * * *
381
382
c--
c-c ***
R. E. Burkard,
T BCnniger / A heurisfic for quadratic Boolean programs
IMPLICIT INTEGER (A - 2) INTEGER A(N,l), B(N,l), opE(l), C(l), Hi(l), Hz(l), H3(1), * H4(1), AP(l), op(1) REAL AREAL( LAMBDA(l), U(l), V(l), DD(l), HR(l), * BETA, EPS REAL PROZENT, ABWEICH LOGICAL BOOL(l), STARTP -____-___-__________--_____ NN = N*N R=l IREP = 1 OL = UNENDL ____-_-___--________--__-------DETERMINATION OF THE RANDOM START PERMUTATION
C
10
IF(.NoT. STARTP) CALL ZUFALL (N,oPE,BoOL) DO 10 I=l,N OP(I) = OPE(1) CONTINUE
c-c *x* C C
COMPUTATION OF THE CONSTANTS C(I,J) = N*(MAX A(I,K))*(MAX B(J,L))
DO 105 I=l,N FMAX = 0 DMAX = 0 DO 104 K=l,N FF = A(I,K) DE = B(I,K) IF(FF .GT. FMAX) FMAX = FF IF(DE .GT. DMAX) DMAX = DE CONTINUE 104 Hl(1) = FMAX H2(1) = DMAX 105 CONTINUE IZAEHL = 0 DO 108 I=l,N DO 108 J=l,N IZAEHL = IZAEHL+l LAMBDA(IZAEHL) = 0 C(IZAEHL) = N*Hl(I)*H2(J) 108 CONTINUE GOT0 110 109 CONTINUE IF(IREP .EQ. REP) GOT0 900 IREP = IREP+l R=l CALL ZUFALL (N,OP,BOOL) _____-___-_-----------__-_-___c-c *xx COMPUTATION OF THE CORRESPONDINGOBJECTIVE FUNCTION VALUE C 110 CONTINUE UBl = 0 IZAEHL = 0 DO 115 I=l,N DO 115 K=l,N IZAEHL = IZAEHL+l LAMBDA(IZAEHL)= 0 OPI = OP(1) OPK = OP(K) UBl = UBl+A(I,K)*B(OPI,OPK) 115 CONTINUE ________________---------------c-C *** PAIR AND TRIPLE EXCHANGE C CALL PEIHEN (N,A,B,OP,Hl,H2,H3,H4,BooL) CALL HEIDEK (N,A,B,UB~,~P,H~)
R.E. Burkard,
T. ‘Btinniger / A heuristic
for quadratic Boolean programs
CALL DREIEK (N,A,B,UBl,OP,Hl,BOOL) IF(UB1 .GE. OL) GOT0 156 OL = UBl DO 117 I=l,N OPE(I) = OP(I) 117 CONTINUE GOTO 156 _______________-_-_--e-v-------c-C *xx SOLUTION FOR THE FIRST ITERATION R = 1 C 123 CONTINUE UBl = 0 DO 125 I=l,N DO 125 K=l,N OPI = OP(1) OPK = OP(K) UBl = lJBl+A(I,K)*B(OPI,OPK) 125 CONTINUE IF(UB1 .GE. OL) GOT0 150 CL = UBl DO 127 I=l,N OPE(I) = OP(1) 127 CONTINUE 150 CONTINUE R = R+l IF(MOD(R,MITER) .EQ. 0) GOTO 109 156 CONTINUE _____________---____-----------C__ C *** DETERMINATION OF THE NEW CUT C
160
ALPHA = 0 IZAEHL = 0 DO 170 I=l,N DO 170 J=l,N IZAEHL = IZAEHLfl SP = 0 DO 160 K=l,N OPK = OP(K) SP = SP+A(K,I)*B(OPK,J) CONTINUE IF(.J .NE. OP(I)) GOT0 165 CC = C(IZAEHL) SP = sp+cc ALPHA = ALPHA+CC AREAL(IZAEHL) = FLOAT(SP) CONTINUE ------___-_________-____________
165 170 c-C *** HEURISTIC SOLUTION OF THE RESTRICTED MASTER PROBLEM DETERMINATION OF BETA AND OF THE VECTOR LAMBDA(I) C C CALL LSAPR (N,UNENDL,AREAL,BETA,Hl,OP,U,V,DD,HR,H2,BOOL,EPS) LBB = IFIX(BETA)-ALPHA BETA = FLOAT(LBB) IF(BETA .LT. 0.) BETA = -BETA IF(BETA .EQ. 0.) BETA = 1. DO 180 I=l,NN LA?lBDA(I) = LAMBDA(I)+AREAL(I)/BETA 180 CONTINUE C-_ -___________-__-____~~~-~~~~~~~~ C *** FOR R=l IS LBB THE EXACT SOLUTION OF THE RESTRICTED MASTER C C
PROBLEM IF(R .EQ. 1) GOT0 123 CALL LSAPR (N,UNENDL,LAMBDA,BETA,Hl,OP,U,V,DD,HR,H2,BOOL,EPS) ----------_---__-__-~~~~~~~~~-~~
c-C *xx COMPUTATION C TO OP(I)
OF THE OBJECTIVE
FUNCTION
VALUE CORRESPONDING
383
384
R.E. Burkard,
T. BBnniger / A heuristic for quadratic Boolean programs
C UBl = 0 DO 200 I=l,N DO 200 K=l,N OPI = OP(1) OPK = OP(K) UBl = UBl+A(I,K)*B(OPI,OPK) ZOO CONTINUE -___________________~-~~~~~~~-~~ c-c *** IMPROVEMENT BY PAIRWISE EXCHANGE C DO 210 I=l,N AP(1) = OP(1) 210 CONTINUE CALL REIHEN (N,A,B,AP,Hl,H2,H3,H4,BOOL) CALL HEIDER (N,A,B,UB~,AP,H~) IF(OL .LE. UBl) GOT0 150 OL = UBl DO 211 I=l,N OPE(1) = AP(1) 211 CONTINUE GOT0 150 900 CONTINUE RETURN END PROGRAM MAIN (INPUT,OUTPUT,TAPE5=INPUT,TAPE6=OUTPUT) __--_________-______-----------c-IMPLICIT INTEGER (A-Z) INTEGER A(12,12), B(12,12), OPE(12), C(144), Hl(144), H2(l2), * H3(12), H4(12), AP(12), OP(12) REAL AREAL(144), LAMBDA(144), U(lZ), V(l2), DD(l2), HR(12) REAL EPS LOGICAL BOOL(12), STARTP c______________________-----------READ(5,102) N DO 10 I=l,N 10 READ(5,103) (A(I,J),J=l,N) DO 11 I=l,N 11 READ(5,103) (B(I,J),J=l,N) l4ITER= 3*N KEP = 4 UNENDL = 1000000000 EPS = l.E-13 STARTP = .FALSE. WRITE(6,lOOO)N DO 100 I=l,N 100 WRITE(6,lOlO) (A(I,J),J=l,N) WRITE(6,1015) DO 110 I=l,N 110 WRITE(6,lOiO) (B(I,J),J=~,N) CALL QAPH3 (N,A,B,MITER,REP,UNENDL,EPS,OPE,STARTP,OL,c,Hl,H2, * H3,H4,AP,OP,AREAL,LAMBDA,U,V,DD,HR,BOOL) WRITE(6,2000) DO 200 I=l,N 200 WRITE(6,2005) I,OPE(I) WRITE(6,2010) OL STOP 102 FORMAT(I2) 103 FORMAT(2013) 1000 FORMAT(lH1,13X,31HTESTEXAMPLE OF NUGENT WITH N =,13,///,22X, *17HDISTANCE MATRIX A,/) 1010 EORMAT(lH ,5X,2014) 1015 FORMAT(//22X,l9HCONNECTION MATRIX B,/) 2000 FORMAT(///lH ,8X,19HHEURISTICSOLUTION:) 2005 FORMAT(1H ,8X,I5,4H-->,13) 2010 FORMAT(/lH ,8X,25HOBJECTIVEFUNCTION VALUE:,I6) END
R. E. Burkard,
TEST
EXAMPLE OF NUGENT WITH N =
DISTANCE 0 10 2
12
3 1 2 3 4 2 3 4 5
2 2 12 2 3 3 2 3 4
T. BAnniger / A heuristtc for quadratic Boolean programs
3
12 2
12 10
13 10 3
4 0 10 2
4 3
12 2 4 3 2 3
13 5 4 3 2
12 2 3 4
3 12
4 3
12 2
15 3
12 IO 2 12 2 3
12
MATKIX A 3
12 2
385
2 3 4 12 2
13 10 3 12 2
4 3
4 0 10 2
13
3 2 3
4 3 2
5 4 3
4
3 3
2 4 3
12 2 3 12
12 2
1 3
12 10 2
10
1
CONNECTION l+lATKIX B 0
5
2
4
5
0
3
0
2 4 1
3 0 2
0 0 0
0 0 6 2 15 1
2 2 0 4 0
0 0 5 5 2 2
0 0 5 2 2 10 0 0 5
1
0
2
5
HEURISTIC l-->
0 2
6
2
2
0
4
111 5
0
0
0 5 0
0 2 10
0 2 0
5 10 0
5 0 0
2 0 5
2 5 1
2 5 1
10 0 0 0 5 I
0 5 1 1 5 4
5 0 10 5 2 3
1 10 0 0 0 5
1 5 0 0 0 10
5 2 0 0 0 5
4 3 5 10 5 0
0 3 0 10 0 2
1
0
3
0
10
0
2
0
SOLUTION: 3
2--> 3--> 4 -> 5->
9 7 12 1
6 -> 7-> a---> 9--> 10 -->
11 a 4 2 10
11 --> 12 -->
6 5
OBJECTIVE
10 2
FUNCTION VALUE:
578
References and ES. Buffa, Heuristic algorithm and simulation approach to relative location of facilities, Manugement Ser.Y (1963)294-309. by a new linearization, Presented at the TIMS,/ORSA meeting. PI E. Balas and J.B. Mazzola, Quadratic O-I programming Washington, DC (1980). [31M.S. Bazaraa and H.D. Sherali, Benders’ partitioning scheme applied to a new formulation of the quadratic assignment problem, Naval Rex Logwt. Quart. 27 (1980) 29-41. Zuordnungsproblem. Bericht, Mathematisches Institut. Universttat zu Koln, Koln [41T. Bonniger. Algorithmen zum quadratischen (1979). Lecture Notes [51R.E. Burkard and U. Derigs, Assignment and matching problems: solution methods with FORTRAN-programs. m Economics and Mathematical Systems 184 (Springer, Berlin, 1980).
['IG.C. Armour
R. E. Burkard,
386
i? B&niger
/ A heurrstic for quadratic
Boolean programs
(61 R.E. Burkard
and U. Fincke, Probabilistic asymptotic properties of quadratic assignment problems, Report 81-3, Mathematisches Institut, Universitat zu Koln, Koln (1981). [7] R.E. Burkard and K.-H. Stratmann. Numerical investigations on quadratic assignment problems, Naoal Rm Logist. Quarr. 25 (1978) 129-148. [S] A.N. Elshafei. Hospital layout as a quadratic assignment problem, Operatmnal Res. Quart. 28 (1977) 167-179. (91 L. Kaufman and F. Broeckx, An algorithm for the quadratic assignment problem using Bender’s decomposition, European J. Operational
Rex 2 (1978)
20442 11.
[lo) J. Krarup, Quadratic assignment. Saertryk af data 3-72 and unpublished data from hospital planning. [ 111 C.E. Nugent, T.E. Vollmann and J. Rum], An experimental comparison of techniques for the assignment J. Operations Res. 16 (1968) [ 121 L. Steinberg, The backboard
150-173.
wiring problem:
a placement
algorithm.
Slam Rev. 3 (1961) 37-50.
of facilities to locations,