You are on page 1of 7

MATH 187: CLASS 1

VIN DE SILVA

1. Linear optimization

Operations Research became a field of research in the aftermath of World War II.

‘Operations’ refers to military operations (supply chains, logistics, factories, etc.)

1.1. A 2-dimensional problem

Example. You manufacture two brands (1 and 2) of a product type, from two raw ingredients (A and B).

Ingredient Composition:
1 lb of Brand 1 requires 1 lb of ingredient A
2 lb of ingredient B

1 lb of Brand 2 requires 2 lb of ingredient A


1 lb of ingredient B

Ingredient Availability:
6 lb of ingredient A
8 lb of ingredient B

Profit:
$30 for each pound of Brand 1
$20 for each pound of Brand 2

Regulations:
You may not make more than 2 lb of Brand 2.
The amount of Brand 2 cannot exceed the amount of Brand 1 by more than 1 lb.

How can you maximize your profit?

Date: 2022–jan–19.
1
We introduce two decision variables:
x1 = amount of Brand 1 that we manufacture
x2 = amount of Brand 2 that we manufacture

We wish to maximize the following objective function:


z = 30x1 + 2x2

Our solution must satisfy the following functionality constraints:


(C1 ) x1 + 2x2 ≤ 6
(C2 ) 2x1 + x2 ≤ 8
(C3 ) x2 ≤ 2
(C4 ) −x1 + x2 ≤ 1

Our solution must satisfy the following sign constraints:


(C5 ) x1 ≥ 0
treated separately
(C6 ) x2 ≥ 0

This problem is an example of a 2-dimensional linear program.

• A feasible solution is an assignment of values to the decisions variables that satisfies all the constraints.

• An optimal solution is a feasible solution that maximizes (or minimizes) the objective function.

Exercise. Find a feasible solution. Evaluate the objective function on your feasible solution.

(i)

(ii)
Obvious question:

• How do we find an optimal solution to a LP?

Possibly easier questions:

• How do we find a feasible solution to a LP?

• Given a feasible solution, how can we tell if it is optimal?

• Given a non-optimal feasible solution, how can we find a better feasible solution?

• If we repeat the last step, do we eventually find an optimal solution?

Claim. (x1 , x2 ) = is the optimum solution to the problem above.

Proof. We calculate: z =

Someone whispers in our ear the following:


. . . C1 + . . . C2

Any feasible solution must, in particular, satisfy:

. . . (x1 + 2x2 ) ≤ . . . 6

. . . (2x1 + x2 ) ≤ . . . 8

What happened here? The whispered hint enabled us to certify the optimality of the given solution.
1.2. Geometric point of view

We can draw our 2-variable example in the plane. Each inequality confines the feasible set to a half-plane:

Desmos | Graphing Calculator 1/19/22, 1'18 PM Desmos | Graphing Calculator 1/19/22, 1'18 PM Desmos | Graphing Calculator 1/19/22, 1'19 PM

x1 + 2x2 ≤ 6 2x1 + x2 ≤ 8 x2 ≤ 2
Desmos | Graphing Calculator 1/19/22, 1'18 PM Desmos | Graphing Calculator 1/19/22, 1'19 PM Desmos | Graphing Calculator 1/19/22, 1'19 PM

https://www.desmos.com/calculator Page 1 of 3 https://www.desmos.com/calculator Page 1 of 3 https://www.desmos.com/calculator Page 1 of 3

−x1 + x2 ≤ 1 x1 ≥ 0 x2 ≥ 0

https://www.desmos.com/calculator Page 1 of 3 https://www.desmos.com/calculator Page 1 of 3 https://www.desmos.com/calculator Page 1 of 3

We can intersect the regions as follows:


Desmos | Graphing Calculator 1/19/22, 1'17 PM

https://www.desmos.com/calculator Page 1 of 3
Let us shade the feasible set:
Desmos | Graphing Calculator 1/19/22, 1'20 PM

"isolines" of the
objective function

To optimize the objective function z = 30x1 + 20x2 , we consider all lines of the form:

30x1 + 20x2 = constant

want isoline as far to the right as


These have slope −3/2. possible without violating constraints
(too far left --> there is a larger value
https://www.desmos.com/calculator
within the feasible set)
Page 1 of 3
Other scenarios

If we remove constraints C1 and C2 , then the feasible set becomes unbounded.


Desmos | Graphing Calculator 1/19/22, 1'26 PM

In this case, there is no upper bound on the possible profit.

https://www.desmos.com/calculator Page 1 of 3

If we reverse the constraints C2 and C4 , then the feasible set becomes empty.
Desmos | Graphing Calculator 1/19/22, 1'28 PM

We say that the LP is infeasible.

https://www.desmos.com/calculator Page 1 of 3
1.3. Integer Programming (IP)

For some problems, we require the decision variables to be integers.

Important Warning. For many IP, the solution to the associated LP may be no use at all.

Example. Suppose in the previous problem we are manufacturing bricks, rather than liquid soap.
Desmos | Graphing Calculator 1/19/22, 1'20 PM

https://www.desmos.com/calculator Page 1 of 3

You might also like