01 / 20

Setting Up
Linear Programming Problems

Learn to translate word problems into objective functions and constraints: the essential first step in optimization.

Finite Mathematics

What is Linear Programming?

Linear programming (LP) is a method for finding the best outcome (maximum profit, minimum cost) in a mathematical model whose requirements are expressed as linear relationships.

Optimize
Find the maximum or minimum value of a quantity
Subject to
Real-world limits on resources, time, or capacity
Linear
All equations involve variables raised only to the first power

Key Vocabulary

1
Decision Variables: The unknowns you control, typically \( x \) and \( y \).
2
Objective Function: The expression you want to maximize or minimize, e.g. \( P = 5x + 8y \).
3
Constraints: Linear inequalities that limit your variables, e.g. \( 2x + 3y \leq 120 \).
4
Feasible Region: The set of all points \( (x, y) \) satisfying every constraint.

Why Setting Up Matters Most

Solving an LP problem is mechanical once the setup is correct. The hard part is translating English sentences into math. A wrong inequality or a missing constraint leads to a meaningless answer, no matter how perfectly you solve it.

The Standard Form of an LP

Every LP problem has three pieces: decision variables, one objective function, and a system of inequality constraints (including non-negativity).

Visualizing the Feasible Region

\(x\)
\(y\)
2 4 6 8 2 4 6 8
\(x+y \leq 6\)
\(2x+y \leq 8\)
Feasible Region

Maximize vs Minimize

Maximize Minimize
Goal Largest possible value of \( Z \) Smallest possible value of \( Z \)
Typical uses Profit, revenue, output Cost, waste, time
Signal words "greatest," "most," "highest" "least," "cheapest," "fewest"
Constraint direction Resources \( \leq \) limits Requirements \( \geq \) minimums

The 5-Step Setup Method

1
Read and identify the goal. Are you maximizing or minimizing? What quantity?
2
Define decision variables. Let \( x \) and \( y \) represent the quantities you can control.
3
Write the objective function. Express the goal as \( Z = ax + by \).
4
Translate each constraint. Turn every resource limit or requirement into a linear inequality.
5
Add non-negativity constraints. Always include \( x \geq 0 \) and \( y \geq 0 \).

Example 1: Furniture Factory

Step 1: Goal is to maximize profit.
Step 2: Let \( x = \) number of tables, \( y = \) number of chairs.

Example 1: Complete Formulation

\(x\)
\(y\)
\( 4x+3y=240 \)
\( 2x+y=100 \)
\( (0,0) \)
\( (0, 80) \)
\( (30, 40) \)
\( (50, 0) \)
Feasible Region

Example 2: Nutrition Problem

Minimize: \( \geq \) vs \( \leq \)

\( \leq \) Constraints
Used when a resource is limited: "at most," "no more than," "capacity of"
\( \geq \) Constraints
Used when a requirement must be met: "at least," "minimum of," "no fewer than"

Example 3: Investment Portfolio

Translating English to Math

English Phrase Math Symbol
"at most 200" \( \leq 200 \)
"at least 50" \( \geq 50 \)
"no more than 100" \( \leq 100 \)
"A is at least 10 more than B" \( x \geq y + 10 \)
"total cannot exceed 500" \( x + y \leq 500 \)
"A is exactly twice B" \( x = 2y \)
"A is at least twice B" \( x \geq 2y \)

Common Mistakes to Avoid

✕ Flipping the inequality
Writing \( \leq \) when the problem says "at least" (which needs \( \geq \)).
✕ Forgetting non-negativity
Omitting \( x \geq 0 \) and \( y \geq 0 \). These are always required.
✕ Swapping variables
Mixing up which variable is which, e.g. using \( x \) for chairs when you defined \( x \) as tables.

Question 1 of 5

A bakery makes cakes (\( x \)) and pies (\( y \)). Profit is $12 per cake and $8 per pie. Which is the correct objective function to maximize profit?

Question 2 of 5

"The factory can produce at most 150 units per day." If \( x \) and \( y \) are the two products, which constraint represents this?

Question 3 of 5

A diet requires at least 40 g of protein. Food X provides 5 g per serving, Food Y provides 8 g per serving. Which constraint is correct?

Question 4 of 5

"The number of desks produced must be at least twice the number of bookcases." Let \( x = \) desks, \( y = \) bookcases. Which inequality is correct?

Question 5 of 5

Which of the following is always included when setting up a linear programming problem?