Worksheet 6-1: Convex Sets (with Solutions)#
Download: CMSE382-WS6_1.pdf · Solution 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 6-1: Q1#
Let \(\mathbf{x}_1 = (2,3)^\top\) and \(\mathbf{x}_2 = (1,4)^\top\).
Write the equation of the line passing through \(\mathbf{x}_1\) and \(\mathbf{x}_2\) as a function of \(\lambda\):
\[\mathbf{x}(\lambda) = (1-\lambda)\mathbf{x}_1 + \lambda \mathbf{x}_2\]For each value of \(\lambda\) below, compute the point \(\mathbf{x}(\lambda)\):
\(\lambda\)
\(\mathbf{x}(\lambda)\)
On segment?
\(\lambda = 0\)
\(\lambda = 1/2\)
\(\lambda = 1\)
\(\lambda = 2\)
Solution
\(\lambda\) |
\(\mathbf{x}(\lambda)\) |
On segment? |
|---|---|---|
\(0\) |
\((2,3)\) |
Yes (endpoint \(\mathbf{x}_1\)) |
\(1/2\) |
\((1.5, 3.5)\) |
Yes (midpoint) |
\(1\) |
\((1,4)\) |
Yes (endpoint \(\mathbf{x}_2\)) |
\(2\) |
\((0, 5)\) |
No (outside, beyond \(\mathbf{x}_2\)) |
The segment corresponds to \(\lambda \in [0,1]\).
Worksheet 6-1: Q2#
For each of the following sets, determine whether it is convex or not convex.
(a) A finite set of points \(S = \{p_1, p_2, \ldots, p_k\} \subset \mathbb{R}^n\) (with \(k \ge 2\)).
Solution
Not convex. The midpoint of any two distinct points in \(S\) is generally not in \(S\).
(b) The nonnegative orthant \(\mathbb{R}^2_+ = \{(x,y) \mid x \ge 0, y \ge 0\}\).
Solution
Convex. For any \(\mathbf{x}, \mathbf{y} \in \mathbb{R}^2_+\) and \(\lambda \in [0,1]\): \((1-\lambda)\mathbf{x} + \lambda\mathbf{y}\) has nonnegative components, so it stays in \(\mathbb{R}^2_+\).
(c) The set \(\{(x,y) \mid xy = 0\}\) (the coordinate axes):
Solution
Not convex. Take \((1,0)\) and \((0,1)\); their midpoint \((1/2, 1/2)\) has \(xy = 1/4 \ne 0\), so it’s not in the set.
(d) The nonlinear region shown below:
Solution
Not convex. The figure shows a non-convex region (a crescent or non-star-shaped region) — there exist two points in the set whose connecting segment exits the set.
(e) The \(\ell_1\), \(\ell_2\), and \(\ell_\infty\) unit balls in \(\mathbb{R}^2\):
Solution
All three unit balls are convex:
\(\ell_1\) ball (diamond shape): convex polygon.
\(\ell_2\) ball (disk): convex (standard result for any norm ball).
\(\ell_\infty\) ball (square): convex polygon.
In general, \(\{\mathbf{x} \mid \|\mathbf{x}\| \le 1\}\) is convex for any norm, since norms satisfy the triangle inequality.
Worksheet 6-1: Q3#
(a) Draw an example of a union of two convex sets that is not convex.
Solution
Take \(A = \{(x,y) \mid x \le -1\}\) and \(B = \{(x,y) \mid x \ge 1\}\). Both are convex half-planes, but \(A \cup B\) is not convex (e.g., \((-1,0) \in A\) and \((1,0) \in B\) but the midpoint \((0,0) \notin A \cup B\)).
(b) Draw an example of a union of two convex sets that is convex.
Solution
Take \(A = \{(x,y) \mid x \le 0\}\) and \(B = \{(x,y) \mid x \ge 0\}\). Both are half-planes and \(A \cup B = \mathbb{R}^2\), which is convex. (Alternatively, any two sets where one contains the other.)
Worksheet 6-1: Q4#
Let \(S = \{(1,1), (2,2), (3,1)\}\).
Sketch the convex hull \(\text{conv}(S)\) — it is the triangle with vertices at these three points.
Find coefficients for each point:
Point \(\mathbf{x}\)
\(\lambda_1\)
\(\lambda_2\)
\(\lambda_3\)
\((2,2)\)
\((2,1.5)\)
\((1.5, 1.5)\)
\((2, 1)\)
Solution
Note: \(\mathbf{x} = \lambda_1(1,1)+\lambda_2(2,2)+\lambda_3(3,1)\), i.e., \(x = \lambda_1+2\lambda_2+3\lambda_3\) and \(y = \lambda_1+2\lambda_2+\lambda_3\), with \(\lambda_1+\lambda_2+\lambda_3=1\).
Point \(\mathbf{x}\)
\(\lambda_1\)
\(\lambda_2\)
\(\lambda_3\)
\((2,2)\)
\(0\)
\(1\)
\(0\)
\((2,1.5)\)
\(0\)
\(1/2\)
\(1/2\)
\((1.5, 1.5)\)
\(1/2\)
\(1/2\)
\(0\)
\((2, 1)\)
\(1/3\)
\(0\)
\(2/3\)
Identify the point for each set of coefficients:
\(\lambda_1\)
\(\lambda_2\)
\(\lambda_3\)
Point \(\mathbf{x}\)
\(1/3\)
\(1/3\)
\(1/3\)
\(1/2\)
\(0\)
\(1/2\)
\(0\)
\(1/4\)
\(3/4\)
Solution
\(\lambda_1\)
\(\lambda_2\)
\(\lambda_3\)
Point \(\mathbf{x}\)
\(1/3\)
\(1/3\)
\(1/3\)
\((2, 4/3)\) — centroid
\(1/2\)
\(0\)
\(1/2\)
\((2, 1)\) — midpoint of base
\(0\)
\(1/4\)
\(3/4\)
\((2.75, 1.25)\)
Worksheet 6-1: Q5#
Let \(S = \{(1,1), (1,2), (2,1), (2,2)\}\).
Sketch \(S\) and its convex hull — it is the unit square \([1,2]\times[1,2]\).
What is the maximum number of points from \(S\) needed to represent any point in \(\text{conv}(S)\) as a convex combination?
Solution
By Carathéodory’s theorem in \(\mathbb{R}^2\): any point in the convex hull can be written as a convex combination of at most \(2+1 = \mathbf{3}\) points.
Write the point \(\mathbf{x} = (1.5, 1.4)\) as a convex combination of points in \(S\).
Solution
One valid decomposition uses 3 points: $\(\mathbf{x} = (1.5, 1.4) = 0.6(1,1) + 0(1,2) + 0(2,1) + 0.4(2,2)?\)\( Check: \)0.6(1,1)+0.4(2,2) = (0.6+0.8, 0.6+0.8) = (1.4, 1.4) \ne (1.5, 1.4)$.
Try: \(\lambda_1(1,1) + \lambda_3(2,1) + \lambda_4(2,2)\) with \(\lambda_1+\lambda_3+\lambda_4=1\): $\(x: \lambda_1 + 2\lambda_3 + 2\lambda_4 = 1.5, \quad y: \lambda_1 + \lambda_3 + 2\lambda_4 = 1.4\)\( Subtracting: \)\lambda_3 = 0.1\(, then \)\lambda_1 + 2(0.1) + 2\lambda_4 = 1.5 \Rightarrow \lambda_1 + 2\lambda_4 = 1.3\(, and \)\lambda_1 + 0.1 + 2\lambda_4 = 1.4 \Rightarrow \lambda_1 + 2\lambda_4 = 1.3\( ✓. With \)\lambda_1+\lambda_3+\lambda_4=1\(: \)\lambda_1 + \lambda_4 = 0.9\(. From \)\lambda_1 + 2\lambda_4 = 1.3\(: \)\lambda_4 = 0.4\(, \)\lambda_1 = 0.5$.
\[\mathbf{x} = 0.5(1,1) + 0.1(2,1) + 0.4(2,2) = (0.5+0.2+0.8,\, 0.5+0.1+0.8) = (1.5, 1.4) \checkmark\]