On positive duality gaps in semidefinite programming

Similar documents
On positive duality gaps in semidefinite programming

arxiv: v4 [math.oc] 12 Apr 2017

Lecture 1. 1 Conic programming. MA 796S: Convex Optimization and Interior Point Methods October 8, Consider the conic program. min.

Chapter 1. Preliminaries

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Lecture 5. Theorems of Alternatives and Self-Dual Embedding

Summer School: Semidefinite Optimization

Linear Programming Redux

MAT-INF4110/MAT-INF9110 Mathematical optimization

Solving conic optimization problems via self-dual embedding and facial reduction: a unified approach

Semidefinite Programming

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

Definition 2.3. We define addition and multiplication of matrices as follows.

CSC Linear Programming and Combinatorial Optimization Lecture 10: Semidefinite Programming

Linear Algebra March 16, 2019

Lecture Notes 1: Vector spaces

Optimization Theory. A Concise Introduction. Jiongmin Yong

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

Algebraic Methods in Combinatorics

I.3. LMI DUALITY. Didier HENRION EECI Graduate School on Control Supélec - Spring 2010

3. Linear Programming and Polyhedral Combinatorics

Uniqueness of the Solutions of Some Completion Problems

4. Algebra and Duality

Optimality Conditions for Constrained Optimization

DUALITY IN COUNTABLY INFINITE MONOTROPIC PROGRAMS

LINEAR ALGEBRA: THEORY. Version: August 12,

Mathematical Optimisation, Chpt 2: Linear Equations and inequalities

ELEMENTARY REFORMULATION AND SUCCINCT CERTIFICATES IN CONIC LINEAR PROGRAMMING. Minghui Liu

Contents Real Vector Spaces Linear Equations and Linear Inequalities Polyhedra Linear Programs and the Simplex Method Lagrangian Duality

Linear Algebra. Preliminary Lecture Notes

Lecture 1: Entropy, convexity, and matrix scaling CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016

Chapter 3 Transformations

NORMS ON SPACE OF MATRICES

Linear Algebra. Preliminary Lecture Notes

How to generate weakly infeasible semidefinite programs via Lasserre s relaxations for polynomial optimization

Lecture 8 : Eigenvalues and Eigenvectors

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Lecture 7: Positive Semidefinite Matrices

Linear Algebra. Min Yan

Assignment 1: From the Definition of Convexity to Helley Theorem

Introduction to Semidefinite Programming I: Basic properties a

Econ Slides from Lecture 7

Lecture 8: Semidefinite programs for fidelity and optimal measurements

1 Review Session. 1.1 Lecture 2

Conic Linear Optimization and its Dual. yyye

Semidefinite Programming Basics and Applications

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 12 Luca Trevisan October 3, 2017

Example: feasibility. Interpretation as formal proof. Example: linear inequalities and Farkas lemma

Convex Functions and Optimization

Elementary linear algebra

Week 3 Linear programming duality

A Criterion for the Stochasticity of Matrices with Specified Order Relations

Extreme Abridgment of Boyd and Vandenberghe s Convex Optimization

2: LINEAR TRANSFORMATIONS AND MATRICES

ORIE 6300 Mathematical Programming I August 25, Recitation 1

NOTES (1) FOR MATH 375, FALL 2012

On duality gap in linear conic problems

Eigenvalues and Eigenvectors

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 4

ELEMENTARY SUBALGEBRAS OF RESTRICTED LIE ALGEBRAS

Facial Reduction and Partial Polyhedrality

Notes taken by Graham Taylor. January 22, 2005

Lecture 2: Linear Algebra

Foundations of Matrix Analysis

The Simplex Algorithm

3. Linear Programming and Polyhedral Combinatorics

The value of a problem is not so much coming up with the answer as in the ideas and attempted ideas it forces on the would be solver I.N.

Research Reports on Mathematical and Computing Sciences

UNDERGROUND LECTURE NOTES 1: Optimality Conditions for Constrained Optimization Problems

Ω R n is called the constraint set or feasible set. x 1

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

Lecture 7: Semidefinite programming

SDP Relaxations for MAXCUT

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

Bare-bones outline of eigenvalue theory and the Jordan canonical form

Part III. 10 Topological Space Basics. Topological Spaces

Lecture Note 5: Semidefinite Programming for Stability Analysis

Linear and non-linear programming

Math 341: Convex Geometry. Xi Chen

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Semidefinite and Second Order Cone Programming Seminar Fall 2001 Lecture 5

MTH 309 Supplemental Lecture Notes Based on Robert Messer, Linear Algebra Gateway to Mathematics

Math 350 Fall 2011 Notes about inner product spaces. In this notes we state and prove some important properties of inner product spaces.

Optimality, Duality, Complementarity for Constrained Optimization

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

Convex Optimization Notes

SEMIDEFINITE PROGRAM BASICS. Contents

Selected Examples of CONIC DUALITY AT WORK Robust Linear Optimization Synthesis of Linear Controllers Matrix Cube Theorem A.

On the sufficiency of finite support duals in semi-infinite linear programming

Volume in n Dimensions

Optimization for Communications and Networks. Poompat Saengudomlert. Session 4 Duality and Lagrange Multipliers

Recall the convention that, for us, all vectors are column vectors.

Linear Algebra, Summer 2011, pt. 2

CS261: A Second Course in Algorithms Lecture #8: Linear Programming Duality (Part 1)

Linear Programming. Larry Blume Cornell University, IHS Vienna and SFI. Summer 2016

Chapter 3, Operations Research (OR)

A linear algebra proof of the fundamental theorem of algebra

Topological Data Analysis - Spring 2018

Symmetric Matrices and Eigendecomposition

Chapter 2: Linear Independence and Bases

Transcription:

On positive duality gaps in semidefinite programming Gábor Pataki arxiv:82.796v [math.oc] 3 Dec 28 January, 29 Abstract We present a novel analysis of semidefinite programs (SDPs) with positive duality gaps, i.e., different optimal values in the primal and dual problems. These SDPs are considered extremely pathological, they are often unsolvable, and they also serve as models of more general pathological convex programs. We first characterize two variable SDPs with positive gaps: we transform them into a standard form which makes the positive gap easy to recognize. The transformation is very simple, as it mostly uses elementary row operations coming from Gaussian elimination. We next show that the two variable case sheds light on larger SDPs with positive gaps: we present SDPs in any dimension in which the positive gap is certified by the same structure as in the two variable case. We analyze an important parameter, the singularity degree of the duals of our SDPs and show that it is the largest that can result in a positive gap. We complete the paper by generating a library of difficult SDPs with positive gaps (some of these SDPs have only two variables), and a computational study. Key words: semidefinite programming; duality; positive duality gaps; facial reduction; singularity degree MSC 2 subject classification: Primary: 9C46, 49N5; secondary: 52A4 OR/MS subject classification: Primary: convexity; secondary: programming-nonlinear-theory Introduction Consider the primal-dual pair of semidefinite programs (SDPs) (P ) sup s.t. m c i x i i= m x i A i B i= inf B Y s.t. A i Y = c i (i =,..., m) Y (D) where A,..., A m, and B are n n symmetric matrices and c,..., c m are scalars. For symmetric matrices S and T we write S T to say that T S is positive semidefinite (psd) and T S := trace(t S) is their inner product.

SDPs are probably the most interesting, and useful optimization problems to emerge in the last three decades. They fit in a hierarchy between linear programs and general convex programs: they generalize linear programs, and their feasible set is convex. SDPs appear in a broad range of applications, for example, in combinatorial optimization, control theory, robotics, and machine learning. While SDPs are useful, they are often pathological: for examples, and discussions, see e.g. [5, 4, 2]. In particular, they may not attain their optimal values; they may be infeasible, but have zero distance to the set of feasible instances. In that case we say they are weakly infeasible. the optimal values of (P ) and (D) may differ. (duality) gap. In that case we say there is a positive SDPs with positive duality gaps may be the most pathological/most interesting. They are in stark contrast with gapfree linear programs, and they may look innocent, but still defeat SDP solvers. Example. In the SDP sup x 2 s.t. x + x 2 (P small ) the (, 3) element of A 2 is, but the (3, 3) element in all matrices is zero. Hence x 2 = always holds, so the optimal value of (P small ) is. Let Y = (y ij ) be the dual variable matrix. By the first dual constraint y =, so the first row and column of Y is zero. Hence the dual is equivalent to inf y 22 s.t. y 22 =, (.) whose optimal solution is. The Mosek commercial SDP solver reports that (P small ) is primal infeasible. We remark here that SDPs with positive duality gaps also serve as models of other, perhaps more complex convex programs with positive duality gaps. An early prominent example from the sixties is is Duffin s duality gap [5, Exercise 3.2.]; see [3, Example 5.3.2] for a similar example. Research in the last few years has greatly helped us to understand pathological SDPs. See e.g., [2, 6, 28, 3] for structural results; and [6, 3, 2, 7] for facial reduction algorithms, which also help our understanding. For the related pathology of small (or zero) distance to infeasibility see e.g., [24, 9] and [22]. 2

We note that SDPs can be pathological, since the linear image of the cone of psd matrices is not always closed. For recent studies on when the linear image of a closed convex cone is closed, see e.g., [9] and []. Despite these advances, duality gaps in SDPs and in other convex programs seem to be less well studied. For example, we need m 2 to have a positive gap, however, no such result has been published. As far as we know, no analysis of the m = 2 case is known. Contributions In this work we show that simple certificates of positive gaps exist in a large class of SDPs, not just in artificial looking examples. Our first result is Theorem. Suppose m = 2. Then val(p ) < val(d) iff (P ) has a reformulation sup c 2x 2 Λ M s.t. x +x Σ 2 I s M T I p I r p where Λ and Σ are diagonal, Λ is positive definite, M, c 2 > and s.., (P ref ) Henceforth, val() denotes the optimal value of an optimization problem. The partitioning of the matrices shows their order, e.g., Λ has order p. The empty blocks are zero, and the blocks marked by symbols have arbitrary elements. In Subsection. we precisely define reformulations. However, if we accept that a reformulated problem has a positive gap with its dual iff the original one does, we can already prove the If direction of Theorem. To build intuition, we give this proof below; it essentially reuses the argument from Example. Proof of If in Theorem : Since M, we have x 2 = in any feasible solution of (P ref ), so val(p ref ) =. On the other hand, if Y is feasible in the dual of (P ref ), then by the first dual constraint the upper left p p block of Y is zero, and Y, so the first p rows and columns of Y are zero. So the dual is equivalent to the reduced dual I inf Y Σ (D s.t. Y = c red ) 2 I s Y, whose optimal value is positive (since c 2 > ). Example needs no reformulation and has Σ = [] and s =. 3

In particular, (D red ) is infeasible iff Σ : in this case val(d) = +, so the duality gap is infinite. Besides proving Theorem we show that the two variable case sheds light on larger SDPs with positive gaps: we present SDPs in any dimension in which the positive gap is certified by the same structure as in the two variable case. We analyze an important parameter, the singularity degree of the duals of our SDPs and show that it is the largest that can result in a positive gap. We finally generate a library of SDPs with positive duality gaps, and present a computational study. Literature review In [2] we characterized pathological semidefinite systems, which yield an unattained dual value or positive gap for some c R m. However, [2] does not distinguish among bad objective functions. For example, it does not tell which c gives a positive gap, and which gives the more harmless pathology of zero gap and unattained dual value. The paper [28] showed how some positive gap SDPs can be found from a homogeneous primal-dual pair (with c = and B = ) assuming the ranks of the maximum rank solutions sum to n. As to weak infeasibility, see [6] for a proof that any weakly infeasible SDP contains such an SDP of dimension at most n. In fact, in Section 6 we will use some ideas from [6]. See [4] and [3] for characterizations of infeasibility and weak infeasibility in SDPs and in conic LPs. Our understanding of pathological SDPs (and of other conic linear programs) is greatly helped by facial reduction algorithms. These algorithms regularize (P ) or (D) by replacing the semidefiniteness constraint with membership in a face of the set of psd matrices. Facial reduction algforithms originated in [6]. Simplified versions appeared in [2, 3, 3]; see [7] for a version with a reduced number of steps assuming the cone has polyhedral faces. The singularity degree of an SDP is a fundamental parameter: it is the mimimum number of facial reduction steps that are necessary to regularize the SDP. This concept was introduced in [25], and used to bound the distance of a putative solution to the feasible set. See [27] for a family of semidefinite systems which have the maximum singularity degree of n (assuming the order of the matrices is n). However, as far as we know, the SDPs in this paper are the first ones with large singularity degree and a positive duality gap. A related pathology of feasible conic LPs is ill-posedness, meaning zero distance to the set of infeasible instances. Ill posedness, and the distance to infeasibility of conic LPs was introduced in the seminal work [24]. For followup work, see e.g., [8, 22]. For example, it is not hard to see that an SDP with a positive duality gap must have zero distance to infeasibility. Organization The rest of the paper is organized as follows: In Subsection. we review preliminaries. In Section 2 we prove the only if direction of Theorem. In Corollary we prove that when m = 2, the worst pathology positive gap coupled with unattained optimal value does not happen. In Corollary 2 we completely characterize two variable semidefinite systems that admit a positive gap for some c. In Section 3 we present positive gap SDPs in any dimension in which the same structure certifies the positive gap, as in the two variable case. In Section 4 we analyze the singularity degree of two dual SDPs associated with our 4

instances. The first dual is just (D) and the second is the homogeneous dual A i Y = (i =,..., m) B Y = Y. (HD) We show that the singularity degrees are m and m, respectively. In Section 5 we prove an auxiliary result (which we think is of independent interest): we show how to reformulate (P )-(D) so the maximum rank slack matrix in (P ) and the maximum rank solution of (HD) both become easy to see. In Section 6 we show that our positive gap SDPs are best possible in a well defined sense. We prove that the singularity degrees of (D) and of (HD) of any SDP are always m and m +, respectively, and when equality holds there is no duality gap. In Section 7 we present a computational study on a library of SDPs with positive gaps. These SDPs are patterned after the infeasible and weakly infeasible SDPs described in [3]: we can verify the positive gap by inspection in exact arithmetic, but they are challenging for SDP solvers. Reader s guide Most of the paper, in particular, all of Sections 2, 3 and 7 can be read with a minimal background in linear algebra and semidefinite programming, which we summarize in Subsection.. The proofs are short and fairly elementary, and we illustrate our results with many examples.. Preliminaries Reformulations The central definition of the paper is Definition. We obtain an elementary reformulation, sequence of the following operations: or reformulation of (P )-(D) by a () Replace B by B + λa j, for some j and λ. (2) Exchange (A i, c i ) and (A j, c j ), where i j. (3) Replace (A i, c i ) by λ(a i, c i ) + µ(a j, c j ), where λ. (4) Apply a rotation T T ()T to all A i and B, where T is an invertible matrix 2. Note that operations ()-(3) are indeed elementary row operations done on (D). For example, operation (2) exchanges the constraints A i Y = c i and A j Y = c j. Clearly, (P ) and (D) attain their optimal values iff they do so after a reformulation, and reformulations also preserve duality gaps. 2 We call the operation T T ()T a rotation whenever T is invertible, even if it is not orthogonal. 5

Matrices We write S n, S n +, and S n ++ for the set of n n symmetric, symmetric positive semidefinite (psd), and symmetric positive definite (pd) matrices, respectively. For S, T S n we write T S to say T S S n ++. For matrices A and B we let A A B :=. B We write S r + for the set of matrices whose upper left r r block is psd, and the rest is zero. The dimension of the zero part will be clear from the context. The meaning of S r + is similar. Strict feasibility and the Gordan-Stiemke theorem (P ), if Z = B m i= x ia i for some x R m. We call Z a slack matrix in We say that (P ) is strictly feasible, if there is a positive definite slack in it. If (P ) is strictly feasible, then there is no duality gap, and val(d) is attained when finite. Similarly, we say that (D) is strictly feasible if it has a positive definite feasible Y. If this is the case, then there is no duality gap, and val(p ) is attained when finite. The lack of strict feasibility has a simple certificate. Given an affine subspace H S n +, the Gordan-Stiemke theorem for the semidefinite cone states H S n ++ = H (S n + \ {}). (.2) We make the following Assumption. Problem (P ) is feasible, the A i and B are linearly independent, B is of the form I r B =, where r < n, (.3) and it is the maximum rank slack in (P ). The assumption about B is easy to satisfy, at least in theory. Suppose Z is a maximum rank slack in (P ) and Q is a matrix of suitably scaled eigenvectors of Z. We can first replace B by Z, (using operation () in Definition ) then replace all A i by Q T A i Q for all i and B by T T BT to put B in the required form. In all examples we will call the matrices on the left A i and the right hand side B in the primal problem. 2 The two variable case 2. Proof of Only if in Theorem We now turn to the proof of the Only if direction in Theorem. The main idea is that (D) cannot be strictly feasible, otherwise the duality gap would be zero. We first make the lack of 6

strict feasibility obvious by creating the constraint (Λ ) Y = where Λ. Clearly, if Y satisfies this constraint, and Λ is p p, then the first p rows and columns of Y are zero. We create the constraint (Λ ) Y = by performing a facial reduction step [3, 2, 6] and a reformulation step. Since we only need one facial reduction step, we simply invoke the Gordan-Stiemke theorem once, thus our proof is self-contained. We next analyse cases to show that the second constraint matrix must be in a certain form to ensure a positive gap, and further reformulate (P ) to put it into the final form (P ref ). We need a basic lemma, whose proof is in Appendix A.. Lemma. Let where A S r, A 22 S r2 +. A A 2 A = A T, 2 A 22 Then there is an invertible matrix T such that Σ W T T AT = I s and T T I r I r T =, W T where Σ S r is diagonal and s. Proof of Only if in Theorem We reformulate (P ) into (P ref ) in several steps, and we call the primal and dual problems (P ) and (D) throughout the process. We call the constraint matrices on the left A and A 2 throughout, starting with A = A and A 2 = A 2. Case : (D) is feasible We break the proof into four parts: facial reduction step and first reformulation, transforming A, transforming A 2, and ensuring c 2 >. Facial reduction step and first reformulation Let H = { Y A i Y = c i i } = { Y A i Y = i } + Y, (2.4) where Y H is arbitrary. Since (D) is not strictly feasible, by (.2) there is A H (S+ n \ {}). Thus A = λ A + λ 2 A 2, A Y =, hence λ c + λ 2 c 2 = (λ A + λ 2 A 2 ) Y = A Y =, so we can reformulate the feasible set of (D) using only operations (2) and (3) in Definition as A Y = A 2 Y = c 2 Y (2.5) 7

with some c 2 R. These operations do not change B. Transforming A Since A and B is the maximum rank slack in (P ), the only nonzero components of A are in its upper left r r block, otherwise B x A would be a slack with larger rank than r for x <. Let p be the rank of A, Q a matrix of length eigenvectors of the upper left r r block of A, set T = Q I n r, and apply the transformation T T ()T to A, A 2 and B. After this A looks like Λ A =, (2.6) where Λ S p ++ is diagonal. From now the upper left corner of all matrices bordered by the double lines will be r r. Note that B is still in the same form (see Assumption ). Transforming A 2 Let S be the lower (n r) (n r) block of A 2. We claim that S cannot be indefinite, so suppose it is. Then the equation S Y = c 2 has a positive definite solution Y. Then Y :=. (2.7) Y is feasible in (D) with value, thus so the duality gap is zero, a contradiction. val(p ) val(d), We can now assume S (if S, we multiply A 2 and c 2 by ). Recall that Λ in (2.6) is p p, where p r. Next we apply Lemma with A := lower right (n p) (n p) block of A 2, r := r p, r 2 := n r. Let T be the invertible matrix supplied by Lemma, and apply the rotation (I p T ) T ()(I p T ) to A, A 2 and B. This operation keeps A as it was. It also keeps B as it was, since the rotation T T ()T keeps (I r p ) the same. Next we multiply both A 2 and c 2 by ; afterwards A 2 looks like M Σ W A 2 = for some M and W. (2.8) I s M T W T We claim that W or M. Indeed if both were zero, then B x 2 A 2 would have larger rank than r for some x 2 <. 8

Since M or W, we claim that x 2 = in any feasible solution of (P ). Indeed x 2 would imply that the corresponding slack matrix has a diagonal entry, and a corresponding nonzero offdiagonal entry, thus it could not be psd. We thus have val(p ) =. Next we claim W =, so suppose W. Then we define Y = ɛi where ɛ >, we choose the * block so that A 2 Y = c 2, we choose λ > large enough to ensure Y, and the unspecified entries of Y as zero. Thus B Y = (r p)ɛ, so letting ɛ we deduce val(d) =, a contradiction. λi, Ensuring c 2 >. We have c 2, otherwise the duality gap would be zero. First, suppose s >. We will prove that in this case c 2 > must hold, so to obtain a contradiction, assume c 2 <. Then Y := ( c 2/s)I s, (where the unspecified entries are zero) is feasible in (D) with value, a contradiction. Next, suppose s =. If c 2 >, then we are done; if c 2 <, then we multiply A 2 and c 2 by to ensure c 2 >. This completes the proof of Case. Case 2: (D) is infeasible Since there is a positive duality gap, we have val(p ) < +. Consider the SDP inf λ s.t. A i Y λc i = i Y λ R and note that its optimal value is zero. Indeed, if (Y, λ) were feasible in it with λ >, then (/λ)y would be feasible in (D). We claim that (2.9) Y s.t. (Y, λ) is feasible in (2.9) with some λ, (2.) so suppose there is such a Y. We next construct an equivalent SDP in the standard dual form inf B Ȳ s.t. Ā i Ȳ = i Ȳ S+ n+2, (2.) 9

where Ā i = A i [ c i ] [c i ] i B = [] [ ] [] (Note the free variable λ in (2.9) is split as λ = ȳ n+,n+ ȳ n+2,n+2.). Since (2.9) is strictly feasible, and has zero optimal value, the same is true of (2.). Thus the dual of (2.) is feasible, so there is x R m s.t. m i= x ia i m i= x (2.2) ic i =. Adding λ x for a large λ > to a feasible solution of (P ) we deduce val(p ) = +, a contradiction. The rest of the proof Up to now we proved (2.), which means lin H S++ n =, where H is defined in (2.4). Since (lin H) = H, we next invoke the Gordan-Stiemke theorem (.2) with lin H in place of H and complete the proof as in Case. 2.2 Some corollaries Arguably the worst possible pathology of SDPs is a positve duality gap accompanied by an unattained optimal value on either the primal or the dual side. The next corollary shows that this worst pathology does not happen when m = 2. Corollary. Suppose m = 2, (D) is feasible, and val(p ) < val(d). Then (P ) attains its optimal value, and so does (D) if it is feasible. Proof Assume the conditions above hold and assume w.l.o.g. that we reformulated (P ) into (P ref ). Let (D ref ) be the dual of (P ref ). Clearly (P ref ) attains its optimal value, hence so does (P ). If (D) is infeasible, then we are done, so assume it is feasible. Then so is (D ref ). Recall that (D ref ) is equivalent to the reduced dual (D red ) in which the matrix Σ is diagonal, so (D red ) is just a linear program, which attains its optimal value. Hence so do (D ref ) and (D). We now turn to studying the semidefinite system m x i A i B. (P SD ) i= In [2] we characterized when (P SD ) is badly behaved, meaning when there is c R m such that (P ) has a finite optimal value, but (D) has no solution with the same value. Hence it is natural to ask: when is (P SD ) really badly behaved, i.e., when is there c R m that leads to a positive gap? The following straightforward corollary of Theorem answers this question when m = 2. It relies on reformulating (P SD ), i.e., reformulating (P ) with some c.

Corollary 2. Suppose m = 2. Then there is (c, c 2 ) such that val(p ) < val(d) iff (P SD ) has a reformulation Λ M I p x +x Σ 2 I s I r p, M T where Λ and Σ are diagonal, Λ is positive definite, M, and s. 3 A cookbook to generate SDPs with positive gaps We now show that the two variable case helps us understand positive gaps in larger SDPs. We present SDPs in any dimension in which the same structure causes the duality gap as in the two variable case. We present three families of SDPs. The ones in Examples 2 and 3 have a certain single sequence structure, and are larger versions of Example in a well defined sense. In these SDPs the primal optimal value is zero, while the dual is equivalent to an SDP like (D red ) with s =. Hence the dual has a positive optimal value. In Example 4 we present SDPs with a certain double sequence structure. These are somewhat more subtle: the primal optimal value is still zero, but the dual is equivalent to an SDP like (D red ) with s =. Hence the dual again has a positive optimal value. 3. Positive gap SDPs with a single sequence: larger versions of Example Example 2. Let n 3 and define E ij S n as a matrix whose only nonzero entries are in positions (i, j) and (j, i) and for brevity, let E i := E ii. Consider the SDP sup s.t. x n x E + n i=2 x i(e i + E i,n ) I n. (3.3) For example, when n = 3 we recover Example. When n = 4 problem (3.3) is sup x 3 s.t. x + x 2 + x 3. We claim that there is a duality gap of between (3.3) and its dual.

Indeed, first let us compute the optimal value of (3.3). If x is feasible in it and Z = (z ij ) is the corresponding slack, then z nn = so the last row and column of Z is zero. Since z n 2,n = x n, we deduce x n = and val(3.3) =. On the other hand, if Y is feasible in the dual, then by the first dual constraint y =. Thus y = y j = j (since Y ) y 22 = (since A 2 Y = ) y 2j = j (since Y ). y n 2,j = j (since Y ). (3.4) Thus the dual is equivalent to inf s.t. Y Y = Y, (3.5) which has optimal value. So the duality gap is, as wanted. Figure shows the sparsity structure of the A i and of B in Example 2. Note that these SDPs are somehat subtle: we could simply use A i = E i for all i and still have the same gap. However, the result would not be a bona fide n variable SDP, since we could just replace A with, say, A + + A m and drop A 2,..., A m to get a two variable SDP with the same gap. Why is such a simplification impossible? The reason is that the (i, n) element of all A i is nonzero, so it is not hard to see that the only psd linear combinations of the A i are nonnegative multiples of A. In fact, more can be said: as we show in Section 4, the matrices A,..., A m are a minimal sequence (in a well defined sense) that reduce the dual variable matrix to have its first n 2 rows and columns equal to zero. Example 3. Let us change the last matrix in Example 2 to E n + E n 2,n. The resulting primal SDP still has zero optimal value, but now the dual is equivalent to inf Y (3.6) s.t. Y =, hence it is infeasible. Thus we have i.e., an infinite duality gap. Y, = val(p ) < val(d) = +, 2

Note that the dual is now weakly infeasible, meaning its alternative system x n = n i= x i A i (3.7) is also infeasible 3. This follows by an argument similar to the one that showed zero optimal value of the primal (3.3). It is well known that the dual (D) is weakly infeasible, iff the affine subspace { Y A i Y = c i (i =,..., m) } has zero distance to S n + but does not intersect it. Thus weakly infeasible SDPs are very challenging for SDP solvers: see [29] and [3] for theoretical and computational studies and instance libraries. The SDPs of Example 3 are much simpler than the ones in [29, 3] while they are just as difficult; see Section 7. Figure : The sparsity structure of the A i and of B in Example 2 and 3 with m = 2, m = 3 and m = 4 3.2 Positive gap SDPs with a double sequence In this subsection we present another family of SDPs with a positive duality gap. These SDPs may not be per se more difficult than the ones from Examples 2 and 3 (as we will see in Section 3 If (3.7) were feasible, then it would be a convenient certificate that the dual of (3.3) is infeasible, since a simple argument shows that both cannot be feasible. 3

7, those are already very difficult). The SDPs in this section, however, have a more sophisticated double sequence structure and we will show in Sections 4 and 6 that the so-called singularity degree of two associated duals of (D) and of (HD) are the maximm that permit a positive duality gap. Example 4. Let m 2, n = 2m, and for notational convenience set (The number k is undefined). k i = m + i (i = 2,..., m + ). Consider the SDP x E + m i=2 x ) i( Ei + E ki + E i,n + E ki,n +x m Em E km + E m,n + E km,n I m. (3.8) Note that these SDPs are a bit more subtle than the ones in Example 2. For example, the negative sign of E km in the last term is essential: if we change it to positive, then a simple calculation shows that the resulting SDP will have zero gap with its dual. For concreteness, when m = 2 the SDP (3.8) is sup x 2 s.t. x +x 2. (3.9) (Note that since k is undefined, we have A 2 = E 2 E k2 +E,n if m = 2; and A 2 = E 2 +E k2 +E,n if m 3.) When m = 3 the SDP (3.8) is sup x 3 s.t.x + x 2 + x 3 (3.2) Figure 2 shows the sparsity structure of the A i and of B in Example 4. We next argue that (P ) and (D) satisfy = val(p ) < val(d) =. 4

Figure 2: The sparsity structure of the A i and of B in Example 4 with m = 2, m = 3 and m = 4 Indeed, in any feasible solution of (P ) we have x m = ; this follows just like in the analysis in Example 2. On the other hand, suppose Y is feasible in the dual. Then A Y = so y =, hence y = y j = j (by Y ) y 22 + y k2,k 2 = (by A 2 Y = ) y 22 = y k2,k 2 = (by y 22, y k2,k 2 y 2j = y k2,j = j (by Y ) (3.2). y m,j = y km,j = j (by Y ). Thus A m and Y look like in equation (3.22) below. (As before, the empty blocks are zero, and the blocks may have arbitrary elements.) 5

... m {}}{ m {}}{ k 2... k m k {}}{{}} m k m+ {{}}{, } {{ } A m... m {}}{ m {}}{ k 2... k m k {}}{{}} m k m+ {{}}{ } {{ } Y (3.22) Thus (D) is equivalent to inf s.t. Y Y =, Y, (3.23) hence it has optimal value, as wanted. 4 The singularity degree of the duals of our positive gap SDPs We now study our positive gap SDPs in more depth. We introduce the concepts of faces, facial reduction, and singularity degree of SDPs, and show that the duals associated with our SDPs, namely (D) and (HD) (defined in the Introduction), have singularity degree equal to m and m, respectively. First we need a definition. A set K is a cone, if x K, λ implies λx K, and the dual cone of cone K is K = { y y, x x K }. In particular, (S n +) = S n + with respect to the inner product. 4. Facial reduction and singularity degree Definition 2. Given a closed convex cone K, a convex subset F of K is a face of K, if x, y K, 2 (x + y) F implies x, y F. We are mainly interested in the faces of S+, n which have a simple and attractive description: they are { } } X F = T T T : X S+ r, with dual cone F = {T T X Z Z T T : X S+ r, Y (4.24) 6

where r n and T R n n is invertible (see, e.g., [8]). In other words, the faces are of the form T T (S r + )T for some r and for some invertible matrix T. For such a face, assuming T = I we will sometimes use the shorthand F =, F =, (4.25) when the size of the partition is clear from the context. The sign denotes a positive semidefinite submatrix and the sign stands for a submatrix with arbitrary elements. Figure 3 illustrates the cone S+ 2 in 3 dimensions: it plots the triplets (x, y, z) such that x z. z y It is clear that all faces of S 2 + that are different from {} and itself are extreme rays of the form { λuu T : λ }, where u R 2 is nonzero, i.e., we can choose r = in (4.24). Figure 3: The 2 2 semidefinite cone Definition 3. Suppose K is a closed convex cone, and H is an affine subspace with H K. Then the minimal cone of H K is the smallest face of K that contains H K. The minimal cone of (P ), (D), and of (HD) is the minimal cone of their feasible sets. In particular, the minimal cone of (P ) is the minimal cone of (lin{ A,..., A m } + B) S n +. The following easy-to-verify fact will help us identify the minimal cone of SDPs: if H S n is an affine subspace which contains a psd matrix, then the minimal cone of H S+ n is the smallest face of S+ n that contains the maximum rank psd matrix of H. 7

Example 5. Let H be the linear subspace spanned by the matrices A =, A 2 =, and K = S 3 +. Then the minimal cone of H K is the set of nonnegative multiples of A. In this paper we are mostly interested in the minimal cone of (D) and of (HD) 4. Example 6. (Example continued) In this example Y = is a maximum rank feasible solution in (D) so the minimal cone of (D) is S 2 +. Why is the minimal cone interesting? Suppose F is the minimal cone of (D). Then there is a feasible Y in the relative interior of F, otherwise the feasible set of (D) would be contained in a smaller face of S n +. Thus replacing the primal constraint by B i x i F yields a primal-dual pair with no duality gap and primal attainment. (An analogous result holds for the minimal cone of (P ) and enlarging the dual feasible set). For details, see e.g. [3]. How do we actually compute the minimal cone of H K? The following basic facial reduction algorithm is designed for this task. Let y =, F = K, i =. for i =, 2,... do Choose y i F i H. Let F i = F i y i. end for Algorithm : Facial Reduction Definition 4. We say that a (y,..., y k ) output by Algorithm is a facial reduction sequence for K; and we say that it is a strict facial reduction sequence for K if in addition y i F i \F i for all i. We denote the set of facial reduction sequences for K by FR(K). Note that Algorithm contains y only for notational convenience, but y is not included in Definition 4. It is clear that any F i constructed by Algorithm contains the minimal cone of H K. Further, there is always a facial reduction sequence such that F i equals the minimal cone for some i : for a proof, see e.g., [6, 3, 2, 3]. We will say that such a sequence defines the minimal cone of H K. 4 In contrast, the minimal cone of (P ) is easy to identify, since it is just the smallest face of S+ n that contains the right hand side B (see Assumption ). 8

Clearly, Algorithm can generate many possible sequences (it can even choose several y i which are zero), but it is preferable to terminate it in a minimim number of steps. Definition 5. Suppose H is an affine subspace with H K. The singularity degree d(h K) of H K is the smallest number of steps necessary for Algorithm to construct the minimal cone of H K. The singularity degree of SDPs was introduced in the seminal paper [25]. It was used to bound the distance of a symmetric matrix from H S n +, given the distances from H and from S n +. More recently it was used in [7] to bound the rate of convergence of the alternating projection algorithm to such a set. In the following examples involving SDPs we denote the members of facial reduction sequences by capital letters (since they are matrices). Example 7. (Example 5 continued) In this example the sequence (Y, Y 2 ) below defines the minimal cone, with corresponding faces shown. Note that F 2 is the minimal cone. Y = Y 2 =, F = S+ 3 Y 2 =, F 2 = F Y 2 =,. Since Y is the maximum rank psd matrix in H, it is the best choice for the first member of such a facial reduction sequence, hence d(h S 3 +) = 2. Example 8. (Example continued) In this example the one element facial reduction sequence (A ) defines the minimall cone of (D). The reader may wonder, why we connect positive gaps to the singularity degree of (D) and of (HD), and not to the singularity degree of (P ). We could do the latter, by exchanging the roles of the primal and dual. However, we think that our treatment is more intuitive, as we next explain. The dual feasible set is H S n +, where H = { Y S n A i Y = c i i }. Thus, to define the minimal cone of (D) we use a facial reduction sequence whose members are in H lin{a,..., A m }. As we will show, in our instances actually the A i themselves form a facial reduction sequence that defines the minimal cone of (D), making the essential structure of the minimal cone apparent. An analogous statement holds for the minimal cone of (HD). 4.2 The singularity degree of the single sequence SDPs in Example 2 We now analyze the singularity degree of the duals of the SDPs given in Example 2. 9

Theorem 2. Let (D) be the dual of (3.3). Then d(d) = m. Proof We first claim S n + A A i = S n i + for i m. (4.26) Indeed, in (4.26) is trivial, since A,..., A i have nonzero elements in rows and columns,..., i only. The containment follows by successively plugging Y into the dual constraints, like in the chain of implications (3.4). Hence taking i = m = n 2 we deduce that the minimal cone of (D) S 2 +. By (4.26) we deduce A i+ (S n + A A i ) for i =,..., m 2, hence (A,..., A m ) is a facial reduction sequence, which defines the minimal cone of (D). Thus d(d) m. To complete the analysis we show that any strict facial reduction sequence in lin {A,..., A m } can reduce S n + by at most as much as the A i themselves. This is done in Claim, whose proof is in Appendix A.2. Claim. Suppose i {,..., m } and (Y,..., Y i ) is a strict facial reduction sequence, whose members are all in lin{a,..., A m }. Then S+ n Y Yi = S n i +. (4.27) To complete the proof, suppose that (Y,..., Y i ) is a facial reduction sequence that defines the minimal cone of (D). Since the minimal cone is S 2 +, by Claim we deduce i = n 2 = m. Hence d(d) = m follows and the proof is complete. 4.3 The singularity degree of the double sequence SDPs in Example 4 Theorem 3. Let (D) be the dual of (3.8). Then d(d) = m and d(hd) = m. Proof The proof of d(d) = m is almost verbatim the same as the proof of the same statement in Theorem 2: the key is to show that for i {,..., m } S+ n A A i = { Y rows and columns of Y indexed by,..., i and k 2,..., k i are zero }. We leave the details to the reader. 2

We next look at the singularity degree of (HD). For i {,..., m} define { S+ n B, if i = G i := S+ n B A 2 A i, if i 2. (4.28) Note that if i 2, then A is not needed in the definition of G i. The reason is that both A and B are psd, and the rangespace of A is contained in the rangespace of B, thus S n + B S n + A. So B is at least as good a start for a facial reduction sequence as A. Using a similar argument as before we can show that for i {,..., m } we have G i = { Y rows and columns of Y indexed by,..., m and k 2,..., k i are zero }. (4.29) In particular, the inclusion is trivial. The reverse inclusion follows by plugging Y into the constraints B Y =, then A 2 Y =,..., A i Y = (see (3.2)). Hence the minimal cone of (HD) is G m. By (4.29) we have that (B, A 2,..., A m, A m ) is a facial reduction sequence that defines the minimal cone of (HD), hence d(hd) m follows. Equality follows from Claim 2 below. Claim 2. Suppose i {,..., m} and (Y,..., Y i ) is a strict facial reduction sequence, whose members are all in lin { B, A 2,..., A m }. Then G i = S n + Y Y i. (4.3) The proof of Claim 2 is almost the same as the proof of Claim hence we omit it. Given Claim 2 the proof of Theorem 3 is complete. 5 The double reformulation In this section we present an auxiliary result in Theorem 4, which we believe to be of independent interest (hence the separate section): we show how to reformulate (P ) so its maximum rank slack and the maximum rank solution of its homogeneous dual both become easy to see. We will use Theorem 4 in Section 6. First we define certain structured facial reduction sequences for S n + which will be useful for this purpose. These sequences were originally introduced in [3]. Definition 6. We say that (M,..., M k ) is a regularized facial reduction sequence for S n + if M i = r +... + r i {}}{ r i {}}{ I n r... r {}}{ i for all i, where the r i are nonnegative integers, and the symbols correspond to blocks with arbitrary elements. 2

We denote the set of such sequences by REGFR(S n +). Sometimes we will refer to such a sequence by the length r i blocks I := {,..., r }, I 2 := {r +,..., r + r 2 },. I k := k { r i +,..., i= k r i }. For instance, (A,..., A m ) in the single sequence SDPs in Example 2 (and Example 3) is a regularized facial reduction sequence. So is (B, A 2,..., A m, A m ) in the double sequence SDPs in Example 4. However, in the latter SDPs (A, A 2,..., A m, A m ) is a facial reduction sequence, which, however may not be regularized, since the nonzero blocks in the A i may not be contiguous see the SDP in (3.2) Definition 7. We say that is a double reformulation of (P ) if i= sup m i= c i x i m i= x ia i B, () B is the maximum rank slack in (P ) as well as in (P ). (2) (B, A,..., A d(hd) ) REGFR(Sn +) defines the minimal cone of the homogeneous dual of (P ). Theorem 4. We have d(hd) m+ and any SDP of the form (P ) has a double reformulation. Furthermore, the double reformulation can be constructed using only operations (2), (3) and (4) in Definition. The proof of Theorem 4 is in Appendix A.3. The reason we call the above reformulation a double reformulation is that it serves a double purpose: using it we can easily visualize the maximum rank slack both in (P ) (as it is just the right hand side) as well as the maximum rank feasible solution in its homogeneous dual. As to the latter point, suppose Y is feasible in the homogeneous dual of (P ), and also suppose the block sizes in the sequence (B, A,..., A d(hd) ) are r, r, r 2,.... Since B Y = the first r rows and columns of Y are zero. Since A Y = the next r rows and columns of Y are zero, and so on. Let us see an illustration: Example 9. Consider the SDP sup 3x 3x 2 2 2 s.t. x 2 + x 2 2 2 2 (P ), (5.3) and let A and A 2 denote the matrices on the left hand side, and B the right hand side. Then 22

B is the maximum rank slack and (B, A, A 2 ) REGFR(S 4 +) with block sizes defines the minimal cone of (HD), which is the set of nonnegative multiples of Thus d(hd) 3 and we claim that actually Y =. d(hd) = 3 holds. Indeed, let L := lin {B, A,..., A m }, then the facial reduction sequences that define the minimal cone of (HD) are in L. Clearly, B is the only nonzero psd matrix in L. Also, A is the only matrix in L (S 3 + B ) whose lower right 3 3 block is nonzero, thus (B, A ) is the only strict length two facial reduction sequence in L. We can similarly show that (B, A, A 2 ) is the only strict length three facial reduction sequence in L. Thus d(hd) = 3 follows. Remark 5.. We can add more terms to the to the right hand side of (5.3), while keeping it in a double reformulation form. For example, we can add the terms +x 3 + x 4. 6 The case of maximal singularity degree We now look at the case when (D) or (HD) have maximal singularity degree (m or m +, respectively) and prove that in these cases there is no duality gap. The first result is fairly straightforward. Proposition. We have d(d) m. Furthermore, when d(d) = m there is no duality gap. Proof Let H = { Y S n A i Y = c i i } = { Y S n A i Y = i } + Y, 23

where Y H is arbitrary. Then the feasible set of (D) is H S n +, so d(d) dim H m. where the first inequality comes from Theorem in [3] and the second from the definition of H. Thus, if d(d) = m then dim H = m, hence c i = A i Y = for all i, so there is no gap. The main result of this section follows. Theorem 5. Suppose d(hd) = m +. Then (D) is strictly feasible, and val(p ) = val(d) =. To prove Theorem 5 we need some notation. For Y S n and I, J {,..., n} we define Y (I, J ) as the submatrix of Y with rows in I and columns in J, and let Y (I) := Y (I, I), Y (I, :) := Y (I, {,..., n}). Given sets I,..., I k and i j we denote I i:j := I i I j. Proof of Theorem 5 Assume d(hd) = m + and consider (P ), the double reformulation of (P ). Assume that in (P ) the sequence (B, A,..., A m) is associated with index sets I, I,..., I m (see Definition 6). For convenience set A = B, I m+ = {,..., n} \ I :m. For brevity, let us write I i: for I i:(m+) for all i (we can do this without confusion, since m + is the largest index). We first prove A i(i i, I (i+): ) for i =,..., m. (6.32) Let i and let us picture A i and A i in equation (6.33): as always, the empty blocks are zero, and the blocks are arbitrary, as before. The block marked by is A i (I i, I (i+): ) and its symmetric counterpart. A i = I :(i 2) {}}{ I i {}}{ I I i {}}{ I (i+): {}}{, A i = I :(i 2) I i {}}{ I (i+): I {}}{{}}{ i {}}{ I. (6.33) 24

Now suppose the blocks are zero and let A i := λa i + A i for some large λ >. Then by the Schur complement condition for positive definiteness we find A i (I (i ):i ), hence A,..., A i 2, A i, A i+,..., A m is a shorter facial reduction sequence, which also defines the minimal cone of (HD), a contradiction. We thus proved (6.32). We show in equation (6.34) the A i matrices when m = 2 and d(hd) = 3. I I I 2 I 3 I I I 2 I 3 I I I 2 I 3 A = I A = I A 2 = I (6.34) Next we will prove val(p ) =. For that, let x be feasible in (P ); we will prove x =. With that goal in mind, let m Z = B x i A i. Since Z(I m+ ) = and Z we deduce that the columns of Z corresponding to I m+ are zero. Hence = Z(I m, I m+ ) = x m A m(i m, I m+ ), }{{} so x m =, which implies Z(I m:(m+) ) =. By a similar argument we get i= = Z(I m 2, I m:(m+) ) = x m A m (I m, I m:(m+) ), }{{} hence x m =, and so on. Thus x = follows. Given that (P ) was constructed from (P ) using only operations (2), (3) and (4) in Definition, it follows that the only feasible solution of (P ) is. Thus val(p ) =, as desired. We finally prove that (D) is strictly feasible. For that purpose, we consider the following algorithm, which constructs Y feasible for (D ), the dual of (P ). We call the algorithm a Staircase Algorithm, since it fills in the entries of Y in a staircase pattern. Algorithm 2: Staircase Algorithm Initialize Y :=. Set Y (I ). Set Y (I ). for i = : m do (*) Set Y (I i, I i+: ) to satisfy the ith equation in (D ). (**) Set Y (I i+ ) to make Y (I :(i+) ). end for 25

Figure 4, which is best viewed together with equation (6.34), illustrates how the algorithm works when m = 2. It shows the order in which the entries of Y are defined, and the type of entries they are filled in with: first we set Y (I ) ; second, Y (I ) ; third, we set Y (I, I 2:3 ) to satisfy the constraint A Y = c ; fourth, we set Y (I 2 ) to ensure Y (I :2 ), and so on. I I I 2 I 3, + 3, c Y = 2, + 5, c 2 3, c 4, + 5, c 2 6, + Figure 4: How the Staircase Algorithm works when m = 2 and d(hd) = 3 We now argue that the Staircase Algorithm is correct. Clearly, steps (*) can be executed because of condition (6.32). Steps (**) can be executed with i =,..., m because of the Schur complement condition for positive definiteness. Since A (I i+ ) = = A i (I i+) = it follows that the previously satisfied equations,..., i are not affected. It remains to show that step (**) can be executed when i = m. To see this, since (A, A,..., A m) defines the minimal cone of (HD), there is Y feasible in (HD) such that Y (I m+ ) and the other entries of Y are zero. We add a large multiple of Y to our current Y and this ensures Y. The proof is now complete. Example. (Example 9 continued) Recall that in this SDP we have d(hd) = 3. We chose the blocks specified in equation (6.32) to have entries all equal to 2 and I = {}, I = {2}, I 2 = {3}. A possible Y constructed by the Staircase Algorithm is as follows: 2 Y = (y ij ) 4 2 i,j= = 2 5 2 25 () set y = ; (2) set y 22 = ; (3) set y 3 = y 3 = 2, y 4 = y 4 = ; 26

(4) set y 33 = 5; (5) set y 24 = y 42 = 2; (6) set y 44 = 25. 7 A computational study This section presents a computational study of SDPs with positive duality gaps. We first remark that pathological SDPs are extremely difficult to solve by interior point methods. However, some recent implementations of facial reduction [23, 3] work on some pathological SDPs. We refer to [5] for an implementation of the Douglas-Rachford splitting algorithm to solve the weakly infeasible SDPs from [5] and to [] for a homotopy method to tackle these SDPs. Furthermore, the exact SDP solver SPECTRA [2] can solve small SDPs in exact arithmetic. We hope that the detailed study we present here will inspire further research into solving pathological SDPs. We generated a library of challenging SDPs based on the single sequence SDPs in Example 2 and Example 3. First we created SDPs described in Example 2 with m = 2,...,. We multiplied the primal objective by, meaning we chose c = e m. (Recall m = n in these SDPs.) Thus in these instances the primal optimal value is still zero, but the dual optimal value is. Second, we constructed SDPs from the single sequence SDPs in Example 3, which have an infinite duality gap, with m = 2,...,. For consistency, we multiplied the primal objective by. So the objective is still e m. Then the primal optimal value is still zero, and the dual is infeasible, meaning the duality gap is still infinity. We say that the SDPs thus created from Examples 2 and 3 are clean, meaning the duality gap can be verified by simple inspection. To construct SDPs in which the duality gap is less obvious, we added an optional Messing step: Let T be an invertible matrix with integer entries, and replace all A i by T T A i T and B by T T BT. Thus we have four categories of SDPs, stored under the names gap single f inite clean m, gap single f inite messy m, gap single inf clean m, and gap single inf messy m, 27

where m = 2,..., in each category. We tested two SDP solvers: the Mosek commercial solver, and the SDPA-GMP high precision SDP solver []. Table reports the number of correctly solved instances in each category. The solvers are not designed to detect a finite positive duality gap. Thus, to be fair, we report that a simple gap instance was correctly solved when Mosek does not report OPTIMAL or NEAROPTIMAL status, and SDPA-GMP does not report pdopt status. The solvers, however, are designed to detect infeasibility, and in the simple gap, infinity instances the dual is infeasible. Hence we would report that an instance is correctly solved, when Mosek or SDPA-GMP report dual infeasibility. However, this did not happen for any of the instances. We also tested the preprocessing method of [23] and Sieve-SDP [3] on the dual problems, then on the preprocessed problems we ran Mosek. Both these methods correctly preprocessed all clean instances, but could not preprocess the messy instances. See the rows in Table marked by PP+Mosek and Sieve-SDP+Mosek. Gap, single, finite Gap, single, infinite Clean Messy Clean Messy Mosek SDPA-GMP PP+Mosek Sieve-SDP + Mosek Table : Computational results We finally tested the exact SDP solver SPECTRA [2] on the gap single messy 2 instance. SPECTRA cannot run on our SDPs as they are, since they do not satisfy an important algebraic assumption. However, SPECTRA could compute and certify in exact arithmetic the optimal solution of the perturbed dual inf B Y s.t. A i (Y + ɛi) = c i (i =, 2) Y (7.35) where ɛ was chosen as a small rational number. For example, with ɛ = 2 SPECTRA found and certified the optimal solution value as. in about two seconds of computing time. The instances are stored in Sedumi format [26], in which the roles of c and B are interchanged. Each clean instance is given by A, which is a matrix with m rows and n 2 columns. The ith row of A contains matrix A i of (P ) stretched out as a vector; b, which is the c in the primal (P ), i.e., b = e n ; c, which is the right hand side B of (P ), stretched out as a vector; 28

These SDPs are available from the author s website. 8 Conclusion We analyzed semidefinite programs with positive duality gaps, which is arguably the most interesting and challenging pathology of SDPs. First we dealt with the two variable case: we transformed two variable SDPs to a standard form, that makes the positive gap (if any) selfevident. Second, we showed that the two variable case helps us understand positive gaps in larger SDPs: the structure that causes a positive gap in the two variable case also appears in higher dimensions. We studied an intrinsic parameter, the singularity degree of the duals of our SDPs, and proved that these are the largest that permit a positive gap. Finally, we created a problem library of innocent looking, but very difficult SDPs, and showed that they are currently unsolvable by modern interior point methods. It would be interesting to try the the Douglas-Rachford algorithm [5] or the homotopy method in [] on the duals of our Gap, single, infinite SDPs, which are weakly infeasible. It may also be possible to adapt these algorithms to work on the Gap, single, finite instances (which have a finite duality gap). * A Proofs of technical statements A. Proof of Lemma 4 Let Q R r r be a matrix of orthonormal eigenvectors of A, Q 2 R r2 r2 a matrix of suitably normalized eigenvectors of A 22, and T = Q Q 2. Then T T MT = Ω V W V T I s W T with Ω S r, s is equal to the rank of A 22, and V and W are possibly nonzero., Next, let T 2 = I r V T I s I r2 s, then T 2 T T T MT T 2 = Ω V V T W I s W. Finally, let Q 3 R r r be a matrix of orthonormal eigenvectors of Ω V V T, and T 3 = Q 3 I r2, then T T 3 T T 2 T T MT T 2 T 3 is in the required form. Also note that Ir Ir T T i T i = for i =, 2, 3, 29

hence will do. T := T T 2 T 3 A.2 Proof of Claim We will prove that for the sequence (Y,..., Y i ) it holds that Y i = i λ ij A j with λ ii >, j= (A.36) where the λ ij are suitable reals. This statement will clearly imply our claim. To start, for brevity, let L := lin {A,..., A m }. We first prove (4.27) for i =, so let Y L (S n + \ {}) and write Y = m j= λ ja j with some λ j reals. The last row of Y is (λ 2,..., λ,n,, ). Since Y we deduce λ 2 = = λ,n =. Since Y we deduce λ > so our claim follows. Next, suppose (4.27) holds for some i, and let (Y,..., Y i+ ) be a strict facial reduction sequence whose members are all in L. We have Y i+ (S+ n Y Yi = ( S+ n i ), where the equation is from the induction hypothesis. Thus the lower (n i) (n i) block of Y i+ is psd. Considering the last row of Y i+ and using a similar argument as before, we deduce that Y i+ is a linear combination of A,..., A i, A i+ only, i.e., Y i+ = i+ j= λ i+,ja j with some λ i+,j scalars. It remains to show that λ i+,i+ >. Indeed, λ i+,i+ since the lower right order n i block of Y i+ is psd. If λ i+,i+ were, then Y i+ ( S+ n i ) would follow, which would contradict the assumption that (Y,..., Y i+ ) is strict. Thus the proof is complete. ) A.3 Proof of Theorem 4 For brevity, let We first show d := d(hd) and L := lin {B, A,..., A m }. d m +. Indeed, the feasible set of (HD) is L S n + hence Theorem in [3] implies d dim L = m +, as required. 3