理论计算机科学(PPT专题讲稿)Topics in Theoretical Computer Science(Linear Programming)

CMSC5706 Topics in Theoretical Computer Science Week 2: Linear Programming Instructor: Shengyu Zhang 1
Instructor: Shengyu Zhang 1

LP Motivating examples a Introduction to algorithms Simplex algorithm o On a particular example a General algorithm Duality An application to game theory
LP ◼ Motivating examples ◼ Introduction to algorithms ◼ Simplex algorithm ❑ On a particular example ❑ General algorithm ◼ Duality ◼ An application to game theory 2

Example 1: profit maximization A company has two types of products: P, Q Profit: P---$1 each; Q---S6 each Constraints a Daily productivity(including both P and Q)is 400 a daily demand for P is 200 a daily demand for Q is 300 Question How many P and o should we produce to maximize the profit? o x, units of P. x, units of q
Example 1: profit maximization ◼ A company has two types of products: P, Q. ◼ Profit: P --- $1 each; Q --- $6 each. ◼ Constraints: ❑ Daily productivity (including both P and Q) is 400 ❑ Daily demand for P is 200 ❑ Daily demand for Q is 300 ◼ Question: How many P and Q should we produce to maximize the profit? ❑ 𝑥1 units of P, 𝑥2 units of Q 3

How to solve? x, units of p Variables x, units of Q o x and x Constraints Constraints a daily productivity(including a X1 +x2 $400 both p and Q )is 400 口x1≤200 Daily demand for p is 200 口x,≤300 a daily demand for Q is 300 1x2≥0 Question how much P Objective and Q to produce to maxxi+ 6x2 maximize the profit?
How to solve? ◼ 𝑥1 units of P 𝑥2 units of Q ◼ Constraints: ❑ Daily productivity (including both P and Q) is 400 ❑ Daily demand for P is 200 ❑ Daily demand for Q is 300 ◼ Question: how much P and Q to produce to maximize the profit? ◼ Variables: ❑ 𝑥1 and 𝑥2. ◼ Constraints: ❑ 𝑥1 + 𝑥2 ≤ 400 ❑ 𝑥1 ≤ 200 ❑ 𝑥2 ≤ 300 ❑ 𝑥1, 𝑥2 ≥ 0 ◼ Objective: max 𝑥1 + 6𝑥2 4

Illustrative figures Optimum point c=1500 .C=600
Illustrative figures 5

Example 2 a We are managing a network with bandwidth as shown by numbers on eages a Bandwidth: max units of flows 3 connections: AB BC. CA a We get $3, $2, $4 for providing them respectively o two routes for each connection short and long Question: How to route the connections to maximize our revenue?
Example 2 ◼ We are managing a network with bandwidth as shown by numbers on edges. ❑ Bandwidth: max units of flows ◼ 3 connections: AB, BC, CA ❑ We get $3, $2, $4 for providing them respectively. ❑ Two routes for each connection: short and long. ◼ Question: How to route the connections to maximize our revenue? 6

Example 2 xar: amount of flow of the short route xAp: amount of flow of the long route ariables 0 AB, XAB XBC, xBC, XAC, xAC Constraints 口xAB+xAB+xAC+xAC≤12(edge(A,a) 口xAB+xAB+xBC+xBC≤10(edge(B,b) 口xBC+xBC+xAC+xAC≤8(edge(C,c) 口xAB+xBC+xAc≤6 (edge(a, b)) axAc+xAB+xBC≤13 (edge(b, c)) 口xAB+xBC+xAC≤11 (edge(a, c)) 口xAB,xAB,xBC,xBC,xAC,xAC≥0 Objective: max 3 (AB+XAB)+ 2(xBC +xBC)+4(xAC Xac)
Example 2 ◼ Variables: ❑ 𝑥𝐴𝐵, 𝑥𝐴𝐵 ′ ,𝑥𝐵𝐶,𝑥𝐵𝐶 ′ ,𝑥𝐴𝐶,𝑥𝐴𝐶 ′ . ◼ Constraints: ❑ 𝑥𝐴𝐵 + 𝑥𝐴𝐵 ′ + 𝑥𝐴𝐶 + 𝑥𝐴𝐶 ′ ≤ 12 (edge (𝐴, 𝑎)) ❑ 𝑥𝐴𝐵 + 𝑥𝐴𝐵 ′ + 𝑥𝐵𝐶 + 𝑥𝐵𝐶 ′ ≤ 10 (edge (𝐵, 𝑏)) ❑ 𝑥𝐵𝐶 + 𝑥𝐵𝐶 ′ + 𝑥𝐴𝐶 + 𝑥𝐴𝐶 ′ ≤ 8 (edge (𝐶, 𝑐)) ❑ 𝑥𝐴𝐵 + 𝑥𝐵𝐶 ′ + 𝑥𝐴𝐶 ′ ≤ 6 (edge (𝑎, 𝑏)) ❑ 𝑥𝐴𝐶 ′ + 𝑥𝐴𝐵 ′ + 𝑥𝐵𝐶 ≤ 13 (edge (𝑏, 𝑐)) ❑ 𝑥𝐴𝐵 + 𝑥𝐵𝐶 ′ + 𝑥𝐴𝐶 ′ ≤ 11 (edge (𝑎, 𝑐)) ❑ 𝑥𝐴𝐵, 𝑥𝐴𝐵 ′ ,𝑥𝐵𝐶,𝑥𝐵𝐶 ′ ,𝑥𝐴𝐶,𝑥𝐴𝐶 ′ ≥ 0 ◼ Objective: max 3(𝑥𝐴𝐵 + 𝑥𝐴𝐵 ′ ) + 2(𝑥𝐵𝐶 + 𝑥𝐵𝐶 ′ ) + 4(𝑥𝐴𝐶 + 𝑥𝐴𝐶 ′ ) 𝑥𝐴𝐵: amount of flow of the short route 𝑥𝐴𝐵 ′ : amount of flow of the long route 7

LP in general Max/min a linear function of variables a Called the objective function All constraints are linear(in)equalities Equational form Superscript transpose of vectors max cr maXC1x1+…+Cnxn s t. Ax= b st.a1x1+…+amxn=b ≥0,Vi=1,… a x: variables Inequality: entry-wise a(A, b): coefficients in constraints
LP in general ◼ Max/min a linear function of variables ❑ Called the objective function ◼ All constraints are linear (in)equalities ◼ Equational form: max 𝒄 𝑇𝒙 max 𝑐1𝑥1 + ⋯ + 𝑐𝑛𝑥𝑛 s.t. 𝐴𝒙 = 𝒃 s.t. 𝑎𝑖1𝑥1 + ⋯ + 𝑎𝑖𝑛𝑥𝑛 = 𝑏𝑖 , ∀𝑖 = 1, … , 𝑚 𝒙 ≥ 𝟎 𝑥𝑖 ≥ 0, ∀𝑖 = 1, … ,𝑛 ❑ 𝒙: variables. ❑ (𝐴, 𝒃): coefficients in constraints Superscript T: transpose of vectors. Inequality: entry-wise 8

Transformations between forms Min vs, max o mince台max-Cx Inequality directions 口ax≥be-axs-b Equalities to inequalities: (ai: row i in matrix A) o ax=b eax> b. and ax s b
Transformations between forms ◼ Min vs. max: ❑ min 𝒄 𝑇𝒙 ⇔ max−𝒄 𝑇𝒙 ◼ Inequality directions: ❑ 𝒂𝒊 𝑇𝒙 ≥ 𝑏𝑖 ⇔ −𝒂𝒊 𝑇𝒙 ≤ −𝑏𝑖 ◼ Equalities to inequalities: (𝒂𝒊 : row 𝑖 in matrix 𝐴) ❑ 𝒂𝒊 𝑇𝒙 = 𝑏𝑖 ⇔ 𝒂𝒊 𝑇𝒙 ≥ 𝑏𝑖 , and 𝒂𝒊 𝑇𝒙 ≤ 𝑏𝑖 . 9

Transformations between forms a Inequalities to equalities aax≥b台ax=b2+S,S1≥0 The newly introduced variable Si is called slack variable “ Unrestricted”to“ nonnegative constraint” 口x; unrestricted兮x;=S-tS≥0,t≥0
Transformations between forms ◼ Inequalities to equalities: ❑ 𝒂𝒊 𝑇𝒙 ≥ 𝑏𝑖 ⇔ 𝒂𝒊 𝑇𝒙 = 𝑏𝑖 + 𝑠𝑖 , 𝑠𝑖 ≥ 0 ◼ The newly introduced variable 𝑠𝑖 is called slack variable ◼ “Unrestricted” to “nonnegative constraint”: ❑ 𝑥𝑖 unrestricted ⇔ 𝑥𝑖 = 𝑠– 𝑡, 𝑠 ≥ 0,𝑡 ≥ 0 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《C语言程序设计》课程电子教案(PPT课件讲稿)第9章 文件操作.ppt
- 香港科技大学:Recent Development of Heterogeneous Information Networks - From Meta-paths to Meta-graphs.pptx
- 西安培华学院:《计算机应用基础》课程教学资源(PPT课件讲稿)第1章 信息技术与计算机基础知识.ppt
- 同济大学:FWA for Noisy Optimization Problems(张军旗).pptx
- 南京大学:《编译原理》课程教学资源(PPT课件讲稿)第三章 词法分析.ppt
- 电子科技大学:《计算机操作系统》课程教学资源(PPT课件)第一章 操作系统引论.ppt
- 电子工业出版社:《计算机网络》课程教学资源(第五版,PPT课件讲稿)第五章 运输层.ppt
- 四川大学:《操作系统 Operating System》课程教学资源(PPT课件讲稿)Chapter 5 互斥与同步(Mutual Exclusion and Synchronization)5.1 Principles of Concurrency 5.2 Mutual Exclusion.ppt
- 中国科学技术大学:《计算机网络 Computer Networks(计算机通信网)》课程教学资源(PPT课件讲稿)Chapter 06 Internet Protocol.ppt
- 构建互联互通的单位局域网(PPT讲稿).ppt
- 安徽理工大学:《汇编语言》课程教学资源(PPT课件讲稿)第八章 输入输出程序设计.ppt
- 中国科学技术大学:《信号与图像处理基础 Signal and Image Processing》课程教学资源(PPT课件讲稿)空域滤波 Spatial Filtering.pptx
- 广西医科大学:《计算机网络 Computer Networking》课程教学资源(PPT课件讲稿)Chapter 03 Network Management and Operation(Network Architetures and Standarts).pptx
- 《电子商务实用教程》课程教学资源(PPT课件讲稿)第三章 网络营销.ppt
- 河南中医药大学:《网络技术实训》课程教学资源(PPT课件讲稿)第7讲 网络安全实训(主讲:许成刚).pptx
- 《计算机应用基础》工学结合配套课件(PPT讲稿)模块二系统软件操作技术(Windows XP的实用工具).ppt
- 《C++程序设计》教学资源(PPT课件讲稿)构造函数和析构函数.ppt
- 《程序设计语言》课程教学资源(PPT课件讲稿)第5章 函数式程序设计语言.ppt
- 南京大学:移动Agent系统支撑(PPT讲稿)Agent Mobility Software Agent.pptx
- 计算机硬件维护(PPT课件讲稿).ppt
- 北京建筑大学:《计算机图形学》课程教学资源(PPT课件讲稿)第一章 绪论(吕书强).ppt
- 清华大学:《计算机导论》课程电子教案(PPT教学课件)第5章 程序设计知识.ppt
- 中国科学技术大学:《计算机文化基础》课程教学资源(PPT课件讲稿,共四章,李金龙).ppt
- 《自然语言处理》课程教学资源(PPT课件讲稿)语言模型.ppt
- 《计算机网络》课程教学资源(PPT课件讲稿)第7章 运输层.ppt
- 河南中医药大学(河南中医学院):《计算机文化》课程教学资源(PPT课件讲稿)第八章 数字多媒体.ppt
- 丽水职业技术学院:《电子商务实训》课程教学资源(PPT课件讲稿)电子商务交易模式之“B2C”.ppt
- 中国科学技术大学:《数据结构》课程教学资源(PPT课件)第八章 查找表.pps
- 《数据结构》课程教学资源(PPT课件讲稿)第九章 排序 Sort.ppt
- 《微机原理》课程教学资源(PPT课件讲稿)第三章 寻址方式与指令系统.ppt
- 《数据结构和编程设计》课程教学资源(PPT课件讲稿)Chapter 1 Programming Principles.ppt
- 西安电子科技大学:人工神经网络(PPT讲稿)Artificial Neural Networks(Introduction).ppt
- A New Approach for Accurate Modelling of Medium Access Control(MAC)Protocols.ppt
- 贵州师范学院:《高级语言程序设计 Advanced Programming》课程教学资源(PPT课件讲稿)第9章 结构体.ppt
- 《大型机高级系统管理技术》课程教学资源(PPT课件讲稿)第3章 作业控制语言.ppt
- 厦门大学:《大数据技术原理与应用》课程教学资源(PPT课件讲稿)第九章 图计算.ppt
- 《微机原理笔记》课程教学资源(PPT课件讲稿)第6章 输入输出和中断技术.ppt
- 香港科技大学:Introduction to Software Defined Network(SDN).pptx
- 《高级语言程序设计 Advanced Programming》课程教学资源(PPT课件讲稿)第5章 循环结构程序设计.ppt
- 中国科学技术大学:《计算机科学导论》课程教学资源(PPT课件讲稿)第五讲 经典计算的计算模型(主讲:陈意云).pptx