For NP-completeness, use the decision version with an objective threshold. A permutation is a polynomial-size certificate, and its quadratic assignment problem cost is computable in arithmetic operations. To reduce the travelling salesman problem, let be the adjacency matrix of a directed cycle on the facility labels: , with indices cyclic, and every other entry zero. Let be the matrix of city-to-city distances. Then
which is exactly the tour length. Every tour arises from such a permutation. Hence the decision QAP is NP-complete, and finding its optimal value is NP-hard. No factor of two appears in this directed-cycle construction, even when the distance matrix is symmetric.
Fix any complete assignment . Its restriction to the facilities other than is an admissible bijection in the definition of , so
Summing this inequality over gives . Restricting to and minimizing proves
This is the Gilmore-Lawler bound. Its row minima may come from mutually incompatible assignments, so equality is not automatic. To find , fix facility one at location , delete that row and column from , and solve the residual assignment problem using the Hungarian algorithm, adding to its value.
For the supplied instance, the two residual assignment sums at each initial branch are
Use branch and bound to explore , the branch with smallest bound. Its minimizing linear assignment is . Evaluating the true ordered-pair objective gives
This supplies an incumbent of value and meets the lower bound of . Alternatively, after branching on facility two, the other leaf has row-sum bound and is pruned. The initial bounds and prune and as well, since neither can improve the incumbent. Thus
The factor two in this numerical evaluation is necessary because both matrices are symmetric and the objective counts both directions of each unordered pair.