THE QUADRATIC ASSIGNMENT PROBLEM - Åbo Akademiweb.abo.fi/fak/tkf/at/ose/doc/Pres_29112012/The...

22
OSE SEMINAR 2012 THE QUADRATIC ASSIGNMENT PROBLEM Axel Nyberg CENTER OF EXCELLENCE IN OPTIMIZATION AND SYSTEMS ENGINEERING ÅBO AKADEMI UNIVERSITY ÅBO, NOVEMBER 29, 2012

Transcript of THE QUADRATIC ASSIGNMENT PROBLEM - Åbo Akademiweb.abo.fi/fak/tkf/at/ose/doc/Pres_29112012/The...

OSE SEMINAR 2012

THE QUADRATIC ASSIGNMENT PROBLEM

Axel Nyberg

CENTER OF EXCELLENCE INOPTIMIZATION AND SYSTEMS ENGINEERINGÅBO AKADEMI UNIVERSITY

ÅBO, NOVEMBER 29, 2012

2 | 16

Introduction

I Introduced by Koopmans and Beckmann in 1957

I Cited by ≈ 1500

I Among the hardest combinatorial problems

I Real and test instances easily accessible (QAPLIB - A Quadraticassignment problem Library)

I Instances with N=30 are still unsolved

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 3 | 16

Location theory

I Supply Chains

I Logistics

I Production

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 3 | 16

Location theory

I Objective: Assign N plants between N given locations in order tominimize total flows.

1

2

3

4

5

36

4

2

2

3

3

3

4

1

A=

0 3 6 4 23 0 2 3 36 2 0 3 44 3 3 0 12 3 4 1 0

1

2

3 4

5

10

15

7

56

4

25

B=

0 10 15 0 7

10 0 5 6 015 5 0 4 20 6 4 0 57 0 2 5 0

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 3 | 16

Location theory

12

24

35

43

51

3*6

4*5

2*10

2*5

3*4 3*2

4*7

1*15

I Optimal solution = 258I Optimal Permutation=[2 4 5 3 1]

A=

0 3 6 4 23 0 2 3 36 2 0 3 44 3 3 0 12 3 4 1 0

B24531 =

0 6 0 5 106 0 5 4 00 5 0 2 75 4 2 0 15

10 0 7 15 0

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 4 | 16

Facility Layout-Real World Examples

I Hospital Layout - Germanuniversity hospital, KlinikumRegensburg 1972.(Optimality proved in the year2000)

I Ship Design

I Airport gate Assignment

I Nature Park Layout

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 5 | 16

DNA MicroArray Layout

I Microarrays can have up to 1.3 million probes

I Small subregions can be solved as QAPs

I Objective: To reduce the risk of unintended illumination ofprobes

AGTCGCACGCGTAGA

ATTTGGAGCCGTCGA

TGTTGATGCGGAGGC

CGTCGCCTCCGAGGT

ACTCGAGGAAGATGT

Sub-region (size N = 25)

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Applications 6 | 16

Other applications for QAPs

I Backboard wiring

I Control panel and keyboard layout

I VLSI design

I Computer manufacturing

I Archeology

I Bandwith minimization of a graph

I Economics

I Image processing

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 7 | 16

Three Objective Functions

I Koopmanns-Beckmann

minA ·XBXT (1)

I SDPmintr(AXBXT ) (2)

I DLRminXA ·BX (3)

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 8 | 16

Koopmans Beckmann form

N¼i=1

N¼j=1

N¼k=1

N¼l=1

aijbkl · xikxjl

N¼i=1

xij = 1, j = 1, ...,N ;

N¼j=1

xij = 1, i = 1, ...,N ;

xij ∈ {0,1}, i , j = 1, ...,N ;

I This formulation has N2(N −1)2 bilinear terms.

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 8 | 16

Koopmans Beckmann form

N¼i=1

N¼j=1

N¼k=1

N¼l=1

aijbkl · xikxjl

N¼i=1

xij = 1, j = 1, ...,N ;

N¼j=1

xij = 1, i = 1, ...,N ;

xij ∈ {0,1}, i , j = 1, ...,N ;

I This formulation has N2(N −1)2 bilinear terms.

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 9 | 16tr(AXBXT ) = tr((A⊗B)yyT )

Q= A⊗B=

a11B · · · a1NB

... · · ·...

aN1B · · · aNNB

and y= vec(X) =

x11...

xNN

Semi Definite Programming Relaxation

minY,y

tr(Q′Y)

s.t. diag(Y) = y[1 yT

y Y

]� 0

I ⊗ is the Kronecker product

I The number of continuous variables in Y is N4 and the number ofbinary variables in y is N2

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 10 | 16

minXA ·BX

minN¼i=1

N¼j=1

a ′ijb′ij

a ′ij =n¼

k=1

akjxik ∀i , j

b ′ij =n¼

k=1

bik xkj ∀i , j

A=

0 3 5 9 63 0 2 6 95 2 0 8 109 6 8 0 26 9 10 2 0

B=

0 4 3 7 74 0 4 10 4

3 4 0 2 37 10 2 0 47 4 3 4 0

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 10 | 16

minXA ·BX

minN¼i=1

N¼j=1

a ′ijb′ij

a ′ij =n¼

k=1

akjxik ∀i , j

b ′ij =n¼

k=1

bik xkj ∀i , j

A=

0 3 5 9 63 0 2 6 95 2 0 8 109 6 8 0 26 9 10 2 0

B=

0 4 3 7 74 0 4 10 4

3 4 0 2 37 10 2 0 47 4 3 4 0

a ′23 = 5x21 +2x22 +0x23 +8x24 +10x25

b ′23 = 4x13 +0x23 +4x33 +10x43 +4x53THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 11 | 16

Discrete Linear Reformulation (DLR)

minn¼

i=1

n¼j=1

Mi¼m=1

Bmi zmij

zmij ≤ Aj¼

k∈Kmi

xkj m = 1, ...,Mi

Mi¼m=1

zmij = a′ij

∀i , j

Example for one bilinear term a′23b′23

a′23 = 5x21 +2x22 +0x23 +8x24 +10x25

b ′23 = 4x13 +0x23 +4x33 +10x43 +4x53

x13 + x23 + x33 + x43 + x53 = 1

x21 + x22 + x23 + x24 + x25 = 1

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 11 | 16

Discrete Linear Reformulation (DLR)

minn¼

i=1

n¼j=1

Mi¼m=1

Bmi zmij

zmij ≤ Aj¼

k∈Kmi

xkj m = 1, ...,Mi

Mi¼m=1

zmij = a′ij

∀i , j

Example for one bilinear term a′23b′23

a′23 = 5x21 +2x22 +0x23 +8x24 +10x25

b ′23 = 4x13 +0x23 +4x33 +10x43 +4x53

x13 + x23 + x33 + x43 + x53 = 1

x21 + x22 + x23 + x24 + x25 = 1

4z123 +10z2

23

z123 ≤ 10(x13 + x33 + x53)

z123 + z2

23 = a ′23

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 12 | 16

02

46

810

02

46

810

0

20

40

60

80

100

02

46

810

02

46

810

0

20

40

60

80

100

Figure 1: Bilinear term a ′23b′23 discretized in b ′23 (to the left) and in a ′23 (to the right)

I The size of the MILP problem is dependent on the number ofunique elements per row.

I Tightness of the MILP problem is dependent on the differencesbetween the elements in each row.

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 13 | 16

I The size of the DLR is dependent on the number of uniqueelements per row.

I Tightness of the DLR problem is dependent on the differencesbetween the elements in each row.

I A can be modified to any matrix A, where aij + aji = aij +aji .

A=

0 1 2 2 3 4 4 51 0 1 1 2 3 3 42 1 0 2 1 2 2 32 1 2 0 1 2 2 33 2 1 1 0 1 1 24 3 2 2 1 0 2 34 3 2 2 1 2 0 15 4 3 3 2 3 1 0

A=

0 2 2 2 6 6 6 60 0 0 0 4 4 4 42 2 0 2 2 2 2 22 2 2 0 2 2 2 20 0 0 0 0 0 0 02 2 2 2 2 0 2 22 2 2 2 2 2 0 24 4 4 4 4 4 0 0

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 13 | 16

I The size of the DLR is dependent on the number of uniqueelements per row.

I Tightness of the DLR problem is dependent on the differencesbetween the elements in each row.

I A can be modified to any matrix A, where aij + aji = aij +aji .

A=

0 1 2 2 3 4 4 51 0 1 1 2 3 3 42 1 0 2 1 2 2 32 1 2 0 1 2 2 33 2 1 1 0 1 1 24 3 2 2 1 0 2 34 3 2 2 1 2 0 15 4 3 3 2 3 1 0

A=

0 2 2 2 6 6 6 60 0 0 0 4 4 4 42 2 0 2 2 2 2 22 2 2 0 2 2 2 20 0 0 0 0 0 0 02 2 2 2 2 0 2 22 2 2 2 2 2 0 24 4 4 4 4 4 0 0

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

Formulations 14 | 16

Instance Size BKS old LB DLR Time(minutes)esc32a 32 130 103 130 1964esc32b 32 168 132 168 3500esc32c 32 642 616 642 254esc32d 32 200 191 200 10esc64a 64 116 98 116 48

Table 1: Solution times when solving the instances esc32a, esc32b, esc32c, esc32d

and esc64a from the QAPLIB to global optimality

I Previously unsolved instances presented in 1990.

I Nug30 (N = 30) solved in 2001 (in 7 days) using 1000computers in parallel.

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

15 | 16

A few references

S.A. de Carvalho Jr. and S. Rahmann.Microarray layout as a quadratic assignment problem.Proceedings of the German Conference on Bioinformatics (GCB), P-83 of Lecture Notes inInformatic:11–20, 2006.

B. Eschermann and H.-J. Wunderlich.Optimized synthesis of self-testable finite state machines.In Fault-Tolerant Computing, 1990. FTCS-20. Digest of Papers., 20th InternationalSymposium, pages 390 –397, jun 1990.

Peter Hahn and Miguel Anjos.Qaplib - a quadratic assignment problem library online.University of Pennsylvania, School of Engineering and Applied Science, 2002.

T.C. Koopmans and M.J. Beckmann.Assignment problems and location of economic activities.Econometrica, 25:53–76, 1957.

Axel Nyberg and Tapio Westerlund.A new exact discrete linear reformulation of the quadratic assignment problem.European Journal of Operational Research, 220(2):314 – 319, 2012.

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University

16 | 16

The financial support from the Academy of Finland (Project 127992,Large Scale Mixed-Integer Global Optimization) is gratefullyacknowledged.

Thank you for listening!

Questions?

THE QAP

Center of Excellence in Optimization and Systems Engineering at Åbo Akademi University