Lecture10

Lecture10 - CME 305: Discrete Mathematics and Algorithms...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CME 305: Discrete Mathematics and Algorithms Instructor: Professor Amin Saberi (saberi@stanford.edu) February 4, 2010 Lecture 10: Linear Programs Maximum flow and many other problems can be incorporated into a broader class of problems called linear programs (LPs) . There are several courses at Stanford that deal specifically with LPs (such as MS&E 310). The simplex method , which is the algorithm for solving LP, has been called as one of the most important algorithms of the 20 th century. 1 The General, the Cook, and the Mother of all Max-Min Theorems Suppose we have a division of soldiers, a General, and a Cook. There is a set of food ingredients { 1 , 2 ,...,n } , where one unit of i provides a ij units of property j , 1 j m (such as calories, protein, vitamins, etc...). The cook needs to ensure that each soldier gets a sufficient amount of property j which is given by b j ; in other words, the nutrition fact of the food should be such that each soldier gets at least b j units of property j ; consuming one unit of i costs c i . The general asks the cook to prepare a meal (regardless of taste) that meets all of the soldiers requirements at a minimum cost. Let x i be amount of ingredient i consumed in the food, the problem that the cook needs to solve can be formulated as follows: minimize: X i c i x i subject to: X i a ij x i b j for all j x i for all i Such an optimization problem is called a linear program (LP) as the constraints and the objective function are both linear. Example: The list of ingredients and their nutrition facts are given in Table 1; each soldier needs 6 units of vitamins, 9 units of calories, and 5 units of proteins. Ingredient Vitamins Calories Proteins Cost Milk 3 2 2 8 Potato 3 3 Meat 2 1 2 Fruit 1 1 1 3 Table 1: Ingredients and Their Nutrition Facts It is easy to check that 2 units of milk, 1 unit of potato, and 1 unit of meat satisfy all the constraints, and cost 2 8 + 3 + 2 = 21. How can the cook show that this is, in fact, the recipe with the minimum cost?...
View Full Document

Page1 / 4

Lecture10 - CME 305: Discrete Mathematics and Algorithms...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online