Linear Programming | Lesson 1 of 10

Introduction to Linear Programming Contexts

S4 Mathematics — Term 1, Topic 3

In this lesson:

  • Recognize optimization problems from real situations
  • Identify decision variables and constraints
  • Write an objective function direction (maximize or minimize)
S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

What You Will Learn Today

By the end of this lesson, you should be able to:

  1. Recognize when a real problem is an optimization problem
  2. Identify the decision variables and constraints in a situation
  3. State the objective function — what to maximize or minimize
S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

A Farmer Faces a Real Decision

A farmer has 20 acres of land and can grow maize or beans.

  • Maize earns more profit per acre
  • Beans require less water and labour
  • The farmer can only work 8 hours per day

Which combination gives the most profit?

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

What Is an Optimization Problem?

Diagram showing a decision-maker choosing between two options, with arrows pointing to constraints and a goal

Linear programming finds the best decision within given limits.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Two Parts of Every LP Problem

Part What it means Example
Constraints Rules that limit your choices "Land available ≤ 20 acres"
Objective The goal you want to reach "Maximize profit"

The constraints set the boundaries. The objective sets the direction.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Quick Check: Constraints or Objective?

Classify each statement for a school tuck-shop:

  1. "The tuck-shop can only prepare 50 items per day"
  2. "Each chapati earns 300 shillings profit"
  3. "We want to earn as much profit as possible"

Think before the next slide...

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Check Your Answers: Constraints or Objective

  1. "Can only prepare 50 items per day" → Constraint (a limit)
  2. "Each chapati earns 300 shillings" → Data (used to build the objective)
  3. "Earn as much profit as possible" → Objective (the goal)

Data becomes part of the objective once we know what we are deciding.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Decision Variables: What You Choose

Decision variables are the quantities you get to decide.

  • Labeled and — the choices the decision-maker controls
  • Everything else — prices, capacity, costs — is given data

In the farmer scenario, you decide how many acres of each crop to plant.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Naming Your Variables: Tuck-Shop Example

A school tuck-shop sells chapatis and mandazis.

  • Let = chapatis prepared per day
  • Let = mandazis prepared per day

Two-column diagram: left column shows chapati with label x, right column shows mandazi with label y, arrow pointing down to "daily profit"

Prices and profit rates are data — not variables.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Constraints: Rules That Limit Variables

Constraints are real-world limits written as inequalities.

  • At most 50 items per day:
  • At least 10 chapatis:
  • Non-negativity: ,

Every constraint involves the decision variables.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Worked Example: Finding All Constraints

Tuck-shop scenario:

  • Total items ≤ 50 per day
  • Chapatis ≥ 10, mandazis ≥ 5
  • Ingredient budget ≤ 15,000 shillings

Constraints:

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Quick Check: Variables in a New Problem

A transport company runs two routes — Route A and Route B.

What are the decision variables?

What does the company control? Not fares, not fuel costs.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

The Objective Function: Expressing Your Goal

The objective function expresses the quantity you want to optimize.

  • It is written as an equation involving the decision variables
  • It always has a direction: maximize or minimize

where is profit, = chapatis, = mandazis

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Should You Maximize or Minimize?

Two-column reference card: left column "Maximize" with examples profit, output, revenue; right column "Minimize" with examples cost, time, waste

  • Maximize: profit, revenue, output, satisfaction
  • Minimize: cost, time, distance, waste, risk
S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Worked Example: Writing the Objective

Tuck-shop objective: Each chapati earns 500 shillings profit; each mandazi earns 400 shillings.

The owner wants to maximize total daily profit .

The coefficient of each variable comes from the data in the problem.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Your Turn: Model the Transport Company

Route A: 8,000 shs/trip. Route B: 5,000 shs/trip.
Limits: total trips ≤ 12; Route A ≤ 8; Route B ≥ 2.

Write a complete model:

  1. Decision variables
  2. Two constraints as inequalities
  3. Objective function with direction

Try first, then advance for the answer.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Check Your Answers: Transport Company Model

Let = Route A trips/day, = Route B trips/day

Constraints:

Objective:

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

The Standard Model Statement Format

Every linear programming model uses this structure:

Let = [decision variable 1], = [decision variable 2]

Constraints:
List each inequality, one per line

Objective:
Maximize/Minimize = [expression in and ]

This format is what you will always present in exams and assignments.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Practice: Build Three Quick Models

Name variables, write 2 constraints, state objective direction.

  1. Bakery: bread and cakes. Max revenue. Oven ≤ 8 hrs; flour ≤ 20 kg.

  2. School: chairs and desks. Min cost. Budget ≤ 500,000 UGX; chairs ≥ 20.

  3. Clinic: nurses and doctors. Min wages. Staff ≥ 4; doctors ≥ 1.

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Check Your Practice Model Answers

  1. = bread, = cakes; oven and flour limits; Maximize revenue

  2. = chairs, = desks; budget, chairs ≥ 20; Minimize cost

  3. = nurses, = doctors; staff ≥ 4, doctors ≥ 1; Minimize wages

Always include , .

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Key Takeaways From Today's Lesson

✓ LP finds the best decision within given limits

Decision variables = what you choose, not given data

Constraints = limits as inequalities (, )

Objective = equation + direction (Maximize or Minimize)

⚠️ Variables are choices — not prices; maximize profit, minimize cost

S4 Mathematics | NCDC Uganda
Linear Programming | Lesson 1 of 10

Next Lesson: The Feasible Region

In Lesson 2, we will:

  • Graph the constraints on a coordinate plane
  • Shade the region that satisfies all constraints at once
  • Identify this as the feasible region — where all valid solutions live

Today's model statements become tomorrow's graphs.

S4 Mathematics | NCDC Uganda

Click to begin the narrated lesson

Introduction to Linear Programming Contexts