首页 > 其他分享 >First-Order Conditions For Convexity

First-Order Conditions For Convexity

时间:2023-11-15 16:49:24浏览次数:27  
标签:geq mathbf top nabla leq theta Conditions Order Convexity

Statement of the First-Order Condition for Convexity

For a differentiable function $ f: \mathbb{R}^n \to \mathbb{R} $, $ f $ is convex on a convex set $ C \subseteq \mathbb{R}^n $ if and only if for all $ \mathbf{x}, \mathbf{y} \in C $ the following inequality holds:

\[f(\mathbf{y}) \geq f(\mathbf{x}) + \nabla f(\mathbf{x})^\top (\mathbf{y} - \mathbf{x}) \]

Proof

Part 1: Necessity

Assume $ f $ is convex. We need to show that the first-order condition holds.

  1. Convexity of $ f $: By definition of convexity, for any $ \mathbf{x}, \mathbf{y} \in C $ and $ \theta $ with $ 0 \leq \theta \leq 1 $, we have:

    \[f(\theta \mathbf{y} + (1 - \theta) \mathbf{x}) \leq \theta f(\mathbf{y}) + (1 - \theta) f(\mathbf{x}) \]

  2. Apply the Definition to a Point Slightly Away from $ \mathbf{x} $: Choose $ \theta $ to be a small positive number $ h $, and set $ \mathbf{z} = \mathbf{x} + h(\mathbf{y} - \mathbf{x}) $. Then, the above inequality becomes:

    \[f(\mathbf{x} + h(\mathbf{y} - \mathbf{x})) \leq hf(\mathbf{y}) + (1 - h)f(\mathbf{x}) \]

  3. Rearrange and Divide by $ h $:

    \[\frac{f(\mathbf{x} + h(\mathbf{y} - \mathbf{x})) - f(\mathbf{x})}{h} \leq f(\mathbf{y}) - f(\mathbf{x}) \]

  4. Take the Limit as $ h \to 0 $:

    \[\lim_{h \to 0} \frac{f(\mathbf{x} + h(\mathbf{y} - \mathbf{x})) - f(\mathbf{x})}{h} = \nabla f(\mathbf{x})^\top (\mathbf{y} - \mathbf{x}) \]

    Therefore, $ f(\mathbf{y}) \geq f(\mathbf{x}) + \nabla f(\mathbf{x})^\top (\mathbf{y} - \mathbf{x}) $.

Part 2: Sufficiency

Given:

The first-order condition states that for all $ \mathbf{x}, \mathbf{y} \in C $:

\[f(\mathbf{y}) \geq f(\mathbf{x}) + \nabla f(\mathbf{x})^\top (\mathbf{y} - \mathbf{x}) \]

Goal:

To prove that $ f $ is convex, i.e., for any $ \mathbf{x}, \mathbf{y} \in C $ and for any $ \theta $ with $ 0 \leq \theta \leq 1 $, the following inequality holds:

\[f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) \leq \theta f(\mathbf{x}) + (1 - \theta) f(\mathbf{y}) \]

Proof Steps:

Step 1: Apply First-Order Condition with $ \mathbf{x} $ and $ \mathbf{y} $

For $ \mathbf{z} = \theta \mathbf{x} + (1 - \theta) \mathbf{y} $ and using $ \mathbf{y} $ in the first-order condition, we have:

\[f(\mathbf{y}) \geq f(\mathbf{z}) + \nabla f(\mathbf{z})^\top (\mathbf{y} - \mathbf{z}) \]

Step 2: Substitute $ \mathbf{z} $

\[f(\mathbf{y}) \geq f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + \nabla f(\theta \mathbf{x} + (1 - \theta) \mathbf{y})^\top (\mathbf{y} - (\theta \mathbf{x} + (1 - \theta) \mathbf{y})) \]

Step 3: Expand and Rearrange

\[f(\mathbf{y}) \geq f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + \theta\nabla f(\theta \mathbf{x} + (1 - \theta) \mathbf{y})^\top (\mathbf{y} - \mathbf{x}) \]

Step 4: Multiply by $ (1 - \theta) $

\[(1 - \theta) f(\mathbf{y}) \geq (1 - \theta) f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + \theta(1 - \theta) \nabla f(\theta \mathbf{x} + (1 - \theta) \mathbf{y})^\top (\mathbf{y} - \mathbf{x}) \]

Step 5: Apply First-Order Condition with $ \mathbf{x} $ and $ \mathbf{z} $

Similarly, applying the condition with $ \mathbf{x} $ and $ \mathbf{z} $:

\[f(\mathbf{x}) \geq f(\mathbf{z}) + \nabla f(\mathbf{z})^\top (\mathbf{x} - \mathbf{z}) \]

Step 6: Substitute $ \mathbf{z} $ and Multiply by $ \theta $

\[\theta f(\mathbf{x}) \geq \theta f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + \theta(1 - \theta) \nabla f(\theta \mathbf{x} + (1 - \theta) \mathbf{y})^\top (\mathbf{x} - \mathbf{y}) \]

Step 7: Combine and Simplify

Add the inequalities from Steps 4 and 6:

\[\theta f(\mathbf{x}) + (1 - \theta) f(\mathbf{y}) \geq \theta f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + (1 - \theta) f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) + \text{[terms involving gradients]} \]

The terms involving the gradients will cancel

out, leaving:

\[\theta f(\mathbf{x}) + (1 - \theta) f(\mathbf{y}) \geq f(\theta \mathbf{x} + (1 - \theta) \mathbf{y}) \]

标签:geq,mathbf,top,nabla,leq,theta,Conditions,Order,Convexity
From: https://www.cnblogs.com/maluyelang/p/17834150.html

相关文章

  • mysql中select、from、where、group by、having、order by 、limit执行顺序
    语法顺序:select->from->where->groupby->having->orderby->limit执行顺序:from-->where-->groupby-->having-->select-->orderby-->limit1)from子句组装来自不同数据源的数据;2)使用on进行join连接的数据筛选3)where子句基于指定的条件对记录行进行筛选;4)groupby子......
  • 根据数字值和探究 哈希以及unordered_map实现
    leecode里面的第一题,是两数值和,内容如下/**************************************************************给定一个整数数组nums和一个整数目标值target,请你在该数组中找出和为目标值target的那两个整数,并返回它们的数组下标。你可以假设每种输入只会对应一个答案。......
  • G - Cut and Reorder 状压DP
    我是题目链接首先显然先一操作,然后二操作这样不会影响最终结果一眼状压DP,选出一些a从前往后塞,f[i][j]表示选出的a状态为i,且结尾为j时最小花费转移就看上一个状态的结尾(设为k)和当前结尾(设为j)在a里的下标是否顺着挨着(就是j=k+1),不是顺着挨着就要加个c这样会tle#include<bits/std......
  • MySQL 数据库查询与数据操作:使用 ORDER BY 排序和 DELETE 删除记录
    使用ORDERBY进行排序使用ORDERBY语句按升序或降序对结果进行排序。ORDERBY关键字默认按升序排序。要按降序排序结果,使用DESC关键字。示例按名称按字母顺序排序结果:importmysql.connectormydb=mysql.connector.connect(host="localhost",user="yourusernam......
  • MySQL 数据库查询与数据操作:使用 ORDER BY 排序和 DELETE 删除记录
    使用ORDERBY进行排序使用ORDERBY语句按升序或降序对结果进行排序。ORDERBY关键字默认按升序排序。要按降序排序结果,使用DESC关键字。示例按名称按字母顺序排序结果:importmysql.connectormydb=mysql.connector.connect(host="localhost",user="youruserna......
  • 云承载网中Border边界网络的对接方案
    业务背景在私有云的业务场景中,常见的通信包含了同VPC内虚机互访、不同VPC之间的虚机互访、VPC访问Underlay资源、VPC访问Internet资源、VPC提供服务,被Internet访问、VPC与专线网络之间互访等;实际应用中,大多数云业务通信场景都需要依赖安全、NAT、负载等边界设备组合使用来实现,云承......
  • MySQL中ORDER BY与LIMIT一起使用(有坑)
     1. 现象与问题ORDERBY排序后,用LIMIT取前几条,发现返回的结果集的顺序与预期的不一样下面是我遇到的问题:可以看到,带LIMIT与不带LIMIT的结果与我预期的不一样,而且“很不可思议”,真是百思不得其解后来百度了一下,如果orderby的列有相同的值时,mysql会随机选取这些行,为了保......
  • STL之unordered_set与unordered_map的模拟实现(万字长文详解)
    unordered_set与unordered_map的模拟实现哈希节点类#pragmaonce#include<iostream>#include<vector>namespaceMySTL{template<classT>structHashNode{HashNode(constT&data=T())......
  • 无界鼠标的使用 (mouse without borders)
    下载:https://www.cnblogs.com/dengziqi/p/14613391.html官网https://www.microsoft.com/en-us/download/details.aspx?id=35460 使用:https://www.cnblogs.com/yufeng218/p/16264460.html ......
  • 软件测试|Selenium Expected Conditions 模块使用
    简介在自动化测试中,页面元素可能需要一些时间才能加载或完成某种操作,为了确保测试的稳定性,我们需要等待特定条件变为真。Selenium提供了一个ExpectedConditions模块,用于智能等待页面元素的出现、可见、可点击等条件。本文将详细介绍如何使用Selenium的ExpectedConditions......