Why optimization — when do we need it
See how many of the 4 practice questions are done.
Tie the pieces together on a different case in the comprehensive review, and audit progress across every practice question.
To close out, we redo the whole flow on a different case whose coefficients differ from the running example. If you can solve this, you should now understand the procedure itself — not just remember the original answers.
| Item | Content |
|---|---|
| Objective | maximize z = 7x + 4y |
| Constraint 1 | x + y ≤ 8 |
| Constraint 2 | 2x + y ≤ 10 |
| Non-negativity | x ≥ 0, y ≥ 0 |
Recap in the same order: compute intersections → score vertices → change coefficients and trigger alternate optima.
In the comprehensive review we consider the following LP.
maximize z = 7x + 4ysubject to x + y ≤ 82x + y ≤ 10x ≥ 0, y ≥ 0First, find the intersection of the boundary lines x + y = 8 and 2x + y = 10.
Subtracting the first equation from the second gives (2x + y) - (x + y) = 10 - 8, so x = 2. Substituting back into x + y = 8 gives y = 6.
Using the intersection (2, 6) from the previous question, compute the objective z = 7x + 4y.
7×2 + 4×6 = 14 + 24 = 38.
What value does the objective z = 7x + 4y take at the vertex (5, 0)?
7×5 + 4×0 = 35. Always compare the axis vertices as well, not only intersections.
For the comprehensive-review standard objective z = 7x + 4y, enter the coordinates of the optimal vertex.
Comparing the objective at each vertex gives (0,0)→0, (5,0)→35, (2,6)→38, (0,8)→32, so the optimum is (2,6).
Keeping the feasible region the same, change the objective to maximize z = 10x + 5y. Choose the type of optimum and enter the optimal value.
10x + 5y = 5(2x + y), which is parallel to the constraint 2x + y ≤ 10. So the entire segment from (5,0) to (2,6) attains z = 50.
Here is a chapter-by-chapter view of your progress. Chapters with all questions correct are highlighted in green.
See how many of the 4 practice questions are done.
See how many of the 5 practice questions are done.
See how many of the 5 practice questions are done.
See how many of the 5 practice questions are done.
See how many of the 4 practice questions are done.
See how many of the 4 practice questions are done.
See how many of the 5 practice questions are done.
0 / 32 correct
This course is an introduction that takes you through "diagrams → hand calculation → code" entirely in two variables. Use the following as a map for stepping into more practical or more advanced material.
| Topic | How it relates to this course |
|---|---|
| The simplex method | With three or more variables, the "enumerate every vertex" strategy of this course explodes combinatorially. The simplex method walks the vertices of the feasible region one step at a time toward the optimum, and is the foundation of modern general-purpose LP solvers. |
| Duality | "How much does the objective improve if you relax a constraint by one unit?" — the concept of a shadow price. The mathematical underpinning for the intuitions you noticed when looking at slack and active constraints. |
| Integer programming (IP / MIP) | An extension where some variables must be integers (for example, lot counts can only be whole numbers). The answers differ from the continuous LP solution and the problems are dramatically harder to solve. |
| Nonlinear programming | Optimization with quadratic or higher-degree terms like x² or xy. Needed when you want to express scale economies or congestion costs. |
| Practical solvers | In Python: scipy.optimize.linprog, PuLP, cvxpy; commercially, Gurobi or CPLEX. Hand the variables, objective, and constraints to one of these instead of the toy solver, and thousands of variables become tractable. |
Move on to the next step while the feel of two variables is still fresh. Abstract algorithms become much easier to read when you can match them to "the thing the diagram was doing".