Linear Programming线性规划(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Linear Programming
1. Fundamentals
objective function and constraints:
min/max3x1+24x2+13x3+9x4...s.tlinearconstraintsmin/max\quad 3x_1+24x_2+13x_3+9x_4...\\s.t\quad\;\; linear\; constraints min/max3x1+24x2+13x3+9x4...s.tlinearconstraints
optimal solution: a feasible solution that has the min(or max) objective value
convex property: the optimal solution must fall in the corner of the feasible region(decided by constraints)
geometric interpretation:
each constraint defines a half-space, the solutions are the intersection of half-spaces and are called simplex;
objective functions form a hyperplane.
2. Standard and Slack forms
LP to standard form:
convert a minimization into a maximization;
add nonnegative constraints: all xxx variables are greater than zero;
convert some variables that do not have nonnegative constraints;
replace xjx_jxj with xj′−xj′′x_j'-x_j''xj′−xj′′
convert equality constraints into inequality constraints; by replacing === with ≤\le≤ and ≥\ge≥
convert ≥\ge≥ into ≤\le≤;
Standard form to slack form
For example: 2x1+3x2+x3≤5−>2x1+3x2+x3+x4=52x_1+3x_2+x_3\le 5\quad->\quad 2x_1+3x_2+x_3+x_4=52x1+3x2+x3≤5−>2x1+3x2+x3+x4=5, where x4x_4x4 is the slack.
Put all the slacks to right hand side and get the slack form, for example:
Basic Solutions: in slack form, set all RHS variables to 0, and the LHS variables are called basic, RHS variables are nonbasic.
3. Simplex algorithm
Convert into slack form;
find the variable in “z row” with biggest coefficient;
Do min test and replace the basic value with its corresponding non-basic value;
Repeat step 2 and 3 until all variables in “z row” become negative or sometimes LP is obviously unbounded.
Why would it terminate? If the number of basic solution(mmm) is finite then iterations would be: (m+nm)\binom{m+n}{m}(mm+n)
LP is Unbounded: when one variable increase, then all of other variables also increase. Non constraints are binding; LP is unbounded.
4. Degeneracy
The objective function’s value doesn’t change between iterations.
- 1.we need two out of three lines to find a corner which means that one line(constraint) is extra.
- 2.the reason why one of variable is equal to zero.
5. Cycling
- If Simplex fails to terminate then it cycles;
- two or more basic variables compete for leaving, then choose the one with smallest subscript to leave.
6. Infeasible First Basic Solution
Example:
7. Auxiliary Linear Programming
If original LP is feasible, then the slack form of the auxiliary LP
will yield a feasible basic solution to the original LP (and the
corresponding slack form).
8. Duality
LP in standard form and its dual
Weak Duality: x∗x^*x∗ feasible solution to the primal LP; y∗y*y∗ feasible solution to the dual LP.
If
∑j=1ncjxj∗=∑i=1mbiyi∗\sum_{j=1}^nc_jx_j^*=\sum_{i=1}^mb_iy_i^*j=1∑ncjxj∗=i=1∑mbiyi∗
then x∗x^*x∗ and y∗y^*y∗ are optimal solutions to the primal and to the
dual LPs, respectively.
9. Upper Bounds on Maximization LP
10. Additional Proof
10.1 If S IMPLEX fails to terminate in at most (n+mm)\binom{n+m}{m}(mn+m)iterations, then it cycles.
Proof Given a set BBB of basic variables(Lemma 29.4), the associated slack form is uniquely determined. There are n+mn+mn+m variables and ∣B∣=m|B|=m∣B∣=m, and therefore, there are at most (n+mm)\binom{n+m}{m}(mn+m) ways to determine BBB. Thus, there are at most (n+mm)\binom{n+m}{m}(mn+m) unique slack forms.
To be continue…
Linear Programming线性规划(Introduction to Algorithms, 算法导论,CLRS)学习笔记相关推荐
- 算法设计与分析_算法导论(CLRS)骨灰级笔记分享:目录
倘若你去问一个木匠学徒:你需要什么样的工具进行工作,他可能会回答你:"我只要一把锤子和一个锯".但是如果你去问一个老木工或者是大师级的建筑师,他会告诉你"我需要一些精确的 ...
- 网易公开课-MIT麻省理工学院《算法导论》 学习笔记(1)
本文为麻省理工学院<算法导论>课程第一讲的学习笔记. 网易云课堂上该课程的网站为http://open.163.com/special/opencourse/algorithms.html ...
- 麻省理工公开课《算法导论》学习笔记:第一讲
主题:简介课程,渐近概念的大局观,插入排序和归并排序,递归式函数时间分析(递归树方法) 教材:<算法导论> 收获:很感动地看到算法分析那个log(n)是为什么出现了,更深层还要听第二讲,若 ...
- Hashing哈希函数(Introduction to Algorithms, 算法导论,CLRS)学习笔记
Hashing Hashing fundamentals Application: Unordered sets Hash table with chaining Practical universa ...
- van Emde Boas Trees(vEB树)(Introduction to Algorithms, 算法导论,CLRS)学习笔记
van Emde Boas Trees 1. Predecessor search/ordered sets predecessor: return the nearest left neighbor ...
- 【算法导论】学习笔记——第11章 散列表
11.1 直接寻址表 当关键字的全域U很小,可采用直接寻址的方式.假设动态集合S的元素都取自全域U={0, 1, ..., m-1}的一个关键字,并且没有两个元素具有相同的关键字. 为表示动态集合,使 ...
- 【算法导论】学习笔记——第16章 贪心算法
贪心算法是使做出的选择看起来都是当前最佳的,期望通过所做的局部最优选择来产生一个全局最优解.其实,这个定义旨在说明贪心算法必须伴随做出最优选择,如moving table,我们选择最大重叠数等等.当然 ...
- 《算法导论》学习笔记——快速排序
快速排序 1.快速排序原理 快速排序是一种应用很广泛的排序算法,与归并排序类似,快速排序也采用了分治策略.对于一个待排序的数组A[p...r]进行快速排序,根据分治思想,可以分为如下三个步骤: ...
- 【算法导论】学习笔记——第9章 中位数和顺序统计量
在一个由n个元素组成的集合中,第i个顺序统计量(order statistic)是该集合中第i小的元素.用非形式化的描述来说,一个中位数(median)使它所属集合的"中点元素". ...
最新文章
- 手机qq2008触屏版_比微信老却是00后最爱 手机QQ 16年进化史
- 涂鸦智能冲刺IPO,不卖硬件的AIoT公司,团队阿里云出身,腾讯是大股东
- MPLS 解决方案有哪些优势?——Vecloud
- 探秘Tomcat(一)——Myeclipse中导入Tomcat源码
- python调用rust_在 Rust 代码中编写 Python 是种怎样的体验?
- linux 修改默认脚本,linux环境初始脚本
- 将windows下编辑好的文件(GBK)转换成Linux下的格式(UTF8)
- C++11 并发指南四(future 详解三 std::future std::shared_future)
- Spring:@Configuration和@Component的使用与区别
- Spring-data ElasticSearch的使用
- 均方根值、均方根误差以及标准差的区别
- Basic认证方式的配置
- 十部让你泣不成声的老电影
- UTF-8不是兼容Unicode吗? 那UTF-8也应该支持中文啊, 为什么上面的XML文档会 出现字符集错误的情况呢?
- Dynamic DMA mapping Guide
- Centos系统内核优化参数列表
- 华为云CDN是怎么为你的下载加速保驾护航
- C语言希尔排序及其增量序列
- 039-070前端学习
- aplus翻译_promise/A+规范翻译以及手写实现
热门文章
- PERT:一种基于乱序语言模型的预训练模型
- python软件下载安装百度网盘-Python3.8.0
- 标准粒子群C语言程序
- [Err] 42000 - [SQL Server]参数数据类型 text 对于 replace 函数的参数 1 无效。
- sql语句--黄一家
- 数据可视化大屏设计-金螳螂项目管理指挥中心-大数据项目
- 使用js-xlsx handsontable 分批次导入Excel数据(兼容ie9)
- 解决pycharm下载速度太慢的问题
- 今夕何夕 今天是2017年8月6日,农历闰六月十五。 小度独自凭栏,望着一轮圆月,发出了“今夕何夕,见此良人”的寂寞感慨。
- 互联网行业薪资现状,月薪2万属于低收入? 6千外派包吃住