# Worksheet 10-1: Optimality Conditions for Linearly Constrained Problems

Download: [CMSE382-WS10_1.pdf](CMSE382-WS10_1.pdf)

```{warning}
This is an AI-generated transcript of the worksheet and may contain errors or inaccuracies. Please refer to the original course materials for authoritative content.
```

---

## Worksheet 10-1: Q1

Let $m, n = 2$, and the matrices

$$

\mathbf{A} =
\begin{bmatrix}
6 & 3 \\
4 & 0
\end{bmatrix},
\qquad
\mathbf{c} =
\begin{bmatrix}
3 \\
1
\end{bmatrix}.

$$

1. The first possibility from Farkas' lemma is that there exists $\mathbf{x} \in \mathbb{R}^2$ such that $\mathbf{A} \mathbf{x} \leq \mathbf{0}$ and $\mathbf{c}^T \mathbf{x} > 0$.

   a. Write down the system of inequalities implied by $\mathbf{A} \mathbf{x} \leq \mathbf{0}$. Use Desmos to sketch the region defined by these inequalities.

   b. Write down the inequality implied by $\mathbf{c}^T \mathbf{x} > 0$. Draw this restriction on the same Desmos plot.

   c. Does there exist $\mathbf{x} \in \mathbb{R}^2$ such that $\mathbf{A} \mathbf{x} \leq \mathbf{0}$ and $\mathbf{c}^T \mathbf{x} > 0$? Justify your answer using the Desmos plot.

2. The second possibility from Farkas' lemma is that there exists $\mathbf{y} \in \mathbb{R}^2$ such that $\mathbf{A}^\top\mathbf{y} =\mathbf{c}$ and $\mathbf{y}\geq 0$.

   a. Write down the system of equations implied by $\mathbf{A}^\top\mathbf{y} =\mathbf{c}$. Plot the solution of these equations in a new Desmos plot.

   b. Is there a solution $\mathbf{y} \geq 0$ to the equations above? Use your Desmos plot to justify.

3. Based on the previous parts, which of the two possibilities from Farkas' lemma holds for the matrices $\mathbf{A}$ and $\mathbf{c}$ above? Justify your answer.

4. Repeat the previous part for the matrices

$$

\mathbf{A} =
\begin{bmatrix}
6 & 3 \\
4 & 0
\end{bmatrix},
\qquad
\mathbf{d} =
\begin{bmatrix}
1 \\
-1
\end{bmatrix}.

$$

Which of the two possibilities from Farkas' lemma holds for the matrices $\mathbf{A}$ and $\mathbf{d}$ above? Justify your answer.

---

## Worksheet 10-1: Q2

Find the stationary point(s) for

$$

\min \frac{1}{2}\left(x_1^2 + x_2^2 +x_3^2\right) \quad \text{s.t.} \quad x_1 + x_2 + x_3=3

$$

by following the steps below.

(a) Determine $f$, $A$, $\mathbf{b}$, $C$, and $\mathbf{d}$ to write the problem in standard form:

$$

\min_{\mathbf{x}} f(\mathbf{x}) \quad \text{s.t.} \quad A \mathbf{x} \leq \mathbf{b},\; C\mathbf{x} = \mathbf{d}.

$$

(b) Write down the Lagrangian function.

(c) Write down the KKT condition (also called the stationarity condition).

(d) Write down the feasibility constraints.

(e) Solve for the stationary point(s) by solving the stationarity and feasibility constraints together.

(f) Is the stationary point(s) optimal? Justify your answer.

---

## Worksheet 10-1: Q3

Consider the problem

$$

\begin{aligned}
& \text{minimize} & & x_1^2 + 2x_2^2 + 4x_1x_2 \\
& \text{subject to} & & x_1 + x_2 = 1, \\
& & & x_1, x_2 \geq 0.
\end{aligned}

$$

(a) Is this problem convex? Justify your answer.

(b) Recall the Generalized Extreme Value Theorem (GEVT): If $f:U \to \mathbb{R}$ is a continuous function and $U \subseteq \mathbb{R}^n$ is compact, then $f$ is bounded and there exist $\mathbf{x}^*, \mathbf{x}_* \in U$ such that

$$

f(\mathbf{x}^*) = \sup_{\mathbf{x} \in U} f(\mathbf{x})
\quad \text{and} \quad
f(\mathbf{x}_*) = \inf_{\mathbf{x} \in U} f(\mathbf{x}).

$$

Use the GEVT to argue that there exists an optimal solution to the problem above.

(c) Find the Lagrangian.

(d) Write down the stationarity KKT condition.

(e) Write down the complementary slackness conditions.

(f) Write down the feasibility conditions from the problem constraints.

(g) Write down the feasibility conditions for each of the $\lambda$s.

(h) From everything above, copy down the 9 total equations/inequalities to be satisfied by an optimal solution.

(i) This problem involves multiple cases for $\lambda_1$ and $\lambda_2$. We will address each separately.

**Case 1:** $\lambda_1=\lambda_2= 0$. Use the complementary slackness conditions to solve for $x_1$ and $x_2$. Is the solution consistent with the constraints?

**Case 2:** $\lambda_1, \lambda_2 > 0$. Use the complementary slackness conditions to solve for $x_1$ and $x_2$. Is the solution consistent with the constraints?

**Case 3:** $\lambda_1>0, \lambda_2 = 0$. Use the complementary slackness conditions to solve for $x_1$ and $x_2$. Is the solution consistent with the constraints?

**Case 4:** $\lambda_1=0, \lambda_2 > 0$. Use the complementary slackness conditions to solve for $x_1$ and $x_2$. Is the solution consistent with the constraints?

(j) Write down the KKT points you found above (there should be two of them).

(k) Can you use the KKT theorem to determine which of the points you found above is a local optimal solution of the problem? Justify your answer.

(l) Which of the two points is the global optimal solution of the problem? Justify your answer.
