The formal definition of the quadratic assignment problem is as follows:
Usually weight and distance functions are viewed as square real-valued matrices, so that the cost function is written down as:
In matrix notation:
where Π n {\displaystyle \Pi _{n}} is the set of n × n {\displaystyle n\times n} permutation matrices, W {\displaystyle W} is the weight matrix and D {\displaystyle D} is the distance matrix.
The problem is NP-hard, so there is no known algorithm for solving this problem in polynomial time, and even small instances may require long computation time. It was also proven that the problem does not have an approximation algorithm running in polynomial time for any (constant) factor, unless P = NP.2 The travelling salesman problem (TSP) may be seen as a special case of QAP if one assumes that the flows connect all facilities only along a single ring, all flows have the same non-zero (constant) value and all distances are equal to the respective distances of the TSP instance. Many other problems of standard combinatorial optimization problems may be written in this form.
In addition to the original plant location formulation, QAP is a mathematical model for the problem of placement of interconnected electronic components onto a printed circuit board or on a microchip, which is part of the place and route stage of computer aided design in the electronics industry.
The QAP has also been used to model the cost of character placement on a keyboard. In this case, the locations are keys on the keyboard and their pairwise distances correspond to the time required to press a given pair of keys. The facilities are characters and their weights are proportional to how often the given pair of characters occur in a text corpus. This type of QAP model was used in the design of the French keyboard standard (NF Z71-300).3
Koopmans TC, Beckmann M (1957). Assignment problems and the location of economic activities. Econometrica 25(1):53-76 ↩
Sahni, Sartaj; Gonzalez, Teofilo (July 1976). "P-Complete Approximation Problems". Journal of the ACM. 23 (3): 555–565. doi:10.1145/321958.321975. hdl:10338.dmlcz/103883. /wiki/Doi_(identifier) ↩
John, Maximilian; Karrenbauer, Andreas (2019). "Dynamic Sparsification for Quadratic Assignment Problems". Mathematical Optimization Theory and Operations Research (PDF). Vol. 11548. Cham: Springer International Publishing. p. 232–246. doi:10.1007/978-3-030-22629-9_17. ISBN 978-3-030-22628-2. 978-3-030-22628-2 ↩