12.1 Linear Programming Problems and Their Formulation
Every limit on a plan — hours, money, kilograms — is a linear inequality, and the graph of a linear inequality in two variables is a half-plane. Put the half-planes together and you have the feasible region of a linear programming problem.
A furniture workshop makes $x$ tables and $y$ chairs a week. Each table needs 3 hours at the carpentry bench and each chair 1 hour, and the bench is free for only 30 hours (illustrative numbers, used throughout this chapter). So whatever plan is chosen, it must satisfy $3x+y\le30$. That single sentence rules out infinitely many plans — 10 tables and 1 chair, for example — and keeps infinitely many others. Which plans survive? To see them at a glance we need the graph of an inequality in two variables, something Class 11 handled only for one variable on the number line.
This section builds that picture from scratch. The graph of a linear inequality turns out to be a half-plane — everything on one side of a straight line — and one test point tells you which side. With that tool we can state what a linear programming problem is: choose values of the decision variables to make a linear objective function as large or as small as possible, subject to linear constraints. Most of the work in a real problem is formulation — turning a paragraph of English into these inequalities — and the second half of the section is devoted to it. Solving the problems comes in Sections 12.2 and 12.3.
Linear Inequalities in Two Variables and Half-Planes
In Class 11 you solved inequalities such as $5-2x\ge11$ in one variable; the answer was an interval on the number line. With two variables the solutions are points $(x,y)$ of the coordinate plane, and the answer is a region.
A linear inequality in two variables is one of the forms $$ax+by\lt c,\qquad ax+by\le c,$$ $$ax+by\gt c,\qquad ax+by\ge c,$$ where $a,b,c$ are real numbers and $a,b$ are not both zero. A point $(x_0,y_0)$ is a solution if the inequality is true when $x=x_0,\ y=y_0$.
The line $ax+by=c$ is the boundary line of the inequality. It divides the plane into two parts, each called a half-plane. A half-plane together with its boundary line is closed (used for $\le$ and $\ge$; the line is drawn solid); without the line it is open (used for $\lt$ and $\gt$; the line is drawn dashed).
Why it is true. Suppose first that $b\gt0$. Take any point $(x_0,y_0)$ on $L$, so $ax_0+by_0=c$, and move straight up or down from it to $(x_0,\,y_0+t)$. There $$a x_0+b(y_0+t)=c+bt,$$ which is greater than $c$ when $t\gt0$ (above $L$) and less than $c$ when $t\lt0$ (below $L$). Every point of the plane lies directly above or below exactly one point of $L$ (since $b\ne0$, $L$ is not vertical), so all points above $L$ give $ax+by\gt c$ and all points below give $ax+by\lt c$. If $b\lt0$ the same calculation works with the roles of “above” and “below” exchanged. If $b=0$ then $a\ne0$, $L$ is the vertical line $x=\tfrac ca$, and the same argument works moving left and right instead. $\square$
So the sign of $ax+by-c$ can change only when you cross the boundary line. That is why one test point decides the whole side — the test point method.
- Draw the boundary line $ax+by=c$, most easily through its intercepts: put $y=0$ to get $\left(\tfrac ca,0\right)$ and $x=0$ to get $\left(0,\tfrac cb\right)$. Draw it solid for $\le$ or $\ge$, dashed for $\lt$ or $\gt$.
- Choose a test point not on the line — the origin $(0,0)$ is easiest, unless the line passes through it (that happens exactly when $c=0$); then use $(1,0)$ or $(0,1)$.
- Substitute. If the test point satisfies the inequality, shade the side containing it; if not, shade the other side.
- Check with a second point on the shaded side.
What Is a Linear Programming Problem?
Return to the workshop. Besides the carpentry bench, every piece goes through the polishing station: a table needs 1 hour there and a chair 2 hours, and the station is open 20 hours a week. Each table earns a profit of ₹600 and each chair ₹300 (all figures illustrative). The owner must decide how many of each to make. Written in symbols, with $x$ tables and $y$ chairs:
$$\text{Maximise } Z=600x+300y$$ $$\text{subject to}\quad 3x+y\le30,\qquad x+2y\le20,$$ $$x\ge0,\quad y\ge0.$$
The last two conditions say that the workshop cannot make a negative number of tables or chairs. They are easy to forget and they matter: without them the plan “$x=-5$, $y=12$” would pass the other two tests.
A linear programming problem (LPP) in two variables asks for the maximum or the minimum value of a linear function $$Z=ax+by,$$ ($a,b$ constants, not both zero), called the objective function, where the variables $x$ and $y$ — the decision variables — must satisfy a finite set of linear inequalities (or equations) called the constraints. The constraints $x\ge0,\ y\ge0$ are called the non-negative constraints.
“Linear” because the objective function and every constraint are of the first degree in $x$ and $y$; “programming” in its old sense of planning. Finding the largest or smallest value is called optimising $Z$.
A feasible solution is simply a plan that can be carried out; it need not be a good one. Making nothing at all, $(0,0)$, is feasible for the workshop, and earns nothing. The best feasible solutions — the optimal ones — are the subject of Section 12.2. Notice that “solution” here does not mean “answer”: it means any candidate point.
Formulating a Linear Programming Problem
A Board question on this chapter almost always begins with a paragraph about a factory, a farm, a diet or an investment. Turning that paragraph into an LPP is worth marks on its own, and a mistake here makes every later step wrong, however neatly it is done. Work slowly and use a table.
- Decision variables. Ask “what has to be decided?” and give each quantity a letter with its unit: “let $x$ be the number of bags of fertiliser $F_1$ bought”.
- Tabulate the data. One row per resource or requirement, one column per decision variable, and a last column for the amount available or required.
- Objective function. Write $Z$ (profit, cost, time…) in terms of $x$ and $y$, and say whether it is to be maximised or minimised.
- Constraints. Turn each row of the table into an inequality. “At most”, “not more than”, “available” give $\le$; “at least”, “not less than”, “required” give $\ge$.
- Non-negative constraints. Add $x\ge0,\ y\ge0$ (unless a stronger condition such as $x\ge10$ already implies one of them).
- Check units. Both sides of every constraint must be in the same unit — hours with hours, kilograms with kilograms.
| $F_1$ (per bag) | $F_2$ (per bag) | required | |
|---|---|---|---|
| nitrogen (kg) | 3 | 1 | at least 9 |
| phosphate (kg) | 1 | 2 | at least 8 |
| cost (₹) | 400 | 300 | minimise |
1. Shading the wrong side. Never guess from the look of the inequality (“$\le$ means below”). For $x-y\ge2$ the solutions lie below the line $y=x-2$ (the origin fails: $0\ge2$ is false). Always use a test point.
2. Reversing “at least” and “at most”. A requirement (“at least 9 kg”) gives $\ge$; a limit on a resource (“30 hours available”) gives $\le$.
3. Forgetting the non-negative constraints. Without them the region may spill into the other quadrants and include impossible plans with negative quantities.
4. Mixing units. If one cake needs 200 g of flour and 5 kg are available, write $200x+\dots\le5000$ (grams) — not $\le5$.
5. Ratios written backwards. “$y$ is at most twice $x$” is $y\le2x$. Test the sentence with a number before you write it.
6. Using non-linear expressions. Products such as $xy$, squares such as $x^2$ or quotients such as $\tfrac xy$ are not allowed in an LPP.
Exercises
- 1 $x+y\le5$
- 2 $2x-y\gt4$
- 3 $3x+4y\ge12$
- 4 $y\lt2x$
- 5 $x\le-1$
- 6 Is the point $(2,-1)$ a solution of $4x-3y\le10$?
- 7 Write the inequality whose graph is the closed half-plane on the origin side of the line through $(0,3)$ and $(4,0)$.
- 8 For which values of $k$ does the point $(k,2)$ lie in the half-plane $3x-2y\ge5$?
- 1 $x+y\le6,\ x\le4,\ x\ge0,\ y\ge0$
- 2 $2x+y\le8,\ x+2y\le10,\ x\ge0,\ y\ge0$
- 3 $x+y\ge4,\ x+3y\ge6,\ x\ge0,\ y\ge0$
- 4 $2x+3y\le6,\ x+y\ge4,\ x\ge0,\ y\ge0$
- 5 For the system of part 2, decide which of $(2,3)$, $(3,3)$, $(1,4.5)$ are feasible solutions.
- 6 Find constraints whose feasible region is the quadrilateral with corners $(0,0)$, $(6,0)$, $(4,3)$, $(0,4)$.
- 7 $x+2y\le10,\ x-y\le1,\ x\ge0,\ y\ge0$
Each constraint is evaluated at your point; one ✗ is enough to make the point infeasible. Values may be fractions such as 7/2.
- 1 Home bakery. A batch of muffins uses 2 kg of flour and 1 kg of sugar; a batch of cookies uses 1 kg of flour and 1 kg of sugar. There are 40 kg of flour and 25 kg of sugar in stock. A batch of muffins earns ₹500 and a batch of cookies ₹400. How many batches of each maximise the profit?
- 2 Cattle feed. 1 kg of feed P contains 2 units of protein and 1 unit of minerals; 1 kg of feed Q contains 1 unit of protein and 2 units of minerals. A cow needs at least 10 units of protein and 8 units of minerals a day. P costs ₹50 per kg and Q ₹40 per kg. Find the cheapest daily mix.
- 3 Weekend revision. Asha has at most 10 hours for revising Maths and Physics. She wants at least 4 hours of Maths, and at least half as much time on Physics as on Maths. She estimates that each hour of Maths gains her 6 marks and each hour of Physics 5 marks. Maximise her estimated gain.
- 4 Savings. A family can invest at most ₹1,00,000 in a fixed deposit paying 7% a year and in bonds paying 9% a year. They want at least ₹20,000 in the fixed deposit and at most ₹40,000 in bonds. Maximise the yearly interest.
- 5 Tailoring unit. A kurta takes 1 hour of cutting and 3 hours of stitching; a shirt takes 1 hour of cutting and 2 hours of stitching. Each week 40 cutting hours and 100 stitching hours are available, and an order requires at least 10 shirts. The profit is ₹250 per kurta and ₹200 per shirt. Maximise the weekly profit.
- 6 A student formulates Example 4 as “Minimise $Z=400x+300y$ subject to $3x+y\le9$, $x+2y\ge8$.” Find the two errors, and give a plan that the student's model wrongly accepts.
- 1 Which of these may appear in an LPP (as a constraint or as the objective function)? (a) $3x-2y\le7$ (b) $xy\le5$ (c) $x^2+y\ge1$ (d) $Z=4x-y$ (e) $|x|\le2$ (f) $Z=\dfrac xy$
- 2 Why can the origin not be used as the test point for $2x+5y\le0$? Graph the inequality using another test point.
- 3 Show that if $P(x_1,y_1)$ and $Q(x_2,y_2)$ both satisfy $ax+by\le c$, then so does every point $\big((1-t)x_1+tx_2,\ (1-t)y_1+ty_2\big)$ with $0\le t\le1$ — every point of the segment $PQ$. Deduce that a feasible region never has a “dent” (it is convex).
- 4 Describe the feasible region of $x+y\le3,\ x+y\ge3,\ x\ge0,\ y\ge0$.
- 5 For which values of $k$ is the feasible region of $x+y\le k,\ x\ge0,\ y\ge0$ (a) a triangle, (b) a single point, (c) empty?
How this is examined: linear programming is a Board-only chapter (it is not in the JEE Main or JEE Advanced syllabus). Expect 1-mark MCQs and Assertion–Reason items on half-planes, feasibility and corner points, a 3-mark formulation, and a case study that walks through formulating, testing a plan and listing corners before the solving step of Section 12.2.
E1. Board · 1 mark Which of the following points lies in the half-plane $2x+3y\le6$? (A) $(3,1)$ (B) $(1,1)$ (C) $(0,3)$ (D) $(2,1)$
E2. Board · 1 mark The number of corner points of the feasible region of $x+y\le4,\ x\le3,\ x\ge0,\ y\ge0$ is (A) $2$ (B) $3$ (C) $4$ (D) $5$
E3. Board · 1 mark Assertion–Reason. Assertion (A): $(0,0)$ is a feasible solution of the LPP with constraints $x+y\ge2$, $x\ge0$, $y\ge0$. Reason (R): a feasible solution must satisfy every constraint of the problem, including the non-negative constraints. (A) Both A and R are true and R is the correct explanation of A (B) Both A and R are true but R is not the correct explanation of A (C) A is true but R is false (D) A is false but R is true
E4. Board · 1 mark The corner points of the feasible region of $3x+2y\le12$, $x\ge0$, $y\ge0$ are (A) $(0,0),(4,0),(0,6)$ (B) $(0,0),(6,0),(0,4)$ (C) $(4,0),(0,6)$ only (D) $(0,0),(3,0),(0,2)$
E5. Board · 3 marks A shopkeeper stocks two kinds of school bag. Type A costs her ₹600 and type B ₹900; she can spend at most ₹36,000 and has room for at most 50 bags. She earns ₹100 on each type A bag and ₹120 on each type B bag (illustrative figures). Formulate an LPP to maximise her profit, and find the corner points of the feasible region.
E6. Board · Case study A school canteen makes veg rolls and sandwiches for the lunch break. A roll needs 2 minutes of preparation and 1 minute on the grill; a sandwich needs 1 minute of preparation and 1 minute on the grill. Each morning there are 100 minutes of preparation time and 70 minutes of grill time (illustrative figures). Let $x$ rolls and $y$ sandwiches be made. (i) Write the constraints. (2 marks) (ii) Is the plan of 20 rolls and 30 sandwiches feasible? What about 40 rolls and 30 sandwiches? (1 mark) (iii) Find the corner points of the feasible region. (1 mark)
Research question. What really limits a small local business — and can its daily decisions be written as a linear programming problem?
Why it matters. Large companies, Indian Railways and airlines solve LPPs with thousands of variables every day, but the first and hardest step is always the same as in this section: deciding what the variables are and which limits are real. A wrong constraint gives a confident, precise and useless answer.
What to do.
- Choose a small business you can observe or ask about — a tea stall, a tailor, a tiffin service, a school stationery shop — that makes or sells (at least) two products.
- Collect real data (with permission): the time, ingredients or money each unit uses, what is available per day, and the profit per unit. Record your sources; where you have to estimate, say so.
- Formulate an LPP with two decision variables and two or three constraints. Draw its feasible region on graph paper and list the corner points.
- Check your model against reality: is the owner's actual daily plan a feasible point? Which constraint is the owner closest to breaking?
Tools: Graph paper, a calculator, and optionally a free graphing tool such as GeoGebra to check the region.
Hand in: Your data table (with sources), the LPP, the graph with corner points, and a paragraph on one limit that your model leaves out (demand, weather, staff absence…) and how it might be added as a constraint.
Going further. Keep the model: in Section 12.2 you will find the corner that maximises profit and compare it with what the owner actually does.
🧪 Self-check quiz
Q1. To graph $3x-4y\lt12$ you draw the line $3x-4y=12$
Q2. Which of these cannot be a constraint of a linear programming problem?
Q3. For the constraints $2x+y\ge6$, $x+y\le4$, $x\ge0$, $y\ge0$, the point $(2,1)$ is
Q4. A transport company decides to run $x$ buses and $y$ vans. The non-negative constraints are
Q5. The feasible region of $x+y\ge2$, $x+y\le1$, $x\ge0$, $y\ge0$ is