凸優化第三章凸函數 做業題

水平集

1)Some level sets of a function f are shown below. The curve labeled 1 shows\left \{ x|f(x)=1 \right \},etcapp

Which of the following properties could f have?dom

由圖像可看出f(x)的下水平集是凸集,故函數是擬凸函數,但不能由下水平集是凸集而判斷函數是凸函數仍是凹函數。而函數上水平集不是凸集,故函數f(x)不是擬凹函數。ide

2)Now consider the following function:函數

Which of the following properties could f have?spa

從圖像函數下水平集不是凸集,已知凸函數的下水平集必定是凸集,因此函數f(x)不是凸函數,故其爲凹函數。而上水平集是凸集,故函數f(x)是擬凹函數。.net

函數和上境圖

1)The epigraph of a function f is a halfspace if and only if3d

函數的上境圖是半空間,即下圖,因此函數f(x)是一個仿射函數。ci

 

2)The epigraph of a function f is a convex cone if and only ifget

函數f(x)的上境圖是一個凸錐,因此f(x)必定是凸函數,根據凸錐的定義:\forall z,y\in C,\forall \theta_1 ,\theta _2\geq 0,\theta_1 z+\theta_2 y\in C同步

如上圖,令\theta_2=0,此時只看z的那條射線,可知\forall \theta_1\geqslant 0,\theta_1 z\in C,由於上圖是f(x)的上境圖,故z的射線其實就是f(x)函數在那段區間的取值,這裏假設z的射線對應的x區間爲[x_1,+\infty ],因此\forall x \in[x_1,+\infty ],(x,f(x))都在射線z上,\forall \theta_1\geq 0,(\theta_1 x,f(\theta_1 x))在射線z上,由錐的定義\forall \theta_1\geqslant 0,\theta_1 z\in C,可知\forall \theta_1\geq 0,x\in [x_1,+\infty ],(\theta_1 x,\theta_1 f(x))\in z\Rightarrow \forall \theta_1\geq 0,x\in [x_1,+\infty ],(\theta_1 x,\theta_1 f(x))=(\theta_1 x,\theta_1 f(x))

同理可證在射線y上\forall \theta_1\geq 0,x\in [-\infty ,x_1 ],(\theta_1 x,\theta_1 f(x))=(\theta_1 x,\theta_1 f(x))

綜上可知\forall x,\forall a\geq 0,f(ax)=af(x)

3)The epigraph of a function f is a polyhedron if and only if

由於多面體是凸集,因此f(x)的上境圖是凸集,因此f(x)是凸函數。根據定義多面體是多個不等式和等式解集,幾何上是有限個半空間和超平面的交集,半空間是仿射函數的上境圖,多個半空間的交集,便可以是分段仿射函數的上境圖。

凸性和擬凸性

For each of the following functions, determine whether it is convex, concave, quasiconvex, or quasiconcave. (Check all that apply.)

1)f(x)=e^x-1 \, \, on \, R\, \, is

證實:\forall x \in R,f^{'}(x)=e^x,f^{''}(x)=e^x> 0,故f(x)是凸函數。

上圖是函數f(x)的圖像,可看出其上水平集合下水平集均爲凸集,故函數f(x)既是擬凸函數又是擬凹函數。

2)f(x_1,x_2)=x_1x_2\, \, on \, \, R^2_{++}\, \, is

證實:根據海瑟矩陣

\bigtriangledown ^2f(x)=\begin{bmatrix} 0 &1 \\ 1 & 0 \end{bmatrix}可判斷函數集不是凸函數也不是凹函數。

看其下水平集:S_a=\left \{ x \in R^2_{++}|x_1x_2\leq a \right \}

\forall y,x\in R^2_{++},\forall \theta \in[0,1],\theta x+(1-\theta)y=(\theta x_1+(1-\theta)y_1,\theta x_2+(1-\theta)y_2)

(\theta x_1+(1-\theta)y_1)(\theta x_2+(1-\theta)y_2)

=\theta ^2x_1x_2+(1-\theta)^2y_1y_2+\theta(1-\theta)y_1x_2+\theta(1-\theta)x_1y_2

=\theta ^2x_1x_2+(1-\theta)^2y_1y_2+\theta(1-\theta)y_1x_2+\theta(1-\theta)x_1y_2-\theta x_1x_2+\theta x_1x_2+(1-\theta)y_1y_2-(1-\theta)y_1y_2

=\theta x_1x_2+(1-\theta)y_1y_2+(\theta ^2-\theta)x_1x_2+((1-\theta)^2-(1-\theta))y_1y_2+\theta(1-\theta)(x_1y_2+x_2y_1)

=\theta x_1x_2+(1-\theta)y_1y_2-\theta (1-\theta)x_1x_2-(1-\theta)\theta y_1y_2+\theta(1-\theta)(x_1y_2+x_2y_1)

=\theta x_1x_2+(1-\theta)y_1y_2+\theta (1-\theta)\left\{-x_1x_2- y_1y_2+x_1y_2+x_2y_1\right\}

=\theta x_1x_2+(1-\theta)y_1y_2+\theta (1-\theta)\left\{x_2(y_1-x_1) +y_2(x_1-y_1)\right\}

=\theta x_1x_2+(1-\theta)y_1y_2+\theta (1-\theta)\left\{(y_1-x_1) (x_2-y_2)\right\}

y_1> x_1,x_2>y_2時,上式> a,因此下水平集不是凸集

而上水平集S_a=\left \{ x \in R^2_{++}|x_1x_2\geq a \right \}是凸集,故函數是擬凹函數。

3)f(x_1,x_2)=1/(x_1x_2)\, \, on \, \, R^2_{++}\, \, is

證實:\bigtriangledown f(x)=( \frac{-1}{x_1^2x_2},\ \frac{-1}{x_2^2x_1})^T,\bigtriangledown^2 f(x)=\begin{pmatrix} \frac{2}{x_1^3x_2} &\frac{1}{x_1^2x_2^2} \\ \frac{1}{x_1^2x_2^2}& \frac{2}{x_2^3x_1} \end{pmatrix}正定,因此函數f(x)是凸函數,因此函數f(x)也是擬凸函數。

4)f(x_1,x_2)=x_1/x_2\, \, on \, \, R^2_{++}\, \, is

證實:

\bigtriangledown f(x)=\begin{pmatrix} \frac{1}{x_2}, & \frac{-x_1}{x_2^2} \end{pmatrix},\bigtriangledown ^2f(x)=\begin{pmatrix} 0 & \frac{-1}{x_2^2}\\ \frac{-1}{x_2^2} & \frac{2x_1}{x_2^3} \end{pmatrix},既不是半正定也不是半負定,因此既不是凸函數也不是凹函數。

看其下水平集S_a=\left \{ x \in R^2_{++}|x_1/x_2\leq a \right \}

\forall x,y \in S_a,x=(x_1,x_2),y=(y_1,y_2),\forall \theta \in [0,1],(\theta x+(1-\theta) y)

\frac{\theta x_1 +(1-\theta) y_1}{\theta x_2+(1-\theta) y_2}=\frac{\theta \bar{x}}{\theta x_2+(1-\theta) y_2}*\frac{x_2}{x_2}+\frac{(1-\theta)y_1}{\theta x_2+(1-\theta) y_2}*\frac{y_2}{y_2}

=\frac{\theta x_2}{\theta x_2+(1-\theta) y_2}*\frac{x_1}{x_2}+\frac{(1-\theta) y_2}{\theta x_2+(1-\theta) y_2}*\frac{y_1}{y_2}=\mu \frac{x_1}{x_2}+(1- \mu)\frac{y_1}{y_2}\leq a

因此上水平集是凸集,因此函數是擬凸函數。同理可證下水平集也是凸集,函數是擬凹函數。

通常向量組成規則

Suppose\, f(x)=h(g_1(x),g_2(x),\cdots ,g_k(x)),where\, h:R^k\rightarrow R \, is\, convex,and\, g_i:R^n\rightarrow R.Suppose\, that\, for\, each\, i,one\, of\, the\, following\, holds:

h is nondecreasing in the ith argument, and g_i is convex

h is nonincreasing in the ith argument, and g_i is concave

g_i is affine.

Fill in the blanks in the proof below to show that f is convex. (This composition rule subsumes all the ones given in the book and is the one used in software systems such as CVX.) Assume that dom(h)=R^k; the result also holds in the general case when the monotonicity conditions above are imposed on \bar{h}, the extended-valued extension of h.

proof:

Fix\, x,y,and\, \theta \in[0,1],and\, let\, z=\theta x+(1-\theta)y.Let's\, re-arrange\, the\, indexes\, so\, that\, g_i\, is\, affine\, for\, i=1,\cdots p,g_i\, is\, convex\, for\, i=p+1,\cdots ,q,and\, g_i\, is\, concave\, for\, i=q+1,\cdots ,k.Therefore\, we\, have

g_i(z)(\, \, \, )\theta g_i(x)+(1-\theta)g_i(y),i=1,\cdots p

g_i(z)(\, \, \, )\theta g_i(x)+(1-\theta)g_i(y),i=p+1,\cdots q

g_i(z)(\, \, \, )\theta g_i(x)+(1-\theta)g_i(y),i=q+1,\cdots k

The correct inequalities in the above equations are

根據仿射函數,凸函數和凹函數的定義,上述答案是顯然的。

\begin{eqnarray*} f(z) &=& h(g_1(z), g_2(z), \ldots, g_k(z))\\[0.2em] &\leq & h(\theta g_1(x)+ (1-\theta) g_1(y), \ldots, \theta g_k(x)+ (1-\theta) g_k(y)) \\[0.2em] &\leq & \theta h(g_1(x), \ldots, g_k(x)) + (1-\theta ) h(g_1(y), \ldots, g_k(y)) \\[0.2em] &=& \theta f(x) + (1-\theta) f(y). \end{eqnarray*}

The second line holds since, for i=p+1,…,q, we have _ the ith argument of h, which is (by assumption) nondecreasing in the ith argument, and for i=q+1,…,k, we have _ the ith argument, and h is nonincreasing in these arguments. The third line follows from _. 

The correct phrases that fill the blank spots are

共軛函數

 

What is the conjugate function of f(x) = \mathrm{max}_{i=1,\dots,n}\ x_i on \mathbf{R}^n

根據共軛函數的定義:f^*(y)=\underset{x\in dom(f)}{sup}(y^Tx-f(x)),由於f(x) = \mathrm{max}_{i=1,\dots,n}\ x_i,這裏對x_i求偏導,當x_i=max\, x_i時,獲得

\frac{\partial f^*(y)}{\partial x_i}=y_i-1,令其爲0,獲得y_i=1,當x_i\neq max\, x_i時,\frac{\partial f^*(y)}{\partial x_i}=y_i,令其爲0獲得y_i=0,因此y是一個向量只在x_i=max\, x_i的i份量爲1,其餘份量爲0,因此選A。

本文同步分享在 博客「使君杭千秋」(CSDN)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。

相關文章
相關標籤/搜索