A Brief Overview of the DNN Bound for QAP
In this post I want to sketch out the DNN bound for the quadratic assignment problem (QAP).
If you want to know more about QAP, read this. The idea is to assign facilities to locations in a way that minimizes the flow of materials between them. Here, try solving one:
I’m interested in the DNN bound because QAP is very hard to solve, and DNN is a relaxed version of QAP. When you solve DNN, you get a lower bound on the corresponding QAP. You can use that to help solve the original QAP.
DNN was proposed by Zhao, Karisch, Rendl and Wolkowicz in 1998. I have a great deal of admiration for this paper, and am honored to have met both Karisch and Wolkowicz! We will now sketch out how they derived it.
It’s going to get technical, but the idea is the following:
- Rewrite QAP by lifting it into a higher dimension to make the objective linear.
- Use a semidefinite programming relaxation to make the constraints linear.
- Solve the resulting semidefinite program to get the bound.
The point of doing all of this is that the bound is tighter than most alternatives, which helps us solve the QAP, if we can compute the bound fast enough.
Lifting QAP to get a linear objective
We will write QAP in matrix form as follows.
Here is the set of permutation matrices. is a flow matrix and a distance matrix, both symmetric, and if facility is assigned to location .
Let vec(X) be the vector formed by stacking the columns of X, so we let x = vec(X). We can rewrite the condition “X is a permutation matrix” in terms of a “lifted” matrix Y, which uses the outer product of x:
Here the entries of are indexed by pairs, , and index 0 belongs to the 1 on top.
Why would we do that? To explain, I need more notation.
- is , is the Kronecker product, is the columns of stacked, and is the vector of ones.
- is an matrix whose columns are an orthonormal basis for the nullspace of , as in PB and QPB.
Then, because and , the objective is linear in :
All we have done so far is rewrite things, but at least now we have a linear objective.
At this point, two paths diverge in a wood. In my thesis, Kurt and I did some tricks to make convex, and then considered a quadratic program with continuous variables.
Here, Zhao et al. work with Y directly and try to constrain it. Let us follow that path.
The assignment constraints, lifted
A permutation matrix X satisfies the assignment constraints, i.e. the row sums and column sums of X are 1. But we’re working with Y now.
is true exactly when for some matrix . That is the substitution behind PB and QPB. In lifted form we have with
So lies in the range of , a subspace of dimension , and every lifted permutation can be written
This implies that every column in Y satisfies the assignment constraints, scaled by that column’s entry in row 0:
Gangster zeros and nonnegativity: the DNN relaxation
Two more facts about a lifted permutation round out the picture. Both are in Zhao et al.
Gangster zeros. A location holds one facility, so for , and a facility has one location, so for . Each of these products is an entry of , so those entries are zero. Zhao et al. write for them. They call the gangster operator because it shoots holes in the matrix.
Together with the column sums, the gangster zeros say more. Take in the first sum above. The zeros remove every term but , leaving : the diagonal of equals its row 0. Column 0 gives , so the marginals form a doubly stochastic matrix.
Nonnegativity. Every entry of a lifted permutation is a product of zeros and ones, so . A matrix that is both positive semidefinite and entrywise nonnegative is called doubly nonnegative.
Now drop the one requirement that is not convex, that has rank one, and keep the rest:
Here’s what looks like:
n = 3. Y is 10 × 10. 36 of its 100 entries are forced to zero. Shown: the permutation with facility→location 1→2, 2→3, 3→1. Point at a cell to see which product it stands for.
Because vec stacks columns, the blocks of are indexed by pairs of locations. Diagonal blocks are diagonal and off-diagonal blocks have zero diagonals. The ones of any lifted permutation avoid every hole.
- The upper bound is implied by the other constraints. Oliveira, Wolkowicz and Xu keep it because it speeds up computation (as we will cover in a future post).
- Nonnegativity is what makes the relaxation strong, and what put it out of reach for two decades for big QAPs. At the matrix has about 406,000 distinct entries, each with its own sign constraint, and interior-point methods cannot carry that many inequalities.
- Povh and Rendl (2009) reach the same relaxation from a completely positive formulation of the QAP.
- At a node of the branch-and-bound tree with facilities unassigned, the subproblem is again a QAP of size . collects the interactions with the fixed assignments and there is a constant term. Everything here applies with in place of .
| Order of : | Order of : | Distinct entries of | |
|---|---|---|---|
| 12 | 145 | 122 | 10,585 |
| 20 | 401 | 362 | 80,601 |
| 30 | 901 | 842 | 406,351 |
Obtaining the DNN Bound
If you solve the semidefinite program with objective with the constraints above, you get the DNN bound.
On the QAPLIB problems Kurt and I considered, the DNN bound closes on average 89% of the gap between QPB and the optimum, and at least 61% on every problem where the computation converged. We obtain the optimum on ten of them. On the “nug” problems it is on average 1.8% below the optimum, where QPB is 10% to 17% below. This makes a big difference in a branch-and-bound context. Here’s a visual:
- QPB
- DNN
All 42 problems, with GLB, PB and SDPB1
| Problem | Optimum | GLB | PB | QPB | SDPB1 | DNN |
|---|---|---|---|---|---|---|
| esc16a | 68 | 38 | 47 | 55 | 47 | 64 |
| esc16b | 292 | 220 | 250 | 250 | 250 | 290 |
| esc16c | 160 | 83 | 95 | 95 | 95 | 154 |
| esc16d | 16 | 3 | −19 | −19 | −19 | 13 |
| esc16e | 28 | 12 | 6 | 6 | 6 | 27 |
| esc16g | 26 | 12 | 9 | 9 | 9 | 25 |
| esc16h | 996 | 625 | 708 | 708 | 708 | 977 |
| esc16i | 14 | 0 | −25 | −25 | −25 | 12 |
| esc16j | 8 | 1 | −6 | −6 | −6 | 8 |
| had12 | 1,652 | 1,536 | 1,573 | 1,592 | 1,604 | 1,652 |
| had14 | 2,724 | 2,492 | 2,609 | 2,630 | 2,651 | 2,724 |
| had16 | 3,720 | 3,358 | 3,560 | 3,595 | 3,612 | 3,720 |
| had18 | 5,358 | 4,776 | 5,104 | 5,143 | 5,174 | 5,358 |
| had20 | 6,922 | 6,166 | 6,625 | 6,677 | 6,713 | 6,922 |
| kra30a | 88,900 | 68,360 | 63,717 | 68,572 | 69,736 | – |
| kra30b | 91,420 | 69,065 | 63,818 | 69,021 | 70,324 | – |
| nug12 | 578 | 493 | 472 | 482 | 486 | 568 |
| nug14 | 1,014 | 852 | 871 | 891 | 903 | 1,011 |
| nug15 | 1,150 | 963 | 973 | 996 | 1,009 | 1,141 |
| nug16a | 1,610 | 1,314 | 1,403 | 1,448 | 1,461 | 1,600 |
| nug16b | 1,240 | 1,022 | 1,046 | 1,071 | 1,082 | 1,219 |
| nug17 | 1,732 | 1,388 | 1,487 | 1,529 | 1,548 | 1,708 |
| nug18 | 1,930 | 1,554 | 1,663 | 1,705 | 1,723 | 1,894 |
| nug20 | 2,570 | 2,057 | 2,196 | 2,254 | 2,281 | 2,507 |
| nug21 | 2,438 | 1,833 | 1,979 | 2,055 | 2,090 | 2,382 |
| nug22 | 3,596 | 2,483 | 2,966 | 3,080 | 3,140 | 3,529 |
| nug24 | 3,488 | 2,676 | 2,960 | 3,028 | 3,068 | 3,402 |
| nug25 | 3,744 | 2,869 | 3,190 | 3,272 | 3,305 | 3,626 |
| nug30 | 6,124 | 4,539 | 5,266 | 5,365 | 5,413 | 5,950 |
| rou12 | 235,528 | 202,272 | 200,024 | 206,102 | 208,685 | 235,528 |
| rou15 | 354,210 | 298,548 | 296,705 | 303,777 | 306,833 | 350,217 |
| rou20 | 725,520 | 599,948 | 597,045 | 607,822 | 615,549 | 695,181 |
| scr12 | 31,410 | 27,858 | 4,727 | 8,585 | 11,117 | 31,410 |
| scr15 | 51,140 | 44,737 | 10,355 | 12,479 | 17,046 | 51,140 |
| scr20 | 110,030 | 86,766 | 16,113 | 23,960 | 28,535 | 106,802 |
| tai12a | 224,416 | 195,918 | 193,124 | 199,597 | 203,595 | 224,416 |
| tai15a | 388,214 | 327,501 | 325,019 | 330,310 | 333,437 | 377,101 |
| tai17a | 491,812 | 412,722 | 408,910 | 416,033 | 419,619 | 476,525 |
| tai20a | 703,482 | 580,674 | 575,831 | 585,139 | 591,994 | 671,675 |
| tai25a | 1,167,256 | 962,417 | 956,657 | 983,456 | 974,004 | 1,096,657 |
| tai30a | 1,818,146 | 1,504,688 | 1,500,407 | 1,518,059 | 1,529,135 | 1,706,870 |
| tho30 | 149,936 | 90,578 | 119,254 | 124,684 | 125,972 | 143,576 |
In the illustration above we show QPB and DNN in relation to the optimum, across several QAPLIB instances. We haven’t discussed how to solve DNN yet, but the key point here is that the DNN bound reported is not fully converged because it’s costly to compute. So we are understating by a bit, but not enough to change the main narrative.
If you expand the table below the illustration, you’ll see even more details. We compare DNN with the GLB, PB, QPB and SDPB1 bounds as Kurt and I reported back in 2001. For kra30a and kra30b the DNN calculation procedure used did not converge with parameters tuned on the Nugent problems, so no value is given.
Good news: the bound is great. Bad news: solving SDPs is hard, and costly. We will consider that in a future post.