E1 251 · Mock End-term Paper
Linear and Nonlinear Optimization · Mock version MK1 (new questions, built in the professor's Midterm 2 style) · Total time: 3 hours · Maximum marks: 100
Instructions
- Part A (20 marks, about 25 minutes) is compulsory and is answered without any sheet. Write each answer in one or two lines. These are the results you "have to remember absolutely".
- Part B (80 marks, about 2 h 35 min): answer exactly five of Questions I–VII, including at least two descriptive questions from IV–VII. One handwritten sheet may be used for Part B.
- Each MCQ group (I, II, III) counts as one question. Answer all parts of each selected question. All seven questions carry equal overall weight (16 marks); MCQ parts carry equal shares of their group's weight (2 marks each).
- The valid choices are: three MCQ groups and two descriptive questions, two MCQ groups and three descriptive questions, or one MCQ group and four descriptive questions.
- For every selected MCQ, choose exactly one option, (a)–(d), valid in general under the stated assumptions. (In the real paper you shade a bubble in a shuffled response table; here, click an option to check it.) Leave unselected groups unmarked.
- Show reasoning and calculations for descriptive questions. Use the conventions stated in each question: $L=f+\lambda^Th+\mu^Tg$ with $\mu\ge 0$ for constraints written as $g(x)\le 0$, $h(x)=0$; LP standard form $\min c^Tx$ s.t. $Ax=b$, $x\ge 0$, written as $h(x)=b-Ax=0$, $g(x)=-x\le0$, so $L=c^Tx+\lambda^T(b-Ax)-\mu^Tx$; QP form $f=\frac12x^TQx-c^Tx$ with $L=f+\lambda^T(Ax-b)$.
- Assume no negative marking in Part B unless your paper says otherwise (quizzes used $+1/-\tfrac14$; do not guess blindly).
Select your five Part B questions: ☐ I ☐ II ☐ III ☐ IV ☐ V ☐ VI ☐ VII
Suggested clock: start 0:00 Part A → 0:25 Part B → spend about 20 min per MCQ group and 35 min per descriptive question → last 10 min to check signs ($\mu\ge0$, $B^{-1}$ vs $B^{-T}$, ½ factors). Answers are hidden behind "Show answer": do not open them until the 3 hours are over.
Part A · Short answers (compulsory, no sheet, 10 × 2 = 20 marks)
Write the dual of the standard-form LP $\;\min_x c^Tx$ subject to $Ax=b,\ x\ge 0$, stating the sign of the dual variable.
Show answer
$$\max_{\lambda}\ b^T\lambda\quad\text{subject to}\quad A^T\lambda\le c,\qquad \lambda\ \text{free (unrestricted)}.$$ (Course form: $h(x)=b-Ax=0$, $g(x)=-x\le0$, so $L=c^Tx+\lambda^T(b-Ax)-\mu^Tx=b^T\lambda+(c-A^T\lambda-\mu)^Tx$ with $\mu\ge0$. The infimum over $x$ is finite only if $c-A^T\lambda=\mu\ge0$, giving $q(\lambda)=b^T\lambda$. If you write the equality the other way round, $\lambda^T(Ax-b)$, the only change is that $\lambda$ flips sign: $\max -b^T\lambda$ s.t. $-A^T\lambda\le c$, the same problem.)
Write the complete KKT (optimality) system for the standard-form LP of A1.
Show answer
$$A^T\lambda+\mu=c\ \ \text{(stationarity)},\qquad Ax=b,\ x\ge0\ \ \text{(primal feasibility)},\qquad \mu\ge 0\ \ \text{(dual feasibility)},\qquad \mu_ix_i=0\ \forall i\ \ \text{(complementary slackness)}.$$ (From $\nabla_xL=c-A^T\lambda-\mu=0$ with $L$ as in A1.) Equivalently: $x$ primal feasible, $\lambda$ dual feasible ($A^T\lambda\le c$), and $x^T(c-A^T\lambda)=0$. "Stationarity is the only thing you have to memorise" — the rest is feasibility.
For $\min f(x)$ s.t. $h(x)=0$, $g(x)\le 0$, with column-gradient Jacobians $J_h, J_g$, write all five parts of the KKT conditions at $(x^*,\lambda^*,\mu^*)$.
Show answer
- Stationarity: $\nabla f(x^*)+J_h(x^*)\lambda^*+J_g(x^*)\mu^*=0$.
- Equality feasibility: $h(x^*)=0$.
- Inequality feasibility: $g(x^*)\le 0$.
- Dual feasibility: $\mu^*\ge 0$ ($\lambda^*$ free).
- Complementary slackness: $\mu_i^*g_i(x^*)=0$ for every $i$.
Trap: CS is "$=0$", not "$\le 0$"; $\mu\ge0$, not $\le0$ (Midterm 2 I.1 distractors).
State the second-order sufficient condition (SOSC), including the definition of the critical cone.
Show answer
Let $(x^*,\lambda^*,\mu^*)$ satisfy KKT. Let $A_+=\{j \text{ active}: \mu_j^*>0\}$, $A_0=\{j\text{ active}:\mu_j^*=0\}$ and $$C(x^*)=\{d:\ \nabla h_i(x^*)^Td=0\ \forall i,\ \ \nabla g_j(x^*)^Td=0\ (j\in A_+),\ \ \nabla g_j(x^*)^Td\le 0\ (j\in A_0)\}.$$ If $d^T\nabla^2_{xx}L(x^*,\lambda^*,\mu^*)\,d>0$ for every $d\in C(x^*)$, $d\ne0$, then $x^*$ is a strict local minimiser. (If $C=\{0\}$ the condition holds vacuously. No LICQ needed for SOSC.)
$f,g_i$ convex, $h$ affine, a point $x^0$ with $h(x^0)=0$, $g(x^0)<0$, and $p^*$ finite. What does Slater's theorem conclude?
Show answer
Zero duality gap, $p^*=d^*$, and the dual optimum is attained (some $(\lambda^*,\mu^*)$ with $\mu^*\ge0$ has $q(\lambda^*,\mu^*)=d^*$). It does not guarantee that the primal optimum is attained.
State weak duality and say which assumptions it needs.
Show answer
For every primal-feasible $x$ and every $(\lambda,\mu)$ with $\mu\ge0$: $q(\lambda,\mu)\le f(x)$, hence $d^*\le p^*$. Proof in one line: $q(\lambda,\mu)\le L(x,\lambda,\mu)=f(x)+\lambda^Th(x)+\mu^Tg(x)\le f(x)$. No convexity needed.
For $\min f_1(x_1)+f_2(x_2)$ s.t. $A_1x_1+A_2x_2=b$, write the augmented Lagrangian and the three ADMM steps.
Show answer
$L_A=f_1(x_1)+f_2(x_2)+\lambda^T(A_1x_1+A_2x_2-b)+\frac{\beta}{2}\|A_1x_1+A_2x_2-b\|^2$, $\beta>0$. $$x_1^{(k+1)}\in\arg\min_{x_1}L_A(x_1,x_2^{(k)},\lambda^{(k)}),\quad x_2^{(k+1)}\in\arg\min_{x_2}L_A(x_1^{(k+1)},x_2,\lambda^{(k)}),\quad \lambda^{(k+1)}=\lambda^{(k)}+\beta\,(A_1x_1^{(k+1)}+A_2x_2^{(k+1)}-b).$$ New $x_1$, old $\lambda$ in the $x_2$-step; the multiplier step size is the same $\beta$.
Give $\arg\min_{z\in\mathbb{R}}\ \gamma|z|+\frac{\beta}{2}(z-v)^2$ ($\gamma,\beta>0$) as an explicit formula.
Show answer
$z^*=S_{\tau}(v)=\operatorname{sign}(v)\max(|v|-\tau,0)$ with $\tau=\gamma/\beta$: $\ v-\tau$ if $v>\tau$; $\ 0$ if $|v|\le\tau$; $\ v+\tau$ if $v<-\tau$.
For CG on $f=\frac12x^TQx-b^Tx$ ($Q\succ0$), give $\alpha_k$, $\beta_k$ and the direction update, with $g_k=\nabla f(x_k)$.
Show answer
$d_0=-g_0$; $\ \alpha_k=\dfrac{g_k^Tg_k}{d_k^TQd_k}$; $\ x_{k+1}=x_k+\alpha_kd_k$; $\ g_{k+1}=g_k+\alpha_kQd_k$; $\ \beta_k=\dfrac{\|g_{k+1}\|^2}{\|g_k\|^2}$; $\ d_{k+1}=-g_{k+1}+\beta_kd_k$. Gradients mutually orthogonal, directions $Q$-conjugate.
Fixed-step gradient descent $x_{k+1}=x_k-\alpha\nabla f(x_k)$ on $f=\frac12x^TQx-b^Tx$, $Q\succ 0$ with eigenvalues $\lambda_{\min},\dots,\lambda_{\max}$: for which $\alpha$ does it converge from every start? Best $\alpha$ and its rate?
Show answer
The error in eigen-direction $i$ is multiplied by $(1-\alpha\lambda_i)$ each step, so convergence for every start $\iff |1-\alpha\lambda_i|<1\ \forall i\iff 0<\alpha<2/\lambda_{\max}$. Best fixed step $\alpha^*=2/(\lambda_{\min}+\lambda_{\max})$, rate $\dfrac{\kappa-1}{\kappa+1}$ with $\kappa=\lambda_{\max}/\lambda_{\min}$.
Part B · Answer exactly five of I–VII (16 marks each)
Question I · MCQ group: unconstrained optimality, gradient descent, CG (8 × 2 marks)
Unless stated otherwise, $f$ is twice continuously differentiable, $Q$ is symmetric, and $g=\nabla f$.
Let $f(x)=x^4$ on $\mathbb{R}$ and $x^*=0$. Which statement is correct?
- (a) $x^*$ fails SONC because $f''(0)=0$.
- (b) $x^*$ fails SOSC, so it cannot be a strict local minimiser.
- (c) $x^*$ satisfies FONC and SONC, fails SOSC, and is nevertheless a strict global minimiser.
- (d) $x^*$ satisfies SOSC because $f''(0)\ge 0$.
Show answer
Answer: (c). $f'(0)=0$, $f''(0)=0\ge0$ (FONC, SONC hold); SOSC needs $f''(0)>0$, which fails. Still $x^4>0$ for $x\ne0$, so 0 is a strict global minimiser: SOSC is sufficient, not necessary. (a) SONC only needs $\ge0$. (b) confuses "sufficient" with "necessary". (d) SOSC needs strict positivity.
Let $f(x_1,x_2)=x_1^3+x_2^2$ and $x^*=0$. Which statement is correct?
- (a) FONC and SONC hold at $0$, but $0$ is not a local minimiser.
- (b) FONC fails at $0$.
- (c) FONC and SONC hold, hence $0$ is a local minimiser.
- (d) SOSC holds because $\nabla^2f(0)=\operatorname{diag}(0,2)$ is positive semidefinite.
Show answer
Answer: (a). $\nabla f(0)=(0,0)$, $\nabla^2f(0)=\operatorname{diag}(0,2)\succeq0$, so FONC and SONC hold. But $f(-t,0)=-t^3<0=f(0)$ for every $t>0$, so 0 is not a local minimiser. (b) gradient is zero. (c) necessary conditions are not sufficient. (d) SOSC needs positive definite.
Let $Q=\begin{pmatrix}0&0\\0&-1\end{pmatrix}$. Which statement is correct?
- (a) Both leading principal minors are $\ge0$ ($0$ and $0$), so $Q$ is positive semidefinite.
- (b) $\det Q=0\ge0$, so $Q$ is positive semidefinite.
- (c) $Q$ is negative definite.
- (d) $Q$ is not positive semidefinite: PSD needs all principal minors $\ge0$, and the principal minor $q_{22}=-1<0$.
Show answer
Answer: (d). Eigenvalues $0,-1$: $Q$ is negative semidefinite, not PSD. The "leading minors $\ge0$" test works for PD (with $>0$) but not for PSD; you need all principal minors. (a), (b) use the wrong test. (c) $Q$ has eigenvalue 0, so it is not definite.
Gradient descent with fixed step $\alpha$ on $f(x)=\frac12x^TQx$, $Q=\operatorname{diag}(1,4,10)$. Which statement is correct for every starting point?
- (a) It converges iff $0<\alpha<2$; the best fixed step is $\alpha=1/10$.
- (b) It converges iff $0<\alpha<0.2$; the best fixed step is $\alpha=2/11$, with worst-case contraction factor $9/11$.
- (c) It converges iff $0<\alpha\le0.2$; the best fixed step is $\alpha=2/11$, with factor $10/11$.
- (d) It converges iff $0<\alpha<0.2$; the best fixed step is $\alpha=1/10$, with factor $9/10$.
Show answer
Answer: (b). Mode $i$ is multiplied by $1-\alpha\lambda_i$; need $|1-10\alpha|<1\iff\alpha<0.2$. Best $\alpha=2/(1+10)=2/11$ balances $|1-\alpha\cdot1|=|1-10\alpha|=9/11=(\kappa-1)/(\kappa+1)$ with $\kappa=10$. (a) uses $\lambda_{\min}$ instead of $\lambda_{\max}$. (c) at $\alpha=0.2$ the factor for $\lambda=10$ is $-1$: the mode oscillates forever, so "$\le$" is wrong; also $10/11$ is wrong. (d) $\alpha=1/10$ is admissible but gives factor $0.9$, slower than $9/11\approx0.818$.
Same $f$ and $Q=\operatorname{diag}(1,4,10)$, now with $\alpha=0.25$ and $x_0=(1,1,0)^T$, in exact arithmetic. What happens?
- (a) The iterates converge to $0$: the mode factors are $0.75,\ 0,\ -1.5$, and the third component is $0$ at the start and stays $0$.
- (b) The iterates diverge, because $\alpha>2/\lambda_{\max}$.
- (c) The iterates reach $0$ in exactly one step.
- (d) The iterates oscillate without converging, because $1-4\alpha=0$.
Show answer
Answer: (a). $x_{k+1,i}=(1-\alpha\lambda_i)x_{k,i}$: factors $0.75, 0, -1.5$. The first component decays like $0.75^k$, the second is killed in one step, the third is $0\cdot(-1.5)^k=0$. The range $\alpha<2/\lambda_{\max}$ is for every start; for a start with no component along the bad eigenvector, only the eigenvalues that are present matter (the "effective" spectrum). (b) false for this start (true for a generic start). (c) the first component is $0.75$ after one step. (d) factor 0 means that mode vanishes, not oscillates.
On $f(x)=\frac12x^TQx-b^Tx$ with $Q=\operatorname{diag}(1,3)$, at a point where $g=\nabla f=(1,1)^T$, the exact line-search step along $-g$ is
- (a) $2$
- (b) $1/2$
- (c) $1/3$
- (d) $1/4$
Show answer
Answer: (b). $\alpha=\dfrac{g^Tg}{g^TQg}=\dfrac{2}{1+3}=\dfrac12$. (a) is the reciprocal $g^TQg/g^Tg$. (c) $=1/\lambda_{\max}$, (d) $=1/(g^TQg)$: not the formula.
CG (exact arithmetic) on $f=\frac12x^TQx-b^Tx$, where $Q\in\mathbb{R}^{6\times6}$ is SPD with eigenvalues $1,1,1,5,5,9$. From any $x_0$, the minimiser is reached in at most
- (a) 6 steps (the dimension), and no fewer in general.
- (b) 2 steps.
- (c) 3 steps.
- (d) 9 steps ($=\kappa$).
Show answer
Answer: (c). CG terminates in at most the number of distinct eigenvalues ($1,5,9$ → 3): a degree-3 polynomial $P$ with $P(0)=1$ vanishing at $1,5,9$ kills the error. (a) $n$ is an upper bound but not the best one here. (b) and (d) have no basis.
CG on $f=\frac12x^TQx-b^Tx$ with $Q=\operatorname{diag}(1,2)$, $b=(1,1)^T$, $x_0=0$. Then $\alpha_0=2/3$, $x_1=(2/3,2/3)^T$. Which gives $\beta_0$ and the second direction $d_1$?
- (a) $\beta_0=1/3$, $d_1=(2/3,\,0)^T$.
- (b) $\beta_0=9$, $d_1=(28/3,\,26/3)^T$.
- (c) $\beta_0=1/9$, $d_1=(-2/9,\,4/9)^T$.
- (d) $\beta_0=1/9$, $d_1=(4/9,\,-2/9)^T$.
Show answer
Answer: (d). $g_0=-b=(-1,-1)$, $d_0=(1,1)$. $g_1=Qx_1-b=(-1/3,1/3)$, so $\beta_0=\|g_1\|^2/\|g_0\|^2=(2/9)/2=1/9$ and $d_1=-g_1+\beta_0d_0=(1/3+1/9,\,-1/3+1/9)=(4/9,-2/9)$. Check: $d_0^TQd_1=4/9-4/9=0$ ($Q$-conjugate), $g_0^Tg_1=1/3-1/3=0$ (orthogonal). One more step gives $x_2=(1,1/2)=Q^{-1}b$ (2 steps, 2 distinct eigenvalues). (a) uses $\beta=\|g_1\|/\|g_0\|$-type error. (b) inverted ratio. (c) components swapped: not $Q$-conjugate to $d_0$ ($d_0^TQd_1=-2/9+8/9\ne0$).
Question II · MCQ group: simplex concepts and QP (8 × 2 marks)
Parts II.1–II.6 use the LP in standard form $$\min\ -2x_1-x_2\quad\text{s.t.}\quad x_1+x_2+x_3=4,\qquad x_1-x_2+x_4=2,\qquad x\ge0,$$ i.e. $A=\begin{pmatrix}1&1&1&0\\1&-1&0&1\end{pmatrix}$, $b=(4,2)^T$, $c=(-2,-1,0,0)^T$. For a basis $B$: $x_B=B^{-1}b$, $\lambda=B^{-T}c_B$, reduced costs $\mu_N=c_N-N^T\lambda$. No numerical pivoting beyond what is asked.
Take the basis $\{x_3,x_4\}$. Which statement is correct?
- (a) $x_B=(4,2)$, but the point is not an extreme point because $x_1=x_2=0$.
- (b) $x=(0,0,4,2)^T$ is a basic feasible solution, hence an extreme point of the feasible set.
- (c) $x=(4,2,0,0)^T$ is the basic solution.
- (d) The basic solution is infeasible because $B=I$ gives $x_B=b$ which need not be $\ge0$.
Show answer
Answer: (b). $B=I$, $x_B=B^{-1}b=(4,2)\ge0$, nonbasic $x_1=x_2=0$: a BFS; extreme point $\iff$ BFS. (a) nonbasic zeros are exactly what a BFS has. (c) puts the values on the wrong variables. (d) here $b\ge0$, so it is feasible.
At the basis $\{x_3,x_4\}$, what are $\lambda$ and the reduced costs $(\mu_1,\mu_2)$, and what follows?
- (a) $\lambda=(4,2)$, $\mu_N=(-6,-3)$; not optimal.
- (b) $\lambda=0$, $\mu_N=(2,1)$; optimal.
- (c) $\lambda=0$, $\mu_N=(-2,-1)$; not optimal, either $x_1$ or $x_2$ may enter.
- (d) $\lambda=0$, $\mu_N=(-2,-1)$; the LP is unbounded.
Show answer
Answer: (c). $c_B=(0,0)\Rightarrow\lambda=B^{-T}c_B=0$, $\mu_N=c_N-N^T\lambda=c_N=(-2,-1)$. A negative reduced cost means the cost decreases if that variable enters: not optimal. (a) used $b$ instead of $c_B$. (b) sign error. (d) unboundedness needs also $B^{-1}a_q\le0$, which fails here ($B^{-1}a_1=(1,1)$).
Let $x_1$ enter. Which gives the edge direction on the basic variables $(x_3,x_4)$, the step $\theta$ and the leaving variable?
- (a) $d_B=-B^{-1}a_1=(-1,-1)$, $\theta=\min\{4/1,\,2/1\}=2$, $x_4$ leaves; new point $(2,0,2,0)^T$.
- (b) $d_B=(1,1)$, $\theta=4$, $x_3$ leaves; new point $(4,0,0,-2)^T$.
- (c) $d_B=(-1,-1)$, $\theta=\max\{4,2\}=4$, $x_3$ leaves.
- (d) $d_B=(-1,1)$, $\theta=4$, $x_3$ leaves.
Show answer
Answer: (a). Direction: $d_q=1$, $d_B=-B^{-1}a_q=-(1,1)$. Ratio test over components with $d_{B,i}<0$: $\theta=\min\{x_{B,i}/(-d_{B,i})\}=\min\{4,2\}=2$, attained by $x_4$. New point $x+\theta d=(2,0,4-2,2-2)$. (b), (c) take a step that makes $x_4$ negative (the $\max$ is wrong; the ratio test is a $\min$ so feasibility is kept). (d) wrong column $a_1=(1,1)$.
After the step in II.3, the objective value changes from $0$ to
- (a) $-2$, since $\mu_q=-2$.
- (b) $+4$, since $\theta\mu_q$ is subtracted.
- (c) $-8$, since $\theta=4$.
- (d) $-4$, since the change is $\theta\mu_q=2\cdot(-2)$.
Show answer
Answer: (d). $c^T(x+\theta d)-c^Tx=\theta\,c^Td=\theta\mu_q$. Check: $c^T(2,0,2,0)=-4$. (a) forgets $\theta$. (b) sign. (c) wrong $\theta$.
Now take the basis $\{x_1,x_2\}$. Which statement is correct?
- (a) $x_B=(3,1)$, $\lambda=(-1/2,-3/2)$, $\mu_N=(1/2,3/2)$; optimal with value $-7$.
- (b) $x_B=(3,1)$, $\lambda=(-3/2,-1/2)$, $\mu_N=(\mu_3,\mu_4)=(3/2,1/2)\ge0$; this BFS is optimal with value $-7$, and $\lambda$ is dual optimal since $b^T\lambda=-7$.
- (c) $x_B=(3,1)$ but $\mu_N$ has a negative entry, so not optimal.
- (d) $x_B=(1,3)$; optimal with value $-5$.
Show answer
Answer: (b). $B=\begin{pmatrix}1&1\\1&-1\end{pmatrix}$: $x_1+x_2=4$, $x_1-x_2=2\Rightarrow x_B=(3,1)\ge0$. $B^T\lambda=c_B$: $\lambda_1+\lambda_2=-2$, $\lambda_1-\lambda_2=-1\Rightarrow\lambda=(-3/2,-1/2)$. $\mu_3=0-\lambda_1=3/2$, $\mu_4=0-\lambda_2=1/2$, both $\ge0$ → optimal. $c^Tx=-6-1=-7=b^T\lambda=-6-1$. (a) swaps the components of $\lambda$: $(-\tfrac12,-\tfrac32)$ gives $B^T\lambda=(-2,1)\ne c_B$ and $b^T\lambda=-5\ne-7$ (always solve $B^T\lambda=c_B$, the $B^{-T}$ formula). (c) false. (d) wrong solve.
For a general standard-form LP at a BFS with basis $B$, suppose some nonbasic $q$ has $\mu_q<0$. Which statement is valid in general?
- (a) If some basic variable equals $0$ (degenerate BFS), the step $\theta$ is necessarily positive.
- (b) If $B^{-1}a_q\le0$, the dual is unbounded above.
- (c) If $B^{-1}a_q\le0$ componentwise, the ray $x+\theta d$ stays feasible for all $\theta\ge0$ and the cost $c^Tx+\theta\mu_q\to-\infty$: the LP is unbounded below (so the dual is infeasible).
- (d) $\mu_q<0$ alone proves that the LP is unbounded below.
Show answer
Answer: (c). $d_B=-B^{-1}a_q\ge0$, so no basic variable decreases: no ratio, $\theta$ unlimited, cost decreases by $\theta|\mu_q|$. Primal unbounded ⇒ dual infeasible. (a) degenerate BFS can give $\theta=0$ (basis changes, point does not). (b) the primal is unbounded and the dual infeasible, not unbounded. (d) $\mu_q<0$ only says "not optimal; let $q$ enter".
Consider $\min\frac12x^TQx-c^Tx$ s.t. $x_1-x_2=b$ ($x\in\mathbb{R}^2$), with $Q=\begin{pmatrix}1&2\\2&1\end{pmatrix}$. Which statement is correct for every $c$ and $b$?
- (a) $Q$ is indefinite (eigenvalues $3,-1$), but $z^TQz>0$ on $\operatorname{null}(A)=\operatorname{span}\{(1,1)\}$ ($Z^TQZ=6$), so the KKT matrix is nonsingular and the QP has a unique global minimiser.
- (b) $Q$ is indefinite, so the QP is unbounded below.
- (c) A unique minimiser exists only if $Q\succ0$.
- (d) The KKT matrix is singular because $Q$ is singular.
Show answer
Answer: (a). Feasible points are $x=\hat x+t(1,1)$; along them $f$ is a 1-D quadratic with curvature $Z^TQZ=(1,1)Q(1,1)^T=1+4+1=6>0$. So $Q$ PD on null$(A)$ ⇒ $K=\begin{pmatrix}Q&A^T\\A&0\end{pmatrix}$ nonsingular ($\det K=-6$) ⇒ unique KKT point = unique global minimiser. (b) negative curvature is only along $(1,-1)$, which is not feasible. (c) the "Q PD" requirement is the trap. (d) $\det Q=-3\ne0$.
An active-set method for a convex QP with constraints $a_i^Tx\le b_i$: $x_1\le3$ (1), $x_2\le2$ (2), $-x_1\le0$ (3). At $x_k=(1,1)^T$ with working set $W_k=\emptyset$, the subproblem gives $p_k=(4,\tfrac12)^T$. Which describes the step?
- (a) No constraint blocks; take the full step to $(5,1.5)^T$.
- (b) $\alpha_k=\min\{(3-1)/4,\ (2-1)/\tfrac12\}=\tfrac12$; accepted step $\min\{1,\alpha_k\}=\tfrac12$; $x_{k+1}=(3,1.25)^T$; add constraint 1 to $W$.
- (c) $\alpha_k=2$; accepted step $2$; add constraint 2.
- (d) Accepted step $\tfrac12$; add constraints 1 and 3 to $W$.
Show answer
Answer: (b). Only constraints with $a_i^Tp_k>0$ can block: (1) $4>0$, ratio $2/4=\tfrac12$; (2) $\tfrac12>0$, ratio $1/\tfrac12=2$; (3) $a_3^Tp=-4<0$, never blocks. $\alpha_k=\tfrac12<1$, so the step is $\tfrac12$ (the "very important" $\min\{1,\alpha_k\}$ rule) and the blocking constraint 1 is added. (a) $(5,1.5)$ violates $x_1\le3$. (c) took the largest ratio and a step above 1 (never). (d) constraint 3 is not active at $(3,1.25)$; add only one blocker.
Question III · MCQ group: duality theorems and the weak-duality proof chain (8 × 2 marks)
Consider $\min_{x\in\mathbb{R}^n} f(x)$ s.t. $h(x)=0$, $g(x)\le0$, with $L(x,\lambda,\mu)=f(x)+\lambda^Th(x)+\mu^Tg(x)$ and dual function $q(\lambda,\mu)=\inf_{x\in\mathbb{R}^n}L(x,\lambda,\mu)$. No convexity is assumed in III.1–III.4. Let $\bar x$ be any feasible point and $(\bar\lambda,\bar\mu)$ any multipliers with $\bar\mu\ge0$.
Which statement justifies $q(\bar\lambda,\bar\mu)\le L(\bar x,\bar\lambda,\bar\mu)$?
- (a) $\bar x$ minimises $L(\cdot,\bar\lambda,\bar\mu)$.
- (b) $q$ is the infimum of $L$ over all $x\in\mathbb{R}^n$, and $\bar x$ is one such $x$.
- (c) Convexity of $f$ and of each $g_i$.
- (d) Complementary slackness at $\bar x$.
Show answer
Answer: (b). An infimum is $\le$ the value at any particular point. (a) is not assumed. (c), (d) are not needed and not given.
What can be asserted about $\bar\lambda^Th(\bar x)+\bar\mu^Tg(\bar x)$?
- (a) It equals $0$, by complementary slackness.
- (b) It is $\ge0$, since $\bar\mu\ge0$.
- (c) It has no fixed sign, because $\bar\lambda$ is unrestricted.
- (d) It is $\le0$: the first term is $0$ since $h(\bar x)=0$, and each $\bar\mu_ig_i(\bar x)\le0$ since $\bar\mu_i\ge0$ and $g_i(\bar x)\le0$.
Show answer
Answer: (d). (a) CS is not assumed for an arbitrary pair. (b) sign wrong: $\ge0$ times $\le0$ is $\le0$. (c) $\bar\lambda$ is free but multiplies $h(\bar x)=0$.
Combining III.1 and III.2, which conclusion follows?
- (a) $q(\bar\lambda,\bar\mu)\le f(\bar x)$ for every feasible $\bar x$ and every $\bar\mu\ge0$; taking sup over multipliers and inf over feasible points, $d^*\le p^*$.
- (b) $d^*=p^*$.
- (c) $d^*\ge p^*$.
- (d) $q(\bar\lambda,\bar\mu)\le f(\bar x)$ only at the primal optimum.
Show answer
Answer: (a). Weak duality. (b) needs extra hypotheses (e.g. Slater, or LP). (c) wrong direction. (d) it holds for every feasible point.
Which of the following was not used in III.1–III.3?
- (a) $\bar\mu\ge0$.
- (b) Feasibility of $\bar x$.
- (c) Convexity of $f,g$ and affineness of $h$.
- (d) The inner infimum in $q$ being over all of $\mathbb{R}^n$ (a set containing $\bar x$).
Show answer
Answer: (c). Weak duality holds for nonconvex problems too. (a), (b) were used in III.2, (d) in III.1.
Now let $f,g_i$ be convex, $h$ affine, $p^*$ finite, and suppose $h(x^0)=0$, $g(x^0)<0$ for some $x^0$. Which is guaranteed?
- (a) Zero gap and a primal optimum exists; the dual optimum need not be attained.
- (b) Both optima exist and are unique.
- (c) Zero gap and the dual optimum is attained; primal attainment is not guaranteed.
- (d) Zero gap only if $f$ is strictly convex.
Show answer
Answer: (c). The course's Slater theorem: $p^*=d^*$ and a dual optimum exists. (a) swaps primal and dual. (b) uniqueness is never claimed. (d) strict convexity is not a hypothesis.
For a differentiable convex problem (convex $f,g$, affine $h$), suppose $(x^*,\lambda^*,\mu^*)$ satisfies the KKT conditions. Which must hold?
- (a) $x^*$ is a local minimiser, but the duality gap may be positive.
- (b) $x^*$ is a global minimiser, $(\lambda^*,\mu^*)$ is dual optimal, and $p^*=d^*=f(x^*)$.
- (c) $(\lambda^*,\mu^*)$ is dual optimal, but $x^*$ need not be primal optimal without Slater.
- (d) $x^*$ is the unique global minimiser.
Show answer
Answer: (b). Convexity + stationarity ⇒ $x^*$ minimises $L(\cdot,\lambda^*,\mu^*)$ over $\mathbb{R}^n$, so $q(\lambda^*,\mu^*)=L(x^*,\lambda^*,\mu^*)=f(x^*)$ (feasibility + CS). Weak duality then makes both optimal with zero gap. (a) too weak. (c) no constraint qualification is needed in this direction. (d) uniqueness needs e.g. strict convexity.
For the LP pair $\min c^Tx$, $Ax=b$, $x\ge0$ / $\max b^T\lambda$, $A^T\lambda\le c$: a primal-feasible $\hat x$ and a dual-feasible $\hat\lambda$ have $c^T\hat x=b^T\hat\lambda=9$. Which conclusion is correct?
- (a) Only $d^*\le9\le p^*$ is known.
- (b) $\hat x$ is optimal, but $\hat\lambda$ may not be.
- (c) Complementary slackness must be checked separately before concluding optimality.
- (d) Both are optimal and $p^*=d^*=9$; complementary slackness $\hat x^T(c-A^T\hat\lambda)=0$ then holds automatically.
Show answer
Answer: (d). $9=b^T\hat\lambda\le d^*\le p^*\le c^T\hat x=9$, so all equal. And $c^T\hat x-b^T\hat\lambda=\hat x^T(c-A^T\hat\lambda)=0$ is exactly CS. (a) the inequality is the wrong way round ($b^T\hat\lambda\le d^*$, $p^*\le c^T\hat x$). (b), (c) the equal values already settle everything.
For the same LP pair, suppose the primal is infeasible. Which statement is valid in general?
- (a) The dual has no optimal solution: it is either infeasible or unbounded above.
- (b) The dual must be unbounded above.
- (c) The dual must be infeasible.
- (d) The dual has an optimal solution with $d^*=+\infty$.
Show answer
Answer: (a). If the dual had an optimum, the LP duality theorem would give a primal optimum, contradicting infeasibility. Both remaining cases occur: e.g. $A=[0]$, $b=1$, $c=-1$ makes both infeasible; so (b) is the classic mistake ("infeasible ⇏ unbounded"), and (c) is also not forced. (d) an optimal solution has a finite value.
Question IV · ADMM for 1-D total-variation denoising (16 marks) — "derive the exact formula for each step"
Let $y\in\mathbb{R}^n$ be a noisy signal, $\gamma>0$, and let $D\in\mathbb{R}^{(n-1)\times n}$ be the first-difference matrix, $(Dx)_i=x_{i+1}-x_i$. Consider $$\min_{x\in\mathbb{R}^n}\ \tfrac12\|x-y\|_2^2+\gamma\|Dx\|_1 .$$ Apply ADMM with $x_1=x\in\mathbb{R}^n$, $x_2\in\mathbb{R}^{n-1}$, $f_1(x_1)=\frac12\|x_1-y\|^2$, $f_2(x_2)=\gamma\|x_2\|_1$, the constraint $Dx_1-x_2=0$, multiplier $\lambda\in\mathbb{R}^{n-1}$ and penalty $\beta>0$.
- [2] Write the problem in the form $\min f_1(x_1)+f_2(x_2)$ s.t. $A_1x_1+A_2x_2=b$, identifying $A_1,A_2,b$. Explain why the original problem cannot be solved by applying soft thresholding to $x$ directly.
- [2] Write the augmented Lagrangian $L_A(x_1,x_2,\lambda)$.
- [3] Derive the exact $x_1$-update. Show that the linear system you obtain has a unique solution for every $\beta>0$, even though $D^TD$ is singular.
- [4] Derive the exact $x_2$-update. Include the derivation of the scalar minimiser of $\gamma|z|+\frac{\beta}{2}(z-v)^2$.
- [1] Write the multiplier update.
- [2] Let $n=3$, $y=(0,4,0)^T$, $\gamma=\tfrac12$, $\beta=1$, $x_2^{(0)}=0$, $\lambda^{(0)}=0$. Compute one full iteration $x_1^{(1)},x_2^{(1)},\lambda^{(1)}$. Then verify that $x_1=(\tfrac12,3,\tfrac12)^T$, $x_2=(\tfrac52,-\tfrac52)^T$, $\lambda=(\tfrac12,-\tfrac12)^T$ is a fixed point of the three updates.
- [2] Replace $\gamma\|Dx\|_1$ by the hard constraint $|x_{i+1}-x_i|\le\varepsilon$ for all $i$ (i.e. $f_2$ = indicator of the box $[-\varepsilon,\varepsilon]^{n-1}$). Which updates change, and what is the new formula? Compute $x_2^{(1)}$ and $\lambda^{(1)}$ for the data in (f) with $\varepsilon=1$.
Hint
Complete the square: $\lambda^T(Dx_1-x_2)+\frac{\beta}{2}\|Dx_1-x_2\|^2=\frac{\beta}{2}\|Dx_1-x_2+\lambda/\beta\|^2-\frac{\|\lambda\|^2}{2\beta}$. In the $x_2$-step the sign in front of $x_2$ is minus, so the centre is $Dx_1+\lambda/\beta$.
Show answer
- Form. $A_1=D$, $A_2=-I_{n-1}$, $b=0$: $\min\frac12\|x_1-y\|^2+\gamma\|x_2\|_1$ s.t. $Dx_1-x_2=0$. Soft thresholding needs a penalty that separates by component of the variable; $\|Dx\|_1=\sum_i|x_{i+1}-x_i|$ couples neighbouring components, so no componentwise formula exists in $x$. The split moves the $\ell_1$ term onto its own variable $x_2=Dx$, where it does separate.
- Augmented Lagrangian. $$L_A=\tfrac12\|x_1-y\|^2+\gamma\|x_2\|_1+\lambda^T(Dx_1-x_2)+\tfrac{\beta}{2}\|Dx_1-x_2\|^2 .$$
- $x_1$-step. $f_{1,k}(z)=\frac12\|z-y\|^2+\lambda^{(k)T}(Dz-x_2^{(k)})+\frac{\beta}{2}\|Dz-x_2^{(k)}\|^2$ is smooth and strongly convex. Gradient $=0$: $$(z-y)+D^T\lambda^{(k)}+\beta D^T(Dz-x_2^{(k)})=0\ \Longrightarrow\ \boxed{(I+\beta D^TD)\,x_1^{(k+1)}=y+D^T\big(\beta x_2^{(k)}-\lambda^{(k)}\big)}.$$ For $z\ne0$: $z^T(I+\beta D^TD)z=\|z\|^2+\beta\|Dz\|^2\ge\|z\|^2>0$, so the matrix is PD (hence invertible) although $D^TD$ is singular ($D\mathbf 1=0$). The identity comes from the data term $\frac12\|x-y\|^2$. (If the data term had no ½, it would be $2I+\beta D^TD$ and $2y$.)
- $x_2$-step. Keep terms with $x_2$: $\gamma\|x_2\|_1-\lambda^{(k)T}x_2+\frac{\beta}{2}\|x_2-Dx_1^{(k+1)}\|^2=\gamma\|x_2\|_1+\frac{\beta}{2}\|x_2-v\|^2+\text{const}$, with $v=Dx_1^{(k+1)}+\lambda^{(k)}/\beta$. This separates: $\sum_i\big[\gamma|x_{2,i}|+\frac{\beta}{2}(x_{2,i}-v_i)^2\big]$.
Scalar problem $p(z)=\gamma|z|+\frac{\beta}{2}(z-v)^2$, $\tau=\gamma/\beta$ (strictly convex, unique minimiser):- On $z>0$: $p'(z)=\gamma+\beta(z-v)=0\Rightarrow z=v-\tau$, admissible iff $v>\tau$.
- On $z<0$: $p'(z)=-\gamma+\beta(z-v)=0\Rightarrow z=v+\tau$, admissible iff $v<-\tau$.
- If $|v|\le\tau$: for $z>0$, $p'(z)=\gamma+\beta(z-v)\ge\beta z>0$ and for $z<0$, $p'(z)\le\beta z<0$, so $p$ decreases to 0 and increases after: $z=0$. (Graph view: the minimiser lies between 0 and $v$; if the smooth minimiser would cross 0, the answer is 0.)
- Multiplier. $\lambda^{(k+1)}=\lambda^{(k)}+\beta\big(Dx_1^{(k+1)}-x_2^{(k+1)}\big)$.
- Numbers. $D=\begin{pmatrix}-1&1&0\\0&-1&1\end{pmatrix}$, $I+D^TD=\begin{pmatrix}2&-1&0\\-1&3&-1\\0&-1&2\end{pmatrix}$ (eigenvalues $1,2,4$).
Iteration 1: RHS $=y+D^T(0-0)=(0,4,0)$. Solve: $x_1^{(1)}=(1,2,1)$ [check: $2-2=0$, $-1+6-1=4$, $-2+2=0$]. $Dx_1^{(1)}=(1,-1)$, $v=(1,-1)$, $\tau=\frac12$: $x_2^{(1)}=(\tfrac12,-\tfrac12)$. $\lambda^{(1)}=0+\big((1,-1)-(\tfrac12,-\tfrac12)\big)=(\tfrac12,-\tfrac12)$.
Fixed point: $x_1$-step RHS $=y+D^T\big((\tfrac52,-\tfrac52)-(\tfrac12,-\tfrac12)\big)=(0,4,0)+D^T(2,-2)=(0,4,0)+(-2,4,-2)=(-2,8,-2)$, and $(I+D^TD)(\tfrac12,3,\tfrac12)^T=(1-3,\,-\tfrac12+9-\tfrac12,\,-3+1)=(-2,8,-2)$ ✓. $x_2$-step: $Dx_1+\lambda=(\tfrac52+\tfrac12,-\tfrac52-\tfrac12)=(3,-3)$, $S_{1/2}=(\tfrac52,-\tfrac52)$ ✓. Residual $Dx_1-x_2=0$, so $\lambda$ is unchanged ✓.
(It is also the true optimum: $x-y+\gamma D^T\operatorname{sign}(Dx)=(\tfrac12,-1,\tfrac12)+\tfrac12(-1,2,-1)=0$, optimal value $3.25$; ADMM from (f) converges to it.) - Box variant. Only the $x_2$-step changes: $\min_{x_2}\ P_{[-\varepsilon,\varepsilon]^{n-1}}(x_2)+\frac{\beta}{2}\|x_2-v\|^2$ = projection of $v$ onto the box, i.e. clip each component: $x_{2,i}^{(k+1)}=\min\{\max\{v_i,-\varepsilon\},\varepsilon\}$ with the same $v=Dx_1^{(k+1)}+\lambda^{(k)}/\beta$. The $x_1$-step and the $\lambda$-update are unchanged in form.
Data: $x_1^{(1)}=(1,2,1)$ as before, $v=(1,-1)$, clip to $[-1,1]$: $x_2^{(1)}=(1,-1)$; $\lambda^{(1)}=0+\big((1,-1)-(1,-1)\big)=(0,0)$. (Continuing, ADMM converges to $x=(1,2,1)$, $\lambda=(1,-1)$.)
Marking: (c) and (d) carry the marks for "exact formula"; a correct boxed formula without the derivation gets about half.
Question V · Full KKT ladder with a parameter (16 marks)
For a parameter $a\ge0$, consider $$\min_{x\in\mathbb{R}^2} f_a(x)=\tfrac12\big[(x_1-a)^2+x_2^2\big]\quad\text{subject to}\quad g(x)=1-x_1^2-x_2^2\le0$$ (stay outside the open unit disc). Use $L=f_a+\mu g$ with $\mu\ge0$.
- [2] Write the complete KKT conditions explicitly (stationarity, primal feasibility, dual feasibility, complementary slackness).
- [4] Determine all KKT points and multipliers for every $a\ge0$. Identify the active sets and the parameter values at which they change.
- [2] Check LICQ and strict complementarity at every KKT point. Identify any parameter value at which an active constraint has a zero multiplier, and whether LICQ holds there.
- [3] Determine the critical cone at each KKT point in every parameter regime, treating transition values separately; express it in terms of $d=(d_1,d_2)^T$.
- [5] Compute $\nabla^2_{xx}L$ at each KKT point and apply SONC/SOSC. State which KKT points are strict local minimisers, which are not local minimisers (give a critical direction showing failure), and identify the global minimiser(s) for each $a$.
Show answer
- KKT. $L=\frac12[(x_1-a)^2+x_2^2]+\mu(1-x_1^2-x_2^2)$. Stationarity: $x_1-a-2\mu x_1=0$, $\ x_2-2\mu x_2=0$. Primal: $1-x_1^2-x_2^2\le0$. Dual: $\mu\ge0$. CS: $\mu(1-x_1^2-x_2^2)=0$.
- Cases.
- Inactive ($\mu=0$): $x=(a,0)$; feasible iff $a^2\ge1$, i.e. $a\ge1$ (for $a=1$ it lies on the circle).
- Active ($x_1^2+x_2^2=1$): $x_2(1-2\mu)=0$.
- $x_2=0\Rightarrow x_1=\pm1$. $x_1=1$: $1-a-2\mu=0\Rightarrow\mu=\frac{1-a}{2}$, valid iff $a\le1$. $x_1=-1$: $-1-a+2\mu=0\Rightarrow\mu=\frac{1+a}{2}>0$, valid for all $a$.
- $\mu=\frac12$: then $x_1-a-x_1=0\Rightarrow a=0$; every point of the unit circle is then a KKT point with $\mu=\frac12$.
Transition values: $a=0$ (a whole circle of KKT points) and $a=1$ (active set at the minimiser changes from $\{1\}$ to $\emptyset$).$a$ KKT points (multiplier, active set) $a=0$ every $x$ with $\|x\|=1$, $\mu=\frac12$, $\{1\}$ $0<a<1$ $P=(1,0)$, $\mu=\frac{1-a}{2}>0$, $\{1\}$; $\ N=(-1,0)$, $\mu=\frac{1+a}{2}$, $\{1\}$ $a=1$ $P=(1,0)$, $\mu=0$, $\{1\}$ (degenerate); $\ N$, $\mu=1$ $a>1$ $I=(a,0)$, $\mu=0$, $\emptyset$; $\ N$, $\mu=\frac{1+a}{2}$. ($P$ is no longer KKT: $\mu<0$.) - LICQ / strict complementarity. $\nabla g(x)=(-2x_1,-2x_2)$ has norm 2 on the circle, so it is nonzero: LICQ holds at every KKT point where $g$ is active; at $I$ no constraint is active (LICQ holds trivially). Strict complementarity fails only at $a=1$, point $P=(1,0)$: $g$ active with $\mu=0$. LICQ still holds there.
- Critical cones. (Using $C=\{d:\nabla g^Td=0\}$ if $\mu>0$, $\{d:\nabla g^Td\le0\}$ if active with $\mu=0$.)
- $P$, $0<a<1$: $\nabla g=(-2,0)$, $\mu>0$: $C=\{d:d_1=0\}$.
- $P$, $a=1$: $A_0=\{1\}$: $C=\{d:-2d_1\le0\}=\{d:d_1\ge0\}$ (a half-plane).
- $I$, $a>1$: no active constraint: $C=\mathbb{R}^2$.
- $N$, all $a$: $\nabla g=(2,0)$, $\mu>0$: $C=\{d:d_1=0\}$.
- $a=0$, $\bar x=(\cos\theta,\sin\theta)$: $C=\{d:\bar x^Td=0\}$ (the tangent line).
- Second order. $\nabla^2_{xx}L=(1-2\mu)I$.
- $P$, $0<a<1$: $1-2\mu=a$, so $d^T\nabla^2Ld=a\,d_2^2>0$ for $0\ne d\in C$ → SOSC holds, strict local minimiser.
- $P$, $a=1$: $\nabla^2L=I\succ0$ → SOSC on the half-plane → strict local minimiser.
- $I$, $a>1$: $\nabla^2L=I$ → SOSC → strict local (indeed global, $f=0$) minimiser.
- $N$, $a>0$: $1-2\mu=-a$; $d=(0,1)\in C$ gives $d^T\nabla^2Ld=-a<0$ → SONC fails, $N$ is not a local minimiser (moving along the circle away from $(-1,0)$ brings you closer to $(a,0)$).
- $a=0$: $\nabla^2L=0$, so $d^T\nabla^2Ld=0$ on $C$: SONC holds, SOSC fails at every circle point. Indeed $f=\frac12\|x\|^2=\frac12$ on the whole circle and $\ge\frac12$ on the feasible set, so every circle point is a global but not strict minimiser (SOSC failing does not mean "not a minimiser").
Question VI · Dual of a non-standard LP; dual of a convex QP (16 marks)
Consider the LP $$(P)\quad\min\ 3x_1+x_2+4x_3\quad\text{s.t.}\quad x_1+x_2+2x_3\ge5,\qquad x_1-x_2+x_3\ge1,\qquad x_1\ge0,\ x_3\ge0,\ x_2\ \text{free}.$$
- [4] Rewrite every constraint in the form $g_i(x)\le0$, form the Lagrangian with $\mu\ge0$, compute the dual function (infimum over all $x\in\mathbb{R}^3$), and write the dual problem in terms of the two multipliers of the main constraints.
- [2] State the complementary slackness conditions for this primal–dual pair.
- [3] Verify that $\hat x=(0,1,2)^T$ and $\hat\mu=(\tfrac53,\tfrac23)^T$ are optimal for $(P)$ and its dual, without solving either problem.
- [5] Now consider the convex QP $\ \min\ x_1^2+2x_2^2\ $ s.t. $x_1+x_2\ge3$. Compute the dual function $q(\mu)$ by completing the square (or setting the gradient of $L$ to zero), solve the dual, recover the primal solution, and confirm $p^*=d^*$.
- [2] Name a Slater point for the QP in (d) and state which results justify (i) zero gap and (ii) that the recovered $x$ is the primal optimum.
Show answer
- Dual. $g_1=5-x_1-x_2-2x_3\le0$, $g_2=1-x_1+x_2-x_3\le0$, $g_3=-x_1\le0$, $g_4=-x_3\le0$; multipliers $\mu_1,\dots,\mu_4\ge0$ (no constraint on $x_2$). $$L=(3-\mu_1-\mu_2-\mu_3)x_1+(1-\mu_1+\mu_2)x_2+(4-2\mu_1-\mu_2-\mu_4)x_3+5\mu_1+\mu_2 .$$ $L$ is affine in $x$, so $q=5\mu_1+\mu_2$ if all three coefficients vanish, $-\infty$ otherwise. Eliminating $\mu_3=3-\mu_1-\mu_2\ge0$, $\mu_4=4-2\mu_1-\mu_2\ge0$: $$(D)\quad\max\ 5\mu_1+\mu_2\quad\text{s.t.}\quad \mu_1+\mu_2\le3,\quad \mu_1-\mu_2=1,\quad 2\mu_1+\mu_2\le4,\quad \mu_1,\mu_2\ge0 .$$ Pattern to remember: "$\ge$" row in a min ⇒ multiplier $\ge0$; free variable ⇒ equality dual row; $x_j\ge0$ ⇒ "$\le$" dual row.
- CS. $\mu_1(x_1+x_2+2x_3-5)=0$, $\ \mu_2(x_1-x_2+x_3-1)=0$, $\ x_1(3-\mu_1-\mu_2)=0$, $\ x_3(4-2\mu_1-\mu_2)=0$. (No condition for free $x_2$: its dual row is an equality.)
- Verification. Primal: $0+1+4=5\ge5$ ✓, $0-1+2=1\ge1$ ✓, $x_1=0,x_3=2\ge0$ ✓. Dual: $\frac53+\frac23=\frac73\le3$ ✓, $\frac53-\frac23=1$ ✓, $\frac{10}3+\frac23=4\le4$ ✓, $\hat\mu\ge0$ ✓. Values: $c^T\hat x=0+1+8=9$, $\ 5\cdot\frac53+\frac23=\frac{27}{3}=9$. By weak duality $9\le d^*\le p^*\le9$, so both are optimal, $p^*=d^*=9$. (CS is consistent: $x_1=0$ where the dual row has slack $\frac23$; $x_3=2$ where it is tight.)
If asked to solve: $\mu_1=1+\mu_2$ turns the dual into $\max 5+6\mu_2$ s.t. $\mu_2\le1$, $\mu_2\le\frac23$ ⇒ $\mu_2=\frac23$; CS then forces $x_1=0$ and both main constraints tight ⇒ $x_2+2x_3=5$, $-x_2+x_3=1$ ⇒ $x=(0,1,2)$. - QP dual. $g=3-x_1-x_2\le0$. $L=x_1^2+2x_2^2+\mu(3-x_1-x_2)$, strictly convex in $x$. $\nabla_xL=0$: $2x_1=\mu$, $4x_2=\mu$ ⇒ $x(\mu)=(\mu/2,\mu/4)$. $$q(\mu)=\tfrac{\mu^2}{4}+\tfrac{\mu^2}{8}+3\mu-\tfrac{\mu^2}{2}-\tfrac{\mu^2}{4}=3\mu-\tfrac38\mu^2,\qquad \mu\ge0 .$$ $q'(\mu)=3-\frac34\mu=0\Rightarrow\mu^*=4\ (\ge0)$, $d^*=12-6=6$. Recovery: $x(4)=(2,1)$, feasible ($2+1=3$, active, consistent with $\mu^*>0$), $f=4+2=6=d^*$. So $p^*=d^*=6$, $x^*=(2,1)$.
- Theory. Slater point: e.g. $(2,2)$, $g=-1<0$ (convex $f$, affine $g$). (i) Slater ⇒ zero gap and dual attainment. (ii) Primal recovery: zero gap with both optima attained and $L(\cdot,\mu^*)$ having a unique minimiser ⇒ that minimiser is the unique primal optimum. (Here $f(2,1)=q(4)$ also certifies it directly by weak duality.)
Question VII · Equality-constrained QP with indefinite $Q$; one active-set iteration (16 marks)
Consider $\min f(x)=\frac12x^TQx-c^Tx$ s.t. $Ax=b$, with $$Q=\begin{pmatrix}1&2&0\\2&1&0\\0&0&2\end{pmatrix},\quad c=\begin{pmatrix}2\\1\\2\end{pmatrix},\quad A=\begin{pmatrix}1&-1&0\end{pmatrix},\quad b=1,$$ and $L=f+\lambda(Ax-b)$ (the Ch 9 form).
- [2] Write the KKT conditions as one linear system with the KKT matrix.
- [3] Show that $Q$ is indefinite, but positive definite on $\operatorname{null}(A)$.
- [3] Solve the KKT system for $(x^*,\lambda^*)$ and compute $f(x^*)$.
- [2] Using a null-space parametrisation of the feasible set, show that $x^*$ is the unique global minimiser.
- [6] Active set. For $\min\frac12\|x\|^2-3x_1-2x_2$ s.t. $x_1+x_2\le2$ (1), $-x_1\le0$ (2), $-x_2\le0$ (3), start at $x_0=(0,0)^T$ with $W_0=\{2,3\}$. Constraints are $a_i^Tx\le b_i$ and working-set multipliers satisfy $g_k+\sum_{i\in W_k}\lambda_ia_i=0$. (i) Compute $p_0$ and the multipliers; which constraint is dropped? (ii) After dropping it, compute the new direction $p$. (iii) Do the ratio test and give the accepted step $\min\{1,\alpha_k\}$, the new point and the new working set. (iv) Continue to the optimum and verify optimality by the multiplier signs.
Show answer
- KKT system. $\nabla_xL=Qx-c+A^T\lambda=0$, $Ax=b$: $$\begin{pmatrix}Q&A^T\\A&0\end{pmatrix}\begin{pmatrix}x\\\lambda\end{pmatrix}=\begin{pmatrix}c\\b\end{pmatrix}:\quad \begin{pmatrix}1&2&0&1\\2&1&0&-1\\0&0&2&0\\1&-1&0&0\end{pmatrix}\begin{pmatrix}x_1\\x_2\\x_3\\\lambda\end{pmatrix}=\begin{pmatrix}2\\1\\2\\1\end{pmatrix}.$$
- Curvature. Eigenvalues of $Q$: $3,-1$ (from the $2\times2$ block) and $2$ → indefinite; e.g. $v=(1,-1,0)$: $v^TQv=1-4+1=-2<0$. Null space: $Ax=0\iff x_1=x_2$, basis $Z=\begin{pmatrix}1&0\\1&0\\0&1\end{pmatrix}$, $AZ=0$, $Z^TQZ=\begin{pmatrix}6&0\\0&2\end{pmatrix}\succ0$. So $Q$ is PD on null$(A)$ (the bad direction $(1,-1,0)$ is not in null$(A)$).
- Solve. Row 3: $x_3=1$. Rows 1+2: $3x_1+3x_2=3\Rightarrow x_1+x_2=1$; with $x_1-x_2=1$: $x_1=1$, $x_2=0$. Row 1: $\lambda=2-1-0=1$. So $x^*=(1,0,1)$, $\lambda^*=1$. $f^*=\frac12(1+0+2)-(2+0+2)=\frac32-4=-\frac52$. ($\det K=-12\ne0$.)
- Null-space argument. Every feasible point is $x=(1,0,0)+t(1,1,0)+s(0,0,1)=(1+t,t,s)$. Substituting, $\varphi(t,s)=3t^2+s^2-2s-\frac32$, whose Hessian is $Z^TQZ=\operatorname{diag}(6,2)\succ0$: strictly convex, unique minimiser $t=0,s=1$, i.e. $x^*=(1,0,1)$, $\varphi=-\frac52$. So $x^*$ is the unique global minimiser even though $Q$ is indefinite (Q PD on null$(A)$ is enough; Q need not be PD).
- Active set. In the form $\frac12x^TQx-c^Tx$: $Q=I$, $c=(3,2)$, gradient $g_k=Qx_k-c=x_k-c$; $a_1=(1,1),b_1=2$; $a_2=(-1,0),b_2=0$; $a_3=(0,-1),b_3=0$.
- (i) $W_0=\{2,3\}$: two independent normals in $\mathbb{R}^2$ force $p_0=0$. $g_0=(-3,-2)$; $g_0+\lambda_2a_2+\lambda_3a_3=0\Rightarrow\lambda_2=-3$, $\lambda_3=-2$. Negative multipliers ⇒ not optimal; drop the most negative, constraint 2 ($x_1\ge0$).
- (ii) $W=\{3\}$: minimise $q(p)=g_0^Tp+\frac12\|p\|^2$ s.t. $p_2=0$ ⇒ $p=(3,0)$. Check $g_0^Tp=-9=-p^TQp$ ✓, and $a_2^Tp=-3<0$: it points into the released constraint ✓.
- (iii) Blocking candidates $i\notin W$ with $a_i^Tp>0$: only (1), $a_1^Tp=3$, ratio $(2-0)/3=\frac23$. $\alpha_k=\frac23<1$ ⇒ step $\min\{1,\frac23\}=\frac23$, $x_1=(2,0)$, $W_1=\{1,3\}$.
- (iv) At $(2,0)$: $p=0$, $g=(-1,-2)$; $g+\lambda_1(1,1)+\lambda_3(0,-1)=0\Rightarrow\lambda_1=1$, $\lambda_3=-1<0$: drop 3. $W=\{1\}$: $p=t(1,-1)$, $q=(-1+2)t+t^2$ ⇒ $t=-\frac12$, $p=(-\frac12,\frac12)$. Ratio: (2) $a_2^Tp=\frac12>0$, ratio $2/\frac12=4$; (3) $a_3^Tp<0$. $\alpha_k=4>1$ ⇒ full step: $x=(\frac32,\frac12)$. Now $g=(-\frac32,-\frac32)$, $\lambda_1=\frac32\ge0$ ⇒ optimal (all working multipliers $\ge0$, $Q\succeq0$). Check: projection of $(3,2)$ onto $x_1+x_2\le2$ is $(3,2)-\frac32(1,1)=(\frac32,\frac12)$ ✓.
Solutions notes: how to score
- Always take IV (ADMM). He promised a "hard problem" on ADMM and said he would ask you to derive each step's exact formula. The recipe is fixed: split → $L_A$ → complete the square → linear system / soft threshold / clip → $\lambda+\beta\times$residual. Even a partial answer earns most of (b), (c), (e).
- Take V (KKT ladder) if you can write all five KKT parts and the critical cone cold; it is in every constrained paper ("seventy percent of mark").
- Then one of VI / VII: VI if LP duals are your strength (fast, mechanical), VII if you are comfortable with $Z^TQZ$ and the active-set ratio test.
- Fill the last two slots with MCQ groups you can finish in 20 minutes each: III (theorem facts + weak duality chain) is usually the fastest; then I or II. MCQ groups are quick marks but one sign slip costs 2 marks each, so read every option.
- A safe pattern: IV + V + VI + III + one of I/II. If short of time, it is better to finish four questions well than five badly — but the paper requires five, so leave 15 minutes for the fifth.
- Part A: give the 2 marks only if every sign and every part is right (e.g. KKT with all five parts, $\mu\ge0$, CS "$=0$").
- IV: ½ vs no-½ in the data term changes the linear system; the $x_2$-step centre is $Dx_1+\lambda/\beta$ (plus sign); threshold $\gamma/\beta$.
- V: critical cone at a degenerate point ($\mu=0$, active) is a half-space, not a line; SOSC failing at $a=0$ does not mean "not a minimiser".
- VI: free variable ⇒ equality in the dual; inner infimum over all $x$.
- VII: $Q$ need not be PD; ratio test only over $a_i^Tp>0$; accepted step $\min\{1,\alpha_k\}$; drop a constraint with negative multiplier.
| Q | .1 | .2 | .3 | .4 | .5 | .6 | .7 | .8 |
|---|---|---|---|---|---|---|---|---|
| I | c | a | d | b | a | b | c | d |
| II | b | c | a | d | b | c | a | b |
| III | b | d | a | c | c | b | d | a |
Every number in this paper (GD factors, CG step, simplex bases, ADMM iterations and fixed point, KKT points, LP and QP duals, KKT matrix solution, active-set steps) was recomputed with Python (sympy/numpy/scipy) before publishing.