What s Linear Programming? Often your try is to maximize or minimize an objective within given constraints

Similar documents
An example of LP problem: Political Elections

Chapter 29 Linear Programming 771. policy urban suburban rural build roads gun control farm subsidies 0 10 gasoline tax

Discrete Optimization. Lecture Notes 2

4.1 The original problem and the optimal tableau

Heuristic Optimization Today: Linear Programming. Tobias Friedrich Chair for Algorithm Engineering Hasso Plattner Institute, Potsdam

Linear Programming. Presentation for use with the textbook, Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

CSE 40/60236 Sam Bailey

4.1 Graphical solution of a linear program and standard form

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

16.410/413 Principles of Autonomy and Decision Making

The Simplex Algorithm

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

Some Advanced Topics in Linear Programming

Optimization of Design. Lecturer:Dung-An Wang Lecture 8

Lecture 9: Linear Programming

Linear and Integer Programming :Algorithms in the Real World. Related Optimization Problems. How important is optimization?

Artificial Intelligence

Linear Programming. Readings: Read text section 11.6, and sections 1 and 2 of Tom Ferguson s notes (see course homepage).

The Simplex Algorithm for LP, and an Open Problem

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Linear programming and duality theory

BCN Decision and Risk Analysis. Syed M. Ahmed, Ph.D.

UNIT 2 LINEAR PROGRAMMING PROBLEMS

Linear programming II João Carlos Lourenço

Linear Programming and its Applications

ISE203 Optimization 1 Linear Models. Dr. Arslan Örnek Chapter 4 Solving LP problems: The Simplex Method SIMPLEX

CHAPTER 3 LINEAR PROGRAMMING: SIMPLEX METHOD

Linear Programming. Linear Programming. Linear Programming. Example: Profit Maximization (1/4) Iris Hui-Ru Jiang Fall Linear programming

Introduction to Linear Programming

MATHEMATICS II: COLLECTION OF EXERCISES AND PROBLEMS

Controlling Air Pollution. A quick review. Reclaiming Solid Wastes. Chapter 4 The Simplex Method. Solving the Bake Sale problem. How to move?

Linear Programming Terminology

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Linear Programming. them such that they

Linear Programming. Linear programming provides methods for allocating limited resources among competing activities in an optimal way.

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

CSC 8301 Design & Analysis of Algorithms: Linear Programming

OPERATIONS RESEARCH. Linear Programming Problem

Linear Programming Problems

Tribhuvan University Institute Of Science and Technology Tribhuvan University Institute of Science and Technology

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

The Simplex Algorithm

CASE STUDY. fourteen. Animating The Simplex Method. case study OVERVIEW. Application Overview and Model Development.

16.410/413 Principles of Autonomy and Decision Making

An introduction to pplex and the Simplex Method

Review for Mastery Using Graphs and Tables to Solve Linear Systems

Part 4. Decomposition Algorithms Dantzig-Wolf Decomposition Algorithm

Linear Programming. L.W. Dasanayake Department of Economics University of Kelaniya

I will illustrate the concepts using the example below.

Introduction. Linear because it requires linear functions. Programming as synonymous of planning.

How to Solve a Standard Maximization Problem Using the Simplex Method and the Rowops Program

4 LINEAR PROGRAMMING (LP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

VARIANTS OF THE SIMPLEX METHOD

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 29

The Ascendance of the Dual Simplex Method: A Geometric View

Lecture notes on the simplex method September We will present an algorithm to solve linear programs of the form. maximize.

Chapter 3: Towards the Simplex Method for Efficient Solution of Linear Programs

Read: H&L chapters 1-6

Linear Programming Motivation: The Diet Problem

Department of Mathematics Oleg Burdakov of 30 October Consider the following linear programming problem (LP):

CMPSCI611: The Simplex Algorithm Lecture 24

Farming Example. Lecture 22. Solving a Linear Program. withthe Simplex Algorithm and with Excel s Solver

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology Madras.

Discrete Optimization 2010 Lecture 5 Min-Cost Flows & Total Unimodularity

Chapter 15 Introduction to Linear Programming

Linear Optimization. Andongwisye John. November 17, Linkoping University. Andongwisye John (Linkoping University) November 17, / 25

Lecture 4: Linear Programming

CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension

Chapter II. Linear Programming

Homework 2: Multi-unit combinatorial auctions (due Nov. 7 before class)

Linear Programming CISC4080, Computer Algorithms CIS, Fordham Univ. Linear Programming

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Solving linear programming

Linear Programming in Small Dimensions

Interior Penalty Functions. Barrier Functions A Problem and a Solution

Lecture 2 - Introduction to Polytopes

Real life Problem. Review

Linear Programming & Graphic Solution. Dr. Monther Tarawneh

6 Randomized rounding of semidefinite programs

Chapter 1. Linear Equations and Straight Lines. 2 of 71. Copyright 2014, 2010, 2007 Pearson Education, Inc.

Outline. CS38 Introduction to Algorithms. Linear programming 5/21/2014. Linear programming. Lecture 15 May 20, 2014

Chapter 7. Linear Programming Models: Graphical and Computer Methods

Quantitative Technique

II. Linear Programming

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

SIMULTANEOUS EQUATIONS

Math Models of OR: The Simplex Algorithm: Practical Considerations

Graphing Linear Inequalities in Two Variables.

Name: THE SIMPLEX METHOD: STANDARD MAXIMIZATION PROBLEMS

Chapter 4: The Mechanics of the Simplex Method

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

11 Linear Programming

Section Notes 4. Duality, Sensitivity, and the Dual Simplex Algorithm. Applied Math / Engineering Sciences 121. Week of October 8, 2018

Algorithmic Game Theory and Applications. Lecture 6: The Simplex Algorithm

Solutions for Operations Research Final Exam

Solving Linear Programs Using the Simplex Method (Manual)

Chapter 1 Linear Programming. Paragraph 4 The Simplex Algorithm

Three Dimensional Geometry. Linear Programming

New Directions in Linear Programming

Mathematics. Linear Programming

Transcription:

Linear Programming What s Linear Programming? Often your try is to maximize or minimize an objective within given constraints A linear programming problem can be expressed as a linear function of certain variables and the constraints can be expressed as equalities or inequalities on those variables Linear programming could be a minimization linear program or a maximization linear program 2

Election Spending Problem You re running for office 100K urban voters, 200K suburban, and 50K rural voters are your target You want to win over at least 50% of voters in each area There s a catch. These voters may be persuaded differently by advertisements on different issues 3 Election Spending Problem The effect of policies (and hence advertising on those policies) on thousands of voters who can be won over (or lost) by spending $1,000 on particular issue. Policy urban suburban rural building roads -2 5 3 gun control 8 2-5 farm subsidies 0 0 10 gasoline tax 10 0-2 4

Evolving the Linear Program Rather than trial and error, you can formulate the problem Let x 1 be the number of thousands of dollars spent on advertising on building roads, x 2... on gun control, x 3... on farm subsidies, and x 4... on gasoline tax (for public transit improvements) You can formulate the requirement to win half urban voters (50k out of 100k voters) as -2x 1 + 8x 2 + 0x 3 + 10x 4 >= 50...(similarly for other areas) You have to ensure x i >= 0 (as spending can t be negative) and minimize x 1 + x 2 + x 3 + x 4 5 Linear Program for Election $ Minimize x 1 + x 2 + x 3 + x 4 subject to -2x 1 + 8x 2 + 0x 3 + 10x 4 >= 50 5x 1 + 2x 2 + 0x 3 + 0x 4 >= 100 3x 1-5x 2 + 10x 3-2x 4 >= 25 x 1, x 2, x 3, x 4 >= 0 Solution to the linear program yields the optimal strategy. 6

General Linear Programs Optimize a linear function subject to a set of linear inequalities Given a set of real numbers a 1, a 2,..., a n and a set of variables x 1, x 2,..., x n, we define a linear function f on those variables: f(x 1, x 2,..., x n ) = a 1 x 1 + a 2 x 2 +... + a n x n =! 1<=i<=n a i x i plus linear constraints: either a linear equality f(x 1, x 2,..., x n ) = b or linear inequalities f(x 1, x 2,..., x n ) <= b or f(x 1, x 2,..., x n ) >= b. 7 Canonical Forms of LP Standard Maximization of a linear function subject to linear inequalities Slack Maximization of a linear function subject to linear equalities 8

Feasible Solution A linear program has n variables subject to a set of m linear inequalities A feasible solution is any values for variables that satisfy all the constraints Feasible region is set of all feasible solutions The maximization function is called the objective function and the value of this function at particular point in the feasible region an objective value There may be infinite number of points in a feasible region, so we need a way to practically find the optimal solution for the objective value 9 Solving Two Variables You can plot the constraints on a cartesian coordinate and find an optimal solution for the objective value Optimal Solution f 1 f 2 Objective function f 3 The optimal solution is the vertex of the feasible region If it is a line, you can use end points of the line segment 10

Solving Multiple Variables Each constrain forms a half-space in n-th dimensional space Feasible region formed by the intersection of these half-spaces is called simplex The objective function is a hyperplane and the optimal solution occurs at the vertex of the simplex The simplex algorithm moves through the exterior of the simplex, determining the vertex with maximum value that satisfy the objective function 11 The Simplex Algorithm Iterative algorithm Set each nonbasic variable to 0 and compute the values of the basic variables from the equality constraints In each iteration you convert from one slack form to another slack form You improve the objective value in each iteration We increase values (subject to constraints) of nonbasic variables from 0 in order to maximize the objective value You convert the equations into equivalent forms until the objective function has all variables with negative coefficient 12

Example of Simplex Alg Given the linear program in standard form maximize 3x 1 + x 2 + 2x 3 subject to x 1 + x 2 + 3x 3 <= 30 2x 1 + 2x 2 + 5x 3 <= 24 4x 1 + x 2 + 2x 3 <= 36 x 1, x 2, x 3 >= 0 13 Convert to Slack Form z = 3x 1 + x 2 + 2x 3 x 4 = 30 - x 1 - x 2-3x 3 x 5 = 24-2x 1-2x 2-5x 3 x 6 = 36-4x 1 - x 2-2x 3 Nonbasic variables on the right, basic variables on the left 14

z = 3x 1 + x 2 + 2x 3 Giving Values x 4 = 30 - x 1 - x 2-3x 3 x 5 = 24-2x 1-2x 2-5x 3 x 6 = 36-4x 1 - x 2-2x 3 Giving values of 0 to nonbasic variables, we have (0, 0, 0, 30, 24, 36) and z gets a value of 0. Now we want to reformulate so the basic solution has a greater objective value. 15 z = 3x 1 + x 2 + 2x 3 Reformulating x 4 = 30 - x 1 - x 2-3x 3 x 5 = 24-2x 1-2x 2-5x 3 x 6 = 36-4x 1 - x 2-2x 3 Take a nonbasic variable whose coefficient in the objective function is positive and increase the value as much as possible without violating constraints. This variable becomes basic and some other variable becomes nonbasic. 16

z = 3x 1 + x 2 + 2x 3 x 4 = 30 - x 1 - x 2-3x 3 x 5 = 24-2x 1-2x 2-5x 3 x 6 = 36-4x 1 - x 2-2x 3 Reformulating Increasing x 1 will result in decreasing x 4, x 5, and x 6. However, non of them can become negative due to constraints. x 4, x 5, and x 6, restrict x 1 to 30, 12, and 9, respectively. The third constraint is the most limiting. We switch roles of x 1 and x 6. 17 Pivoting z = 3x 1 + x 2 + 2x 3 x 4 = 30 - x 1 - x 2-3x 3 x 5 = 24-2x 1-2x 2-5x 3 x 1 = 9 - x 2 /4 - x 3 /2 - x 6 /4 You pivot that is you chose an entering variable (x 1 ) and a leaving variable (x 6 ) and exchange their roles. You now replace all x 1 18

Pivoting z = 27 + x 2 /4 + x 3 /2-3x 6 /4 x 1 = 9 - x 2 /4 - x 3 /2 - x 6 /4 x 4 = 21-3x 2 /4-5x 3 /2 + x 6 /4 x 5 = 6-3x 2 /2-4x 3 + x 6 /2 You re ready to pick the next pivot, an entering variable with positive coefficient in the objective function and a corresponding leaving variable. Let s chose x 3 and that will lead to the tightest function and hence the leaving variable x 5. 19 Pivoting z = 111/4 + x 2 /16 - x 5 /8-11x 6 /16 x 1 = 33/4 - x 2 /16 + x 5 /8-5x 6 /16 x 3 = 3/2-3x 2 /8 - x 5 /4 + x 6 /8 x 4 = 69/4 + 3x 2 /16 + 5x 5 /8 - x 6 /16 The lone standing positive coefficient nonbasic variable in objective function is x 2 Using that as a pivot,... 20

Pivoting z = 28 - x 3 /6 - x 5 /6-2x 6 /3 x 1 = 8 + x 3 /6 + x 5 /6 - x 6 /3 x 2 = 4-8x 3 /3-2x 5 /3 + x 6 /3 x 4 = 18 - x 3 /2 + x 5 /2 Giving zero values to the nonbasic variables, we get x 1 = 8, x 2 = 4, x 3 = 0, and the optimal solution z = 28. 21 Slack Variables maximize 3x 1 + x 2 + 2x 3 x 1 + x 2 + 3x 3 <= 30 12 <= 30, slack is 18 which is x 4 2x 1 + 2x 2 + 5x 3 <= 24 24 <= 24, slack is 0 which is x 5 4x 1 + x 2 + 2x 3 <= 36 36 <= 36, slack is 0 which is x 6 x 1, x 2, x 3 >= 0 Solution x 1 = 8, x 2 = 4, x 3 = 0, and the optimal solution z = 28. x 4, x 5, and x 6 are the slack variable. The slacks are 18, 0, and 0. If you plug in values for x 1, x 2, and x 3 into original inequalities, you can see the slack. 22

Pivot 23 Simplex Algorigthm 24

Issues to consider It is possible that the feasible region is unbounded It is possible that the iteration leaves the objective value unchanged known as degeneracy You need to look for cycles where the slack forms simply cycle through transformations Since Simplex algorithm is deterministic, it will cycle over the same sequence You can determine it cycles if it does not terminate in at most ( ) iterations n+m m 25