On the complexity of nonnegative matrix factorization

Stephen A. Vavasis

Nonnegative matrix factorization

Nonnegative matrix factorization (NMF) has emerged in the past decade as a powerful tool for clustering data and finding features in datasets. Lee and Seung showed that NMF can find features in image databases, and Hofmann showed that probabilistic latent semantic analysis, a variant of NMF, can effectively cluster documents according to their topics. Cohen and Rothblum describe applications for NMF in probability, quantum mechanics and other fields.

Nonnegative matrix factorization is defined as the following problem. The input is (A,k)(A,k), where AA is an m×nm\times n matrix with nonnegative entries, and kk is an integer such that 1≤k≤min⁡(m,n)1\leq k\leq\min(m,n). The output is a pair of matrices (W,H)(W,H) with W∈Rm×kW\in{\bf R}^{m\times k} and H∈Rk×nH\in{\bf R}^{k\times n} such that WW and HH both have nonnegative entries and such that A≈WHA\approx WH. The precise sense in which WHWH approximates AA may vary from one author to the next. Furthermore, some authors seek sparsity in either WW or HH or both. Sparsity may be imposed as a term in the objective function .

The algorithms proposed by and others for NMF have generally been based on local improvement heuristics. Another class of heuristics is based on greedy rank-one downdating . No algorithm proposed in the literature comes with a guarantee of optimality. This suggests that solving NMF to optimality may be a difficult problem, although to the best of our knowledge this has never been established formally.

The main purpose of this paper is to provide the proof that NMF is NP-hard. This paper considers a particular version of NMF that we call exact NMF, which is defined as follows.

EXACT NMF: The input is a matrix A∈Rm×nA\in{\bf R}^{m\times n} with nonnegative entries whose rank is exactly kk, k≥1k\geq 1. The output is a pair of matrices (W,H)(W,H), where W∈Rm×kW\in{\bf R}^{m\times k} and H∈Rk×nH\in{\bf R}^{k\times n}, WW and HH both have nonnegative entries, and A=WHA=WH. If no such (W,H)(W,H) exist, then the output is a statement of nonexistence of a solution. The decision version of EXACT NMF takes the same input and gives as output yes if such a WW and HH exists else it outputs no.

Implicit in the statement of exact NMF is an assumption that the rank of AA is known. If AA is specified as rational data, then its rank may determined in polynomial time via reduction to row-echelon form . In practice, one would usually prefer singular value decomposition to determine rank(A)\mathop{\rm rank}(A) .

Observe that for any reasonable definition of the approximation version of NMF (that is, the version described earlier in which rank(A)\mathop{\rm rank}(A) is not constrained and in which one requires A≈WHA\approx WH instead of exact equality), an optimal algorithm when presented with an AA whose rank is exactly kk ought to solve the exact NMF problem. Thus, the “standard” NMF problem using any norm is a generalization of EXACT NMF. Therefore, any hardness result that applies to exact NMF (such as our hardness result) would presumably apply to most approximation versions as well.

A different generalization of EXACT NMF is the problem of nonnegative rank determination due to Cohen and Rothblum, which asks, given A∈Rm×nA\in{\bf R}^{m\times n} with nonnegative entries, find the minimum value of kk such that A=WHA=WH, W∈Rm×kW\in{\bf R}^{m\times k}, H∈Rk×nH\in{\bf R}^{k\times n}, and W,HW,H have nonnegative entries. Cohen and Rothblum give a super-exponential time algorithm for this problem. Since nonnegative rank determination is a generalization of EXACT NMF, our result shows that it is also NP-hard.

The proof of NP-hardness of EXACT NMF has two parts: In Section 2 we show equivalence between EXACT NMF and a problem in polyhedral combinatorics that we call INTERMEDIATE SIMPLEX, and in Section 3 we show the NP-hardness of this problem. A side result emerging from the proof of equivalence of EXACT NMF to INTERMEDIATE SIMPLEX is that certain local-search heuristic for EXACT NMF can be solved with linear programming (Section 4).

Equivalence to Intermediate Simplex

In this section, we show an equivalence between the EXACT NMF and a problem in polyhedral combinatorics that we call INTERMEDIATE SIMPLEX. Although the focus in this section is on the decision version of these problems, it is apparent from the proofs that the search-versions could also be reduced to each other. The reductions use a number of arithmetic operations polynomial in mm and nn and are therefore polynomial-time for both the usual Turing machine model and the real-number model of Blum et al. .

A problem related to INTERMEDIATE SIMPLEX was proposed by Cohen and Rothblum and show to be equivalent to nonnegative rank determination. Therefore, their results to some extent imply the results of this section. Nonetheless, we present the equivalence here in order to provide detail for our claim that all reductions are polynomial time.

The equivalence is shown in three steps by first showing an equivalence to a problem denoted P1.

P1: Given matrices W0∈Rm×kW_{0}\in{\bf R}^{m\times k} and H0∈Rk×nH_{0}\in{\bf R}^{k\times n} such that each has rank kk and such that all entries of W0H0W_{0}H_{0} are nonnegative, does there exist a nonsingular matrix Q∈Rk×kQ\in{\bf R}^{k\times k} such that W0Q−1W_{0}Q^{-1} and QH0QH_{0} both have all nonnegative entries?

There is a polynomial-time reduction from EXACT NMF to P1 and vice versa.

First we demonstrate the reduction of EXACT NMF to P1. Suppose that we have an NMF instance, that is, a nonnegative matrix AA of rank exactly kk. In polynomial time (using, e.g., reduction to row-echelon form) one can factor A=W0H0A=W_{0}H_{0} such that W0∈Rm×kW_{0}\in{\bf R}^{m\times k} and H0∈Rk×nH_{0}\in{\bf R}^{k\times n}. (This factorization does not solve exact NMF since the signs of the entries of W0W_{0} and H0H_{0} are unknown.) We claim that the original instance of EXACT NMF is a yes-instance iff the instance of P1 is a yes-instance. For one direction, suppose the instance of EXACT NMF is a yes-instance, and suppose W,HW,H are solutions to exact NMF. Then clearly Range(A)=Range(W)=Range(W0)\mathop{\rm Range}(A)=\mathop{\rm Range}(W)=\mathop{\rm Range}(W_{0}), which is a dimension-kk subspace of Rn{\bf R}^{n}, and similarly Range(AT)=Range(HT)=Range(H0T)\mathop{\rm Range}(A^{T})=\mathop{\rm Range}(H^{T})=\mathop{\rm Range}(H_{0}^{T}). This means that there exist two nonsingular k×kk\times k nonsingular matrices, say P,QP,Q, such that W=W0PW=W_{0}P and H=QH0H=QH_{0}. Thus, the equation WH=W0H0WH=W_{0}H_{0} may be rewritten as W0PQH0=W0H0W_{0}PQH_{0}=W_{0}H_{0}. Notice that W0W_{0} has a left inverse and H0H_{0} has a right-inverse since W0W_{0} has full column rank and H0H_{0} has full row rank. Thus, the previous equation simplifies to PQ=IPQ=I (where II denotes the k×kk\times k identity matrix), i.e., P=Q−1P=Q^{-1}. Thus, W0Q−1W_{0}Q^{-1} and QH0QH_{0} both have nonnegative entries, so the instance of P1 is a yes-instance. Conversely, suppose the instance of P1 is a yes-instance. Then there exists QQ such that W=W0Q−1W=W_{0}Q^{-1} and H=QH0H=QH_{0} both have all nonnegative entries, and WH=W0H0=AWH=W_{0}H_{0}=A, so the instance of exact NMF is a yes-instance.

For the opposite reduction, suppose we start with an instance (W0,H0)(W_{0},H_{0}) of P1. Let A=W0H0A=W_{0}H_{0}; then AA is nonnegative and has rank kk. We claim that the instance of AA is a yes-instance if and only if the instance of P1 is a yes-instance. The proof uses essentially the same arguments as in the previous paragraph. ∎

In order to simplify the main proof in this section, it is helpful to define a slightly restricted version of P1 as follows by requiring the last column of W0W_{0} to be all 1’s:

RESTRICTED P1: Given matrices W0∈Rm×kW_{0}\in{\bf R}^{m\times k} and H0∈Rk×nH_{0}\in{\bf R}^{k\times n} such that (1) each has rank kk; (2) all entries of W0H0W_{0}H_{0} are nonnegative; and (3) the last column of W0W_{0} is all 1’s, does there exists a nonsingular matrix Q∈Rk×kQ\in{\bf R}^{k\times k} such that W0Q−1W_{0}Q^{-1} and QH0QH_{0} both have all nonnegative entries?

There is a polynomial-time reduction from P1 to RESTRICTED P1 and vice versa.

Given an instance (W0,H0)(W_{0},H_{0}) of P1, we can produce an instance of RESTRICTED P1 as follows. First, delete all rows of W0W_{0} that are identically 0’s. This does not affect the rank of W0W_{0}, nor does it affect whether the product W0H0W_{0}H_{0} is nonnegative. Finally, if QQ is a solution problem P1 prior to deletion of identically zero rows, then it is still a solution afterwards and vice versa.

For the next step, let Q^\hat{Q} be a k×kk\times k nonsingular matrix chosen such that Q^H0e=ek\hat{Q}H_{0}{\bf e}={\bf e}_{k}. Here, e∈Rn{\bf e}\in{\bf R}^{n} denotes the vector of all 1’s, and ek∈Rk{\bf e}_{k}\in{\bf R}^{k} denotes the last column of the k×kk\times k identity matrix. Such a Q^\hat{Q} is guaranteed to exist because H0eH_{0}{\bf e} cannot be zero: W0H0eW_{0}H_{0}{\bf e} is the sum of columns of W0H0W_{0}H_{0}, which cannot be zero since the columns of W0H0W_{0}H_{0} are all nonnegative and W0H0W_{0}H_{0} is not identically zero by the assumption of rank at least 1. Then observe that (W0Q^−1,Q^H0)(W_{0}\hat{Q}^{-1},\hat{Q}H_{0}) is a yes-instance of P1 iff (W0,H0)(W_{0},H_{0}) is a yes-instance. Such a Q^\hat{Q} may be found in polynomial time; for example, any k×kk\times k nonsingular matrix whose last column is H0eH_{0}{\bf e} may be taken as Q^−1\hat{Q}^{-1}, and matrix inversion is polynomial-time in the Turing machine model .

Next, we observe that the last column of W0Q^−1W_{0}\hat{Q}^{-1} is W0Q^−1ek=W0Q^−1Q^H0e=W0H0eW_{0}\hat{Q}^{-1}{\bf e}_{k}=W_{0}\hat{Q}^{-1}\hat{Q}H_{0}{\bf e}=W_{0}H_{0}{\bf e}. We already argued above that this vector is nonzero, but now we will argue more strongly that every entry of W0H0eW_{0}H_{0}{\bf e} is positive. First, note that W0H0eW_{0}H_{0}{\bf e} is the sum of columns of the nonnegative matrix W0H0W_{0}H_{0}, and hence all its entries are at least nonnegative. Focus on entry ii of W0H0eW_{0}H_{0}{\bf e}; since it is a sum of nonnegative terms, then if it were zero then the entire iith row of W0H0W_{0}H_{0} would have to be zeros. This means that the iith row of W0W_{0} is orthogonal to every column of H0H_{0}. But since H0H_{0} has full rank, this is possible only if the iith row of W0W_{0} is identically 0. However, this possibility is ruled out since we deleted identically zero rows of W0W_{0}.

Thus, the last column of W0Q^−1W_{0}\hat{Q}^{-1} contains all positive entries. Therefore, we can consider the instance of P1 given by (DW0Q^−1,Q^H0)(DW_{0}\hat{Q}^{-1},\hat{Q}H_{0}) where DD is an m×mm\times m positive definite diagonal matrix with diagonal entries chosen to make the last column of DW0Q^−1DW_{0}\hat{Q}^{-1} equal to 1. This instance of P1 is a yes-instance only if the original instance was a yes-instance, because multiplying the first factor by a positive definite diagonal matrix does not affect the signs of W0H0W_{0}H_{0} nor of W0Q^−1Q−1W_{0}\hat{Q}^{-1}Q^{-1}.

The opposite reduction, namely the one from from RESTRICTED P1 to P1, is trivial since any instance of RESTRICTED P1 is also an instance of P1. ∎

Now finally we get to the main new problem of this section.

INTERMEDIATE SIMPLEX: We are given a polyhedron P={x∈Rk−1:Ax≥b}P=\{{\bf x}\in{\bf R}^{k-1}:A{\bf x}\geq{\bf b}\} where A∈Rn×(k−1)A\in{\bf R}^{n\times(k-1)} and b∈Rn{\bf b}\in{\bf R}^{n} such that [A,b][A,{\bf b}] has rank kk. We are also given a set S⊂Rk−1S\subset{\bf R}^{k-1} of mm points that are all contained in PP and that are not all contained in any hyperplane (i.e., they affinely span Rk−1{\bf R}^{k-1}). The question is whether there exists a (k−1)(k-1)-simplex TT such that S⊂T⊂PS\subset T\subset P.

There is a polynomial-time reduction from RESTRICTED P1 to INTERMEDIATE SIMPLEX and vice versa.

We will prove that both reductions exist at the same time by exhibiting a bijection between instances of RESTRICTED P1 and instances of INTERMEDIATE SIMPLEX such that both directions of the bijection can be computed in polynomial time.

Given an instance (W0,H0)(W_{0},H_{0}) of RESTRICTED P1, we produce an instance of INTERMEDIATE SIMPLEX as follows. The polytope P⊂Rk−1P\subset{\bf R}^{k-1} is given by {x∈Rk−1:H0(1:k−1,:)Tx≥−H0(k,:)T}\{{\bf x}\in{\bf R}^{k-1}:H_{0}(1:k-1,:)^{T}{\bf x}\geq-H_{0}(k,:)^{T}\}. (This constraint may be written more compactly as H0T[x;1]≥0H_{0}^{T}[{\bf x};1]\geq{\bf 0}.) The set SS of mm points in PP is given by S={W0(1,1:k−1)T,…,W0(m,1:k−1)T}S=\{W_{0}(1,1:k-1)^{T},\ldots,W_{0}(m,1:k-1)^{T}\}. The inverse mapping of this transformation starts with an instance of INTERMEDIATE SIMPLEX given by P={x:Ax≥b}P=\{{\bf x}:A{\bf x}\geq{\bf b}\}, A∈Rm×(k−1)A\in{\bf R}^{m\times(k-1)} and S={x1,…,xm}S=\{{\bf x}_{1},\ldots,{\bf x}_{m}\} and produces an instance of RESTRICTED P1 given by

We first show that all side-constraints present in the statement of RESTRICTED P1 and INTERMEDIATE SIMPLEX are satisfied. The side-constraint that [A,b][A,{\bf b}] has rank kk is equivalent (under this bijection) to the side-constraint that H0H_{0} has rank kk. The side-constraint that x1,…,xm{\bf x}_{1},\ldots,{\bf x}_{m} affinely span Rk−1{\bf R}^{k-1} is equivalent to requiring that [x1;1],…,[xm;1][{\bf x}_{1};1],\ldots,[{\bf x}_{m};1] linearly span Rk{\bf R}^{k}, i.e., to the side-constraint that W0W_{0} has rank kk. Finally, the side constraint that S⊂PS\subset P means that Axi≥bA{\bf x}_{i}\geq{\bf b} for i=1,…,mi=1,\ldots,m, i.e., [A,−b][xi;1]≥0[A,-{\bf b}][{\bf x}_{i};1]\geq 0, which is hence equivalent to the side-constraint that all entries of W0H0W_{0}H_{0} are nonnegative.

We now show that the above bijection in both directions maps yes-instances to yes-instances. Let (S,P)(S,P) be an instance of INTERMEDIATE SIMPLEX and (W0,H0)(W_{0},H_{0}) the corresponding instance of RESTRICTED P1. Let TT be a putative solution to the instance of INTERMEDIATE SIMPLEX. Let its vertices be g1,…,gk{\bf g}_{1},\ldots,{\bf g}_{k}, which are vectors in Rk−1{\bf R}^{k-1}. The condition that T⊂PT\subset P is equivalent to requiring g1,…,gk∈P{\bf g}_{1},\ldots,{\bf g}_{k}\in P, i.e., to H0T[gi;1]≥0H_{0}^{T}[{\bf g}_{i};1]\geq{\bf 0} for each i=1,…,ki=1,\ldots,k. If we let

then we have shown that the condition T⊂PT\subset P is equivalent to requiring H0TGH_{0}^{T}G has all nonnegative entries.

The condition that S⊂TS\subset T means that for all i=1,…,mi=1,\ldots,m, xi∈T{\bf x}_{i}\in T. Recall that, by definition, a vector is inside a simplex if it is a convex combination of its vertices. Let qi{\bf q}_{i} be the putative vector of coefficients of the convex combination that expresses xi{\bf x}_{i} in the hull of the vertices of TT, for i=1,…,mi=1,\ldots,m. In other words,

plus the requirements that the entries of qi{\bf q}_{i} are nonnegative and sum to 1. The latter constraint may be combined with (\refeq:convhull)(\ref{eq:convhull}) to write Gqi=[xi;1]G{\bf q}_{i}=[{\bf x}_{i};1] where GG is as in (\refeq:gdef)(\ref{eq:gdef}), i.e., qi=G−1W0(i,:)T{\bf q}_{i}=G^{-1}W_{0}(i,:)^{T}. The hypothesis that S⊂TS\subset T is thus equivalent to the condition that each entry of G−1W0TG^{-1}W_{0}^{T} for each i=1,…,mi=1,\ldots,m is nonnegative, i.e., all entries of G−1W0TG^{-1}W_{0}^{T} must be nonnegative. Hence, we have shown that TT is a solution to the instance (S,P)(S,P) if and only if GTG^{T} is a solution to the instance (W0,H0)(W_{0},H_{0}) of RESTRICTED P1.

The argument is essentially the same in the other direction. Given an instance (W0,H0)(W_{0},H_{0}) of RESTRICTED P1, let (S,P)(S,P) be the corresponding instance of INTERMEDIATE SIMPLEX. Let QQ be a putative solution to the RESTRICTED P1 instance, and let g1,…,gk{\bf g}_{1},\ldots,{\bf g}_{k} be the columns of QTQ^{T}. Using the arguments in the previous paragraph shows that W0Q−1W_{0}Q^{-1} and QH0QH_{0} have nonnegative entries iff S⊂TS\subset T and T⊂PT\subset P. ∎

An easy consequence of our transformation of EXACT NMF to INTERMEDIATE SIMPLEX is the observation that when rank(A)=2\mathop{\rm rank}(A)=2, the NMF instance is always a yes-instance. The reason is that the resulting instance of INTERMEDIATE SIMPLEX is 1-dimensional in which case PP is an interval. However, if PP is an interval then it is already a simplex, so one could take T=PT=P to solve the instance. This observation yields a simple linear-time algorithm to find an exact nonnegative factorization of AA case rank(A)=2\mathop{\rm rank}(A)=2. case. This result was first established by Cohen and Rothblum , who also propose a simple linear-time algorithm.

INTERMEDIATE SIMPLEX is NP-hard

In this section, we will argue that the problem INTERMEDIATE SIMPLEX introduced in the previous section is NP-hard.

Before delving into the statement of the main theorem and its proof, we first state the following simpler lemma and proof. This lemma describes the ‘gadget’ used in the main theorem below to encode a setting of a boolean variable.

Consider the following instance of INTERMEDIATE SIMPLEX: the polyhedron PP is given by P={(x,y)∈R2:0≤x,y≤1}P=\{(x,y)\in{\bf R}^{2}:0\leq x,y\leq 1\}, while the set SS is given by {(0,1/2),(1,1/2),(1/2,1/4),(1/2,3/4)}\{(0,1/2),(1,1/2),(1/2,1/4),(1/2,3/4)\}. This instance has precisely two solutions T0T_{0} or T1T_{1} defined by T0=hull{(0,0),(0,1),(1,1/2)}T_{0}=\mathop{\rm hull}\{(0,0),(0,1),(1,1/2)\} and T1=hull{(1,0),(1,1),(0,1/2)}T_{1}=\mathop{\rm hull}\{(1,0),(1,1),(0,1/2)\}.

A diagram of the lemma is given in Fig. 1. It is easy to check that the side-constraints of INTERMEDIATE SIMPLEX (that S⊂PS\subset P, that [A,b][A,{\bf b}] has full column rank, that SS affinely spans R2{\bf R}^{2}) are satisfied by the above instance.

The fact that S⊂Ti⊂PS\subset T_{i}\subset P, i=0,1i=0,1, is elementary to check. The fact that there are no other solutions is proved as follows. Suppose TT is a solution. Let E0E_{0} and E1E_{1} be the two parallel edges of PP given by E0={0}×E_{0}=\{0\}\times and E1={1}×E_{1}=\{1\}\times. Observe that the point (0,1/2)∈S(0,1/2)\in S lies on E0E_{0}, which means that the face of TT containing (0,1/2)(0,1/2) must be either 0 or 1-dimensional, and if it is 1-dimensional then it must be a subset of E0E_{0}. Similarly, (1,1/2)(1,1/2) must lie on a 0- or 1-dimensional boundary of TT. It is not possible for both (0,1/2)(0,1/2) and (1,1/2)(1,1/2) to lie on 1-dimensional boundaries since a triangle cannot have two parallel edges. It is also not possible for both (0,1/2)(0,1/2) and (1,1/2)(1,1/2) to be 0-dimensional boundaries because in this case ×{1/2}\times\{1/2\} would be a bounding segment of TT. Then all of TT would have to be either above or below the segment, but then TT would fail to cover either (1/2,1/4)(1/2,1/4) or (1/2,3/4)(1/2,3/4), points in SS. Thus, the only possibilities are (1) that (0,1/2)(0,1/2) is a vertex of TT, and TT has an edge that is a subset of E1E_{1}, or (2) that (1,1/2)(1,1/2) is a vertex of TT, and TT has an edge that is a subset of E0E_{0}. But now one checks that in either case, in order to cover the two points (1/2,3/4)(1/2,3/4) and (1/2,1/4)(1/2,1/4), the entire edge E0E_{0} or E1E_{1} must be taken as an edge of TT. ∎

Given such an instance of 3-SAT, we define the following instance of INTERMEDIATE SIMPLEX. It contains 3p+q3p+q variables (i.e., k−1=3p+qk-1=3p+q) denoted si,ti,uis_{i},t_{i},u_{i}, i=1,…,pi=1,\ldots,p, and vjv_{j}, j=1,…,qj=1,\ldots,q. These variables are written as (s,t,u,v)({\bf s},{\bf t},{\bf u},{\bf v}) for short. The polyhedron PP is defined by the following inequalities:

Here, e{\bf e} denotes the vector of all 1’s. In the above usage, e∈Rp{\bf e}\in{\bf R}^{p}, but we shall also use e{\bf e} to denote the vector of all 1’s in Rq{\bf R}^{q}.

Let ei{\bf e}_{i} denote the iith column of the identity matrix (either the p×pp\times p or q×qq\times q identity). The set of points SS is defined as follows. Each of the points in the following equation is also given a name for future reference.

Let us first confirm that the side-constraints of INTERMEDIATE SIMPLEX are satisfied by this instance. Since 0∈S{\bf 0}\in S, SS affinely spans R3p+q{\bf R}^{3p+q} iff it linearly spans R3p+q{\bf R}^{3p+q}. Points hj{\bf h}_{j}, j=1,…,qj=1,\ldots,q, span the subspace defined by the last qq coordinate entries. Fix some i∈{1,…,p}i\in\{1,\ldots,p\}. Subtract h1+…+hq{\bf h}_{1}+\ldots+{\bf h}_{q} from the three points ri1,ri2,ri3{\bf r}_{i}^{1},{\bf r}_{i}^{2},{\bf r}_{i}^{3}. This yields three points whose nonzero entries are restricted to the (si,ti,ui)(s_{i},t_{i},u_{i}) positions; in these positions the three points have coordinate entries (0,1/4,1/2)(0,1/4,1/2), (1/2,1/4,1/2)(1/2,1/4,1/2) and (1/4,1/8,1/2)(1/4,1/8,1/2), which are linearly independent. Thus, the subspace indexed by (si,ti,ui)(s_{i},t_{i},u_{i}) is spanned by SS. This is true for all ii, so therefore the points in SS span all of R3p+q{\bf R}^{3p+q}.

The next side-constraint is that the linear inequalities defining PP are independent. One checks that the constraints s≥0{\bf s}\geq{\bf 0}, t≥0{\bf t}\geq{\bf 0}, u≥0{\bf u}\geq{\bf 0}, v≥0{\bf v}\geq{\bf 0} imply that the constraint matrix contains a (3p+q)×(3p+q)(3p+q)\times(3p+q) identity matrix and hence has independent columns. We can also check that the right-hand side is independent of the columns of the matrix; if it were dependent, then there would be a point such that all the constraints are active at that point, which is obviously impossible (e.g., the constraints u≥0{\bf u}\geq{\bf 0} and u≤e{\bf u}\leq{\bf e} cannot be simultaneously active). The final side-constraint is that S⊂PS\subset P, which is an elementary matter to check.

The main theorem of this section is as follows.

The instance of 3-SAT is a yes-instance if and only if the above instance of INTERMEDIATE SIMPLEX is a yes-instance. In other words, the 3-SAT instance has a satisfying assignment if and only if there exists a simplex TT such that S⊂T⊂PS\subset T\subset P.

First, let us choose some terminology for the coordinates of R3p+q{\bf R}^{3p+q}. The individual coordinates may be denoted by sis_{i}, tit_{i}, uiu_{i} or vjv_{j} for i=1,…,pi=1,\ldots,p and j=1,…,qj=1,\ldots,q. Collectively, the three coordinates (si,ti,ui)(s_{i},t_{i},u_{i}) are called the “xix_{i} coordinates” since they correspond to the iith boolean variable in the 3-SAT instance.

Let TT be a solution to the instance of INTERMEDIATE SIMPLEX. From TT we will construct a satisfying assignment σ\sigma for the 3-SAT instance. Clearly TT has exactly 3p+q+13p+q+1 vertices. Observe first that the point 0{\bf 0} is an extreme point of PP and also lies in SS, and therefore one vertex of TT must be 0{\bf 0}.

Similarly, observe that each hj{\bf h}_{j}, j=1,…,qj=1,\ldots,q, lies on extreme edge of PP, and therefore TT must have qq vertices of the form λjhj\lambda_{j}{\bf h}_{j}, j=1,…,qj=1,\ldots,q with each λj≥1\lambda_{j}\geq 1.

This accounts for all but 3p3p of the vertices of TT. For an i∈{1,…,p}i\in\{1,\ldots,p\}, let us say that a vector (s,t,u,v)∈R3p+q({\bf s},{\bf t},{\bf u},{\bf v})\in{\bf R}^{3p+q} is xix_{i}-supported if it is zero in all the xjx_{j}-coordinates for all j∈{1,…,p}−{i}j\in\{1,\ldots,p\}-\{i\}. More strongly, say that it is xix_{i}-positive if it is xix_{i}-supported and is positive in at least one of the xix_{i} coordinates. Fix a particular i∈{1,…,p}i\in\{1,\ldots,p\} and consider the four SS-points ri1,…,ri4{\bf r}_{i}^{1},\ldots,{\bf r}_{i}^{4} which are all xix_{i}-positive. Projected into the xix_{i} coordinates, these points are (0,1/4,1/2)(0,1/4,1/2), (1/2,1/4,1/2)(1/2,1/4,1/2), (1/4,1/8,1/2)(1/4,1/8,1/2) and (1/4,3/8,1/2)(1/4,3/8,1/2). Since none of the TT-vertices has negative entries, each of ri1,…,ri4{\bf r}_{i}^{1},\ldots,{\bf r}_{i}^{4} must lie in the hull only of TT-vertices that are xix_{i}-supported such as 0,λ1h1,…,λqhq{\bf 0},\lambda_{1}{\bf h}_{1},\ldots,\lambda_{q}{\bf h}_{q}. Furthermore, it must lie in the hull of at least one xix_{i}-positive vertex of TT. In fact, there must be at least three such xix_{i}-positive TT-vertices since the four points, when projected into the xix_{i} coordinates, are linearly independent. Thus, TT must have at least three xix_{i}-positive vertices for each i=1,…,pi=1,\ldots,p. Since there are only 3p3p vertices of TT not yet enumerated, we conclude that TT must have exactly three xix_{i}-positive vertices for each ii, which we denote gi,1,gi,2,gi,3{\bf g}_{i,1},{\bf g}_{i,2},{\bf g}_{i,3}.

Let gˉi,1,gˉi,2,gˉi,3∈R3\bar{\bf g}_{i,1},\bar{\bf g}_{i,2},\bar{\bf g}_{i,3}\in{\bf R}^{3} denote the xix_{i} coordinates of gi,1,gi,2,gi,3{\bf g}_{i,1},{\bf g}_{i,2},{\bf g}_{i,3}. By the assumption that TT covers the four points (0,1/4,1/2)(0,1/4,1/2), (1/2,1/4,1/2)(1/2,1/4,1/2), (1/4,1/8,1/2)(1/4,1/8,1/2) and (1/4,3/8,1/2)(1/4,3/8,1/2) in the projection into the xix_{i} coordinates, we conclude that there must exist a 3×43\times 4 matrix BB with nonnegative entries such that

As mentioned above, all of gˉi,1,gˉi,2,gˉi,3\bar{\bf g}_{i,1},\bar{\bf g}_{i,2},\bar{\bf g}_{i,3} are nonzero. Because of the inequalities 0≤s≤u{\bf 0}\leq{\bf s}\leq{\bf u} and 0≤t≤u{\bf 0}\leq{\bf t}\leq{\bf u} that define PP, it must be the case that the third entries of gˉi,1,gˉi,2,gˉi,3\bar{\bf g}_{i,1},\bar{\bf g}_{i,2},\bar{\bf g}_{i,3} are all positive and no smaller than the first and second entries. Therefore, define new vectors g^i,1,g^i,2,g^i,3\hat{\bf g}_{i,1},\hat{\bf g}_{i,2},\hat{\bf g}_{i,3} that are all exactly 1/2 in the last coordinate and have other coordinates lying in [0,1/2][0,1/2] obtained by rescaling each of gˉi,1,gˉi,2,gˉi,3\bar{\bf g}_{i,1},\bar{\bf g}_{i,2},\bar{\bf g}_{i,3} by twice its third coordinate. By rescaling BB in a reciprocal manner, we find that there is a nonnegative matrix B^\hat{B} such that

By consider the third row of the above system of equations, we conclude that each column of B^\hat{B} sums to exactly 1. Then dropping the third row on both sides yields the equation

where the notation v(1:2){\bf v}(1:2) denotes the first two entries of a vector. Now we observe that this is precisely a half-sized version of the instance of INTERMEDIATE SIMPLEX described in the preliminary lemma of this section, namely, find three points lying in [0,1/2]2[0,1/2]^{2} whose convex hull covers the four points {(0,1/4),(1/2,1/4),(1/4,1/8),(1/4,3/8)}\{(0,1/4),(1/2,1/4),(1/4,1/8),(1/4,3/8)\}. As established by the lemma, there are precisely two solutions to this system, which we will denote T0/2T_{0}/2 and T1/2T_{1}/2. Let C0C_{0} be the set of ii’s such that the triangle defined by (g^i,1(1:2),g^i,2(1:2),g^i,3(1:2))(\hat{\bf g}_{i,1}(1:2),\hat{\bf g}_{i,2}(1:2),\hat{\bf g}_{i,3}(1:2)) is T0/2T_{0}/2, while C1C_{1} is the set of ii’s such that this triangle is T1/2T_{1}/2. Thus we conclude that for i∈C0i\in C_{0},

(Here, the notation gi,1∣vj{\bf g}_{i,1}|_{v_{j}} denotes the vjv_{j} coordinate entry of gi,1{\bf g}_{i,1}.) Similarly, for i∈C0i\in C_{0}, for all jj such that xix_{i} occurs as a literal in clause cjc_{j}, we must have

Next, TT must contain the point b{\bf b} from (\refeq:Sdef)(\ref{eq:Sdef}), so there must be coefficients αi,k\alpha_{i,k}, i=1,…,pi=1,\ldots,p, k=1,2,3k=1,2,3 and θj\theta_{j}, j=1,…,qj=1,\ldots,q adding up to at most 1 and all nonnegative such that

Fix a particular ii. The projection of b{\bf b} into xix_{i} coordinates is bˉ=(1/(4p),1/(4p),1/(2p))\bar{\bf b}=(1/(4p),1/(4p),1/(2p)). Referring back to (\refeq:gc0)(\ref{eq:gc0}) and (\refeq:gc1)(\ref{eq:gc1}), one can see that regardless of whether i∈C0i\in C_{0} or i∈C1i\in C_{1}, bˉ\bar{\bf b} is expressed uniquely as bˉ=gˉi,1/(8pμi,1)+gˉi,2/(8pμi,2)+gˉi,3/(4pμi,3)\bar{\bf b}=\bar{\bf g}_{i,1}/(8p\mu_{i,1})+\bar{\bf g}_{i,2}/(8p\mu_{i,2})+\bar{\bf g}_{i,3}/(4p\mu_{i,3}). Therefore,

Suppose i∈C0i\in C_{0}. Then for each jj such that xix_{i} occurs as a literal in clause cjc_{j}, if we combine (\refeq:gc0vj)(\ref{eq:gc0vj}) and (\refeq:alpha)(\ref{eq:alpha}), we obtain

Now, sum the preceding inequality for i=1,…,pi=1,\ldots,p to obtain

Summarizing, we have proved that if there is a simplex TT solving the instance of INTERMEDIATE SIMPLEX, then there are exactly three vertices of TT that are xix_{i}-positive for each i=1,…,pi=1,\ldots,p; that, based on these vertices, ii can be classified as either C0C_{0} or C1C_{1}; and that the assignment σ\sigma of the boolean variables in the original 3-SAT instance derived from C0C_{0} and C1C_{1} must be a satisfying assignment.

For example, the point ri1=(0,ei/4,ei/2,e){\bf r}_{i}^{1}=({\bf 0},{\bf e}_{i}/4,{\bf e}_{i}/2,{\bf e}) in the case that i∈C0i\in C_{0} is expressed as (2/5)gi,1+(2/5)gi,2+h(2/5){\bf g}_{i,1}+(2/5){\bf g}_{i,2}+{\bf h}, where h{\bf h} is some linear combination of λ1h1,…,λqhq\lambda_{1}{\bf h}_{1},\ldots,\lambda_{q}{\bf h}_{q} chosen to make the vjv_{j} entries each equal to 1. (Note that the vjv_{j} entries of (2/5)gi,1+(2/5)gi,2(2/5){\bf g}_{i,1}+(2/5){\bf g}_{i,2} before h{\bf h} is added will be either 0 or 1/41/4). The total sum of the coefficients to express (0,ei/4,ei/2,e)({\bf 0},{\bf e}_{i}/4,{\bf e}_{i}/2,{\bf e}) is 2/5+2/5+h12/5+2/5+h_{1}, where h1h_{1} is the sum of the coefficients needed in the terms of h{\bf h}. Select λ1,…,λq\lambda_{1},\ldots,\lambda_{q} to be large scalars so that we can be assured that 4/5+h1≤14/5+h_{1}\leq 1. If this sum is less than 1, then we include a contribution of 0{\bf 0}, another vertex of TT, in the linear combination to make the sum of coefficients exactly 1.

Similarly, as sketched out earlier, to obtain the point b=(e/(4p),e/(4p),e/(2p),2.5e/(8p)){\bf b}=({\bf e}/(4p),{\bf e}/(4p),{\bf e}/(2p),2.5{\bf e}/(8p)) in the hull of the vertices of TT, we use (\refeq:bsum)(\ref{eq:bsum}) with coefficients chosen according to (\refeq:alpha)(\ref{eq:alpha}). This choice of αi,j\alpha_{i,j}’s yields xix_{i} coordinate entries equal to (1/(4p),1/(4p),1/(2p))(1/(4p),1/(4p),1/(2p)) for each ii and has entries less than or equal to 2/(8p)2/(8p) in each vjv_{j} coordinate entry. Then, as above, one can include additional terms involving 0{\bf 0} and λ1h1,…,λqhq\lambda_{1}{\bf h}_{1},\ldots,\lambda_{q}{\bf h}_{q} to complete the convex combination. One point to note is that the sum of the αi,k\alpha_{i,k} coefficients appearing in (\refeq:bsum)(\ref{eq:bsum}), assuming μi,k=5/8\mu_{i,k}=5/8, is equal to 4/54/5, and hence does not exceed 1. Addition of the θj\theta_{j} coefficients will make the total higher but still less than 1 provided λ1,…,λq\lambda_{1},\ldots,\lambda_{q} are all chosen to be very large. ∎

Local-search heuristics

In this section we will prove a theorem about the INTERMEDIATE SIMPLEX problem that will suggest a class of local-search heuristics. The theorem is as follows.

Consider an instance of INTERMEDIATE SIMPLEX given by polytope P⊂Rk−1P\subset{\bf R}^{k-1} with nn facets and point set S⊂PS\subset P with mm vectors. Suppose there exists a solution TT, and suppose that all vertices of TT are given except for one. Then the set of feasible positions for the last vertex is defined by a system of linear equations and inequalities (mkmk equalities and n+mkn+mk inequalities).

Let the vertices of TT be denoted v1,…,vk{\bf v}_{1},\ldots,{\bf v}_{k}, and suppose all are known except vk{\bf v}_{k}. Two sets of constraints must be satisfied, namely, those arising from the requirement S⊂TS\subset T and those arising from T⊂PT\subset P. Since the simplex TT is assumed to be a solution, the given values of v1,…,vk−1{\bf v}_{1},\ldots,{\bf v}_{k-1} must all lie in PP, and hence the constraint on vk{\bf v}_{k} to ensure that T⊂PT\subset P is simply that vk∈P{\bf v}_{k}\in P. This clearly amounts to a set of nn linear inequalities that must be satisfied by PP.

Next, consider the requirement S⊂TS\subset T; choose a particular vector b∈S{\bf b}\in S. If b{\bf b} is in the hull of v1,…,vk−1{\bf v}_{1},\ldots,{\bf v}_{k-1} then b{\bf b} is in TT no matter what choice is made for vk{\bf v}_{k}, so such a b{\bf b} does not impose any constraint on vk{\bf v}_{k}. Else suppose b{\bf b} is not in the hull of v1,…,vk−1{\bf v}_{1},\ldots,{\bf v}_{k-1}. Then the requirement on vk{\bf v}_{k} is that there exist λ1,…,λk\lambda_{1},\ldots,\lambda_{k} such that λ1v1+⋯+λkvk=b\lambda_{1}{\bf v}_{1}+\cdots+\lambda_{k}{\bf v}_{k}={\bf b}, λi≥0\lambda_{i}\geq 0, i=1,…,ki=1,\ldots,k, and λ1+⋯+λk=1\lambda_{1}+\cdots+\lambda_{k}=1. This constraint is nonlinear because of the product of unknowns λkvk\lambda_{k}{\bf v}_{k}. However, we can rearrange it into a linear constraint by dividing through by λk\lambda_{k} (which is nonzero by the hypothesis that b{\bf b} is not in the hull of v1,…,vk−1{\bf v}_{1},\ldots,{\bf v}_{k-1}) and defining new variables αi=λi/λk\alpha_{i}=\lambda_{i}/\lambda_{k}, i=1,…,k−1i=1,\ldots,k-1, and α∗=1/λk\alpha^{*}=1/\lambda_{k}. Then the above constraints become α1v1+⋯+αk−1vk−1+vk=α∗b\alpha_{1}{\bf v}_{1}+\cdots+\alpha_{k-1}{\bf v}_{k-1}+{\bf v}_{k}=\alpha^{*}{\bf b}, αi≥0\alpha_{i}\geq 0, i=1…,k−1i=1\ldots,k-1, α∗≥0\alpha^{*}\geq 0, α1+⋯+αk−1+1=α∗\alpha_{1}+\cdots+\alpha_{k-1}+1=\alpha^{*}, which are all linear. There are kk equality constraints and kk inequality constraints in this system. A system of this kind is needed for each point in SS. ∎

The preceding theorem suggests a local search heuristic for INTERMEDIATE SIMPLEX. One can choose as an initial guess TT a large simplex that contains all of SS but perhaps is not contained in PP. Then one adjusts the vertices of TT one at a time, optimizing a criterion that minimizes departure of the vertex from feasibility. Because the feasible positions for the vertex under consideration form a polyhedron, several possible criteria such as 2-norm distance to feasibility would constitute convex programming problems. Thus, on each iteration of the local search algorithm, one could reposition a single vertex of TT optimally until a solution is found.

Acknowledgement

The author acknowledges helpful discussions about this material with Levent Tuncel and Ali Ghodsi (University of Waterloo), Jon Kleinberg and Lillian Lee (Cornell), Chris Ding (Lawrence Berkeley Laboratory) and Vincent Blondel (Louvain).

References