凸函数的定义
一个函数
f
:
R
n
↦
R
f: R^n \mapsto R
f:Rn↦R 为凸,等价于
d
o
m
f
dom f
domf为凸集
且对所有的
x
,
y
∈
d
o
m
f
,
0
≤
θ
≤
1
x,y \in domf, 0 \leq \theta \leq 1
x,y∈domf,0≤θ≤1 有
f
(
θ
x
+
(
1
−
θ
)
y
)
≤
θ
f
(
x
)
+
(
1
−
θ
)
f
(
y
)
f(\theta x + (1-\theta) y) \leq \theta f(x) + (1-\theta)f(y)
f(θx+(1−θ)y)≤θf(x)+(1−θ)f(y)
凸函数的扩展
f : R n ↦ R f: R^n \mapsto R f:Rn↦R 为凸 d o m f = C ⊆ R n dom \; f = C \subseteq R^n domf=C⊆Rn
定义
f
^
=
{
f
(
x
)
,
x
∈
d
o
m
f
+
∞
,
x
∉
d
o
m
f
\hat{f} =\begin{cases} f(x), & \text { $x \in domf$} \\ + \infty , & \text{$x \notin domf$} \end{cases}
f^={f(x),+∞, x∈domfx∈/domf
f
^
:
R
n
↦
R
d
o
m
f
^
=
R
n
\hat{f}: R^n \mapsto R \quad dom \hat{f}= R^n
f^:Rn↦Rdomf^=Rn
示性函数是凸函数
突击
C
⊆
R
n
C \subseteq R^n
C⊆Rn
f
c
(
x
)
=
{
无
定
义
,
x
∉
C
0
,
x
∈
C
f_c(x) = \begin{cases} 无定义, & \text { $x \notin C$} \\ 0 , & \text{$x \in C$} \end{cases}
fc(x)={无定义,0, x∈/Cx∈C
I
c
(
x
)
=
{
+
∞
,
x
∉
C
0
,
x
∈
C
I_c(x) = \begin{cases} + \infty, & \text { $x \notin C$} \\ 0 , & \text{$x \in C$} \end{cases}
Ic(x)={+∞,0, x∈/Cx∈C
f c ( x ) 、 I c ( x ) f_c(x)、I_c(x) fc(x)、Ic(x) 都是凸函数 + ∞ / 2 = + ∞ +\infty/2=+\infty +∞/2=+∞
J c ( x ) = { 1 , x ∉ C 0 , x ∈ C J_c(x) = \begin{cases} 1, & \text { $x \notin C$} \\ 0 , & \text{$x \in C$} \end{cases} Jc(x)={1,0, x∈/Cx∈C
J
c
(
x
)
J_c(x)
Jc(x) 不是凸函数也不是凹函数
一阶条件
设
f
:
R
n
↦
R
f: R^n \mapsto R
f:Rn↦R 可微,即梯度
▽
f
在
d
o
m
f
上
均
存
在
\triangledown f在domf上均存在
▽f在domf上均存在,则
f
f
f为凸等价于:
d
o
m
f
domf
domf为凸
f
(
y
)
≥
f
(
x
)
+
▽
f
T
(
x
)
(
y
−
x
)
∀
x
,
y
∈
d
o
m
f
f(y)\geq f(x)+\triangledown f^T(x)(y-x) \quad \forall x,y \in domf
f(y)≥f(x)+▽fT(x)(y−x)∀x,y∈domf
证明1:一阶条件(一维情况)
考虑一维情况
f
:
R
↦
R
f: R \mapsto R
f:R↦R 为凸,
等价于
d
o
m
f
dom f
domf为凸集,且
f
(
y
)
≥
f
(
x
)
+
f
′
(
x
)
(
y
−
x
)
f(y) \geq f(x) + f'(x)(y-x)
f(y)≥f(x)+f′(x)(y−x)
证:
⇒
\Rightarrow
⇒
f
f
f为凸,
∀
x
,
y
∈
d
o
m
f
\forall x,y \in domf
∀x,y∈domf 为凸
∀
t
,
0
<
t
≤
t
,
x
+
t
(
y
−
x
)
∈
d
o
m
f
\forall t,0<t \leq t,x+t(y-x) \in domf
∀t,0<t≤t,x+t(y−x)∈domf
f
(
x
+
t
(
y
−
x
)
)
≤
(
1
−
t
)
f
(
x
)
+
t
f
(
y
)
f(x+t(y-x)) \leq (1-t)f(x) + tf(y)
f(x+t(y−x))≤(1−t)f(x)+tf(y)
t
f
(
y
)
≥
t
f
(
x
)
+
f
(
x
+
(
y
−
x
)
)
−
f
(
x
)
tf(y) \geq tf(x) + f(x+(y-x)) - f(x)
tf(y)≥tf(x)+f(x+(y−x))−f(x)
f
(
y
)
≥
f
(
x
)
+
f
(
x
+
(
y
−
x
)
)
−
f
(
x
)
t
f(y) \geq f(x) + \frac{ f(x+(y-x)) - f(x)}{t}
f(y)≥f(x)+tf(x+(y−x))−f(x)
设
l
i
m
t
→
0
+
lim_{t \rightarrow 0_+}
limt→0+
f
(
y
)
≥
f
(
x
)
+
f
′
(
x
)
(
y
−
x
)
f(y) \geq f(x) + f'(x)(y-x)
f(y)≥f(x)+f′(x)(y−x)
证:
⇐
\Leftarrow
⇐
设
∀
x
≠
y
\forall x \not= y
∀x=y
x
,
y
∈
d
o
m
f
x,y \in domf
x,y∈domf
0
≤
θ
≤
1
0 \leq \theta \leq 1
0≤θ≤1 构造
z
=
θ
x
+
(
1
−
θ
)
y
∈
d
o
m
f
z = \theta x +(1-\theta)y \in domf
z=θx+(1−θ)y∈domf
f
(
x
)
≥
f
(
z
)
+
f
′
(
z
)
(
x
−
z
)
f(x) \geq f(z) + f'(z)(x-z)
f(x)≥f(z)+f′(z)(x−z)
f
(
y
)
≥
f
(
z
)
+
f
′
(
z
)
(
y
−
z
)
f(y) \geq f(z)+ f'(z)(y-z)
f(y)≥f(z)+f′(z)(y−z)
θ
f
(
x
)
+
(
1
−
θ
)
f
(
y
)
≥
f
(
z
)
+
(
θ
(
x
−
z
)
+
(
1
−
θ
)
(
y
−
z
)
)
f
′
(
z
)
\theta f(x) + (1-\theta)f(y) \geq f(z) + (\theta(x-z)+(1-\theta)(y-z))f'(z)
θf(x)+(1−θ)f(y)≥f(z)+(θ(x−z)+(1−θ)(y−z))f′(z)
θ
f
(
x
)
+
(
1
−
θ
)
f
(
y
)
≥
f
(
z
)
+
(
θ
x
+
(
1
−
θ
)
y
−
z
)
f
′
(
z
)
\theta f(x) + (1-\theta)f(y) \geq f(z) + (\theta x +(1-\theta)y -z)f'(z)
θf(x)+(1−θ)f(y)≥f(z)+(θx+(1−θ)y−z)f′(z)
θ
f
(
x
)
+
(
1
−
θ
)
f
(
y
)
≥
f
(
z
)
\theta f(x) + (1-\theta)f(y) \geq f(z)
θf(x)+(1−θ)f(y)≥f(z)
证明2:一阶条件(高维情况)
证:
⇒
\Rightarrow
⇒
考虑一维情况
f
:
R
↦
R
f: R \mapsto R
f:R↦R 为凸,
x
,
y
∈
d
o
m
f
x,y \in domf
x,y∈domf
g
(
t
)
=
f
(
t
y
+
(
1
−
t
)
x
)
=
f
(
x
+
t
(
y
−
x
)
)
g(t)=f(ty+(1-t)x)=f(x+t(y-x))
g(t)=f(ty+(1−t)x)=f(x+t(y−x))
y
−
x
y-x
y−x相当于定义二中的方向,所以
g
(
t
)
g(t)
g(t)是凸函数,
g
(
t
)
g(t)
g(t)是一维函数
g
′
(
t
)
=
▽
f
T
(
t
y
+
(
1
−
t
)
x
)
(
y
−
x
)
g'(t)=\triangledown f^T(ty+(1-t)x)(y-x)
g′(t)=▽fT(ty+(1−t)x)(y−x)
对于一维凸函数具有:
g
(
t
1
)
≥
g
(
t
2
)
+
g
′
(
t
2
)
(
t
1
−
t
2
)
g(t_1) \geq g(t_2) + g'(t_2)(t_1-t_2)
g(t1)≥g(t2)+g′(t2)(t1−t2)
设
t
1
=
1
t
2
=
0
t_1=1\quad t_2=0
t1=1t2=0
g
(
1
)
≥
g
(
0
)
+
g
′
(
0
)
g(1) \geq g(0) + g'(0)
g(1)≥g(0)+g′(0)
所以:
f
(
y
)
≥
f
(
x
)
+
▽
f
T
(
x
)
(
y
−
x
)
f(y) \geq f(x)+\triangledown f^T(x)(y-x)
f(y)≥f(x)+▽fT(x)(y−x)
证:
⇐
\Leftarrow
⇐
∀
x
,
y
∈
d
o
m
f
\forall x,y \in domf
∀x,y∈domf
t
y
+
(
1
−
t
)
x
∈
d
o
m
f
ty+(1-t)x \in domf
ty+(1−t)x∈domf
t
^
y
+
(
1
−
t
^
)
x
∈
d
o
m
f
\hat{t}y + (1-\hat{t})x \in domf
t^y+(1−t^)x∈domf
f
(
t
y
+
(
1
−
t
)
x
)
≥
f
(
t
^
y
+
(
1
−
t
^
)
x
)
+
▽
f
(
t
^
y
+
(
1
−
t
^
)
x
)
(
t
y
+
(
1
−
t
)
x
−
t
^
y
−
(
1
−
t
^
)
x
)
f(ty+(1-t)x) \geq f(\hat ty+(1- \hat t)x) + \triangledown f(\hat ty + (1-\hat t)x)(ty+(1-t)x-\hat ty - (1-\hat t)x)
f(ty+(1−t)x)≥f(t^y+(1−t^)x)+▽f(t^y+(1−t^)x)(ty+(1−t)x−t^y−(1−t^)x)
f
(
t
y
+
(
1
−
t
)
x
)
≥
f
(
t
^
y
+
(
1
−
t
^
)
x
)
+
▽
f
(
t
^
y
+
(
1
−
t
^
)
x
)
(
(
y
−
x
)
(
t
−
t
^
)
)
f(ty+(1-t)x) \geq f(\hat ty+(1- \hat t)x) + \triangledown f(\hat ty + (1-\hat t)x)((y-x)(t - \hat t))
f(ty+(1−t)x)≥f(t^y+(1−t^)x)+▽f(t^y+(1−t^)x)((y−x)(t−t^))
定义:
g
(
t
)
=
f
(
t
y
+
(
1
−
t
)
x
)
g(t) = f(ty+(1-t)x)
g(t)=f(ty+(1−t)x)
g
(
t
^
)
=
f
(
t
^
y
+
(
1
−
t
^
)
x
)
g(\hat t) = f(\hat ty+(1-\hat t)x)
g(t^)=f(t^y+(1−t^)x)
g
′
(
t
^
)
=
▽
f
T
(
t
^
y
+
(
1
−
t
^
)
x
)
(
y
−
x
)
g'(\hat t) = \triangledown f^T(\hat t y + (1- \hat t)x)(y-x)
g′(t^)=▽fT(t^y+(1−t^)x)(y−x)
g
(
t
)
≥
g
(
t
^
)
+
g
′
(
t
^
)
(
t
−
t
^
)
g(t) \geq g(\hat t) + g'(\hat t)(t-\hat t)
g(t)≥g(t^)+g′(t^)(t−t^)
利用推理一的后半部分,能得到 f ( x ) f(x) f(x)为凸。