CISC5835, Algorithms for Big Data

Slides:



Advertisements
Similar presentations
Linear Programming (LP) (Chap.29)
Advertisements

Introduction to Algorithms
Chapter 2: Modeling with Linear Programming & sensitivity analysis
Dragan Jovicic Harvinder Singh
CS 312 – Linear Programming
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Linear Programming Fundamentals Convexity Definition: Line segment joining any 2 pts lies inside shape convex NOT convex.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Operation Research Chapter 3 Simplex Method.
Linear Programming.
1 Introduction to Linear and Integer Programming Lecture 9: Feb 14.
1 2TN – Linear Programming  Linear Programming. 2 Linear Programming Discussion  Requirements of a Linear Programming Problem  Formulate:  Determine:Graphical.
Optimization Linear Programming and Simplex Method
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
LINEAR PROGRAMMING: THE GRAPHICAL METHOD
Chapter 3 An Introduction to Linear Programming
1 1 Slide © 2009 South-Western, a part of Cengage Learning Slides by John Loucks St. Edward’s University.
1 1 Slide LINEAR PROGRAMMING: THE GRAPHICAL METHOD n Linear Programming Problem n Properties of LPs n LP Solutions n Graphical Solution n Introduction.
Linear Programming David Kauchak cs161 Summer 2009.
Decision Procedures An Algorithmic Point of View
1 1 Slide © 2005 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS ST. EDWARD’S UNIVERSITY.
1 1 Slide Linear Programming (LP) Problem n A mathematical programming problem is one that seeks to maximize an objective function subject to constraints.
1 Chapter 7 Linear Programming. 2 Linear Programming (LP) Problems Both objective function and constraints are linear. Solutions are highly structured.
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Chapter 7 Introduction to Linear Programming
1 1 Slide © 2005 Thomson/South-Western Chapter 2 Introduction to Linear Programming n Linear Programming Problem n Problem Formulation n A Maximization.
1 1 Slide © 2001 South-Western College Publishing/Thomson Learning Anderson Sweeney Williams Anderson Sweeney Williams Slides Prepared by JOHN LOUCKS QUANTITATIVE.
Chapter 2 Introduction to Linear Programming n Linear Programming Problem n Problem Formulation n A Maximization Problem n Graphical Solution Procedure.
Highline Class, BI 348 Basic Business Analytics using Excel Chapter 08 & 09: Introduction to Linear Programing 1.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
Linear Programming: Formulations, Geometry and Simplex Method Yi Zhang January 21 th, 2010.
1 Optimization Linear Programming and Simplex Method.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
1 1 Slide Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an.
An Introduction to Linear Programming
Linear Programming for Solving the DSS Problems
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Engineering Economics (2+0)
Module Outline Introduction The Linear Programming Model
Lap Chi Lau we will only use slides 4 to 19
An Introduction to Linear Programming Pertemuan 4
Chapter 2 An Introduction to Linear Programming
Chap 10. Sensitivity Analysis
Linear Programming Topics General optimization model
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Topics in Algorithms Lap Chi Lau.
Solver & Optimization Problems
Linear Programming Dr. T. T. Kachwala.
Linear Programming (LP) (Chap.29)
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Linear programming Simplex method.
Copyright © Cengage Learning. All rights reserved.
Linear Programming Topics General optimization model
Linear Programming Prof. Sweta Shah.
Linear Programming.
Linear Programming Topics General optimization model
Introduction to linear programming (LP): Minimization
Linear Programming CISC4080, Computer Algorithms CIS, Fordham Univ.
Linear Programming Topics General optimization model
Chapter 3 The Simplex Method and Sensitivity Analysis
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
Linear Programming.
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Linear Programming I: Simplex method
Linear programming Simplex method.
Graphical solution A Graphical Solution Procedure (LPs with 2 decision variables can be solved/viewed this way.) 1. Plot each constraint as an equation.
Chapter 10: Iterative Improvement
ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS
Presentation transcript:

CISC5835, Algorithms for Big Data Linear Programming CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

Linear Programming In a linear programming problem, there is a set of variables, and we want to assign real values to them so as to satisfy a set of linear equations and/or linear inequalities involving these variables, and maximize or minimize a given linear objective function.

Example: profit maximization A boutique chocolatier has two products:  its flagship assortment of triangular chocolates, called Pyramide, and the more decadent and deluxe Pyramide Nuit. How much of each should it produce to maximize profits? Every box of Pyramide has a a profit of $1. Every box of Nuit has a profit of $6. The daily demand is limited to at most 200 boxes of Pyramide and 300 boxes of Nuit. The current workforce can produce a total of at most 400 boxes of chocolate per day. Let x1 be # of boxes of Pyramide, x2 be # of boxes of Nuit

LP formulation It is a convex polygon. A linear equation of x1 and x2 defines a line in the two-dimensional (2D) plane A linear inequality designates a half-space (the region on one side of the line) The set of all feasible solutions of this linear program, that is, the points (x1,x2) which satisfy all constraints, is the intersection of five half-spaces. It is a convex polygon.

Maximize Profit Find point(s) in feasible region (shaded part) at which objective function (x1+6x2) is maximized. feasible regions decided by linear constraints Note: All points on line x1 + 6x2 = c (for some constant c) achieve same profit c e.g., points (0, 200), (200, 1000/6) lie on x1 + 6x2 = 1200, both yield profit $1200 so are all points in the line segment feasible region: a polygon (0,200) (200,1000/6)

Maximize Profit (cont’d) All points that lie on line x1 + 6x2 = c (for some constant c) achieve same profit c As c increases, “profit line” moves parallel to itself, up and to the right. To maximize c: move line as far up as possible, while still touching feasible region. Optimum solution: very last feasible point that profit lines sees and must therefore be a vertex of polygon.

Maximize Profit (cont’d) All points that lie on line x1 + 6x2 = c (for some constant c) achieve same profit c As c increases, “profit line” moves parallel to itself, up and to the right. To maximize c: move line as far up as possible, while still touching feasible region. Optimum solution: very last feasible point that profit lines sees and must therefore be a vertex of polygon.

Simplex Method Why does this local test imply global optimality? Simplex method: devised by George Dantzig in 1947. Starts at a vertex, and repeatedly looks for an adjacent vertex (connected by an edge of the feasible region) of better objective value. In this way it does hill-climbing on vertices of the polygon, walking from neighbor to neighbor so as to steadily increase profit along the way. Upon reaching a vertex that has no better neighbor, simplex declares it to be optimal and halts. Why does this local test imply global optimality? considering think of profit line passing through this vertex. Since all the vertex’s neighbors lie below the line, the rest of the feasible polygon must also lie below this line.

A few comments Simplex Method is a kind of hill climbing technique: a mathematical optimization technique which belongs to the family of local search. It is an iterative algorithm that starts with an arbitrary solution to a problem, then attempts to find a better solution by incrementally changing a single element of the solution. If the change produces a better solution, an incremental change is made to the new solution, repeating until no further improvements can be found.

A few comments Linear programming: a special case of convex optimization. Convex optimization: minimizing convex functions over convex sets. Simple ex: What if objective function is: maximize x12+x22 ? What does the “profit” lines look like?

Simplex Algorithm: details Convert the problem into standard form

Simplex Algorithm: detail Convert standard form into slack form slack form: (N, B, A, b, c, v) N: set of non-basic variables (those on the right hand sides, and in object functions) B: the set of basic variables A: matrix (ai,j) (bi): the vector (ci): the coefficients in object function Basic solution: set all non-basic variables to 0, and calculate basic variables accordingly.

What if basic solution not feasible? or the problem is not feasible, or is unbounded?

Practice Consider the following linear program: plot the feasible region and find optimal solution What if objective is to minimize 5x+3y?

Higher Dimension What if there is a third and even more exclusive line of chocolates, called Pyramide Luxe. One box of these will bring in a profit of $13. Nuit and Luxe require same packaging machinery, except that Luxe uses it three times as much, which imposes another constraint x2 + 3x3 ≤ 600

Another Problem Duckwheat is produced in Kansas and Mexico and consumed in New York and California. Kansas produces 15 shnupells of buckwheat and Mexico 8. New York consumes 10 shnupells and California 13. Transportation costs per shnupell are $4 from Mexico to New York, $1 from Mexico to California, $2 from Kansas to New York, and $3 and from Kansas to California. Write a linear program that decides the amounts of duckwheat (in shnupells and fractions of a shnupell) to be transported from each producer to each consumer, so as to minimize the overall transportation cost.

Transport Networks Given a directed graph G=(V,E), two nodes s, t in V (source and sink), and capacities ce on edges Model some transport system (a network of oil pipelines, computer networks, …) Question: How to transport as much as goods from s to t using the network using? A Network

A flow in the network: value is 7 Flow in Networks A shipping scheme/plan assign fe to each edge, and has following properties 0<=fe<=ce (capacity) for all nodes u except s and t, amount of flow entering u equals amount leave u (conserved) A Network A flow in the network: value is 7

A flow in the network: value is 7 Max. Flow in Networks Input: G=(V,E), edge capacity ce Output: fe of each edge (# of var = |E|) Linear Programming problem constraints are all linear! maximize: f(d,t)+f(e,t) A Network A flow in the network: value is 7

A flow in the network: value is 7 Ford-Fulkerson Alg. Input: G=(V,E), edge capacity ce Output: fe of each edge (# of var = |E|) A Network A flow in the network: value is 7

Summary Linear Programming: assign values to variables subject to linear constraints, with goal of minimizing (or maximizing) a linear function Many problems can be formulated as LP if values can only be integer, then it’s a harder problem e.g., Knaksack problems Ideas of Simplex alg.