Back to the on-screen lesson ·
Decision variables, a linear objective, one constraint per limit, and non-negativity.
Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.
By the end of this lesson you will be able to name the decision variables of a described problem with their units, write its objective as a linear combination of them, write one linear constraint for each resource or requirement, and say which quantities the linear language can hold and which it cannot.
You can read a system of linear inequalities in two or more unknowns, and you can solve a pair of linear equations. Everything here is built from those two abilities; what is new is deciding which inequalities to write down in the first place.
A decision variable is a number the plan gets to choose. The objective is the single linear quantity to be made as large or as small as possible. A constraint is a linear inequality or equation the plan must satisfy. A plan satisfying all of them is feasible; the best feasible plan is optimal.
A linear program chooses $x \ge 0$ to maximise or minimise $c^{T}x$ subject to $Ax \le b$. Formulating one is four questions asked in order. What is decided? Name each choice and give it a unit — chairs per week, litres of blend A, hours assigned to shift 3. What is being judged? Write it as a linear combination of the decisions. What limits the choice? One constraint per resource, per requirement and per balance, each with both sides in the same units. What is impossible? Non-negativity, because a plan cannot make minus four chairs.
The order matters. Writing the objective before naming the decisions is how a model ends up with a variable for something nobody chooses, and checking units in every constraint is what catches the row that compares kilograms with hours.
Another way: steps
Another way: example
A workshop makes chairs $x_1$ and tables $x_2$: profit $30x_1 + 50x_2$; wood $2x_1 + 5x_2 \le 100$; labour $3x_1 + 2x_2 \le 60$; $x \ge 0$. Four lines, and every number in them came from one sentence of the description.
The commonest error is making a variable out of something nobody decides — the flour in the store, the profit at the end of the week. Data belongs in coefficients and right-hand sides; consequences belong in the objective. The second commonest is a constraint whose two sides are in different units, which no solver will ever complain about and which makes every answer meaningless.
Two foods $x_1, x_2$ cost $2$ and $3$ a unit. The decisions are the two quantities, in units of food, and the objective is the cost $2x_1 + 3x_2$ to be minimised.
Decisions first, then the objective.
At least $8$ units of protein: $x_1 + 2x_2 \ge 8$. At least $10$ of energy: $3x_1 + x_2 \ge 10$.
A requirement is a $\ge$ constraint.
Add $x_1, x_2 \ge 0$ and the model is complete: two variables, two requirements, one objective.
Nothing is negative.
The decisions are $x$ trips on A and $y$ trips on B, and the objective is $6x + 9y$ to be maximised.
Decisions, then objective.
The one resource is time: $2x + 5y \le 40$, with $x, y \ge 0$.
A workshop makes $x$ chairs and $y$ tables. A chair takes $2$ units of wood and $4$ hours of labour; a table takes $5$ units of wood and $4$ hours. There are $22$ units of wood and $32$ hours available. Write the two constraint rows.
| Used per chair | Used per table | Available | |
|---|---|---|---|
| Wood | |||
| Labour |
Each chair earns $9$ and each table earns $2$. The plan makes $2$ chairs and $10$ tables. What is the profit?
Answer:
Select every quantity a linear program can hold as written.
This task has no paper form; do it on a device.
A bakery decides how many loaves and how many cakes to bake tomorrow. A loaf earns $4$ and a cake earns $3$. Which of these is a decision variable?
A factory chooses quantities for $3$ products, limited by $5$ resources. Complete the count.
The model has v decision variables and c resource constraints, and its objective adds t terms.
Opening the line at all costs a setup fee of $245$; after that each unit costs $5$. Producing nothing costs nothing. Fill in the total cost of each plan.
| Total cost | |
|---|---|
| Make nothing | |
| Make one unit | |
| Make $5$ units |
Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.
A workshop makes $x$ chairs and $y$ tables. A chair takes $5$ units of wood and $1$ hours of labour; a table takes $4$ units of wood and $2$ hours. There are $49$ units of wood and $28$ hours available. Write the two constraint rows.
| Used per chair | Used per table | Available | |
|---|---|---|---|
| Wood | |||
| Labour |
You can turn a described decision into decision variables, a linear objective and one constraint per limit. Say in your own words why a cost that jumps cannot be written as a linear function of the quantity produced.
7. Your turn: a haulier has $40$ hours of driving and earns $6$ a trip on route A and $9$ on route B, which take $2$ and $5$ hours, step 2