1 Introduction

A standard quadratic program, which involves minimizing a (nonconvex) quadratic form (i.e., a homogeneous quadratic function) over the unit simplex, can be expressed as

$$\begin{aligned} \text {(StQP)} \quad \nu (Q) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\min \left\{ x^T Q x: x \in \varDelta _n\right\} , \end{aligned}$$

where \(Q \in \mathcal{S}^n\) and \(\mathcal{S}^n\) denotes the space of \(n \times n\) real symmetric matrices, and \( \varDelta _n\) denotes the unit simplex in the n-dimensional Euclidean space \(\mathbb {R}^n\), i.e.,

$$\begin{aligned} \varDelta _n {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\{x \in \mathbb {R}^n: e^T x = 1,~x \ge 0\}, \end{aligned}$$
(1)

where \(e \in \mathbb {R}^n\) is the vector of all ones.

The standard quadratic program was singled out by Bomze [3], who also described several properties of the problem. It has many application areas such as portfolio optimization [25], population genetics [21], evolutionary game theory [4], and maximum (weighted) clique problem [14, 27]. Since (StQP) contains the maximum (weighted) clique problem as a special case, the problem is, in general, NP-hard.

A standard quadratic program admits an exact reformulation as a linear optimization problem over the convex cone of completely positive matrices [6] (see Sect. 2.2). Since the cone of completely positive matrices is computationally intractable [13], replacing this conic constraint by a larger but computationally tractable convex cone immediately gives rise to a relaxation, whose optimal value yields a lower bound on that of (StQP).

In this paper, we focus on the so-called doubly nonnegative relaxation of (StQP), which arises from replacing the cone of completely positive matrices in the aforementioned reformulation by the larger cone of doubly nonnegative matrices, i.e., the cone of positive semidefinite and componentwise nonnegative matrices. In contrast with the cone of completely positive matrices, a linear optimization problem over the cone of doubly nonnegative matrices can be solved to an arbitrary accuracy in polynomial time. For a given optimization problem, a relaxation is said to be exact if the lower bound arising from that relaxation agrees with the optimal value of the original problem. Our main objective is to provide a characterization of the set of instances of (StQP) that admit an exact doubly nonnegative relaxation as well as a characterization of the set of instances for which the relaxation has a positive gap. Note that such characterizations shed light on instances of (StQP) that can be solved in polynomial time. Furthermore, they are helpful for identifying supporting hyperplanes of the feasible region of the convex conic reformulation of (StQP) that are common with those of the feasible region of the doubly nonnegative relaxation.

Our contributions in this paper are as follows.

  1. 1.

    We present a full characterization of the set of instances of (StQP) that admit an exact doubly nonnegative relaxation (see Sect. 3).

  2. 2.

    Based on this characterization, we propose a simple algorithmic recipe for generating an instance with an exact doubly nonnegative relaxation (see Sect. 3).

  3. 3.

    We explicitly identify three families of instances of (StQP) with exact doubly nonnegative relaxations (see Sect. 4).

  4. 4.

    We establish several relations between the maximal cliques of the so-called convexity graph of an instance and the tightness of the corresponding doubly nonnegative relaxation (see Sect. 5).

  5. 5.

    We present an algebraic characterization of the set of instances of (StQP) for which the doubly nonnegative relaxation has a positive gap (see Sect. 6).

  6. 6.

    By using this characterization, we propose a procedure for generating an instance of (StQP) with a positive relaxation gap (see Sect. 6).

This paper is organized as follows. We briefly review the related literature in Sect. 1.1 and define our notation in Sect. 1.2. In Sect. 2, we review several known results and present the convex conic reformulation as well as the doubly nonnegative relaxation. Section 3 is devoted to the characterization of instances of (StQP) with an exact doubly nonnegative relaxation. Using this characterization, we also describe a procedure for generating an instance with an exact relaxation. In Sect. 4, we identify three families of instances of (StQP) that admit an exact relaxation by relying on the characterization in Sect. 3. We define the convexity graph and establish several relations between the maximal cliques of this graph and the exactness of the doubly nonnegative relaxation in Sect. 5. In particular, we identify a sufficient condition that can be used to find an instance of (StQP) with an exact relaxation that is not covered by any of the three families in Sect. 4. Section 6 presents an algebraic characterization of the instances of (StQP) with a positive relaxation gap and a procedure for generating such an instance. Finally, we conclude the paper in Sect. 7.

1.1 Literature review

We briefly review the related literature. A standard quadratic program can be equivalently formulated as a linear optimization problem over the cone of completely positive matrices, i.e., a copositive program [6]. Despite the fact that solving this conic reformulation remains NP-hard, it offers a fresh perspective for developing tractable approximations of (StQP) by instead focusing on tractable approximations of the cone of completely positive matrices. Relying on sum-of-squares decomposition, Parrilo [29] proposed an approximation hierarchy, i.e., a sequence of nested convex cones that provide increasingly better inner approximations of the dual cone of copositive matrices, which, by duality, yields a sequence of increasingly better outer approximations of the cone of completely positive matrices. Since each of these cones can be represented by linear matrix inequalities, a linear optimization over each cone can be cast as a semidefinite program and can therefore be solved in polynomial time. In fact, the dual of the first cone in this hierarchy is precisely the cone of doubly nonnegative matrices. By exploiting weaker conditions, de Klerk and Pasechnik [10] proposed a sequence of polyhedral cones that yield increasingly better outer approximations of the cone of completely positive matrices. For other inner and outer approximations, we refer the reader to [7, 15, 22, 30, 36].

By combining the approximations of (StQP) arising from the polyhedral approximation hierarchy of [10] with a simple search on a finite grid on the unit simplex, Bomze and de Klerk [5] established a polynomial-time approximation scheme for (StQP). In [36], the second author of this paper proposed an inner polyhedral approximation hierarchy for the cone of completely positive matrices and tightened the error bound of [5], which was used to establish the polynomial-time approximation scheme. The resulting error bound also translates directly into an error bound on the gap between the optimal value of (StQP) and that of the doubly nonnegative relaxation since the hierarchy of Parrilo [29] is stronger than that of [10]. Sağol and Yıldırım [32] studied the behavior of inner and outer polyhedral approximation hierarchies of [10] and [36] on standard quadratic programs. They presented algebraic characterizations of instances of (StQP) with exact inner and/or outer approximations at each level of these hierarchies and established several properties of such instances. In this paper, we aim to establish similar characterizations and properties of the set of instances of (StQP) that admit exact doubly nonnegative relaxations as well as those with a positive relaxation gap. Therefore, our focus in this paper is similar to that of [32].

Very recently, Kim et al. [20] studied the doubly nonnegative relaxations of general copositive programs. Under the assumption that the correlative and sparsity patterns of the data matrices form a block-clique graph, they established the exactness of the doubly nonnegative relaxations. In particular, their results imply that the doubly nonnegative relaxation of any convex quadratically constrained quadratic program is exact. We note that the correlative and sparsity patterns of the data matrices of the copositive formulation of (StQP) form a complete graph, which is, indeed, a block-clique graph. On the other hand, the exactness of the doubly nonnegative relaxation in [20] is established under the additional assumption that the size of each clique is at most four, which is only satisfied for the doubly nonnegative relaxation of instances of (StQP) with \(n \le 4\). However, for such instances, it is already known that the doubly nonnegative relaxation is exact (see Sect. 2). Therefore, our results in this paper are not implied by the results in [20].

1.2 Notation

We use \(\mathbb {R}^n, \mathbb {R}^n_+, \mathbb {R}^n_{++}\), \(\mathbb {R}^{m \times n}\), and \(\mathcal{S}^n\) to denote the n-dimensional Euclidean space, the nonnegative orthant, the positive orthant, the set of \(m \times n\) real matrices, and the space of \(n \times n\) real symmetric matrices, respectively. The unit simplex in \(\mathbb {R}^n\), given by (1), is denoted by \(\varDelta _n\). We reserve e and \(e_j\) for the vector of all ones and the jth unit vector, respectively. The matrix of all ones is denoted by \(E {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,ee^T\) and I denotes the identity matrix. The dimensions of e, \(e_j\), E, and I will always be clear from the context. We use 0 to denote the real number zero, the vector of all zeroes, as well as the matrix of all zeroes. We use calligraphic letters to denote the subsets of \(\mathcal{S}^n\). We use uppercase boldface Roman or uppercase Greek letters to denote the subsets of \(\mathbb {R}^n\). We use uppercase letters both for matrices and index sets, and lower case letters to denote vectors, dimensions, and indices of vectors and matrices. Scalars will be denoted by lowercase Greek letters, with the exception of \(\ell (Q)\) that denotes the lower bound arising from the doubly nonnegative relaxation. For an index set \(A \subseteq \{1,\ldots ,n\}\), we denote by |A| the cardinality of A. For \(x \in \mathbb {R}^n\), \(Q \in \mathcal{S}^n\), \(A \subseteq \{1,\ldots ,n\}\), and \(B \subseteq \{1,\ldots ,n\}\), we denote by \(x_A \in \mathbb {R}^{|A|}\) the subvector of x restricted to the indices in A and by \(Q_{AB}\) the submatrix of Q whose rows and columns are indexed by A and B, respectively. Therefore, \(Q_{AA}\) denotes a principal submatrix of Q. We use the simplified notations \(x_j\) and \(Q_{ij}\) for singleton index sets. For \(v \in \mathbb {R}^n\), \(v^\perp \) denotes the orthogonal complement of v. For any \(U \in \mathbb {R}^{m \times n}\) and \(V \in \mathbb {R}^{m \times n}\), the trace inner product is denoted by

$$\begin{aligned} \langle U, V \rangle {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\sum \limits _{i=1}^m \sum \limits _{j = 1}^n U_{ij} V_{ij}. \end{aligned}$$

For an instance of (StQP) with \(Q \in \mathcal{S}^n\), we denote by \(\nu (Q)\) the optimal value, and the set of optimal solutions is denoted by

$$\begin{aligned} \varOmega (Q) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\{x \in \varDelta _n: x^T Q x = \nu (Q)\}. \end{aligned}$$

For a given \(x \in \varDelta _n\), we define the following index sets corresponding to the positive and zero entries of x, respectively:

$$\begin{aligned} A(x)&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ j \in \{1,\ldots ,n\}: x_j > 0 \right\} , \end{aligned}$$
(2)
$$\begin{aligned} Z(x)&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ j \in \{1,\ldots ,n\}: x_j = 0 \right\} . \end{aligned}$$
(3)

2 Preliminaries

In this section, we review several known results from the literature and present the copositive formulation of a standard quadratic program as well as the doubly nonnegative relaxation.

2.1 Convex cones

We define the following cones in \(\mathcal{S}^n\):

$$\begin{aligned} \mathcal{N}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ M \in \mathcal{S}^n: M_{ij} \ge 0, \quad i = 1,\ldots ,n;~j = 1,\ldots ,n\right\} , \\ \mathcal{PSD}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ M \in \mathcal{S}^n: u^T M u \ge 0, \quad {\text {for all}}~ u \in \mathbb {R}^n \right\} , \\ \mathcal{COP}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ M \in \mathcal{S}^n: u^T M u \ge 0, \quad {\text {for all}}~ u \in \mathbb {R}^n_+ \right\} , \\ \mathcal{CP}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ M \in \mathcal{S}^n: M = \sum \limits _{k=1}^r b^k (b^k)^T, \text { for some}~b^k \in \mathbb {R}^n_+,~k = 1,\ldots ,r\right\} , \\ \mathcal{DN}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\mathcal{PSD}^n \cap \mathcal{N}^n, \\ \mathcal{SPN}^n&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ M \in \mathcal{S}^n: M = M_1 + M_2, \text { for some}~M_1 \in \mathcal{PSD}^n,~M_2 \in \mathcal{N}^n\right\} , \end{aligned}$$

namely, \(\mathcal{N}^n\) is the cone of componentwise nonnegative matrices, \(\mathcal{PSD}^n\) is the cone of positive semidefinite matrices, \(\mathcal{COP}^n\) is the cone of copositive matrices, \(\mathcal{CP}^n\) is the cone of completely positive matrices, \(\mathcal{DN}^n\) is the cone of doubly nonnegative matrices, and \(\mathcal{SPN}^n\) is the cone of SPN matrices, i.e., the cone of matrices that can be decomposed into the sum of a positive semidefinite and a componentwise nonnegative matrix. Each of these cones is closed, convex, full-dimensional, and pointed, and the following set of inclusion relations is satisfied:

$$\begin{aligned} \mathcal{CP}^n \subseteq \mathcal{DN}^n \subseteq \left\{ \begin{array}{c} \mathcal{N}^n \\ \mathcal{PSD}^n \end{array} \right\} \subseteq \mathcal{SPN}^n \subseteq \mathcal{COP}^n. \end{aligned}$$
(4)

By [11],

$$\begin{aligned} \mathcal{CP}^n = \mathcal{DN}^n, \quad \text {and} \quad \mathcal{SPN}^n = \mathcal{COP}^n \quad \text {if and only if} \quad n \le 4. \end{aligned}$$
(5)

For \(n \ge 5\), checking membership is NP-hard for both \(\mathcal{CP}^n\) [13] and \(\mathcal{COP}^n\) [28]. Each of the remaining four cones is tractable in the sense that they admit polynomial-time membership oracles.

The following lemma collects several known results that will be useful throughout the paper. The proofs follow directly from the definitions of the cones and are therefore omitted.

Lemma 1

Let \(\mathcal{K}^n \in \left\{ \mathcal{CP}^n, \mathcal{DN}^n, \mathcal{N}^n, \mathcal{PSD}^n, \mathcal{SPN}^n, \mathcal{COP}^n\right\} \). Then, the following relations are satisfied:

  1. (i)

    If \(U \in \mathcal{K}^n\), then \(U_{kk} \ge 0,~k = 1,\ldots ,n\).

  2. (ii)

    \(U \in \mathcal{K}^n\) if and only if \(J^T U J \in \mathcal{K}^n\), where \(J \in \mathbb {R}^{n \times n}\) is a permutation matrix.

  3. (iii)

    \(U \in \mathcal{K}^n\) if and only if \(D U D \in \mathcal{K}^n\), where \(D \in \mathcal{S}^n\) is a diagonal matrix with positive diagonal entries.

  4. (iv)

    If \(U \in \mathcal{K}^n\), then every principal \(r \times r\) submatrix of U is in \(\mathcal{K}^r\), \(r = 1,\ldots ,n\).

  5. (v)

    If \(U_1 \in \mathcal{K}^n\) and \(U_2 \in \mathcal{K}^m\), then

    $$\begin{aligned} U_1 \oplus U_2 {{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,} \begin{bmatrix} U_1 &{}\quad 0 \\ 0 &{}\quad U_2 \end{bmatrix} \in \mathcal{K}^{n+m}. \end{aligned}$$

    In particular, \(U_2 = 0\) can be chosen.

2.2 Copositive formulation and doubly nonnegative relaxation

(StQP) can be formulated as a copositive program [6], i.e., a linear optimization problem over an affine subset of the convex cone of completely positive matrices:

$$\begin{aligned} \text {(CP)} \quad \nu (Q) = \min \{{\langle }Q, X {\rangle }: {\langle }E, X {\rangle }= 1, \quad X \in \mathcal{CP}^n\}, \end{aligned}$$

where \(X \in \mathcal{S}^n\) is the decision variable.

By (4), we can replace the intractable conic constraint \(X \in \mathcal{CP}^n\) by \(X \in \mathcal{DN}^n\) and obtain a relaxation of (CP), or, equivalently, a relaxation of (StQP):

$$\begin{aligned} \text {(DN-P)} \quad \ell (Q) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\min \left\{ \langle Q, X \rangle : \langle E, X \rangle = 1, \quad X \in \mathcal{DN}^n \right\} . \end{aligned}$$

(DN-P) is referred to as the doubly nonnegative relaxation of (StQP). The Lagrangian dual problem of (DN-P) is given by

$$\begin{aligned} \text {(DN-D)} \quad \ell (Q) = \max \left\{ \sigma : \sigma E + S = Q, \quad S \in \mathcal{SPN}^n \right\} , \end{aligned}$$

where \(\sigma \in \mathbb {R}\) and \(S \in \mathcal{S}^n\) are the decision variables. It is well-known that both (DN-P) and (DN-D) satisfy the Slater’s condition, which implies that strong duality is satisfied, and that optimal solutions are attained in both (DN-P) and (DN-D).

For all \(Q \in \mathcal{S}^n\), we have

$$\begin{aligned} \ell (Q) \le \nu (Q), \end{aligned}$$
(6)

since \(\mathcal{CP}^n \subseteq \mathcal{DN}^n\). For \(n \le 4\), we have \(\ell (Q) = \nu (Q)\) by (5). For \(n \ge 5\), we are interested in the characterization of instances of (StQP) for which \(\ell (Q) = \nu (Q)\) as well as those with \(\ell (Q) < \nu (Q)\).

The following lemma presents a simple shift invariance property that will be useful throughout the remainder of the paper.

Lemma 2

For any \(Q \in \mathcal{S}^n\) and any \(\lambda \in \mathbb {R}\),

$$\begin{aligned} \nu (Q + \lambda E)= & {} \nu (Q) + \lambda , \end{aligned}$$
(7)
$$\begin{aligned} \ell (Q + \lambda E)= & {} \ell (Q) + \lambda . \end{aligned}$$
(8)

Furthermore, \(\varOmega (Q) = \varOmega (Q + \lambda E)\).

Proof

The relations (7) and (8) immediately follow from the formulations (CP) and (DN-P), respectively, since \(\langle Q + \lambda E, X \rangle = \langle Q, X \rangle + \lambda \langle E, X \rangle = \langle Q, X \rangle + \lambda \) for any \(X \in \mathcal{S}^n\) such that \(\langle E, X \rangle = 1\). The last assertion directly follows from the observation that

$$\begin{aligned} x^T(Q + \lambda E) x = x^TQ x + \lambda x^T E x = x^T Q x + \lambda (e^T x)^2 = x^T Q x + \lambda \end{aligned}$$

for any \(\lambda \in \mathbb {R}\) and \(x \in \varDelta _n\). \(\square \)

By Lemma 2, if \(\ell (Q) = \nu (Q)\) for a given \(Q \in \mathcal{S}^n\), note that \(\ell (Q + \lambda E) = \nu (Q + \lambda E)\) for any \(\lambda \in \mathbb {R}\). We will repeatedly use this observation in the remainder of the manuscript.

2.3 Local optimality conditions

In this section, we review the local optimality conditions of (StQP).

Given an instance of (StQP), \(x \in \mathbb {R}^n\) is a local minimizer if and only if there exists \(s \in \mathbb {R}^n\) such that the following conditions are satisfied (see, e.g., [19, 24]):

$$\begin{aligned} Q x - \left( x^T Q x \right) e - s= & {} 0, \end{aligned}$$
(9)
$$\begin{aligned} e^T x= & {} 1, \end{aligned}$$
(10)
$$\begin{aligned} x\in & {} \mathbb {R}^n_+, \end{aligned}$$
(11)
$$\begin{aligned} s\in & {} \mathbb {R}^n_+, \end{aligned}$$
(12)
$$\begin{aligned} x_j s_j= & {} 0, \quad j = 1,\ldots ,n, \end{aligned}$$
(13)
$$\begin{aligned} d^T Q d\ge & {} 0, \quad \text {for all}~d \in \mathbf {D}(x), \end{aligned}$$
(14)

where \(\mathbf {D}(x)\) consists of all feasible directions at x that are orthogonal to the gradient of the objective function at x, and is given by

$$\begin{aligned} \mathbf {D}(x) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ d \in \mathbb {R}^n: e^T d = 0, \quad d^T Q x = 0, \quad d_j \ge 0, \quad \text {for all} ~j \in Z(x)\right\} , \end{aligned}$$

and Z(x) is given by (3). We remark that the Lagrange multipliers \(\mu \in \mathbb {R}\) and \(s \in \mathbb {R}^n\) corresponding to the constraints \(e^T x = 1\) and \(x \ge 0\), respectively, are both scaled by 1/2 and the former is replaced by \(x^T Q x\) in (9) by using (10) and (13).

Note that (9) – (13) are the KKT conditions and any \(x \in \varDelta _n\) that satisfies these conditions is said to be a KKT point. For any KKT point \(x \in \mathbb {R}^n\), (14) captures the second order optimality conditions. Note that

$$\begin{aligned} \mathbf {D}(x) \subseteq \left\{ d \in \mathbb {R}^n: e^T d = 0 \right\} . \end{aligned}$$
(15)

2.4 Global optimality conditions

First, we note that the membership problem in \(\mathcal{COP}^n\) can be cast in the form of (StQP) since \(Q \in \mathcal{COP}^n\) if and only if \(\nu (Q) \ge 0\). The following theorem establishes that checking the global optimality condition in (StQP) conversely reduces to a membership problem in \(\mathcal{COP}^n\). We include a short proof for the sake of completeness.

Theorem 1

(Bomze 1992) Let \(Q \in \mathcal{S}^n\) and let \(x^* \in \varDelta _n\). Then,

$$\begin{aligned} x^* \in \varOmega (Q) \quad \text {if and only if} \quad Q - \left( (x^*)^T Q x^* \right) E \in \mathcal{COP}^n. \end{aligned}$$

Proof

Let \(x^* \in \varOmega (Q)\). Consider \(Q^\prime {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \left( (x^*)^T Q x^* \right) E \in \mathcal{S}^n\). Then, by Lemma 2,

$$\begin{aligned} \nu (Q^\prime ) = \nu \left( Q - \left( (x^*)^T Q x^* \right) E \right) = \nu (Q) - \left( (x^*)^T Q x^* \right) = \nu (Q) - \nu (Q) = 0, \end{aligned}$$

which implies that \(Q^\prime \in \mathcal{COP}^n\).

Conversely, suppose that \({Q^\prime = } \, Q - \left( (x^*)^T Q x^* \right) E \in \mathcal{COP}^n\). Then, for any \(x \in \varDelta _n\), by using \(x^T E x = (e^Tx)^2 = 1\), we obtain

$$\begin{aligned} {x^T Q^\prime x = } \, x^T \left( Q - \left( (x^*)^T Q x^* \right) E \right) x = x^T Q x - (x^*)^T Q x^* \ge 0, \end{aligned}$$

which implies that \(\nu (Q) = (x^*)^T Q x^*\), i.e., \(x^* \in \varOmega (Q)\). \(\square \)

3 Standard quadratic programs with exact doubly nonnegative relaxations

In this section, we focus on the set of instances of (StQP) which admit an exact doubly nonnegative relaxation. To that end, let us define

$$\begin{aligned} \mathcal{Q}^n {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ Q \in \mathcal{S}^n: \ell (Q) = \nu (Q) \right\} . \end{aligned}$$
(16)

We will present alternative characterizations of \(\mathcal{Q}^n\). These characterizations will subsequently be used for identifying several sufficient conditions for membership in \(\mathcal{Q}^n\).

First, given \(x \in \varDelta _n\), we denote by \(\mathcal{S}_x\) the set that consists of all matrices \(Q \in \mathcal{S}^n\) for which \(x \in \varDelta _n\) is an optimal solution of the corresponding (StQP) instance, i.e.,

$$\begin{aligned} \mathcal{S}_x {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ Q \in \mathcal{S}^n: x \in \varOmega (Q)\right\} = \left\{ Q \in \mathcal{S}^n: Q - \left( x^T Q x \right) E \in \mathcal{COP}^n \right\} . \end{aligned}$$
(17)

Note that the second equality in (17) is a consequence of Theorem 1.

Let us define the following line in \(\mathcal{S}^n\), which will frequently arise in the remainder of the paper:

$$\begin{aligned} \mathcal{L}{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ \lambda E: \lambda \in \mathbb {R}\right\} . \end{aligned}$$
(18)

For each \(x \in \varDelta _n\), it is easy to verify that \(\mathcal{S}_x\) is a closed and convex cone in \(\mathcal{S}^n\) and

$$\begin{aligned} \mathcal{L}\subseteq \mathcal{S}_x, \quad \text {for {all}}~x \in \varDelta _n. \end{aligned}$$

Furthermore,

$$\begin{aligned} \bigcup \limits _{x \in \varDelta _n} \mathcal{S}_x = \mathcal{S}^n. \end{aligned}$$
(19)

Next, we focus on the characterization of the set of matrices in \(\mathcal{S}_x\) that admit an exact doubly nonnegative relaxation, i.e.,

$$\begin{aligned} \mathcal{Q}_x {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\mathcal{S}_x \cap \mathcal{Q}^n = \left\{ Q \in \mathcal{S}^n: x \in \varOmega (Q), \quad \ell (Q) = \nu (Q)\right\} . \end{aligned}$$
(20)

The following lemma presents a complete characterization of \(\mathcal{Q}_x\).

Lemma 3

For any \(x \in \varDelta _n\),

$$\begin{aligned} \mathcal{Q}_x = \left\{ Q \in \mathcal{S}^n: Q - \left( x^T Q x \right) E \in \mathcal{SPN}^n \right\} . \end{aligned}$$
(21)

Proof

We prove the relation (21) by showing that each set is a subset of the other one. Let \(x \in \varDelta _n\) and let \(Q \in \mathcal{Q}_x\). By (20), \(Q \in \mathcal{S}_x\) and \(Q \in \mathcal{Q}^n\), i.e., \(\ell (Q) = \nu (Q) = x^T Q x\). Then, since optimal solutions are attained in (DN-D), there exists \(S^* \in \mathcal{SPN}^n\) such that \(\nu (Q)E + S^* = Q\), which implies that \(Q - \nu (Q) E = Q - \left( x^T Q x \right) E \in \mathcal{SPN}^n\).

Conversely, for a given \(x \in \varDelta _n\), if \(Q - \left( x^T Q x \right) E \in \mathcal{SPN}^n\), then \(Q \in \mathcal{S}_x\) by (4) and (17), and \(\nu (Q) = x^T Q x\). Furthermore, let \(\sigma {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,x^T Q x\) and \(S {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \sigma E\). Then, \((\sigma ,S)\) is a feasible solution of (DN-D), which implies that \(\ell (Q) \ge x^T Q x = \nu (Q)\) since (DN-D) is a maximization problem. Combining this inequality with (6), we obtain \(\ell (Q) = \nu (Q)\), i.e., \(Q \in \mathcal{Q}^n\). We therefore obtain \(Q \in \mathcal{Q}_x\). \(\square \)

By Lemma 3, for any \(x \in \varDelta _n\) and \(Q \in \mathcal{S}^n\), one can check if \(Q \in \mathcal{Q}_x\) in polynomial time by solving a semidefinite program. Similar to \(\mathcal{S}_x\), it is easy to verify that \(\mathcal{Q}_x\) is a closed convex cone and

$$\begin{aligned} \mathcal{L}\subseteq \mathcal{Q}_x, \quad \text {for {all}}~x \in \varDelta _n, \end{aligned}$$
(22)

where \(\mathcal{L}\) is given by (18).

Next, for a given \(x \in \varDelta _n\), we aim to present an alternative and more useful characterization of \(\mathcal{Q}_x\) that would enable us to construct a matrix \(Q \in \mathcal{Q}_x\). To that end, for each \(x \in \varDelta _n\), we identify the following subsets, which will be the building blocks for the set \(\mathcal{Q}_x\):

$$\begin{aligned} \mathcal{P}_x&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ P \in \mathcal{PSD}^n: x^T P x = 0\right\} = \left\{ P \in \mathcal{PSD}^n: P x = 0\right\} , \end{aligned}$$
(23)
$$\begin{aligned} \mathcal{N}_x&{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,&\left\{ N \in \mathcal{N}^n: x^T N x = 0 \right\} = \left\{ N \in \mathcal{N}^n: N_{ij} = 0,~{\{i, j\}} \subseteq {A}(x)\right\} , \end{aligned}$$
(24)

where A(x) is defined as in (2).

For each \(x \in \varDelta _n\), note that \(\mathcal{P}_x\) is a face of \(\mathcal{PSD}^n\) and \(\mathcal{N}_x\) is a polyhedral cone in \(\mathcal{N}^n\). Furthermore, for each \(P \in \mathcal{P}_x\) and for each \(N \in \mathcal{N}_x\), we have \(P - (x^T P x) E = P \in \mathcal{SPN}^n\) and \(N - (x^T N x) E = N \in \mathcal{SPN}^n\) by (4). By Lemma 3, we therefore obtain

$$\begin{aligned} \mathcal{P}_x + \mathcal{N}_x \subseteq \mathcal{Q}_x \subseteq \mathcal{S}_x, \quad \text {for {all}}~x \in \varDelta _n. \end{aligned}$$
(25)

The next proposition presents a complete characterization of \(\mathcal{Q}_x\) by establishing a useful relation between \(\mathcal{Q}_x\) and the sets \(\mathcal{N}_x\) and \(\mathcal{P}_x\).

Proposition 1

For each \(x \in \varDelta _n\),

$$\begin{aligned} \mathcal{Q}_x = \mathcal{P}_x + \mathcal{N}_x + \mathcal{L}, \end{aligned}$$
(26)

where \(\mathcal{P}_x\), \(\mathcal{N}_x\), and \(\mathcal{L}\) are defined as in (23), (24), and (18), respectively. Furthermore, for any decomposition of \(Q \in \mathcal{Q}_x\) given by \(Q = P + N + \lambda E\), where \(P \in \mathcal{P}_x\), \(N \in \mathcal{N}_x\), and \(\lambda \in \mathbb {R}\), we have \(\lambda = x^T Q x = \ell (Q) = \nu (Q)\).

Proof

Let \(x \in \varDelta _n\) and \(Q \in \mathcal{Q}_x\). Then, by Lemma 3,

$$\begin{aligned} Q - \left( x^T Q x \right) E = P + N, \end{aligned}$$

where \(P \in \mathcal{PSD}^n\) and \(N \in \mathcal{N}^n\). Therefore, using \(x^T E x = (e^T x)^2 = 1\), we get

$$\begin{aligned} 0 = x^T Q x - \left( x^T Q x \right) \left( x^T E x \right) = x^T P x + x^T N x, \end{aligned}$$

which implies that \(x^T P x = x^T N x = 0\) since both terms are nonnegative. Therefore, we obtain

$$\begin{aligned} Q = P + N + \left( x^T Q x \right) E, \end{aligned}$$

where \(P \in \mathcal{P}_x\) and \(N \in \mathcal{N}_x\). It follows that \(Q \in \mathcal{P}_x + \mathcal{N}_x + \mathcal{L}\).

Conversely, since \(\mathcal{P}_x + \mathcal{N}_x \subseteq \mathcal{Q}_x\) by (25), \(\mathcal{L}\subseteq \mathcal{Q}_x\) by (22), and \(\mathcal{Q}_x\) is a convex cone, it follows that \(\mathcal{P}_x + \mathcal{N}_x + \mathcal{L}\subseteq \mathcal{Q}_x\), which establishes (26).

For the last assertion, let \(Q \in \mathcal{Q}_x\) be decomposed as \(Q = P + N + \lambda E\), where \(P \in \mathcal{P}_x\), \(N \in \mathcal{N}_x\), and \(\lambda \in \mathbb {R}\). Then, \(x^T Q x = x^T P x + x^T N x + \lambda \), which implies that \(x^T Q x = \lambda \). Since \(Q \in \mathcal{Q}^n\) and \(\mathcal{Q}_x \subseteq \mathcal{S}_x\), we obtain \(\lambda = x^T Q x = \ell (Q) = \nu (Q)\). \(\square \)

We remark that Proposition 1 gives a complete characterization of \(\mathcal{Q}_x\) for each \(x \in \varDelta _n\). In addition, it gives a recipe to construct a matrix in \(\mathcal{Q}_x\). Indeed, for any \(x \in \varDelta _n\), one simply needs to generate two matrices \(P \in \mathcal{P}_x\), \(N \in \mathcal{N}_x\), a real number \(\lambda \), and define \(Q {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,P + N + \lambda E\). By Proposition 1, this is necessary and sufficient to ensure that \(Q \in \mathcal{Q}_x\) with \(\ell (Q) = \nu (Q) = \lambda \).

Note that a matrix \(P \in \mathcal{P}_x\) can easily be generated by choosing a matrix \(B \in \mathbb {R}^{n \times (n-1)}\) whose columns form a basis for \(x^\perp \), and defining \(P = B V B^T\), where \(V \in \mathcal{PSD}^{n-1}\). Alternatively, the following discussion illustrates that there is an even simpler procedure to generate such a matrix \(P \in \mathcal{P}_x\), without having to compute a basis for \(x^\perp \). To that end, we present a technical result first.

Lemma 4

For any two vectors \(u \in \mathbb {R}^n\) and \(v \in \mathbb {R}^n\) such that \(u^T v = 1\), we have

$$\begin{aligned} \mathbf {R}(I - uv^T) = v^\perp , \end{aligned}$$
(27)

where \(\mathbf {R}(\cdot )\) denotes the range space.

Proof

Let \(w \in \mathbf {R}(I - uv^T)\). Then, there exists \(z \in \mathbb {R}^n\) such that \(w = (I - u v^T) z = z - (v^T z) u\). Therefore, \(v^T w = v^T z - (v^T z) (v^T u) = v^T z - v^T z = 0\), which implies that \(w \in v^\perp \).

Conversely, if \(w \in v^\perp \), then \((I - u v^T) w = w - (v^T w) u = w\), which implies that \(w \in \mathbf {R}(I - uv^T)\), establishing (27). \(\square \)

Using Lemma 4, we can present a simpler characterization of \(\mathcal{P}_x\).

Lemma 5

For each \(x \in \varDelta _n\), the following identity holds:

$$\begin{aligned} \mathcal{P}_x = \left\{ P \in \mathcal{S}^n: P = \left( I - e x^T \right) K \left( I - x e^T \right) \text { for some } K \in \mathcal{PSD}^{n}\right\} , \end{aligned}$$

where \(\mathcal{P}_x\) is given by (23).

Proof

Suppose that \(P \in \mathcal{P}_x\). Then, \(P \in \mathcal{PSD}^n\) and \(x^T P x = 0\). Since \(P \in \mathcal{PSD}^n\), there exists a matrix \(L \in \mathbb {R}^{n \times n}\) such that \(P = L L^T\). It follows that \(L^T x = 0\), which implies that each column of L belongs to \(x^\perp \). Since \(e^T x = 1\), it follows from Lemma 4 that there exists a matrix \(W \in {\mathbb {R}^{n \times n}}\) such that \(L = \left( I - e x^T \right) W\). Therefore, \(P = L L^T = \left( I - e x^T \right) W W^T \left( I - x e^T \right) = \left( I - e x^T \right) K \left( I - x e^T \right) \), where \(K = W W^T \in \mathcal{PSD}^{n}\).

Conversely, if \(P = \left( I - e x^T \right) K \left( I - x e^T \right) \) for some \(K \in \mathcal{PSD}^{n}\), then we clearly have \(P \in \mathcal{PSD}^n\) and \(x^T P x = 0\), which implies that \(P \in \mathcal{P}_x\). \(\square \)

By Lemma 5, for a given \(x \in \varDelta _n\), in order to ensure that \(P \in \mathcal{P}_x\), it is necessary and sufficient to generate a matrix \(K \in \mathcal{PSD}^{n}\) and define \(P {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left( I - ex^T \right) K \left( I - xe^T \right) \).

The following corollary is an immediate consequence of Proposition 1, (20), and (19).

Corollary 1

The following relation is satisfied:

$$\begin{aligned} \mathcal{Q}^n = \bigcup \limits _{x \in \varDelta _n} \mathcal{Q}_x = \bigcup \limits _{x \in \varDelta _n} \left( \mathcal{P}_x + \mathcal{N}_x + \mathcal{L}\right) , \end{aligned}$$

where \(\mathcal{Q}_x\), \(\mathcal{P}_x\), \(\mathcal{N}_x\), and \(\mathcal{L}\) are given by (20), (23), (24), and (18), respectively.

By Lemma 3, for any positive integer n, any \(x \in \varDelta _n\), and any \(Q \in \mathcal{S}^n\), one can check if \(Q \in \mathcal{Q}_x\) in polynomial time. Recall, by (4) and (5), that \(\mathcal{SPN}^n \subseteq \mathcal{COP}^n\) for each n, and \(\mathcal{COP}^n = \mathcal{SPN}^n\) if and only if \(n \le 4\). By (17) and Lemma 3, we obtain

$$\begin{aligned} \mathcal{S}_x = \mathcal{Q}_x, \quad \text {for all }n \le 4, \quad \text {for all }x \in \varDelta _n. \end{aligned}$$

It follows that, for each \(n \le 4\) and each \(x \in \varDelta _n\), the membership problem for \(\mathcal{S}_x\) can be solved in polynomial time. In contrast, checking if \(Q \in \mathcal{S}_x\) is, in general, NP-hard for \(n \ge 5\). Furthermore, a complete characterization of the matrices in \(\mathcal{S}_x \backslash \mathcal{Q}_x\) requires a full understanding of the set \(\mathcal{COP}^n \backslash \mathcal{SPN}^n\) for \(n \ge 5\). While the set of extreme rays of \(\mathcal{COP}^n \backslash \mathcal{SPN}^n\) has recently been completely characterized for \(n = 5\) in [18] and \(n = 6\) in [1], the problem still remains open in higher dimensions.

In the remainder of this section, we focus on the case \(n \ge 5\). We identify several conditions on \(x \in \varDelta _n\) such that the set \(\mathcal{S}_x\) admits a simple characterization.

To that end, we first recall that the boundary of \(\mathcal{COP}^n\) is given by

$$\begin{aligned} \mathbf {bd} ~\mathcal{COP}^n = \left\{ M \in \mathcal{COP}^n: \exists ~u \in \varDelta _n \text { s.t. } u^T M u = 0 \right\} , \end{aligned}$$
(28)

where \(\mathbf {bd}\) denotes the boundary of a set.

For a copositive matrix \(M \in \mathbf {bd} ~\mathcal{COP}^n\), the set of zeros of M is given by

$$\begin{aligned} \mathbf {V}^M {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ u \in \varDelta _n: u^T M u = 0\right\} . \end{aligned}$$
(29)

We start with the following simple lemma. We remark that these results can be found in, e.g.,  [2, 11, 12]. For the sake of completeness, we present alternate proofs by relying on the optimality conditions of (StQP).

Lemma 6

Let \(Q \in \mathcal{S}^n\) and let \(x^* \in \varOmega (Q)\). Let \(M {{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,} Q - \left( (x^*)^T Q x^* \right) E \in \mathcal{S}^n\), \(A {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,A(x^*)\) and \(Z {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Z(x^*)\), where \(A(\cdot )\) and \(Z(\cdot )\) are defined as in (2) and (3), respectively. Then,

  1. (i)

    \(M \in \mathbf {bd} ~\mathcal{COP}^n\);

  2. (ii)

    \(M_{AA} \, x^*_A = 0\);

  3. (iii)

    \(M_{ZA} \, x^*_A \ge 0\);

  4. (iv)

    \(M_{AA} \in \mathcal{PSD}^{|A|}\).

Proof

Let \(Q \in \mathcal{S}^n\), \(x^* \in \varOmega (Q)\), and \(M = Q - \left( (x^*)^T Q x^* \right) E\). By Theorem 1, \(M \in \mathcal{COP}^n\). Furthermore, \((x^*)^T M x^* = (x^*)^T Q x^* - (x^*)^T Q x^* = 0\), which implies that \(M \in \mathbf {bd} ~\mathcal{COP}^n\) by (28), which establishes (i).

Consider the (StQP) instance corresponding to M. Since \(M \in \mathcal{COP}^n\), we obtain

$$\begin{aligned} x^T M x \ge (x^*)^T M x^* = 0 = \nu (M), \quad {\text {for all}~x \in \varDelta _n}. \end{aligned}$$

By combining \(\nu (M) = (x^*)^T M x^* = 0\) with the KKT conditions (9), (12), and (13), we obtain \(M_{AA} \, x^*_A = 0\) and \(M_{ZA} \, x^*_A \ge 0\), establishing (ii) and (iii).

Finally, for any \(d \in \mathbb {R}^{|A|}\) and any \(\alpha \in \mathbb {R}\), we have

$$\begin{aligned} (x^*_A + \alpha d)^T M_{AA} (x^*_A + \alpha d)= & {} (x^*_A)^T M_{AA} x^*_A + 2 \alpha d^T M_{AA} x^*_{{A}} + \alpha ^2 d^T M_{AA} d,\\= & {} \alpha ^2 d^T M_{AA} d, \end{aligned}$$

where we used \((x^*)^T M x^* = (x^*_A)^T M_{AA} x^*_A = 0\) and (ii) in the second equality. If there exists \(d \in \mathbb {R}^{|A|}\) such that \(d^T M_{AA} d < 0\), then, since \(x^*_A > 0\), for sufficiently small \(\alpha > 0\), we obtain \(x^*_A + \alpha d > 0\) and \((x^*_A + \alpha d)^T M_{AA} (x^*_A + \alpha d) < 0\), which implies that \(M_{AA} \not \in \mathcal{COP}^{{|A|}}\), contradicting Lemma 1 (iv). Therefore, \(M_{AA} \in \mathcal{PSD}^{|A|}\), establishing (iv). \(\square \)

For \(n \ge 5\), we are now in a position to identify some conditions on \(x \in \varDelta _n\) such that the set \(\mathcal{S}_x\) given by (17) has a simple description.

Lemma 7

For any \(n \ge 5\) and any \(x \in \varDelta _n\) such that \(|A(x)| \ge n - 1\), where A(x) is given by (2), we have

$$\begin{aligned} \mathcal{S}_x = \mathcal{Q}_x, \end{aligned}$$

where \(\mathcal{S}_x\) and \(\mathcal{Q}_x\) are given by (17) and (20), respectively.

Proof

Let \(x \in \varDelta _n\) be such that \(|A(x)| \ge n - 1\). Note that we already have \(\mathcal{Q}_x \subseteq \mathcal{S}_x\) by (20). Therefore, it suffices to establish the reverse inclusion.

Let \(Q \in \mathcal{S}_x\) and let \(M {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \left( x^T Q x \right) E \in \mathcal{S}^n\). By Lemma 6 (i), we have \(M \in \mathbf {bd} ~\mathcal{COP}^n\). Let \(A {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,A(x)\). If \(|A| = n\), then \(M_{AA} = M \in \mathcal{PSD}^{n}\) by Lemma 6 (iv), which implies that \(M \in \mathcal{SPN}^n\) by (4) and \(Q \in \mathcal{Q}_x\) by Lemma 3. If, on the other hand, \(|A| = n - 1\), then \(M_{AA} \in \mathcal{PSD}^{n-1}\) by Lemma 6 (iv). By [34, Lemma 3.1], it follows that \(M \in \mathcal{SPN}^n\) and we similarly obtain \(Q \in \mathcal{Q}_x\). \(\square \)

Our final result specifically focuses on the case \(n = 5\).

Lemma 8

Let \(n = 5\). Then, for \(x \in \{e_j: 1\le j \le 5\}\), we have

$$\begin{aligned} \mathcal{S}_x = \mathcal{Q}_x, \end{aligned}$$

where \(\mathcal{S}_x\) and \(\mathcal{Q}_x\) are given by (17) and (20), respectively.

Proof

Let \(Q \in \mathcal{S}_x\), where \(x \in \{e_j: 1\le j \le 5\}\), and let \(M {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \left( x^T Q x \right) E \in \mathcal{S}^5\). Then, \(|A(x)| = |A| = 1\). By Lemma 6 (ii) and (iii), there exists a permutation matrix \(J \in \mathbb {R}^{n \times n}\) such that

$$\begin{aligned} J^T M J = \widehat{M} = \begin{bmatrix} 0 &{}\quad b^T \\ b &{}\quad B \end{bmatrix}, \end{aligned}$$

where \(b \in \mathbb {R}^4_+\) and \(B \in \mathcal{S}^4\). Since \(M \in \mathcal{COP}^5\), we have \(B \in \mathcal{COP}^4\) by Lemma 1 (ii) and (iv). By (5), \(B \in \mathcal{SPN}^4\). Since \(b \ge 0\), it follows from [34, Lemma 3.3] that \(\widehat{M} \in \mathcal{SPN}^5\), which implies that \(M \in \mathcal{SPN}^5\) by Lemma 1 (ii) and that \(Q \in \mathcal{Q}_x\) by Lemma 3. \(\square \)

For any \(x \in \varDelta _n\) that satisfies the conditions of Lemma 7 or Lemma 8, it follows that the doubly nonnegative relaxation is exact for all instances of (StQP) for which x is an optimal solution. We also remark that the proof of Lemma 8 cannot be extended to the case \(n \ge 6\). In fact, for any \(n \ge 6\), we will illustrate in Sect. 6 how to construct an instance of (StQP) with \(\left\{ e_1,e_2,\ldots ,e_n\right\} \subseteq \varOmega (Q)\) such that the doubly nonnegative relaxation has a positive gap.

We close this section by recalling that, for each \(x \in \varDelta _n\), the membership problem in \(\mathcal{Q}_x\) is polynomial-time solvable. On the other hand, for a given \(Q \in \mathcal{S}^n\), it follows from Corollary 1 that checking if \(Q \in \mathcal{Q}^n\) is equivalent to checking if there exists \(x \in \varDelta _n\) such that \(Q \in \mathcal{Q}_x\). Since this latter problem may not necessarily be polynomial-time solvable, we instead focus on explicitly identifying several classes of matrices that belong to \(\mathcal{Q}^n\) in the next section.

4 Three families of standard quadratic programs with exact doubly nonnegative relaxations

In this section, by relying on the characterizations presented in Sect. 3, we identify three families of matrices that admit exact doubly nonnegative relaxations.

4.1 Minimum entry on the diagonal

In this section, we show that any matrix \(Q \in \mathcal{S}^n\) whose minimum entry lies on the diagonal belongs to \(\mathcal{Q}^n\). Let us denote the set of such matrices by \(\mathcal{Q}^n_{1}\), i.e.,

$$\begin{aligned} \mathcal{Q}^n_1 {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ Q \in \mathcal{S}^n: \min \limits _{1 \le i \le j \le n} Q_{ij} = \min \limits _{k = 1,\ldots ,n} Q_{kk}\right\} . \end{aligned}$$
(30)

Note that \(\mathcal{Q}^n_1\) is given by the union of a finite number of polyhedral cones, i.e.,

$$\begin{aligned} \mathcal{Q}^n_1 = \bigcup _{k=1}^n \left\{ Q \in \mathcal{S}^n: Q_{ij} \ge Q_{kk}, \quad 1 \le i \le j \le n\right\} . \end{aligned}$$

Proposition 2

The following relation holds:

$$\begin{aligned} \mathcal{Q}^n_1 \subseteq \mathcal{Q}^n, \end{aligned}$$
(31)

where \(\mathcal{Q}^n_1\) and \(\mathcal{Q}^n\) are given by (30) and (16), respectively.

Proof

Let \(Q \in \mathcal{Q}^n_1\). Let us define \(\lambda {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\min \nolimits _{1 \le i \le j \le n} Q_{ij} = \min \nolimits _{k = 1,\ldots ,n} Q_{kk} = Q_{\ell \ell }\) and \(N {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \lambda E \in \mathcal{N}^n\). Therefore, \(Q = 0 + N + \lambda E\). Then, it is easy to verify that \(N \in \mathcal{N}_x\), where \(x = e_{\ell } \in \mathbb {R}^n\) and \(\mathcal{N}_x\) is given by (24). By Proposition 1, \(Q \in \mathcal{Q}_x\), where \(\mathcal{Q}_x\) is given by (20). The inclusion (31) follows. \(\square \)

4.1.1 Standard quadratic programs with a concave objective function over \(\varDelta _n\)

In this section, we explicitly identify a subset of matrices contained in \(\mathcal{Q}^n_1\), where \(\mathcal{Q}^n_1\) is given by (30).

By the proof of Proposition 2,

$$\begin{aligned} \varOmega (Q) \cap \{e_1,\ldots ,e_n\} \ne \emptyset , \quad {\text {for all }}Q \in \mathcal{Q}^n_1. \end{aligned}$$
(32)

Based on this observation, it is worth focusing on the set of instances of (StQP) with a concave objective function over \(\varDelta _n\) since the set of optimal solutions necessarily contains one of the vertices of the unit simplex. The next lemma gives a complete characterization of such instances.

Lemma 9

The set of instances of (StQP) with a concave objective function over \(\varDelta _n\) is given by those instances in which Q is negative semidefinite on \(e^\perp \), i.e.,

$$\begin{aligned} \mathcal{Q}^n_{\text {concave}} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ Q \in \mathcal{S}^n: d^T Q d \le 0, \quad \text {for all } d \in \mathbb {R}^n ~\text {such that}~ e^T d = 0\right\} . \end{aligned}$$
(33)

Proof

Let \(Q \in \mathcal{S}^n\). For any \(x \in \varDelta _n\), \(y \in \varDelta _n\), and \(\lambda \in [0,1]\), let us define \(d {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,y - x\). Note that \(e^T d = e^T y - e^T x = 0\). Therefore,

$$\begin{aligned} ((1 - \lambda ) x + \lambda y)^T Q ((1 - \lambda ) x + \lambda y)= & {} (1 - \lambda ) x^T Q x + \lambda y^T Q y + \\&\quad \lambda (1 - \lambda ) \left( 2 x^T Q y - x^T Q x - y^T Q y \right) ,\\= & {} (1 - \lambda ) x^T Q x + \lambda y^T Q y - \lambda (1 - \lambda ) d^T Q d, \end{aligned}$$

where we used \(y = x + d\) in the third term on the right-hand side of the first expression to derive the second expression. Since \(\lambda \in [0,1]\) and \(e^T d = 0\), we immediately obtain that the function \(x^T Q x\) is concave over \(\varDelta _n\) if and only if \(d^T Q d \le 0\), i.e., if and only if \(Q \in \mathcal{Q}^n_{\text {concave}}\). \(\square \)

The following inclusion can easily be verified.

$$\begin{aligned} - \mathcal{PSD}^n + \mathcal{L}\subseteq \mathcal{Q}^n_{\text {concave}}, \end{aligned}$$

where \(\mathcal{L}\) is given by (18).

First, we present a useful property of \(\mathcal{Q}^n_{\text {concave}}\).

Lemma 10

For any \(Q \in \mathcal{Q}^n_{\text {concave}}\),

$$\begin{aligned} - \left( I - e x^T \right) Q \left( I - x e^T\right) \in \mathcal{PSD}^n, \quad \text {for {all}}~x \in \varDelta _n. \end{aligned}$$

Proof

Since \(e^T x = 1\) for all \(x \in \varDelta _n\), it follows from Lemma 4 that \(\left( I - x e^T \right) z \in e^\perp \) for any \(z \in \mathbb {R}^n\) and \(x \in \varDelta _n\). The assertion follows directly from (33). \(\square \)

We next show that every matrix \(Q \in \mathcal{Q}^n_{\text {concave}}\) necessarily has a minimum entry along the diagonal.

Proposition 3

The following relation holds:

$$\begin{aligned} \mathcal{Q}^n_{\text {concave}} \subseteq \mathcal{Q}^n_1, \end{aligned}$$
(34)

where \(\mathcal{Q}^n_{\text {concave}}\) and \(\mathcal{Q}^n_1\) are given by (33) and (30), respectively. Therefore,

$$\begin{aligned} \mathcal{Q}^n_{\text {concave}} \subseteq \mathcal{Q}^n. \end{aligned}$$
(35)

Proof

Suppose, for a contradiction, that (34) does not hold. Then, there exists \(Q \in \mathcal{Q}^n_{\text {concave}}\) such that \(Q \not \in \mathcal{Q}^n_1\), i.e., there exists a tuple (kl) such that \(1 \le k < l \le n\) and

$$\begin{aligned} \min \limits _{1 \le i \le j \le n} Q_{ij} = Q_{kl} < \min \limits _{k = 1,\ldots ,n} Q_{kk}. \end{aligned}$$
(36)

Now, let us define

$$\begin{aligned} Y {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,- \left( I- (1/n)E\right) Q \left( I-(1/n)E\right) . \end{aligned}$$
(37)

By Lemma 10, \(Y \in \mathcal{PSD}^n\), which implies that

$$\begin{aligned} Y_{kk} + Y_{ll} \ge 2 Y_{kl}. \end{aligned}$$
(38)

By (37),

$$\begin{aligned} Y_{kk}= & {} - Q_{kk} + \frac{2}{n} e^T Q e_k - \frac{1}{n^2} e^T Q e,\\ Y_{ll}= & {} - Q_{ll} + \frac{2}{n} e^T Q e_l - \frac{1}{n^2} e^T Q e,\\ Y_{kl}= & {} - Q_{kl} + \frac{1}{n} e^T Q e_l + \frac{1}{n} e^T Q e_k - \frac{1}{n^2} e^T Q e, \end{aligned}$$

which, together with (38), implies that

$$\begin{aligned} Q_{kk} + Q_{ll} \le 2 Q_{kl}, \end{aligned}$$

contradicting (36). The relation (34) follows. The inclusion (35) is an immediate consequence of Proposition 2. \(\square \)

We close this section by making two observations. First, we remark that the inclusion (34) can be strict. For instance, we have

$$\begin{aligned} Q = \begin{bmatrix} 0 &{}\quad 0 \\ 0 &{}\quad 1 \end{bmatrix} \in \mathcal{Q}^2_1 \backslash \mathcal{Q}^2_{\text {concave}} \end{aligned}$$

since, for \(d = [-1,1]^T\), we have \(e^T d = 0\) but \(d^T Q d > 0\).

Second, we illustrate, by an example, that the set of matrices that satisfy the relation (32) is strictly larger than \(\mathcal{Q}^n_1\). For instance,

$$\begin{aligned} Q = \begin{bmatrix} 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 2 &{}\quad -1 \\ 0 &{}\quad -1 &{}\quad 2 \end{bmatrix} \not \in \mathcal{Q}^3_1, \end{aligned}$$

whereas \(\varOmega (Q) = \{e_1\}\). On the other hand, for \(n = 5\), recall that the condition (32) is sufficient to ensure that \(Q \in \mathcal{Q}^n\) by Lemma 8.

4.2 Standard quadratic programs with a convex objective function over \(\varDelta _n\)

In this section, we focus on instances of (StQP) whose objective function is convex over \(\varDelta _n\). Note that \(x^T Q x\) is convex over \(\varDelta _n\) if and only if \(-x^T Q x\) is concave over \(\varDelta _n\). By Lemma 9, such instances are precisely characterized by matrices \(Q \in \mathcal{S}^n\) that are positive semidefinite on \(e^\perp \), i.e.,

$$\begin{aligned} \mathcal{Q}^n_2 {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,- \mathcal{Q}^n_{\text {concave}} = \left\{ Q \in \mathcal{S}^n: d^T Q d \ge 0, \quad {\text {for all }}d \in \mathbb {R}^n ~\text {such that}~ e^T d = 0 \right\} . \end{aligned}$$
(39)

Clearly, we have

$$\begin{aligned} \mathcal{PSD}^n + \mathcal{L}\subseteq \mathcal{Q}^n_2, \end{aligned}$$

where \(\mathcal{L}\) is given by (18). For any \(Q \in \mathcal{Q}^n_2\), consider the corresponding (StQP) instance. It follows from (39), (15), and (9)–(14) that any KKT point is a local minimizer. By the convexity of the objective function over the feasible region, any KKT point is, in fact, a global minimizer.

In this section, we aim to establish that \(\mathcal{Q}^n_2 \subseteq \mathcal{Q}^n\). First, we present a technical result that is similar to Lemma 10, which would be useful to prove this inclusion.

Lemma 11

For any \(Q \in \mathcal{Q}^n_2\),

$$\begin{aligned} \left( I - e x^T \right) Q \left( I - x e^T\right) \in \mathcal{PSD}^n, \quad \text {for all}~x \in \varDelta _n. \end{aligned}$$

Proof

Since \(\mathcal{Q}^n_2 = - \mathcal{Q}^n_{\text {concave}}\) by (39), the assertion follows directly from Lemma 10. \(\square \)

Next, we present our main result in this section.

Proposition 4

The following relation holds:

$$\begin{aligned} \mathcal{Q}^n_2 \subseteq \mathcal{Q}^n, \end{aligned}$$

where \(\mathcal{Q}^n_2\) and \(\mathcal{Q}^n\) are given by (39) and (16), respectively.

Proof

If \(Q \in \mathcal{PSD}^n\), then \(Q \in \mathcal{Q}^n\) by [20, Lemma 2.7]. Otherwise, let \(Q \in \mathcal{Q}^n_2\) and \(x \in \varOmega (Q)\). It suffices to show that \(Q \in \mathcal{Q}_x\), where \(\mathcal{Q}_x\) is given by (20). By Proposition 1, we need to construct a decomposition

$$\begin{aligned} Q = P + N + \left( x^T Q x \right) E, \end{aligned}$$

where \(P \in \mathcal{P}_x\), \(N \in \mathcal{N}_x\), and \(\mathcal{P}_x\) and \(\mathcal{N}_x\) are given by (23) and (24), respectively.

Let us define

$$\begin{aligned} P {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left( I - e x^T \right) Q \left( I - x e^T \right) . \end{aligned}$$
(40)

Observe that \(Px = 0\) and, by Lemma 11, \(P \in \mathcal{PSD}^n\). Therefore, \(P \in \mathcal{P}_x\). Now we rewrite (40) as follows:

$$\begin{aligned} P = Q - Q x e^T - e x^T Q + \left( x^T Q x \right) E, \end{aligned}$$

or equivalently,

$$\begin{aligned} Q - \left( x^T Q x \right) E = P + \left( Q x e^T + e x^T Q - 2 \left( x^T Q x \right) E \right) . \end{aligned}$$

Let us accordingly define

$$\begin{aligned} N {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q x e^T + e x^T Q - 2 \left( x^T Q x \right) E. \end{aligned}$$

It suffices to show that \(N \in \mathcal{N}_x\). Since \(x \in \varOmega (Q)\), x is a KKT point, i.e., there exists \(s \in \mathbb {R}^n\) such that the conditions (9) – (13) are satisfied. By (9),

$$\begin{aligned} Qx - \left( x^T Q x \right) e - s = 0, \end{aligned}$$

which implies that

$$\begin{aligned} Q x e^T - \left( x^T Q x \right) E - s e^T= & {} 0, \\ e x^T Q - \left( x^T Q x \right) E - e s^T= & {} 0. \end{aligned}$$

It follows from these two equations and the definition of N that

$$\begin{aligned} N= & {} Q x e^T + e x^T Q - 2 \left( x^T Q x \right) E, \\= & {} s e^T + e s^T. \end{aligned}$$

Finally, note that \(N \in \mathcal{N}_x\) since \(N \in \mathcal{N}^n\) and \(x^T N x = 0\) by (10), (12), and (13). It follows from Proposition 1 that \(Q \in \mathcal{Q}_x\). \(\square \)

Note that the proof of Proposition 4 is based on an explicit construction of the decomposition of a matrix \(Q \in \mathcal{Q}^n_2\) given by Proposition 1.

We close this section by the following observation. By Proposition 4, we have \(\mathcal{Q}^n_2 \subseteq \mathcal{Q}^n\), where \(\mathcal{Q}^n_2\) and \(\mathcal{Q}^n\) are given by (39) and (16), respectively. Since \(\mathcal{Q}^n_2 = - \mathcal{Q}^n_{\text {concave}}\) by (39), for each \(Q \in \mathcal{Q}^n_2 \backslash \{0\}\), it follows from Propositions 3 and 4 that each of the two hyperplanes

$$\begin{aligned} \mathcal{H}_1= & {} \left\{ Y \in \mathcal{S}^n: \langle Q, Y \rangle = \ell (Q) = \nu (Q) \right\} , \\ \mathcal{H}_2= & {} \left\{ Y \in \mathcal{S}^n: \langle -Q, Y \rangle = \ell (-Q) = \nu (-Q) \right\} , \end{aligned}$$

is a supporting hyperplane of both of the feasible regions of (DN-P) and (CP).

4.3 Maximum weighted cliques on perfect graphs

In this section, we identify another family of instances of (StQP) that admit an exact doubly nonnegative relaxation.

First, we briefly review the maximum weighted clique problem. Let \(G = (V_G,E_G)\) be a simple, undirected graph with \(V_G = \{1,\ldots ,n\}\) and let \(w \in \mathbb {R}^n_{++}\), where \(w_k\) denotes the weight of vertex \(k,~k = 1,\ldots ,n\). A set \(C \subseteq V_G\) is a clique if all pairs of vertices in C are connected by an edge. The weight of a clique \(C \subseteq V_G\), denoted by w(C), is given by \(w(C){\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\sum \nolimits _{j \in C} w_j\). The maximum weighted clique problem is concerned with finding a clique with the maximum weight, and its weight is denoted by \(\omega (G,w)\). Note that the maximum weighted clique problem is equivalent to the maximum clique problem if all the weights are identical.

For a given graph \(G = (V_G,E_G)\) and a set \(V \subseteq V_G\), the subgraph of G induced by V is the graph whose vertices are given by V and whose edges are given by the edges in \(E_G\) with both endpoints in V. The maximum weighted clique problem is therefore concerned with finding an induced complete subgraph in G with the maximum weight. The complement of G, denoted by \(\overline{G}\), is the graph on \(V_G\) obtained by deleting all edges in \(E_G\) and connecting each pair of nonadjacent vertices in G. Recall that G is a perfect graph if neither G nor its complement \(\overline{G}\) contains an odd cycle of length at least five as an induced subgraph [9].

We next discuss the connection between the maximum weighted clique problem and (StQP). Let \(G = (V_G,E_G)\) be a graph with \(V_G = \{1,\ldots ,n\}\) and let \(w \in \mathbb {R}^n_{++}\), where \(w_k\) denotes the weight of vertex \(k,~k = 1,\ldots ,n\). Let us define the following class of matrices:

$$\begin{aligned} \mathcal{M}(G,w) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ B \in \mathcal{S}^n: \begin{array}{ll}B_{kk} = 1/w_k, &{} k = 1,\ldots ,n,\\ B_{ij} = 0 , &{} (i,j) \in E_G,\\ 2 B_{ij} \ge B_{ii} + B_{jj}, &{} (i,j) \in E_{\overline{G}} \end{array} \right\} . \end{aligned}$$
(41)

The following theorem establishes the aforementioned connection.

Theorem 2

(Gibbons et al., 1997) Let \(G = (V_G,E_G)\) be a graph with \(V_G = \{1,\ldots ,n\}\) and let \(w \in \mathbb {R}^n_{++}\), where \(w_k\) denotes the weight of vertex \(k,~k = 1,\ldots ,n\). Then, for any \(Q \in \mathcal{M}(G,w)\),

$$\begin{aligned} \nu (Q) = \min \{x^T Q x: x \in \varDelta _n\} = \frac{1}{\omega (G,w)}. \end{aligned}$$

Theorem 2 is a generalization of the well-known Motzkin-Straus Theorem [27] that establishes the first connection between the (unweighted) maximum clique problem and a particular instance of (StQP) associated with the underlying graph.

We next discuss the weighted Lovász theta number. Let \(G = (V_G,E_G)\) be a graph with \(V_G = \{1,\ldots ,n\}\) and let \(w \in \mathbb {R}^n_{++}\), where \(w_k\) denotes the weight of vertex \(k,~k = 1,\ldots ,n\). The weighted Lovász theta number [16, 23] corresponding to the complement graph \(\overline{G}\) is given by

$$\begin{aligned} \vartheta (\overline{G},w) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\max \left\{ \langle W,X \rangle : \langle I, X \rangle = 1, \quad X_{ij} = 0,~(i,j) \in E_{\overline{G}}, \quad X \in \mathcal{PSD}^n\right\} , \end{aligned}$$

where \(W \in \mathcal{S}^n\) is given by

$$\begin{aligned} W_{ij} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\sqrt{w_i w_j},\quad 1 \le i \le j \le n. \end{aligned}$$
(42)

The weighted Lovász theta number satisfies \(\omega (G,w) \le \vartheta (\overline{G},w)\) [23]. Furthermore, by [16],

$$\begin{aligned} \omega (G,w) = \vartheta (\overline{G},w) \quad \text {if { G} is a perfect graph}. \end{aligned}$$
(43)

The weighted Lovász theta number can be strengthened by replacing the constraint \(X \in \mathcal{PSD}^n\) by \(X \in \mathcal{DN}^n\) [33], henceforth referred to as the Lovász-Schrijver bound:

$$\begin{aligned} \vartheta ^\prime (\overline{G},w) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\max \left\{ \langle W,X \rangle : \langle I, X \rangle = 1, \quad X_{ij} = 0,~(i,j) \in E_{\overline{G}}, \quad X \in \mathcal{DN}^n\right\} , \end{aligned}$$
(44)

The Lovász-Schrijver bound satisfies the following relations:

$$\begin{aligned} \omega (G,w) \le \vartheta ^\prime (\overline{G},w) \le \vartheta (\overline{G},w). \end{aligned}$$
(45)

By (43) and (45),

$$\begin{aligned} \omega (G,w) = \vartheta ^\prime (\overline{G},w) \quad \text {if { G} is a perfect graph}. \end{aligned}$$
(46)

For any \(w \in \mathbb {R}^n_{++}\) and any \(G = (V_G,E_G)\), where \(V_G = \{1,\ldots ,n\}\), we next establish that the Lovász-Schrijver bound given by (44) coincides with the reciprocal of the lower bound arising from the doubly nonnegative relaxation of the (StQP) instance corresponding to any \(Q \in \mathcal{M}(G,w)\), i.e., for any \(w \in \mathbb {R}^n_{++}\) and any \(Q \in \mathcal{M}(G,w)\),

$$\begin{aligned} \ell (Q) = \min \left\{ \langle Q, X \rangle : \langle E, X \rangle = 1, \quad X \in \mathcal{DN}^n \right\} = \frac{1}{\vartheta ^\prime (\overline{G},w)}. \end{aligned}$$

First, we prove a useful property of the doubly nonnegative relaxation.

Lemma 12

Let \(G = (V_G,E_G)\) be a simple, undirected graph with \(V_G = \{1,\ldots ,n\}\). For any \(w \in \mathbb {R}^n_{++}\) and any \(Q \in \mathcal{M}(G,w)\), where \(\mathcal{M}(G,w)\) is given by (41), there exists an optimal solution \(X^* \in \mathcal{S}^n\) of (DN-P) such that

$$\begin{aligned} X^*_{ij} = 0, \quad {\text {for all}}~ (i,j) \in E_{\overline{G}}. \end{aligned}$$

Proof

Let \(Q \in \mathcal{M}(G,w)\) and \(X^* \in \mathcal{DN}^n\) be an optimal solution of (DN-P). Suppose that \(X^*_{ij} > 0\) for some \((i,j) \in E_{\overline{G}}\). Let us define

$$\begin{aligned} X(\alpha ) {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,X^* + \alpha (e_i - e_j) (e_i - e_j)^T. \end{aligned}$$

Observe that \(X(\alpha ) \in \mathcal{DN}^n\) for any \(0 \le \alpha \le X^*_{ij}\). Furthermore,

$$\begin{aligned} \langle Q, X(\alpha ) \rangle = \langle Q, X^* \rangle + \alpha \underbrace{(Q_{ii} + Q_{jj} - 2Q_{ij})}_{\le 0} \le \langle Q, X^* \rangle , \end{aligned}$$

where the inequality follows from (41). By setting \(\alpha = X^*_{ij}\) and repeating this procedure for any other edges in \(E_{\overline{G}}\) if necessary, we obtain an optimal solution with the desired property. \(\square \)

We are now in a position to establish the aforementioned relation.

Proposition 5

Let \(G = (V_G,E_G)\) be simple, undirected graph with \(V_G = \{1,\ldots ,n\}\). For any \(w \in \mathbb {R}^n_{++}\) and any \(Q \in \mathcal{M}(G,w)\), where \(\mathcal{M}(G,w)\) is given by (41),

$$\begin{aligned} \ell (Q) = \frac{1}{\vartheta ^\prime (\overline{G},w)}, \end{aligned}$$
(47)

where \(\vartheta ^\prime (\overline{G},w)\) is given by (44).

Proof

Let \(w \in \mathbb {R}^n_{++}\) and let \(Q \in \mathcal{M}(G,w)\).

First, we will show that \(\displaystyle \ell (Q) \le 1/\vartheta ^\prime (\overline{G},w)\). Note that an optimal solution \(X^*_{LS} \in \mathcal{DN}^n\) of (44) exists since the feasible region is nonempty and compact. Furthermore, \(\vartheta ^\prime (\overline{G},w) = \langle W, X^*_{LS} \rangle > 0\) since W has strictly positive components and \(\langle I, X^*_{LS} \rangle = 1\). Let us define \(\hat{X}_{LS} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,D_{LS} X^*_{LS} D_{LS}\), where \(D_{LS} \in \mathcal{S}^n\) is a diagonal matrix given by

$$\begin{aligned} D_{LS} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\frac{1}{\sqrt{\vartheta ^\prime (\overline{G},w)}} \begin{bmatrix} \sqrt{w_1} &{} &{} \\ &{} \ddots &{} \\ &{} &{} \sqrt{w_n} \end{bmatrix}. \end{aligned}$$

By Lemma 1 (iii), \(\hat{X}_{LS} \in \mathcal{DN}^n\). Furthermore,

$$\begin{aligned} \vartheta ^\prime (\overline{G},w) = \langle W, X^*_{LS} \rangle = \langle D_{LS}^{-1} W D_{LS}^{-1}, \hat{X}_{LS} \rangle = \vartheta ^\prime (\overline{G},w) \langle E, \hat{X}_{LS} \rangle , \end{aligned}$$

where we used (42) to derive the third equality. Therefore, \(\langle E, \hat{X}_{LS} \rangle = 1\), i.e., \(\hat{X}_{LS}\) is a feasible solution of (DN-P). By (41), for any \(Q \in \mathcal{M}(G,w)\),

$$\begin{aligned} D_{LS} Q D_{LS} = \frac{1}{\vartheta ^\prime (\overline{G},w)} \left( I + N_{LS} \right) , \end{aligned}$$

where \(N_{LS} \in \mathcal{N}^n\), \((N_{LS})_{kk} = 0\) for each \(k = 1,\ldots ,n\), and \((N_{LS})_{ij} = Q_{ij} = 0\) for each \((i,j) \in E_G\). Therefore,

$$\begin{aligned} \langle Q, \hat{X}_{LS} \rangle= & {} \langle D_{LS} Q D_{LS}, D_{LS}^{-1} \hat{X}_{LS} D_{LS}^{-1} \rangle , \\= & {} \langle D_{LS} Q D_{LS}, X^*_{LS} \rangle , \\= & {} \frac{1}{\vartheta ^\prime (\overline{G},w)} \langle I + N_{LS}, X^*_{LS} \rangle , \\= & {} \frac{1}{\vartheta ^\prime (\overline{G},w)} \left( 1 + \langle N_{LS}, X^*_{LS} \rangle \right) , \end{aligned}$$

where we used \(\langle I, X^*_{LS} \rangle = 1\) in the last line. Since \(Q_{ij} = (N_{LS})_{ij} = 0\) for each \((i,j) \in E_G\), \((X^*_{LS})_{ij} = 0\) for each \((i,j) \in E_{\overline{G}}\), and all the diagonal entries of \(N_{LS}\) are equal to 0, it follows that \(\langle N_{LS}, X^*_{LS} \rangle = 0\), which implies that \(\langle Q, \hat{X}_{LS} \rangle = 1/\vartheta ^\prime (\overline{G},w)\). Therefore, \(\ell (Q) \le 1/\vartheta ^\prime (\overline{G},w)\) since \(\hat{X}_{LS}\) is a feasible solution of (DN-P).

Conversely, let \(X^*_{DN} \in \mathcal{DN}^n\) be an optimal solution of (DN-P). Then, \(\langle E, X^*_{DN} \rangle = 1\) and \(\ell (Q) = \langle Q , X^*_{DN} \rangle > 0\) since \(Q \in \mathcal{N}^n\) with strictly positive diagonal entries. By Lemma 12, we can assume that \((X^*_{DN})_{ij} = 0\) for each \((i,j) \in E_{\overline{G}}\). Let us define another diagonal matrix \(D_{DN} \in \mathcal{S}^n\) given by

$$\begin{aligned} D_{DN} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\frac{1}{\sqrt{\ell (Q)}} \begin{bmatrix} \frac{1}{\sqrt{w_1}} &{} &{} \\ &{} \ddots &{} \\ &{} &{} \frac{1}{\sqrt{w_n}} \end{bmatrix}. \end{aligned}$$

Let \(\hat{X}_{DN} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,D_{DN} X^*_{DN} D_{DN}\). Once again, by Lemma 1 (iii), \(\hat{X}_{DN} \in \mathcal{DN}^n\). Similarly, by (41), for any \(Q \in \mathcal{M}(G,w)\),

$$\begin{aligned} D_{DN}^{-1} Q D_{DN}^{-1} = \ell (Q) \left( I + N_{DN} \right) , \end{aligned}$$

where \(N_{DN} \in \mathcal{N}^n\), \((N_{DN})_{kk} = 0\) for each \(k = 1,\ldots ,n\), and \((N_{DN})_{ij} = Q_{ij} = 0\) for each \((i,j) \in E_G\). Therefore,

$$\begin{aligned} \ell (Q) = \langle Q , X^*_{DN} \rangle = \langle D_{DN}^{-1} Q D_{DN}^{-1}, \hat{X}_{DN} \rangle = \ell (Q) \left( \langle I, \hat{X}_{DN} \rangle + \langle N_{DN}, \hat{X}_{DN} \rangle \right) . \end{aligned}$$

Note that \(\langle N_{DN}, \hat{X}_{DN} \rangle = 0\) since \((N_{DN})_{ij} = Q_{ij} = 0\) for each \((i,j) \in E_G\), \((\hat{X}_{DN})_{ij} = (X^*_{DN})_{ij} = 0\) for each \((i,j) \in E_{\overline{G}}\), and all the diagonal entries of \(N_{DN}\) are equal to 0. It follows that \(\langle I, \hat{X}_{DN} \rangle = 1\), which, combined with the previous observation, implies that \(\hat{X}_{DN}\) is feasible for (44).

Finally, we have

$$\begin{aligned} \langle W, \hat{X}_{DN} \rangle = \langle D_{DN} W D_{DN}, X^*_{DN} \rangle = \frac{1}{\ell (Q)} \langle E, X^*_{DN} \rangle = \frac{1}{\ell (Q)}, \end{aligned}$$

which implies that \(\vartheta ^\prime (\overline{G},w) \ge 1/\ell (Q)\), establishing the reverse inequality. The relation (47) follows. \(\square \)

For a given graph \(G = (V_G,E_G)\), consider the unweighted case, i.e., let \(w {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,e \in \mathbb {R}^n\) and let \(Q {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,I + A_{\overline{G}} \in \mathcal{M}(G,e)\), where \(A_{\overline{G}} \in \mathcal{S}^n\) is the vertex adjacency matrix of \(\overline{G}\). We remark that the identity \(\ell (Q) = 1/\vartheta ^\prime (\overline{G},e)\) is a consequence of Corollary 2.4 and Lemma 5.2 in [10]. It follows that Proposition 5 generalizes this identity to the weighted case and to any \(Q \in \mathcal{M}(G,w)\).

We now have all the ingredients to establish our main result in this section. Let us first introduce the set of all perfect graphs on the set of vertices \(\{1,2,\ldots ,n\}\), i.e.,

$$\begin{aligned} \mathfrak {G} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ G = (V_G,E_G): V_G = \{1,2,\ldots ,n\}, \quad G\text { is a perfect graph}\right\} . \end{aligned}$$

We next define the following set that consists of all symmetric matrices \(Q \in \mathcal{M}(G,w)\) for each \(w \in \mathbb {R}^n_{++}\), where \(G \in \mathfrak {G}\) and \(\mathcal{M}(G,w)\) is given by (41):

$$\begin{aligned} \mathcal{M}{\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\bigcup _{G \in \mathfrak {G}} \bigcup _{w \in \mathbb {R}^n_{++}} \mathcal{M}(G,w). \end{aligned}$$
(48)

For each perfect graph \(G = (V_G,E_G) \in \mathfrak {G}\) and each \(w \in \mathbb {R}^n_{++}\), note that \(\mathcal{M}(G,w)\) is a polyhedral set. Therefore, \(\mathcal{M}\) is given by the union of an infinite number of polyhedral sets.

Finally, we define

$$\begin{aligned} \mathcal{Q}^n_3 {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\mathcal{M}+ \mathcal{L}, \end{aligned}$$
(49)

where \(\mathcal{M}\) and \(\mathcal{L}\) are given by (48) and (18), respectively. We next present our main result.

Proposition 6

The following relation holds:

$$\begin{aligned} \mathcal{Q}^n_3 \subseteq \mathcal{Q}^n, \end{aligned}$$
(50)

where \(\mathcal{Q}^n_3\) and \(\mathcal{Q}^n\) are defined as in (49) and (16), respectively.

Proof

Let \(Q \in \mathcal{Q}^n_3\). Then, there exist a perfect graph \(G = (V_G,E_G) \in \mathfrak {G}\) and \(w \in \mathbb {R}^n_{++}\) such that \(Q = \widehat{Q} + \lambda E\) for some \(\widehat{Q} \in \mathcal{M}(G,w)\) and \(\lambda \in \mathbb {R}\). Since G is a perfect graph and \(\widehat{Q} \in \mathcal{M}(G,w)\), it follows from Theorem 2, the relation (46), and Proposition 5 that \(\ell (\widehat{Q}) = \nu (\widehat{Q})\), i.e., \(\widehat{Q} \in \mathcal{Q}^n\). The inclusion (50) directly follows from Lemma 2. \(\square \)

We close this section by noting that the membership problem in \(\mathcal{Q}^n_3\) can, in theory, be solved in polynomial time. Given \(Q \in \mathcal{S}^n\), let \(G_Q = (V_Q,E_Q)\), where \({V_Q} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\{1,\ldots ,n\}\) and

$$\begin{aligned} {E_Q} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\left\{ (i,j): 1 \le i< j \le n, \quad 2 Q_{ij} < Q_{ii} + Q_{jj} \right\} . \end{aligned}$$
(51)

The graph \(G_Q = (V_Q,E_Q)\) is referred to as the convexity graph of Q, which will be revisited in Sect. 5.

There are two cases. If \({E_Q} = \emptyset \), then let \(\gamma {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\min \nolimits _{1 \le i \le j \le n} Q_{ij} - 1\), and define \(\widehat{Q} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \gamma E \in \mathcal{N}^n\). Then, \(\widehat{Q}\) has strictly positive entries and \(2 \widehat{Q}_{ij} \ge \widehat{Q}_{ii} + \widehat{Q}_{jj}\) for each \(1 \le i < j \le n\) by (51). By defining \(w \in \mathbb {R}^n_{++}\) with \(w_k = 1/\widehat{Q}_{kk} > 0,~ k = 1,\ldots ,n\), it follows that \( \widehat{Q} \in \mathcal{M}(G_Q,w)\) and \(G_Q\) and G is clearly perfect since it contains no edges. Therefore, \(Q = \widehat{Q} + \gamma E \in \mathcal{Q}^n_3\). It is worth noticing that any such matrix Q also belongs to \(\mathcal{Q}^n_1\), where \(\mathcal{Q}^n_1\) is given by (30).

Suppose, on the other hand, that \({E_Q} \ne \emptyset \). We first observe that, by (49), a necessary condition for \(Q \in \mathcal{Q}^n_3\) is given by \(Q_{ij} = \alpha \) for each \((i,j) \in {E_Q}\), where \(\alpha \in \mathbb {R}\). Therefore, let \(\kappa _1 {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\min \nolimits _{(i,j) \in {E_Q}} Q_{ij}\) and \(\kappa _2 {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\max \nolimits _{(i,j) \in {E_Q}} Q_{ij}\). If \(\kappa _1 < \kappa _2\), then \(Q \not \in \mathcal{Q}^n_3\) by the previous necessary condition. Otherwise, let \(\kappa {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\kappa _1 = \kappa _2\) and \(\widehat{Q} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \kappa E\), Note that \(\widehat{Q}_{ij} = 0\) for each \((i,j) \in {E_Q}\) and \(\widehat{Q}_{ij} \ge \widehat{Q}_{ii} + \widehat{Q}_{jj}\) for each \((i,j) \not \in E_{Q}\). If \(\widehat{Q}\) has strictly positive diagonal entries, then we can ensure that \(\widehat{Q} \in \mathcal{M}(G_Q,w)\) by similarly defining \(w \in \mathbb {R}^n_{++}\) with \(w_k = 1/{\widehat{Q}_{kk}} > 0,~ k = 1,\ldots ,n\). Then, one can check in polynomial time if \(G_Q = {(V_Q,E_Q)}\) is a perfect graph [8] and accordingly decide if \(Q \in \mathcal{Q}^n_3\). Finally, if \(\widehat{Q} = Q - \kappa E\) does not have strictly positive diagonal entries, then \(Q \not \in \mathcal{Q}^n_3\). In the latter case, note, however, that \(Q \in \mathcal{Q}^n_1\), and therefore \(Q \in \mathcal{Q}^n\) by Proposition 2.

Conversely, for any perfect graph \(G = (V_G,E_G)\) and any \(w \in \mathbb {R}^n_{++}\), choosing any matrix \(\widehat{Q} \in \mathcal{M}(G,w)\) and any \(\lambda \in \mathbb {R}\), and defining \(Q {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\widehat{Q} + \lambda E\), we ensure that \(Q \in \mathcal{Q}^n\) by Proposition 6.

4.4 Relations among three families

In Sects. 4.1, 4.2, and 4.3, we have explicitly identified three families of instances of (StQP) that admit exact doubly nonnegative relaxations. In this section, we present numerical examples illustrating that neither of these subsets is contained in any of the other two subsets. We also present an example that shows the existence of an instance that belongs to \(\mathcal{Q}^n\) but is not contained in any of the three families.

Example 1

Let

$$\begin{aligned} Q = \begin{bmatrix} 0 &{}\quad 1 &{}\quad 3 &{}\quad 2 &{}\quad 0\\ 1 &{}\quad 3 &{}\quad 1 &{}\quad 3 &{}\quad 2 \\ 3 &{}\quad 1 &{}\quad 2 &{}\quad 1 &{}\quad 3 \\ 2 &{}\quad 3 &{}\quad 1 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 2 &{}\quad 3 &{}\quad 0 &{}\quad 1 \end{bmatrix}. \end{aligned}$$

Observe that \(\min \nolimits _{1 \le i \le j \le n}Q_{ij} = Q_{11} = 0\), which implies that \(Q \in \mathcal{Q}^5_1\) by (30) and \(Q \in \mathcal{Q}^5\) by Proposition 2. Indeed, we have \(\varOmega (Q) = \{e_1\}\) and \(\nu (Q) = \ell (Q) = 0\).

Let \(d = [4,-1,-1,-1,-1]^T \in \mathbb {R}^5\). Note that \(e^T d = 0\). However, \(d^T Q d = -21 < 0\), which implies that \(Q \not \in \mathcal{Q}^5_2\) by (39).

Finally, by (51),

$$\begin{aligned} {E_Q} = \left\{ (1,2),(1,5),(2,3),(3,4),(4,5)\right\} . \end{aligned}$$

Since \({E_Q} \ne \emptyset \), we have \(\kappa _1 = \min \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{15} = 0 < \kappa _2 = \max \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{12} = 1\), which implies that \(Q \not \in \mathcal{Q}^5_3\) by the discussion at the end of Sect. 4.3. It follows that \(Q \in \mathcal{Q}^5_1 \backslash \left( \mathcal{Q}^5_2 \cup \mathcal{Q}^5_3\right) \).

Example 2

Let

$$\begin{aligned} Q = \begin{bmatrix} 2 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 2 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 1 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad 1 \end{bmatrix}. \end{aligned}$$

Note that \(Q \in \mathcal{PSD}^5\), which implies that \(Q \in \mathcal{Q}^5_2\) by (39) and \(Q \in \mathcal{Q}^5\) by Proposition 4. An optimal solution is given by \(x^* = [0.2,0,0.4,0.4,0]^T\) and \(\ell (Q) = \nu (Q) = 0.4\).

Observe that \(\min \nolimits _{1 \le i \le j \le n}Q_{ij} = Q_{12} = 0 < \min \nolimits _{k = 1,\ldots ,n} Q_{kk} ={Q_{33}} = 1\), which implies that \(Q \not \in \mathcal{Q}^5_1\) by (30).

Finally, by (51),

$$\begin{aligned} {E_Q} = \left\{ (1,2),(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5) \right\} . \end{aligned}$$

Since \({E_Q} \ne \emptyset \), we have \(\kappa _1 = \min \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{12} = 0 < \kappa _2 = \max \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{23} = 1\), which implies that \(Q \not \in \mathcal{Q}^5_3\) by the discussion at the end of Sect. 4.3. It follows that \(Q \in \mathcal{Q}^5_2 \backslash \left( \mathcal{Q}^5_1 \cup \mathcal{Q}^5_3\right) \).

Example 3

Let

$$\begin{aligned} Q = \begin{bmatrix} 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1\\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 0 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 0 &{}\quad 1 \end{bmatrix}. \end{aligned}$$

By (51),

$$\begin{aligned} {E_Q} = \left\{ (4,5) \right\} . \end{aligned}$$

Since \({E_Q} \ne \emptyset \), we have \(\kappa _1 = \min \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{45} = 0 = \kappa _2 = \max \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{45} = 0 = \kappa \). Following the discussion at the end of Sect. 4.3, let \(\widehat{Q} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \kappa E = Q\). Clearly, the diagonal entries of Q are all equal to 1. Therefore, we define \(w {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,e \in \mathbb {R}^5\). It follows that \(Q \in \mathcal{M}(G,w)\), where \(G = ({V_Q,E_Q)}\) and \({V_Q} = \{1,2,3,4,5\}\). Note that neither G nor \(\overline{G}\) contains an odd cycle of length at least five as an induced subgraph. It follows that G is a perfect graph, which implies that \(Q \in \mathcal{Q}^5_3\) by (49). By Theorem 2, the relation (46) and Proposition 5, we obtain \(\ell (Q) = \nu (Q) = 1/2\) and the unique optimal solution is given by \(x^* = [0,0,0,0.5,0.5]^T\).

Observe that \(\min \nolimits _{1 \le i \le j \le n}Q_{ij} = Q_{45} = 0 < \min \nolimits _{k = 1,\ldots ,n} Q_{kk} = Q_{11} = 1\), which implies that \(Q \not \in \mathcal{Q}^5_1\) by (30).

Finally, let \(d = [4,-1,-1,-1,-1]^T \in \mathbb {R}^5\). Note that \(e^T d = 0\). However, \(d^T Q d = -2 < 0\), which implies that \(Q \not \in \mathcal{Q}^5_2\) by (39). It follows that \(Q \in \mathcal{Q}^5_3 \backslash \left( \mathcal{Q}^5_1 \cup \mathcal{Q}^5_2\right) \).

As illustrated by Examples 1, 2, and 3, each of the three sets \(\mathcal{Q}_1\), \(\mathcal{Q}_2\), and \(\mathcal{Q}_3\) may contain an element that does not belong to the other two. The final example in this section illustrates that there exist matrices for which the corresponding (StQP) instance admits an exact doubly nonnegative relaxation but they do not belong to any of the three sets \(\mathcal{Q}^n_1\), \(\mathcal{Q}^n_2\), and \(\mathcal{Q}^n_3\).

Example 4

Let

$$\begin{aligned} Q = \begin{bmatrix} 2 &{}\quad 2 &{}\quad 2 &{}\quad 2 &{}\quad 2\\ 2 &{}\quad 2 &{}\quad 2 &{}\quad 2 &{}\quad 2 \\ 2 &{}\quad 2 &{}\quad 2 &{}\quad 1 &{}\quad 2 \\ 2 &{}\quad 2 &{}\quad 1 &{}\quad 2 &{}\quad 0 \\ 2 &{}\quad 2 &{}\quad 2 &{}\quad 0 &{}\quad 2 \end{bmatrix}. \end{aligned}$$

Note that \(\min \nolimits _{1 \le i \le j \le n}Q_{ij} = Q_{45} = 0 < \min \nolimits _{k = 1,\ldots ,n} Q_{kk} = Q_{11} = 2\), which implies that \(Q \not \in \mathcal{Q}^5_1\) by (30).

Let \(d = [4,-1,-1,-1,-1]^T \in \mathbb {R}^5\). Note that \(e^T d = 0\). However, \(d^T Q d = -6 < 0\), which implies that \(Q \not \in \mathcal{Q}^5_2\) by (39).

By (51),

$$\begin{aligned} {E_Q} = \left\{ (3,4),(4,5) \right\} . \end{aligned}$$

Since \({E_Q} \ne \emptyset \), we have \(\kappa _1 = \min \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{45} = 0 < \kappa _2 = \max \nolimits _{(i,j) \in {E_Q}} Q_{ij} = Q_{34} = 1\), which implies that \(Q \not \in \mathcal{Q}^5_3\) by the discussion at the end of Sect. 4.3. It follows that \(Q \not \in \left( \mathcal{Q}^5_1 \cup \mathcal{Q}^5_2 \cup \mathcal{Q}^5_3\right) \).

On the other hand, an optimal solution of the corresponding instance of (StQP) is given by \(x^* = [0,0,0,0.5,0.5]^T\), and \(\nu (Q) = 1\). Finally,

$$\begin{aligned} Q - \left( (x^*)^T Q x^* \right) E = \begin{bmatrix} 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1\\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 0 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 0 &{}\quad 1 &{}\quad -1 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad -1 &{}\quad 1 \end{bmatrix} = \underbrace{\begin{bmatrix} 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 1 &{}\quad -1 \\ 0 &{}\quad 0 &{}\quad 0 &{}\quad -1 &{}\quad 1 \end{bmatrix}}_{P} + \underbrace{\begin{bmatrix} 0 &{}\quad 1 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 1 &{}\quad 0 &{}\quad 1 &{}\quad 1 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ 1 &{}\quad 1 &{}\quad 1 &{}\quad 0 &{}\quad 0 \end{bmatrix}}_{N}, \end{aligned}$$

which implies that \(Q - \left( (x^*)^T Q x^* \right) E \in \mathcal{SPN}^5\) since \(P \in \mathcal{PSD}^5\) and \(N \in \mathcal{N}^5\). Therefore, by Lemma 3, it follows that \(Q \in \mathcal{Q}_{x^*}\), i.e., \(\ell (Q) = \nu (Q) = 1\), which implies that \(Q \in \mathcal{Q}^5\). We conclude that \(Q \in \mathcal{Q}^5 \backslash \left( \mathcal{Q}^5_1 \cup \mathcal{Q}^5_2 \cup \mathcal{Q}^5_3\right) \).

5 Relations with maximal cliques of the convexity graph

In this section, we establish several relations between the tightness of the doubly nonnegative relaxation of an instance of (StQP) and the maximal cliques of the convexity graph associated with the matrix \(Q \in \mathcal{S}^n\).

5.1 Convexity graph

For a given \(Q \in \mathcal{S}^n\), recall that the convexity graph of Q is given by \(G_Q = (V_Q,E_Q)\), where the set of vertices is given by \(V_Q = \{1,\ldots ,n\}\) and the set of edges \(E_Q\) is given by (51). It is easy to verify the following shift invariance property of the convexity graph.

$$\begin{aligned} G_{Q + \lambda E} = G_{Q}, \quad {\text {for all}}~Q \in \mathcal{S}^n, \quad {\text {for all}}~\lambda \in \mathbb {R}. \end{aligned}$$

Recall that a clique in a simple undirected graph is a set of mutually adjacent vertices. For a given \(Q \in \mathcal{S}^n\), the next result provides a useful connection between the cliques of the convexity graph \(G_Q\) and the index set A(x) of an optimal solution \(x \in \varOmega (Q)\) of the corresponding instance of (StQP), where \(A(\cdot )\) is given by (2).

Theorem 3

(Scozzari and Tardella, 2008) Given \(Q \in \mathcal{S}^n\), there exists an optimal solution \(x^* \in \varOmega (Q)\) of the corresponding instance of (StQP) such that the vertices corresponding to \(A(x^*)\) form a clique in the convexity graph \(G_Q = (V_Q,E_Q)\), where \(V_Q = \{1,\ldots ,n\}\), and \(A(\cdot )\) and \(E_Q\) are given by (2) and (51), respectively.

Let \(w \in \mathbb {R}^n_{++}\) and let \(G = (V_G,E_G)\) be a graph with \(V_G = \{1,\ldots ,n\}\). Note that, for any \(Q \in \mathcal{M}(G,w)\), where \(\mathcal{M}(G,w)\) is given by (41), the convexity graph of Q is given by \(G_Q = G\). Therefore, by Theorem 3, the corresponding (StQP) instance has an optimal solution \(x^* \in \varOmega (Q)\) such that \(A(x^*)\) induces a clique in G. Indeed, for any maximum weight clique \(C \subseteq V_Q \), an optimal solution of the corresponding (StQP) presented in Theorem 2 is given by (see, e.g., [14])

$$\begin{aligned} x^*_j = {\left\{ \begin{array}{ll} \frac{w_j}{w(C)}, &{} \text {if}~j \in C, \\ 0 &{} \text {otherwise,} \end{array}\right. } \end{aligned}$$

where \(w(C) = \sum \nolimits _{j \in C} w_j\). Note that \(A(x^*) = C\), which is a clique in \(G_Q\).

5.2 Maximal cliques of the convexity graph

For a given simple undirected graph \(G = (V,E)\), a clique \(C \subseteq V\) is said to be maximal if it is not a proper subset of a larger clique in G. For a given \(Q \in \mathcal{S}^n\), the following lemma establishes useful relations between \(\ell (Q)\), \(\nu (Q)\), and the maximal cliques of the convexity graph.

Lemma 13

For a given \(Q \in \mathcal{S}^n\), let \(G_Q = (V_Q,E_Q)\) denote the convexity graph of Q and let \(\mathfrak {C}\) denote the collection of all maximal cliques of \(G_Q\). Then,

$$\begin{aligned} \ell (Q) \le \min \nolimits _{C \in \mathfrak {C}} \ell (Q_{CC}) \le \min \nolimits _{C \in \mathfrak {C}} \nu (Q_{CC}) = \nu (Q). \end{aligned}$$
(52)

Furthermore, each of the two inequalities is satisfied as an equality if and only if \(Q \in \mathcal{Q}^n\), where \(\mathcal{Q}^n\) is given by (16).

Proof

Consider the first inequality in (52). For any maximal clique \(C \in \mathfrak {C}\), consider any optimal solution \(X^* \in \mathcal{DN}^{|C|}\) of (DN-P) corresponding to \(Q_{CC} \in \mathcal{S}^{|C|}\). By Lemma 1 (ii) and (v), \(X^*\) can be extended to a solution \(\widehat{X} \in \mathcal{S}^n\) by defining \(\widehat{X}_{CC} = X^*\) and \(\widehat{X}_{ij} = 0\) if \(i \not \in C\) or \(j \not \in C\). It follows that \(\widehat{X} \in \mathcal{DN}^n\) is a feasible solution of (DN-P) corresponding to Q and

$$\begin{aligned} \ell (Q) \le \langle Q, \widehat{X} \rangle = \langle Q_{CC}, X^* \rangle = \ell (Q_{CC}), \end{aligned}$$

which establishes the first inequality in (52).

The second inequality in (52) immediately follows from (6).

Consider now the last equality in (52). For any maximal clique \(C \in \mathfrak {C}\), we have

$$\begin{aligned} \nu (Q_{CC}) = \min \limits _{w \in \varDelta _{|C|}} w^T Q_{CC} \, w = \min \limits _{x \in \varDelta _n}\left\{ x^T Q x: x_j = 0,~j \not \in C \right\} \ge \nu (Q), \end{aligned}$$

which implies that \(\nu (Q) \le \min \nolimits _{C \in \mathfrak {C}} \nu (Q_{CC})\).

By Theorem 3, there exists an \(x^* \in \varOmega (Q)\) such that the subgraph of \(G_Q\) induced by \(A(x^*)\) is a clique. Let \(\widehat{C} \in \mathfrak {C}\) denote any maximal clique of G(Q) such that \(A(x^*) \subseteq \widehat{C}\). Since \(e^T x^* = e_{\widehat{C}}^T x^*_{\widehat{C}} = 1\), it follows that

$$\begin{aligned} \nu (Q) = (x^*)^T Q x^* = \left( x^*_{\widehat{C}} \right) ^T Q_{\widehat{C}\widehat{C}} \left( x^*_{\widehat{C}} \right) \ge \nu (Q_{\widehat{C}\widehat{C}}) \ge \min \nolimits _{C \in \mathfrak {C}} \nu (Q_{CC}), \end{aligned}$$

which establishes the reverse inequality. Therefore, \(\nu (Q) = \min \nolimits _{C \in \mathfrak {C}} \nu (Q_{CC})\).

The last assertion immediately follows from (16). \(\square \)

Next, we present two examples illustrating that each of the two inequalities in (52) can be strict.

Example 5

Let

$$\begin{aligned} Q = \begin{bmatrix} 1 &{}\quad 0 &{}\quad 0.9 &{}\quad 0.9 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 0 &{}\quad 0.9 &{}\quad 0.9 \\ 0.9 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 0.9 \\ 0.9 &{}\quad 0.9 &{}\quad 0 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 0.9 &{}\quad 0.9 &{}\quad 0 &{}\quad 1 \end{bmatrix}. \end{aligned}$$

The convexity graph \(G_Q = (V_Q,E_Q)\) is given by

figure a

Since \(G_Q\) is a complete graph, the only maximal clique in \(G_Q\) is \(C_1 = \{1,2,3,4,5\}\), i.e., \(\mathfrak {C} = \{C_1\}\). In this example,

$$\begin{aligned} 0.4472\approx & {} \ell (Q) = \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \ell (Q_{C_1 C_1}) \\< & {} \min \limits _{C \in \mathfrak {C}} \nu (Q_{CC}) = \nu (Q_{C_1 C_1}) = \nu (Q) \approx 0.4872, \end{aligned}$$

which implies that the first inequality in (52) is satisfied with equality, whereas the second inequality is strict.

Example 6

Let

$$\begin{aligned} Q = \begin{bmatrix} 1 &{}\quad 0 &{}\quad 0.9 &{}\quad 1 &{}\quad 0\\ 0 &{}\quad 1 &{}\quad 0 &{}\quad 1 &{}\quad 1 \\ 0.9 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{}\quad 1 \\ 1 &{}\quad 1 &{}\quad 0 &{}\quad 1 &{}\quad 0 \\ 0 &{}\quad 1 &{}\quad 1 &{}\quad 0 &{}\quad 1 \end{bmatrix}. \end{aligned}$$

The convexity graph \(G_Q = (V_Q,E_Q)\) is given by

figure b

Therefore, \(\mathfrak {C} = \{C_1,C_2,C_3,C_4,C_5\}\), where

$$\begin{aligned} C_1 = \{1,2,3\}, \quad C_2 = \{1,5\}, \quad C_3 =\{3,4\}, \quad C_4 = \{4,5\}. \end{aligned}$$

In this example,

$$\begin{aligned} 0.4472\approx & {} \ell (Q) \\< & {} \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \ell (Q_{C_1 C_1}) = \min \limits _{C \in \mathfrak {C}} \nu (Q_{CC})\\= & {} \nu (Q_{C_1 C_1}) = \nu (Q) \approx 0.4872, \end{aligned}$$

which implies that the first inequality in (52) is strict, whereas the second inequality is satisfied with equality.

By Lemma 13, unless \(G_Q\) is a complete graph, an instance of (StQP) can be decomposed into smaller instances of (StQP) each of which corresponds to a maximal clique of the convexity graph \(G_Q\) (see Example 6). In particular, if \(G_Q\) has several connected components, then the problem naturally decomposes into subproblems corresponding to each connected component. Furthermore, the lower bound \(\ell (Q)\) can be improved if one focuses instead on the principal submatrices of Q corresponding to maximal cliques of the convexity graph \(G_Q\) (see Example 6). We remark that, in the worst case, a graph with n vertices may have as many as \(3^{n/3}\) of maximal cliques [26]. On the other hand, several classes of graphs, including planar and chordal graphs, have a polynomial number of maximal cliques (see, e.g., [31] and the references therein). Therefore, on instances of (StQP) with such a convexity graph, Lemma 13 implies that the original problem can be decomposed into a polynomial number of smaller problems and that the lower bound can potentially be improved by focusing only on the doubly nonnegative relaxations of the smaller problems corresponding to maximal cliques of \(G_Q\).

The next result characterizes the set of instances of (StQP) for which the second inequality in (52) is satisfied with equality.

Lemma 14

For a given \(Q \in \mathcal{S}^n\), let \(G_Q = (V_Q,E_Q)\) denote the convexity graph of Q and let \(\mathfrak {C}\) denote the collection of all maximal cliques of \(G_Q\). Then,

$$\begin{aligned} \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \nu (Q) \end{aligned}$$
(53)

if and only if there exists \(C^* \in \mathfrak {C}\) such that

$$\begin{aligned} Q_{C^* C^*} \in \mathcal{Q}^{|C^*|}, \quad \text {and} \quad \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \ell (Q_{C^* C^*}), \end{aligned}$$
(54)

where \(\mathcal{Q}^n\) is given by (16).

Proof

Suppose that (53) holds. By Lemma 13,

$$\begin{aligned} \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \min \limits _{C \in \mathfrak {C}} \nu (Q_{CC}) = \nu (Q). \end{aligned}$$

Then, by (6), there exists \(C^* \in \mathfrak {C}\) such that \(\min \nolimits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \ell (Q_{C^* C^*}) = \nu (Q_{C^* C^*}) = \nu (Q)\), which implies that (54) is satisfied.

Conversely, if (54) holds, it follows from Lemma 13 that

$$\begin{aligned} \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \ell (Q_{C^* C^*}) = \nu (Q_{C^* C^*}) \le \min \limits _{C \in \mathfrak {C}} \nu (Q_{CC}) = \nu (Q) \le \nu (Q_{C^* C^*}), \end{aligned}$$

which implies that (53) holds. \(\square \)

For instance, for each \(C \in \mathfrak {C}\) in Example 6, since \(|C| \le 4\), we have \(Q_{CC} \in \mathcal{Q}^{|C|}\) by (5), which implies the existence of a maximal clique (i.e., \(C_1\)) that satisfies (54), and therefore (53) by Lemma 14. On the other hand, since there is only one maximal clique \(C_1\) in Example 5 and \(Q_{C_1} = Q \not \in \mathcal{Q}^5\), Lemma 14 implies that the second inequality in (52) is strict.

5.3 Matrix completion and SPN completable graphs

Lemma 14 establishes the equivalence of the conditions (53) and (54). However, as illustrated by Example 6, neither of these conditions implies that \(Q \in \mathcal{Q}^n\), where \(\mathcal{Q}^n\) is given by (16).

In this section, we identify an additional condition under which either of the conditions (53) and (54) implies that \(Q \in \mathcal{Q}^n\).

First, we define the matrix completion problem. We mostly follow the discussion in [35]. Let \(V = \{1,\ldots ,n\}\) and let \(F \subseteq V \times V\) be a set with the following properties.

$$\begin{aligned} (i,i) \in F, \quad {\text {for all}}~i \in V, \quad \text {and} \quad (i,j) \in F \Longleftrightarrow (j,i) \in F, \quad 1 \le i < j \le n. \end{aligned}$$
(55)

For a given set \(F \subseteq V \times V\) that satisfies (55), a partial matrix \(B \in \mathcal{S}^n\) is a matrix whose entries \(B_{ij}\) are specified if and only if \((i,j) \in F\). For a given set \(\mathcal{K} \subseteq \mathcal{S}^n\), the matrix completion problem is concerned with finding a matrix \(\widehat{B} \in \mathcal{K}\) such that

$$\begin{aligned} \widehat{B}_{ij} = B_{ij}, \quad {\text {for all}}~(i,j) \in F, \quad \text {and} \quad \widehat{B} \in \mathcal{K}. \end{aligned}$$
(56)

The SPN completion problem is concerned with whether a partial matrix \(B \in \mathcal{S}^n\) is SPN completable, i.e., whether there exists \(\widehat{B} \in \mathcal{K}\) that satisfies (56), with \(\mathcal{K} = \mathcal{SPN}^n\). By Lemma 1 (iv), if a partial matrix B is SPN completable, then each of its fully specified \(r \times r\) principal submatrices should belong to \(\mathcal{SPN}^r\), where \(r = 1,\ldots ,n\). A partial matrix B that satisfies this necessary condition is called a partial SPN matrix.

For a given simple undirected graph \(G = (V_G,E_G)\), where \(V_G = \{1,\ldots ,n\}\), one can associate an SPN completion problem, where \(B_{ij} = B_{ji}\) is specified if and only if \((i,j) \in E_G\) or \(i = j\). Such a matrix B is called a G-partial matrix. A graph G is said to be SPN completable if every G-partial SPN matrix is SPN completable.

The following result in [35] presents a full characterization of SPN completable graphs.

Theorem 4

(Shaked-Monderer et al., 2016) Let \(G = (V_G,E_G)\) be a graph, where \(V_G = \{1,\ldots ,n\}\). G is SPN completable if and only if every odd cycle in G induces a complete subgraph of G.

Recall that each of the two inequalities in (52) is satisfied with equality if and only if \(Q \in \mathcal{Q}^n\) by Lemma 13. Furthermore, Lemma 14 gives a full characterization of instances for which the latter inequality in (52) is satisfied with equality. Example 6 illustrates that there exists a matrix \(Q \in \mathcal{S}^5\) that satisfies the conditions of Lemma 14 but \(Q \not \in \mathcal{Q}^5\). In the next result, for a given \(Q \in \mathcal{S}^n\), under the additional assumption that the convexity graph \(G_Q = (V_Q,E_Q)\) is SPN completable, we show that the exactness of the second inequality in (52) implies the exactness of the first inequality, thereby establishing \(Q \in \mathcal{Q}^n\).

Proposition 7

Let \(Q \in \mathcal{S}^n\) be a matrix such that its convexity graph \(G_Q = (V_Q,E_Q)\) is SPN completable. Then, \(Q \in \mathcal{Q}^n\), where \(\mathcal{Q}^n\) is given by (16), if and only if (53) is satisfied.

Proof

Let \(Q \in \mathcal{S}^n\) be a matrix such that its convexity graph \(G_Q = (V_Q,E_Q)\) is SPN completable. By Lemma 13, if \(Q \in \mathcal{Q}^n\), then the condition (53) is satisfied.

Conversely, suppose that (53) is satisfied. Then,

$$\begin{aligned} \min \limits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \nu (Q), \end{aligned}$$

where \(\mathfrak {C}\) is the collection of all maximal cliques of \(G_Q\). For each \(C \in \mathfrak {C}\), we have \(Q_{CC} - \ell (Q_{CC}) E \in \mathcal{SPN}^{|C|}\) by (DN-D) corresponding to \(Q_{CC}\). Since \(\ell (Q_{CC}) \ge \nu (Q)\), it follows that

$$\begin{aligned} Q_{CC} - \nu (Q) E = Q_{CC} - \ell (Q_{CC}) E + (\ell (Q_{CC}) - \nu (Q))E \in \mathcal{SPN}^{|C|}, \quad {\text {for all}}~C \in \mathfrak {C}. \end{aligned}$$
(57)

Consider the following \(G_Q\)-partial matrix \(B \in \mathcal{S}^n\):

$$\begin{aligned} B_{ij} = Q_{ij} -\nu (Q), \quad (i,j) \in E_Q; \quad B_{ii} = Q_{ii} - \nu (Q), \quad i = 1,\ldots ,n. \end{aligned}$$

Note that every fully specified principal submatrix of B corresponds to a maximal clique \(C \in \mathfrak {C}\). By (57), it follows that B is a \(G_Q\)-partial SPN matrix. Since \(G_Q\) is an SPN completable graph by the hypothesis, there exists a matrix \(\widehat{B} \in \mathcal{S}^n\) such that \(\widehat{B} \in \mathcal{SPN}^n\) and

$$\begin{aligned} \widehat{B}_{ij} = B_{ij}, \quad (i,j) \in E_Q, \quad \widehat{B}_{ii} = B_{ii}, \quad i = 1,\ldots ,n. \end{aligned}$$

Therefore, there exist \(\widehat{P} \in \mathcal{PSD}^n\) and \(\widehat{N} \in \mathcal{N}^n\) such that \(\widehat{B} = \widehat{P} + \widehat{N}\). Without loss of generality, we may assume that \(\widehat{N}_{ii} = 0\) for each \(i = 1,\ldots ,n\) by simply increasing all the diagonal elements of \(\widehat{P}\) accordingly if necessary. Therefore,

$$\begin{aligned} \widehat{P}_{ii}= & {} \widehat{B}_{ii} - \widehat{N}_{ii} = \widehat{B}_{ii} = Q_{ii} - \nu (Q), \quad i = 1,\ldots ,n, \end{aligned}$$
(58)
$$\begin{aligned} \widehat{P}_{ij}= & {} \widehat{B}_{ij} - \widehat{N}_{ij} \le \widehat{B}_{ij} = Q_{ij} - \nu (Q), \quad (i,j) \in E_Q. \end{aligned}$$
(59)

Let us fix (ij) such that \(i \ne j\) and \((i,j) \not \in E_Q\). By the definition of \(E_Q\) in (51), we have \(2 Q_{ij} \ge Q_{ii} + Q_{ij}\). Therefore, for any such (ij), since \(\widehat{P} \in \mathcal{PSD}^n\),

$$\begin{aligned} \widehat{P}_{ij} \le \frac{1}{2} \left( \widehat{P}_{ii} + \widehat{P}_{jj} \right) = \frac{1}{2} \left( Q_{ii} + Q_{jj}\right) - \nu (Q) \le Q_{ij} - \nu (Q) \end{aligned}$$
(60)

by (58). Finally, combining (58), (59), and (60), we conclude that there exists a matrix \(\widehat{N} \in \mathcal{N}^n\) such that \(\widehat{N}_{ii} = 0\) for each \(i = 1,\ldots ,n\) and

$$\begin{aligned} Q - \nu (Q) E = \widehat{P} + \widehat{N}, \end{aligned}$$

which implies that \(Q - \nu (Q) E \in \mathcal{SPN}^n\). Therefore, by (DN-D), we obtain \(\ell (Q) \ge \nu (Q)\), which, together with (6), implies that \(\ell (Q) = \nu (Q)\), or equivalently, that \(Q \in \mathcal{Q}^n\). \(\square \)

Example 7

Consider Example 4. Note that \(Q \in \mathcal{Q}^5 \backslash \left( \mathcal{Q}^5_1 \cup \mathcal{Q}^5_2 \cup \mathcal{Q}^5_3\right) \). The convexity graph \(G_Q = (V_Q,E_Q)\) is given by \(V_Q = \{1,2,3,4,5\}\) and

$$\begin{aligned} E_Q = \left\{ (3,4),(4,5) \right\} . \end{aligned}$$

Clearly, \(G_Q\) is SPN completable since it does not contain any odd cycle. The set of maximal cliques of \(G_Q\) is given by \(\mathfrak {C} = \{C_1,C_2\}\), where \(C_1 = \{3,4\}\) and \(C_2 = \{4,5\}\). Since \(|C_1| = |C_2| = 2 \le 4\), it follows that \(\ell (Q_{C_1 C_1}) = \nu (Q_{C_1 C_1}) = 1.5\) and \(\ell (Q_{C_2 C_2}) = \nu (Q_{C_2 C_2}) = 1\), which implies that the condition (54), and equivalently (53), will be satisfied. Therefore, by (53), \(\min \nolimits _{C \in \mathfrak {C}} \ell (Q_{CC}) = \min \nolimits _{C \in \mathfrak {C}} \nu (Q_{CC}) = \nu (Q) = 1\). Since \(G_Q\) is SPN completable, it follows from Proposition 7 that \(Q \in \mathcal{Q}^5\).

As illustrated by Example 7, Proposition 7 may be helpful for identifying a matrix \(Q \in \mathcal{Q}^n \backslash \left( \mathcal{Q}^n_1 \cup \mathcal{Q}^n_2 \cup \mathcal{Q}^n_3\right) \). An interesting question is whether every matrix \(Q \in \mathcal{Q}^n \backslash \left( \mathcal{Q}^n_1 \cup \mathcal{Q}^n_2 \cup \mathcal{Q}^n_3\right) \) satisfies the conditions of Proposition 7. We close this section with the following counterexample.

Example 8

Let

$$\begin{aligned} Q = \begin{bmatrix} 2 &{}\quad 0 &{}\quad 0 &{}\quad 2 &{}\quad 1\\ 0 &{}\quad 2 &{}\quad 0 &{}\quad 2 &{}\quad 2\\ 0 &{}\quad 0 &{}\quad 2 &{}\quad 0 &{}\quad 2\\ 2 &{}\quad 2 &{}\quad 0 &{}\quad 2 &{}\quad 0\\ 1 &{}\quad 2 &{}\quad 2 &{}\quad 0 &{}\quad 2 \end{bmatrix}. \end{aligned}$$

The convexity graph \(G_Q = (V_Q,E_Q)\) is given by

figure c

Therefore, \(\mathfrak {C} = \{C_1,C_2,C_3,C_4,C_5\}\), where

$$\begin{aligned} C_1 = \{1,2,3\}, \quad C_2 = \{1,5\}, \quad C_3 =\{3,4\}, \quad C_4 = \{4,5\}. \end{aligned}$$

In this example, an optimal solution is given by \(x^* = [1/3,1/3,1/3,0,0]^T\) and \(\nu (Q) = \nu (Q_{C_1 C_1}) = \ell (Q_{C_1 C_1}) = \min \nolimits _{C \in \mathfrak {C}} \ell (Q_{CC}) = 2/3\). One can numerically verify that \(\ell (Q) = \nu (Q) = 2/3\), which implies that \(Q \in \mathcal{Q}^5\).

On the other hand, it is easy to verify that \(Q \not \in \mathcal{Q}^5_1\). For \(d = [-1, -1, -1, 2, 1]^T \in e^\perp \), we have \(d^T Q d = -10 < 0\), which implies that \(Q \not \in \mathcal{Q}^5_2\). By a similar argument at the end of Sect. 4.3, we obtain \(Q \not \in \mathcal{Q}^5_3\). Finally, since the subgraph induced by the odd cycle consisting of the vertices \(\{1,2,3,4,5\}\) is not a complete graph, \(G_Q\) is not SPN completable by Theorem 4. It follows that Q does not satisfy the conditions of Proposition 7.

6 Standard quadratic programs with positive gaps

In this section, we focus on the set of instances of (StQP) for which there is a positive gap between the lower bound arising from the doubly nonnegative relaxation and the optimal value of (StQP), i.e.,

$$\begin{aligned} \mathcal{S}^n \backslash \mathcal{Q}^n = \left\{ Q \in \mathcal{S}^n: \ell (Q) < \nu (Q)\right\} . \end{aligned}$$

We first present an algebraic characterization of such instances. Based on this characterization, we then propose a procedure for generating such an instance.

6.1 An algebraic characterization

The next result gives a complete algebraic characterization of the set \(\mathcal{S}^n \backslash \mathcal{Q}^n\).

Proposition 8

Let \(Q \in \mathcal{S}^n\). Then \(Q \in \mathcal{S}^n \backslash \mathcal{Q}^n\) if and only if there exist \(\lambda \in \mathbb {R}\) and \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\) such that

$$\begin{aligned} Q = \lambda E + M. \end{aligned}$$
(61)

Furthermore, for any decomposition given by (61), we have \(\lambda = \nu (Q)\) and \(\varOmega (Q) = \mathbf {V}^M\), where \(\mathbf {V}^M\) is given by (29).

Proof

Let \(Q \in \mathcal{S}^n\) be such that \(Q \in \mathcal{S}^n \backslash \mathcal{Q}^n\). Let \(x^* \in \varOmega (Q)\) be any optimal solution. Let us define \(M {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,Q - \left( (x^*)^T Q x^* \right) E\). By Lemma 6, \(M \in \mathbf {bd} ~\mathcal{COP}^n\), where \(\mathbf {bd} ~\mathcal{COP}^n\) is given by (28). Since \(Q \not \in \mathcal{Q}^n\), it follows that \(Q \not \in \mathcal{Q}_{x^*}\), where \(\mathcal{Q}_{x^*}\) is given by (20). By Lemma 3, \(M \not \in \mathcal{SPN}^n\). It follows that \(Q = \lambda E + M\), where \(\lambda = (x^*)^T Q x^*\) and \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\).

Conversely, suppose that \(Q = \lambda E + M\), where \(\lambda \in \mathbb {R}\) and \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\). For any \(x \in \varDelta _n\), since \(M \in \mathcal{COP}^n\),

$$\begin{aligned} x^T Q x = \lambda + x^T M x \ge \lambda , \end{aligned}$$

which implies that \(\nu (Q) \ge \lambda \). Since \(M \in \mathbf {bd} ~\mathcal{COP}^n\), it follows that \(\mathbf {V}^M \ne \emptyset \), where \(\mathbf {V}^M\) is given by (29). Then, for any \(x^* \in \mathbf {V}^M\), we have \((x^*)^T Q x^* = \lambda + (x^*)^T M x^* = \lambda \), which implies that \(\nu (Q) = \lambda \) and \(x^* \in \varOmega (Q)\). Suppose, for a contradiction, that \(Q \in \mathcal{Q}^n\). Then, \(Q \in \mathcal{Q}_{x^*}\) by (20). By Lemma 3, \(Q - ((x^*)^T Q x^*) E = Q - \nu (Q) E = Q - \lambda E = M \in \mathcal{SPN}^n\), which contradicts the hypothesis that \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\). Therefore, \(Q \in \mathcal{S}^n \backslash \mathcal{Q}^n\).

For the last assertion, the argument in the previous paragraph already establishes that \(\nu (Q) = \lambda \) and \(\mathbf {V}^M \subseteq \varOmega (Q)\). Conversely, since \(M \in \mathcal{COP}^n\), we have \(x^T Q x = \lambda + x^T M x > \lambda \) for any \(x \in \varDelta _n \backslash \mathbf {V}^M\), which implies that \(\varOmega (Q) \subseteq \mathbf {V}^M\), thereby establishing \(\varOmega (Q) = \mathbf {V}^M\). \(\square \)

6.2 Generating standard quadratic programs with a positive gap

Note that Proposition 8 presents a complete algebraic characterization of the set of instances of (StQP) with a positive gap. For a given \(Q \in \mathcal{S}^n\), checking if a decomposition given by (61) exists is equivalent to solving the corresponding (StQP) instance, which is clearly an intractable problem. On the other hand, by relying on this characterization, we propose a procedure to generate an instance of (StQP) with a positive gap.

By Proposition 8, the main ingredient is a matrix \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\). Recall that \(\mathcal{COP}^n = \mathcal{SPN}^n\) for each \(n \le 4\) by (5). Therefore, \(n = 5\) is the smallest dimension for which \(\mathcal{COP}^n \backslash \mathcal{SPN}^n \ne \emptyset \). To that end, recall the well-known Horn matrix (see, e.g., [17]) given by

$$\begin{aligned} H {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\begin{bmatrix} 1 &{} -1 &{} 1 &{} 1 &{} -1 \\ -1 &{} 1 &{} -1 &{} 1 &{} 1 \\ 1 &{} -1 &{} 1 &{} -1 &{} 1 \\ 1 &{} 1 &{} -1 &{} 1 &{} -1 \\ -1 &{} 1 &{} 1 &{} -1 &{} 1 \end{bmatrix} \in \mathbf {bd} ~\mathcal{COP}^5 \backslash \mathcal{SPN}^5, \end{aligned}$$

and

$$\begin{aligned} \left\{ \frac{1}{2}\left( e_i + e_j\right) \in \mathbb {R}^5: (i,j) \in \left\{ (1,2),(2,3),(3,4),(4,5),(5,1)\right\} \right\} \subseteq \mathbf {V}^H, \end{aligned}$$

where \(\mathbf {V}^H\) is given by (29). Note that \(H \in \mathcal{S}^5 \backslash \mathcal{Q}^5\) by Proposition 8. Indeed, we have \(\ell (H) \approx -0.1056\), whereas \(\nu (H) = 0\).

For any \(n \ge 5\), let \(B \in \mathcal{S}^{n - 5}\) and let \(C \in \mathbb {R}^{(n-5) \times 5}\) be two matrices such that \(B \in \mathcal{COP}^{n-5}\) and each entry of C is nonnegative. Note, in particular, that one may choose \(B \in \mathcal{SPN}^{n-5}\) (or even \(B \in \mathcal{N}^{n-5}\)) and \(C = 0\). Let us define

$$\begin{aligned} \widehat{M} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\begin{bmatrix} B &{} C \\ C^T &{} H \end{bmatrix} \in \mathcal{S}^n. \end{aligned}$$
(62)

By [34, Lemma 3.4 (a)], it follows that \(\widehat{M} \in \mathcal{COP}^n\). Finally, let \(J \in \mathbb {R}^{n \times n}\) be an arbitrary permutation matrix and let \(D \in \mathcal{S}^n\) be an arbitrary diagonal matrix with strictly positive entries. Let us define

$$\begin{aligned} M {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,J D \widehat{M} D J^T, \end{aligned}$$
(63)

where \(\widehat{M}\) is given by (62). By Lemma 1 (ii) and (iii), \(M \in \mathcal{COP}^n\) since \(\widehat{M} \in \mathcal{COP}^n\). Furthermore, \(M \not \in \mathcal{SPN}^n\) since, otherwise, this would imply that \(H \in \mathcal{SPN}^5\) by Lemma 1 (ii), (iii), and (iv). Finally, we claim that \(M \in \mathbf {bd} ~\mathcal{COP}^n\). To see this, let \(u \in \mathbf {V}^H\), and let us define \(\widehat{u} {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,[0^T,u^T]^T \in \varDelta _n\), which implies that \(\widehat{u}^T \widehat{M} \widehat{u} = 0\), i.e., \(\widehat{M} \in \mathbf {bd} ~\mathcal{COP}^n\). Therefore, we obtain \(v^T M v = 0\), where \(v {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,J D^{-1} \widehat{u} \in \mathbb {R}^n_+ \backslash \{0\}\). Therefore, defining \(w {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,(1/(e^T v))v \in \varDelta _n\), we have \(w \in \mathbf {V}^M\), where \(\mathbf {V}^M\) is defined as in (29). It follows that \(M \in \mathbf {bd} ~\mathcal{COP}^n \backslash \mathcal{SPN}^n\).

Finally, by picking an arbitrary real number \(\lambda \in \mathbb {R}\) and defining \(Q {\, \mathrel {\overset{{\mathsf{def}}}{=}}} \,\lambda E + M\), we ensure that \(Q \in \mathcal{S}^n \backslash \mathcal{Q}^n\), \(\nu (Q) = \lambda \), and \(\varOmega (Q) = \mathbf {V}^M\) by Proposition 8.

We close this section by making two observations. First, suppose that \(n \ge 6\). By choosing \(B = 0\) in (62) and \({J} = D = I\) in (63), we can guarantee that any \(x \in \varDelta _n\) of the form \(x = [\hat{x}^T,0^T]^T\), where \(\hat{x} \in \varDelta _{n-5}\) satisfies \(x \in \mathbf {V}^M\). Then, by Proposition 8, any such \(x \in \varDelta _n\) would be an optimal solution of the (StQP) instance corresponding to \(Q = \lambda E + M\) for any \(\lambda \in \mathbb {R}\). Therefore, for \(n \ge 6\) and for any \(x \in \varDelta _n\) such that \(|A(x)| \le n - 5\), where A(x) is given by (2), one can construct a matrix \(Q \in \mathcal{S}_x \backslash \mathcal{Q}_x\), where \(\mathcal{S}_x\) and \(\mathcal{Q}_x\) are given by (17) and (20), respectively. Second, we note that the Horn matrix H in the definition (62) can be replaced by any extreme ray of \(\mathcal{COP}^5\) that does not belong to \(\mathcal{SPN}^5\), which was fully characterized in [18, Theorem 3.1]. Similarly, for \(n \ge 6\), one can use any extreme ray of \(\mathcal{COP}^6 \backslash \mathcal{SPN}^6\), which has recently been characterized in [1]. However, such characterizations are not currently known for \(n \ge 7\).

7 Concluding remarks

In this paper, we studied the doubly nonnegative relaxations of standard quadratic programs. We presented characterizations of instances of (StQP) that admit an exact relaxation as well as those with a positive gap. Both of our characterizations can be used as algorithmic procedures to construct an instance of (StQP) with a prespecified optimal solution, for which the doubly nonnegative relaxation is either exact or has a positive gap. In addition, we explicitly identified three families of instances with exact relaxations. We also established several properties between the maximal cliques of the convexity graph and the tightness of the relaxation.

For a given \(Q \in \mathcal{S}^n\), consider an exact optimal solution of (DN-D), which satisfies \(Q = \ell (Q) E + P + N\), where \(P \in \mathcal{PSD}^n\) and \(\mathcal{N} \in \mathcal{N}^n\). We can check if there exists \(x \in \varDelta _n\) such that \(Q \in \mathcal{Q}_x\), where \(\mathcal{Q}_x\) is given by (20), by solving the following feasibility problem:

$$\begin{aligned} Px = 0, \quad x^T N x = 0, \quad x \in \varDelta _n. \end{aligned}$$

This problem can easily be cast as the following mixed integer linear feasibility problem:

$$\begin{aligned} \begin{array}{rcl} Px &{} = &{} 0, \\ e^T x &{} = &{} 1, \\ x_j &{} \le &{} y_j, \quad j = 1,\ldots ,n,\\ x_j &{} = &{} 0, \quad j \in \{1,\ldots ,n\} \text { s.t. } N_{jj}> 0,\\ y_i + y_j &{} \le &{} 1, \quad 1 \le i < j \le n \text { s.t. } N_{ij} > 0,\\ x &{} \ge &{} 0,\\ y_j &{} \in &{} \{0,1\}, \quad j = 1,\ldots ,n. \end{array} \end{aligned}$$

However, this procedure requires an exact solution of the dual problem (DN-D) and does not shed light on the existence of a polynomial-time algorithm for the membership problem in \(\mathcal{Q}^n\), which we leave as a future research direction.

Another interesting research direction is the investigation of the topological properties of \(\mathcal{Q}^n\) as well as the set \(\mathcal{S}^n \backslash \mathcal{Q}^n\). We intend to study these problems in the near future.