MODULE 5: MATHEMATICS FOR EFFICIENCY Linear Programming, Graph and Shortest Paths and Assignment Problems GEMATMW MR. MARK ANTHONY GARCIA Department of Mathematics and Statistics MAG What is Linear Programming (LP)? Linear programming is a mathematical technique for optimizing linear functions of several variables such as revenue, profit and cost. • It involves solving systems of linear inequalities using graphical methods and the simplex method. MAG Brief History of LP In 1939, Soviet mathematician and economist Leonid Kantorovich formulated a problem that is similar to the general linear programming problem. He later, during the World War II, used it to plan expenditures and returns in order to reduce costs of the army and to increase losses imposed on the enemy. MAG Brief History of LP In 1947, George Dantzig developed general linear programming formulation to use for planning problems in the US Air Force. He provided a formal proof of “A Theorem in Linear Inequalities” and it was published in 1951. In the post war years, many industries applied it in their daily planning. MAG Some Applications of LP Diet Problems – finding the cheapest combination of foods to satisfy nutritional requirements. Portfolio Problems – maximizing returns and minimizing the risk of losing in an investment portfolio. MAG Some Applications of LP Scheduling Problems – an airline has to assign crews to its flights with goal of minimizing logistical costs. Manufacturing and Transportation Problems – maximizing the production costs of a product while minimizing the costs of product transfers from one location to another. MAG Elements of Linear Programming Decision Variables • The decision variables represent the unknown decisions to be made. • Quantity of products to be produced and sold • Quantity of products to be consumed • Allocation of money in investment problems • We normally use the notations 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒏 to represent decision variables. For LP problems involving only two decision variables, we can simply use 𝒙 and 𝒚. Elements of Linear Programming Objective Function This is the goal of the problem which is represented by an equation. This function is either minimized or maximized. • • • • • • MAG Maximize profit or revenue Minimize cost of production/transportation Minimize overtime payment of employees Maximize use of resources/ingredients/materials Minimize labor turnover changes Minimize machine downtime Elements of Linear Programming Constraints • The constraints represent limitation in resources and decision variables. It is represented by a system of inequalities. • There are two types of constraints: resource constraints and non-negativity constraints. MAG Elements of Linear Programming The resource constraints are limitations in elements that affect production, consumption, money allocation. • • • • • • Limited raw material/ingredients Limited money or budget Limited employee work time or machine time Limited personnel/employees Limited ability or skills of employees Limited available capacity in shipments Elements of Linear Programming The non-negativity constraints are constraints that assures nonnegative values for the decision variables. • Most of the time, decision variables represent quantities of products produced and consumed and money allocation, these values should be nonnegative. MAG Example 1: Formulation and Solution of LP ➢ ➢ ➢ ➢ ➢ ➢ MAG A company produces two types of tables, T1 and T2. It takes 2 hours to produce the parts of one unit of T1, 1 hour to assemble and 2 hours to polish. It takes 4 hours to produce the parts of one unit of T2, 2.5 hours to assemble and 1.5 hours to polish. Per month, 7000 hours are available for producing the parts, 4000 hours for assembling the parts and 5500 hours for polishing the tables. The profit per unit of T1 is $90 and per unit of T2 is $110. How many of each type of tables should be produced in order to maximize the total monthly profit? Example 1: Formulation and Solution of LP ➢ MAG A company produces two types of tables, T1 and T2. 𝒙 Quantity for table T1 𝒚 Quantity for table T2 Example 1: Formulation and Solution of LP ➢ ➢ MAG The profit per unit of T1 is $90 and per unit of T2 is $110. How many of each type of tables should be produced in order to maximize the total monthly profit? Example 1: Formulation and Solution of LP ➢ ➢ ➢ It takes 2 hours to produce the parts of one unit of T1, 1 hour to assemble and 2 hours to polish. It takes 4 hours to produce the parts of one unit of T2, 2.5 hours to assemble and 1.5 hours to polish. Per month, 7000 hours are available for producing the parts, 4000 hours for assembling the parts and 5500 hours for polishing the tables. Table T1 Production Time Assembly Time Polishing Time MAG Table T2 Limitation Example 1: Formulation and Solution of LP 𝒙 𝒚 Quantity for table T1 Quantity for table T2 Maximize total monthly profit 𝒛 = 𝟗𝟎𝒙 + 𝟏𝟏𝟎𝒚 𝟐𝒙 + 𝟒𝒚 ≤ 𝟕𝟎𝟎𝟎 𝒙 + 𝟐. 𝟓𝒚 ≤ 𝟒𝟎𝟎𝟎 𝟐𝒙 + 𝟏. 𝟓𝒚 ≤ 𝟓𝟓𝟎𝟎 𝒙 ≥ 𝟎, 𝒚 ≥ 𝟎 MAG Example 1: Formulation and Solution of LP (𝟎, 𝟏𝟔𝟎𝟎) (𝟏𝟓𝟎𝟎, 𝟏𝟎𝟎𝟎) (𝟐𝟑𝟎𝟎, 𝟔𝟎𝟎) (𝟎, 𝟎) (𝟐𝟕𝟓𝟎, 𝟎) MAG Example 1: Formulation and Solution of LP 𝒛 = 𝟗𝟎𝒙 + 𝟏𝟏𝟎𝒚 (𝟎, 𝟏𝟔𝟎𝟎) 𝒛 = 𝟗𝟎 𝟎 + 𝟏𝟏𝟎 𝟏𝟔𝟎𝟎 = 𝟏𝟕𝟔, 𝟎𝟎𝟎 (𝟏𝟓𝟎𝟎, 𝟏𝟎𝟎𝟎) 𝒛 = 𝟗𝟎 𝟏𝟓𝟎𝟎 + 𝟏𝟏𝟎 𝟏𝟎𝟎𝟎 = 𝟐𝟒𝟓, 𝟎𝟎𝟎 (𝟐𝟑𝟎𝟎, 𝟔𝟎𝟎) 𝒛 = 𝟗𝟎 𝟐𝟑𝟎𝟎 + 𝟏𝟏𝟎 𝟔𝟎𝟎 = 𝟐𝟕𝟑, 𝟎𝟎𝟎 (𝟐𝟕𝟓𝟎, 𝟎) 𝒛 = 𝟗𝟎 𝟐𝟕𝟓𝟎 + 𝟏𝟏𝟎 𝟎 = 𝟐𝟒𝟕, 𝟓𝟎𝟎 (𝟎, 𝟎) 𝒛 = 𝟗𝟎 𝟎 + 𝟏𝟏𝟎 𝟎 = 𝟎 • The company should produce 2300 units of Table T1 and 600 units of Table T2. • This implies that the maximum monthly profit is $273,000. MAG Example 2: Formulation and Solution of LP • The liquid portion of a diet is to provide at least 300 calories, at least 36 units of vitamin A, and at least 90 units of vitamin C daily. • A cup of dietary drink X provides 60 calories, 12 units of vitamin A, and 10 units of vitamin C. • A cup of dietary drink Y provides 60 calories, 6 units of vitamin A, and 30 units of vitamin C. • Now, suppose that dietary drink X costs Php12 per cup and drink Y costs Php15 per cup. • How many cups of each drink should be consumed each day to minimize the cost and still meet the stated daily requirements? MAG Example 2: Formulation and Solution of LP ● ● Now, suppose that dietary drink X costs Php12 per cup and drink Y costs Php15 per cup. How many cups of each drink should be consumed each day to minimize the cost and still meet the stated daily requirements? 𝒙 𝒚 MAG No. of cups for Drink X No. of cups for Drink Y Example 2: Formulation and Solution of LP ● ● ● The liquid portion of a diet is to provide at least 300 calories, at least 36 units of vitamin A, and at least 90 units of vitamin C daily. A cup of dietary drink X provides 60 calories, 12 units of vitamin A, and 10 units of vitamin C. A cup of dietary drink Y provides 60 calories, 6 units of vitamin A, and 30 units of vitamin C. Drink X Calories Vitamin A Vitamin C MAG Drink Y Min. Req. Example 2: Formulation and Solution of LP 𝒙 𝒚 No. of cups for Drink X No. of cups for Drink Y Minimize total cost 𝒛 = 𝟏𝟐𝒙 + 𝟏𝟓𝒚 𝟔𝟎𝒙 + 𝟔𝟎𝒚 ≥ 𝟑𝟎𝟎 𝟏𝟐𝒙 + 𝟔𝒚 ≥ 𝟑𝟔 𝟏𝟎𝒙 + 𝟑𝟎𝒚 ≥ 𝟗𝟎 𝒙 ≥ 𝟎, 𝒚 ≥ 𝟎 MAG Example 2: Formulation and Solution of LP (𝟎, 𝟔) (𝟏, 𝟒) (𝟑, 𝟐) (𝟗, 𝟎) MAG