The following construction is similar to the separation algorithm for the cut polytope presented by Barahona and Mahjoub [2]. Nevertheless, we give a detailed explanation on how the separation problem for the A-odd cycle inequalities of BQP can be solved, since our extended formulation depends on the separation technique. Let \(G=(V_G,E_G)\) be the simple graph with \(V_G = N\) and \(E_G = E\).
Consider the digraph \(F=(V_F,A_F)\) with vertex set \(V_F=\{0,1\}\) and arc set \(A_F=\bigl \{(0,0),(0,1),(1,0),(1,1)\bigr \}\). The categorical graph product \(H=(V_{G\times F},A_{G\times F})\) of G and F is given by the vertex set \(V_{G\times F}=N \times \{0,1\}\) and the arc set \(A_{G\times F} = \big \{((i,r),(j,s)) | ij \in E_G \text { and } (r,s) \in A_F \big \}\).
Let us mention that, as for every arc ((i, r), (j, s)) in H the anti-parallel arc ((j, s), (i, r)) is present too, the separation algorithm would also work with an undirected graph instead of F, that has two vertices connected by an edge and a loop at both vertices. However, this does not make a difference to our extended formulation (if, for example, some variable \(f_{ij}\) is involved for edge ij, then it simultaneously produces an inequality for variable \(f_{ji}\)). Also, directed edges are better suited for network-flow formulations such as (A-OC), which will be defined later.
Now we assign arc variable \(w_{ij}^A\) to the arcs \(((i,r),(j,1-r)) \in A_{G\times F}\) and \(w_{ij}^B\) to the arcs \(((i,r),(j,r)) \in A_{G\times F}\) for all \(r \in \{0,1\}\). Figure 1 shows the structure of H for a single edge \(ij \in E_G\).
Whenever we use an \((A_{ij})\)-inequality for an edge \(ij \in E_G\), an arc with arc variable \(w_{ij}^A\) in the product graph H is used and the second index of a vertex in H changes from 0 to 1 or from 1 to 0. Otherwise, using a \((B_{ij})\)-inequality for an edge \(ij \in E_G\) corresponds to an arc with arc variable \(w_{ij}^B\) in H and the second index does not change.
Theorem 3.1
For fixed \(({\bar{x}},{\bar{X}})\), the separation problem for the A-odd cycle inequalities of BQP can be solved by computing the weight of a shortest path from (i, 0) to (i, 1) in H for every \(i \in N\). If every and hence the shortest of these paths has \({\bar{w}}\)-weight at least 1, then \(({\bar{x}},{\bar{X}})\) does not violate any A-odd cycle inequality.
Theorem 3.1 follows directly from Lemmas 3.3–3.5, that we state after the following definition.
Definition 3.2
A u–v-path/walk in G together with an assignment of arc variables, either \(w_{ij}^A\) or \(w_{ij}^B\), to every edge ij of the respective path/walk is called A-odd if the total number of assigned arc variables \(w_{ij}^A\) is odd. If the total number is even, the u–v-path/walk is called A-even.
Lemma 3.3
Let \(u,v \in V_G\) and \(r,s \in \{0,1\}\). Every (u, r)–(v, s)-walk in H corresponds to an A-odd u–v-walk in G if and only if \(r \ne s\).
Lemma 3.4
Let \(({\bar{x}},{\bar{X}})\) be fixed. The \({\bar{w}}\)-weight of a shortest A-odd cycle in G is equal to the \({\bar{w}}\)-weight of a shortest (i, 0)–(i, 1)-path in H among all \(i \in N\).
Proof
Notice first that the \({\bar{w}}\)-weight of a shortest (i, 0)–(i, 1)-path in H is equal to the \({\bar{w}}\)-weight of a shortest (i, 1)–(i, 0)-path in H because for every arc there is an anti-parallel arc of equal weight. Let P be a shortest (i, 0)–(i, 1)-path of all (i, 0)–(i, 1)-paths in H with \(i \in N\). If the first index of all vertices except (i, 0) and (i, 1), which serve as start and end point, on P is different, then there is nothing to show. Otherwise, if for some j both vertices (j, 0) and (j, 1) lie on P, the \({\bar{w}}\)-weight of the subpath between (j, 0) and (j, 1) cannot exceed the \({\bar{w}}\)-weight of P as we do not have negative arc weights. Conversely, the subpath between (j, 0) and (j, 1) cannot have less \({\bar{w}}\)-weight than P by the assumption of P being one of the shortest of all (i, 0)–(i, 1)-paths in H with \(i \in N\). Without loss of generality we can replace P by a \({\bar{w}}\)-shortest (j, 0)–(j, 1)-path with fewer arcs. Successively, we end up in the first case. \(\square \)
Lemma 3.5
Given \(({\bar{x}},{\bar{X}}) \in \text {BQP}^{LP}\). Then \(({\bar{x}},{\bar{X}})\) violates an A-odd cycle inequality if and only if there exists a path from (i, 0) to (i, 1) in H for some \(i \in N\) of \({\bar{w}}\)-weight less than 1.
Proof
Let \(E^A \ {\dot{\cup }} \ E^B\) be the edge set of a simple cycle C in G whose A-odd cycle inequality is violated by \(({\bar{x}},{\bar{X}})\). Then
$$\begin{aligned}\sum _{ij \in E^A} {\bar{w}}_{ij}^A \ \ + \sum _{ij \in E^B} {\bar{w}}_{ij}^B < 1\end{aligned}$$
by inequality (3) and because \(|E^A|\) is odd, there exists a path from (i, 0) to (i, 1), and one from (i, 1) to (i, 0), in H for all \(i \in C\) that add up the same \({\bar{w}}_{ij}^A\) and \({\bar{w}}_{ij}^B\) as given above. Thus, the weight of this path is less than 1.
For the converse, consider a path from (i, 0) to (i, 1) in H with weight less than 1. Analogously, there exists an A-odd cycle in G of equal weight. \(\square \)
Theorem 3.1 allows us to solve the separation problem for the A-odd cycle inequalities of BQP with a linear program. Ahuja et al. [1, Chapter 9.4] find a shortest s–t-path by solving a minimum cost flow problem, i.e., by sending one unit of flow from vertex s to vertex t through the network. We apply their technique of using duality to our graph H and consider for fixed \(i \in N\) the linear program
where the f-variables are indexed by two vertices in H, hence \(f_{isjt}\) is shorthand for \(f_{(i,s),(j,t)}\) and relates to a lower bound for the weight of paths from (i, s) to (j, t). Moreover, (i, 0) serves as the start vertex and (i, 1) as the target vertex of a path. Notice that we partition the inequalities into two types. Both of them bound the variables \(f_{i0js}\), and hence the weight of a shortest (i, 0)–(j, s)-path in H, from above by the weight of any (i, 0)–(j, s)-path in H where the last arc is fixed. The first type of inequalities ensures that the last arc on the path has arc weight \({\bar{w}}_{kj}^A = 2{\bar{X}}_{kj} - {\bar{x}}_k - {\bar{x}}_j + 1\) whenever \(s \ne t\) in order to arrive at vertex (j, s), i.e., when the last inequality on the path is an \((A_{kj})\)-inequality. For \(s = t\), that is, if the last inequality is a \((B_{kj})\)-inequality, we have to use arcs with arc weight \({\bar{w}}_{kj}^B=-2{\bar{X}}_{kj} + {\bar{x}}_k + {\bar{x}}_j\). Thus, the above linear program increases variable \(f_{i0i1}\) until it is equal to the weight of a shortest (i, 0)–(i, 1)-path in H and therefore it does not exceed the weight of any (i, 0)–(i, 1)-path in H. Obviously, this is also true for every variable \(f_{i0js}\) if vertex (j, s) is part of a shortest (i, 0)–(i, 1)-path.
If the objective value of a solution of this linear program is greater or equal than 1 for every \(i \in N\), then \(({\bar{x}},{\bar{X}})\) fulfills all A-odd cycle inequalities of BQP.
Using this idea, we obtain the following compact extended formulation that enforces all A-odd cycle inequalities. Notice that x and X as well as w are now variables in contrast to the separation linear program (A-OC).
Theorem 3.6
The linear system
$$\begin{aligned} f_{irir}&= 0&\forall&\ i \in N, \ r \in \{0,1\}, \end{aligned}$$
(4)
$$\begin{aligned} f_{irjs}&\le f_{ir kt} \ + \ w_{kj}^A&\forall&\ kj \in E, \ i \in N, \ r,s,t \in \{0,1\}, \ s \ne t, \end{aligned}$$
(5)
$$\begin{aligned} f_{irjs}&\le f_{ir kt} \ + \ w_{kj}^B&\forall&\ kj \in E, \ i \in N, \ r,s,t \in \{0,1\}, \ s = t, \end{aligned}$$
(6)
$$\begin{aligned} f_{i0i1}&\ge 1&\forall&\ i \in N, \end{aligned}$$
(7)
together with Eqs. (1) and (2) is an extended formulation of the (potentially exponentially many) A-odd cycle inequalities of BQP and therefore provides a relaxation for BQP.
Proof
Let \(({\bar{x}},{\bar{X}}) \in \text {BQP}^{LP}\). Then the weights \({\bar{w}}^A\) and \({\bar{w}}^B\) are explicitly given by equations (1) and (2).
We first show that if inequalities (3) are fulfilled by \(({\bar{x}},{\bar{X}})\), then for every pair (i, r) and (j, s) in \(V_{G\times F}\) there exists \({\bar{f}}_{irjs}\) such that \(({\bar{x}},{\bar{X}},{\bar{f}})\) is feasible for inequalities (4)–(7). Define \({\bar{f}}_{irjs}\) as the weight of a shortest (i, r)–(j, s)-path in H if such a path exists. Otherwise, assign a large value to \({\bar{f}}_{irjs}\). Inequalities (4) are obviously fulfilled, as shortest paths from a vertex to itself have weight 0 in digraphs where all arc weights are nonnegative. Inequalities (5) and (6) express that the weight of a shortest (i, r)–(j, s)-path cannot exceed the weight of an (i, r)–(j, s)-path where the last arc is fixed, which is always true. Finally, Lemma 3.5 ensures that inequalities (7) are fulfilled.
Conversely, let \(({\bar{x}},{\bar{X}},{\bar{f}})\) be feasible for inequalities (4)–(7). Then \({\bar{f}}_{irir}=0\) for every \(i \in N\) and \(r \in \{0,1\}\) by Eq. (4), which is equal to the weight of a shortest path from vertex (i, r) in H to itself. Consider the case \((k,t)=(i,r)\) in inequalities (5) and (6). For every \(ij \in E\), variables \(f_{irjs}\) are bounded from above by arc variables \(w_{ij}^A\) if \(r \ne s\). Moreover, variables \(f_{irjs}\) are bounded from above by arc variables \(w_{ij}^B\) if \(r=s\). Taking those cases for inequalities (5) and (6) into account, where \((k,t) \ne (i,r)\), every variable \(f_{irjs}\) is bounded from above by the weight of a shortest path from (i, r) to (j, s) in H. Thus, for every vertex pair (i, r) and (j, s) in H, the value \({\bar{f}}_{irjs}\) is lower or equal than the weight of a shortest path from (i, r) to (j, s) in H. Since \({\bar{f}}_{i0i1}\) is lower or equal than the weight of a shortest (i, 0)–(i, 1)-path in H and \({\bar{f}}_{i0i1} \ge 1\) for \(i \in N\), every shortest (i, 0)–(i, 1)-path in H has weight at least 1. This holds for every \(i \in N\) and therefore all A-odd cycle inequalities (3) are fulfilled by \(({\bar{x}},{\bar{X}})\), see Lemma 3.5. \(\square \)
Remark 3.7
The extended A-odd cycle formulation in Theorem 3.6 requires \(4n^2\) additional variables f, whereas the \(w^A\)- and \(w^B\)-defining equations can be replaced by their definition in terms of x and X. In total, \(16|E|n + n\) inequalities are added. Notice that \(f_{irir}\) for all \(i \in N\) and \(r \in \{0,1\}\) are just constant numbers and every edge \(kj \in E\) produces two inequalities for fixed \(i \in N\) and \(r,s,t \in \{0,1\}\).
The extended formulation of Boros et al. [4] includes four different inequalities for every subset \(\{i,j,k\}\) of three different vertices of N, that all involve variables \(X_{ij}\), \(X_{ik}\), and \(X_{jk}\), independent of the sparsity of Q. Each of these triangle inequalities is equivalent to one A-odd cycle inequality for a cycle of length three in a complete graph and vice versa. The number of inequalities (5) and (6) in our extended formulation depends on the cardinality of N and E. The latter represents the density of Q and hence our formulation is much more compact if Q is sparse.