1-D LP: Max p·x s.t. x ∈ [0, M]
Linear Programming · Class XII
A single-variable LP. The optimum sits at an endpoint of the feasible interval , see which one.
- Max value20
- Optimal x*10
- Min value0
- Objective y = p x
Formulas in this lab
- Max value
- Optimal x*
- Min value
Frequently asked questions
▶What is the simplest linear programming problem?
Maximize $z = px$ subject to $0 \le x \le M$. If $p > 0$, optimum is at $x = M$ with value $pM$. If $p < 0$, optimum is at $x = 0$ with value $0$. The maximum always sits at a corner of the feasible interval.
▶How do I use the 1-D LP lab?
Slide the objective slope $p$ and the upper bound $M$. The lab returns the max value $\max(0, pM)$ and the optimal $x^*$. Try $p = 2$, $M = 10$: max is $20$ at $x^* = 10$. Flip $p$ to $-2$ and the optimum jumps to $x^* = 0$.
▶Why is the optimum always at a corner in LP?
Linear objectives on a convex feasible region (a polygon) achieve max and min at vertices. This is the corner-point theorem and is the basis of the simplex method. In 1-D the corners are just the two endpoints, making the principle crystal-clear.
▶Where is LP used in real life?
Diet planning: minimize cost subject to vitamin requirements. Production planning: maximize profit subject to machine hours. Indian Railways uses LP for train scheduling and crew assignment. Practising 1-D LP builds intuition for the higher-dimensional cases on JEE.