# Chapter 2 Slides by

John

Loucks

St. Edward’s

University

Modifications by

A. Asef-Vaziri

1

Chapter 2

Introduction to Linear Programming

Linear Programming Problem

Problem Formulation

A Simple Maximization Problem

Computer Solutions

A Simple Minimization Problem

Special Cases

2

Linear Programming (LP) Problem

Linear programming involves choosing a course of action when the mathematical model of the problem contains only linear functions.

The maximization or minimization of some quantity is the objective in all linear programming problems.

All LP problems have constraints that limit the degree to which the objective can be pursued.

A feasible solution satisfies all the problem's constraints.

An optimal solution is a feasible solution that results in the largest possible objective function value when maximizing (or smallest when minimizing).

3

Linear Programming (LP) Problem

If both the objective function and the constraints are linear, the problem is referred to as a linear programming problem.

Linear functions are functions in which each variable appears in a separate term raised to the first power and is multiplied by a constant (which could be 0).

Linear constraints are linear functions that are restricted to be "less than or equal to", "equal to", or

"greater than or equal to" a constant.

4

Problem Formulation

Problem formulation or modeling is the process of translating a verbal statement of a problem into a mathematical statement.

Formulating models is an art that can only be mastered with practice and experience.

Every LP problems has some unique features, but most problems also have common features.

General guidelines

• Understand the problem thoroughly.

• Identify the decision variables.

• Describe the objective function.

• Describe each constraint.

5

Example 1: A Simple Maximization Problem

LP Formulation

Max 5x

1

+ 7x

2 s.t. x

1

2x

1 x

1

+ 3x

2

+ x

2

< 6

< 19

< 8 x

1

> 0 and x

2

> 0

Objective

Function

“Regular”

Constraints

Non-negativity

Constraints

6

Computer Solutions

LP problems involving 1000s of variables and 1000s of constraints are now routinely solved with computer packages.

Linear programming solvers are now part of many spreadsheet packages, such as Microsoft Excel.

LINGO, MOSEK, Xpress-MP, and Premium Solver for

Excel.

In this chapter we will discuss the following output:

• objective function value

• values of the decision variables

• reduced costs

• slack and surplus

7

A

1

2

3

Constraints

#1

4 #2

5 #3

6 Obj.Func.Coeff.

B

LHS Coefficients

C

X1

1

2

1

5

X2

0

3

1

7

D

RHS Values

6

19

8

8

8

9

10

11

A B

Optimal Decision Variable Values

X1

5.0

12

13

Maximized Objective Function

14 Constraints

15 #1

Amount Used

5

16

17

#2

#3

19

8

C

X2

3.0

46.0

<=

<=

<=

D

RHS Limits

6

19

8

9

Interpretation of Computer Output

We see from the previous slide that:

Objective Function Value = 46

Decision Variable #1 (x

1

Decision Variable #2 (x

2

) = 5

) = 3

Slack in Constraint #1 = 6 – 5 = 1

Slack in Constraint #2 = 19 – 19 = 0

Slack in Constraint #3 = 8 – 8 = 0

10

Reduced Cost

The reduced cost for a decision variable whose value is 0 in the optimal solution is: the amount the variable's objective function coefficient would have to improve (increase for maximization problems, decrease for minimization problems) before this variable could assume a positive value.

The reduced cost for a decision variable whose value is > 0 in the optimal solution is 0.

11

Reduced Costs

Final Reduced Objective

Cell Name Value Cost Coefficient

\$B\$8 X1

\$C\$8 X2

5.0

3.0

0.0

0.0

5

7

Allowable

Increase

Allowable

Decrease

2 0.333333333

0.5

2

Constraints

Cell Name Value Price R.H. Side

\$B\$13 #1

\$B\$14 #2

\$B\$15 #3

5

19

8

0

2

1

Allowable

Increase

Allowable

Decrease

6

19

1E+30

5

8 0.333333333 1.666666667

1

1

12

Example 2: A Simple Minimization Problem

LP Formulation

Min 5x

1

+ 2x

2 s.t. 2x

1

4x

1 x

1

+ 5x

2

x

2

+ x

2

> 10

> 12

> 4 x

1

, x

2

> 0

13

Feasible Region

The feasible region for an LP problem can be nonexistent, a single point, a line, a polygon, or an unbounded area.

Any linear program falls in one of four categories:

• is infeasible

• has a unique optimal solution

• has alternative optimal solutions

• has an objective function that can be increased without bound

A feasible region may be unbounded and yet there may be optimal solutions. This is common in minimization problems and is possible in maximization problems.

14

Special Cases: Alternative Optimal Solutions

Consider the following LP problem.

Max 4x

1

+ 6x

2 s.t. x

1

2x

1 x

1

+ 3x

2

+ x

2

< 6

< 18

< 7 x

1

> 0 and x

2

> 0

15

Special Cases: Infeasibility

• No solution to the LP problem satisfies all the constraints, including the non-negativity conditions.

• Graphically, this means a feasible region does not exist.

• Causes include:

• A formulation error has been made.

• Management’s expectations are too high.

• Too many restrictions have been placed on the problem (i.e. the problem is over-constrained).

16

Example: Infeasible Problem

Consider the following LP problem.

Max 2x

1

+ 6x

2 s.t. 4x

1

2x

1

+ 3x

2

+ x

2

< 12

> 8 x

1

, x

2

> 0

17

Special Cases: Unbounded Feasible Region

• The solution to a maximization LP problem is unbounded if the value of the solution may be made indefinitely large without violating any of the constraints.

• For real problems, this is the result of improper formulation. (Quite likely, a constraint has been inadvertently omitted.)

18

Example: Unbounded Solution

Consider the following LP problem.

Max 4x

1

+ 5x

2 s.t. x

1

3x

1

+ x

2

+ x

2

> 5

> 8 x

1

, x

2

> 0

19

End of Chapter 2

20