Mada za sehemu hiiUse algebra and matrices in problem solvingMada 1
- Explore the basic tenets of algebra (linear programming: constraints, objective functions, and optimal solution)
Linear Programming: Constraints, Objective Functions, and Optimal Solutions
Linear programming is a mathematical method used to find the best possible outcome (such as maximum profit or minimum cost) when there are limited resources and certain restrictions (constraints) that must be satisfied. The goal is to make the most effective use of available resources.
Every linear programming problem has four main parts:
-
Decision variables — The quantities we can control or decide on, usually represented by letters like and .
-
Objective function — The mathematical expression that we want to maximize or minimize (e.g., maximize profit, minimize cost).
-
Constraints — The restrictions or limitations expressed as linear inequalities (e.g., limited money, limited labor, limited time).
-
Non-negativity constraints — The requirement that and because we cannot have negative quantities in real situations.

When we draw all the constraint inequalities on a graph, the region where all inequalities overlap is called the feasible region. This region contains all possible solutions that satisfy every constraint. The feasible region is always bounded by straight lines (the boundary lines of the inequalities).
The corner points are the vertices where the boundary lines of the feasible region intersect. These points are important because, in linear programming, the optimal solution always occurs at one of these corner points.
- Read the problem carefully — Understand what is being asked.
- Define the variables — Let and represent the decision quantities.
- Formulate the model — Write the objective function and all constraints as inequalities.
- Draw the graph — Plot each constraint inequality and identify the feasible region.
- Find corner points — Determine the coordinates of each vertex of the feasible region.
- Evaluate the objective function — Substitute each corner point into the objective function.
- Select the optimal solution — Choose the corner point that gives the maximum (or minimum) value.
A Tanzanian trader wants to sell two types of fruit baskets: type A and type B.
- Each basket of type A gives a profit of 5,000 TZS.
- Each basket of type B gives a profit of 3,000 TZS.
- The trader has only 80 mangoes and 60 oranges available.
- Type A requires 5 mangoes and 3 oranges.
- Type B requires 4 mangoes and 4 oranges.
How many baskets of each type should the trader make to maximize profit?
Solution
Step 1: Define variables
- Let = number of type A baskets
- Let = number of type B baskets
Step 2: Formulate the objective function
We want to maximize profit:
Step 3: Formulate the constraints
- Mango constraint:
- Orange constraint:
- Non-negativity: ,
Step 4: Draw the graph and find the feasible region
Plot the lines:
The feasible region is the area that satisfies all constraints simultaneously.
Step 5: Find corner points
By solving the equations at the intersections, the corner points are:
- — from at
- — from intersection of both lines
- — from at
Step 6: Evaluate the objective function at each corner point
| Corner Point | |
|---|---|
Step 7: Select the optimal solution
The maximum profit is 90,000 TZS, which occurs at point .
Answer: The trader should make 12 baskets of type A and 10 baskets of type B to achieve the maximum profit of 90,000 TZS.
A school cafeteria wants to prepare a meal using two types of nutritious flour: Super flour and Value flour.
- Super flour costs 2,000 TZS per kilogram.
- Value flour costs 1,000 TZS per kilogram.
- The meal must contain at least 30 units of protein and at least 20 units of vitamins.
- Super flour provides 3 units of protein and 2 units of vitamins per kilogram.
- Value flour provides 1 unit of protein and 2 units of vitamins per kilogram.
How many kilograms of each flour should the cafeteria use to minimize cost while meeting the nutritional requirements?
Solution
Step 1: Define variables
- Let = kilograms of Super flour
- Let = kilograms of Value flour
Step 2: Formulate the objective function
We want to minimize cost:
Step 3: Formulate the constraints
- Protein:
- Vitamins: (or )
- Non-negativity: ,
Step 4–7: Solve graphically
The corner points of the feasible region are:
- — from at
- — from at
- — from the intersection of both constraint lines
Evaluate the cost at each point:
| Corner Point | |
|---|---|
Answer: The cafeteria should use 5 kg of Super flour and 5 kg of Value flour, spending 15,000 TZS while meeting both nutritional requirements.
- The feasible region is the intersection of all constraint regions.
- The optimal solution always occurs at a corner point of the feasible region.
- Always include non-negativity constraints (, ) in your formulation.
- Test each corner point in the objective function to find the maximum or minimum value.
- Linear programming helps make the best decision under limited resources.
In Tanzania, market vendors and small business owners frequently use linear programming without formal training. For example, a duka owner deciding how many bags of rice and beans to stock, given limited storage space and a fixed amount of capital, is essentially solving a linear programming problem to maximize profit while staying within their budget and storage constraints.
Swali
In linear programming, what is the feasible region?
Ingia ili kuwasilisha jibu lako na lihesabiwe katika umahiri wako.
Ingia ili kufanya mazoeziMwalimu
Umekwama? Niulize chochote kuhusu mada hii.
Ingia ili kumuuliza Mwalimu wa AI wa Sonza kuhusu swali hili.
Ingia ili kuuliza