← 2026 Paper 2

UPSC 2026 Maths Optional Paper 2 Q4c — Step-by-Step Solution

20 marks · Section A

Simplex method (basic) · Linear Programming · asked 10× in 14 yrs · Read the full method →

Question

Solve the following linear programming problem by the Simplex method:

Maximize Z=4x1+10x2Z = 4x_1 + 10x_2

subject to the constraints

2x1+x2≤102x_1 + x_2 \leq 10 2x1+5x2≤202x_1 + 5x_2 \leq 20 2x1+3x2≤182x_1 + 3x_2 \leq 18 x1, x2≥0x_1,\, x_2 \geq 0

Obtain an alternate optimal solution, if it exists, with explanation.

Technique

All three constraints are ≤\le with non-negative right-hand sides, so slack variables alone give a ready-made feasible basis — no artificial variables, no Big-M, no two-phase. Run the Simplex table; the optimum arrives after one pivot. The alternate-optimum question is then decided by a single diagnostic: at optimality a non-basic variable with net evaluation cj−zj=0c_j-z_j=0 means the entering of that variable changes the vertex but not ZZ, so a second optimal basic feasible solution exists — pivot once more to produce it, and then report the set of optima, which is the whole segment joining the two vertices, not two isolated points. There is also a structural tell worth spotting before any tableau is written: Z=4x1+10x2=2(2x1+5x2)Z=4x_1+10x_2=2(2x_1+5x_2) is exactly twice the left side of the second constraint, so Z≤40Z\le 40 identically, with equality precisely when that constraint is tight.

Solution

Step 0 — Notation and convention (state it; the sign of the optimality test depends on it).

I use the net evaluation row Δj=cj−zj\Delta_j=c_j-z_j, where zj=cB B−1ajz_j=c_B\,B^{-1}a_j is the “imputed cost” of column jj. For a maximisation problem:

(A reader who prefers the zj−cjz_j-c_j convention simply reverses every sign: optimality is then zj−cj≥0z_j-c_j\ge0 and the entering variable is the most negative. Nothing else changes.)

Step 1 — Standard form.

Introduce slack variables s1,s2,s3≥0s_1,s_2,s_3\ge0, one per constraint. The problem becomes

Max Z=4x1+10x2+0⋅s1+0⋅s2+0⋅s3\text{Max } Z=4x_1+10x_2+0\cdot s_1+0\cdot s_2+0\cdot s_3

subject to

2x1+  x2+s1=102x1+5x2            +s2=202x1+3x2                        +s3=18x1,x2,s1,s2,s3≥0.\begin{aligned} 2x_1+\;x_2+s_1&=10\\ 2x_1+5x_2\;\;\;\;\;\;+s_2&=20\\ 2x_1+3x_2\;\;\;\;\;\;\;\;\;\;\;\;+s_3&=18\\ x_1,x_2,s_1,s_2,s_3&\ge0 . \end{aligned}

Since every right-hand side is non-negative, (s1,s2,s3)=(10,20,18)(s_1,s_2,s_3)=(10,20,18) with x1=x2=0x_1=x_2=0 is a basic feasible solution at once: the slack columns form an identity matrix. No artificial variables are needed.

Step 2 — Initial table (Table I).

cj→c_j\rightarrow441010000000
cBc_BBasisxBx_Bx1x_1x2x_2s1s_1s2s_2s3s_3Ratio xB/yi2x_B/y_{i2}
00s1s_11010221111000010/1=1010/1=10
00s2s_22020225\mathbf{5}00110020/5=4  ←20/5=\mathbf{4}\;\leftarrow
00s3s_31818223300001118/3=618/3=6
zjz_jZ=0Z=00000000000
cj−zjc_j-z_j44  ↑ 10\;\uparrow\,\mathbf{10}000000

cB=(0,0,0)c_B=(0,0,0), so zj=0z_j=0 for all jj and cj−zj=cjc_j-z_j=c_j.

Entering variable. c2−z2=10c_2-z_2=10 is the largest positive net evaluation ⇒\Rightarrow x2x_2 enters.

Leaving variable. Ratios xBi/yi2x_{Bi}/y_{i2} over yi2>0y_{i2}>0: 10/1=1010/1=10, 20/5=420/5=4, 18/3=618/3=6. The minimum is 44 in row 22 ⇒\Rightarrow s2s_2 leaves. Pivot element y22=5y_{22}=\mathbf 5.

Step 3 — Pivot 1   ⇒  \;\Rightarrow\; Table II.

Row operations: R2→R2/5R_2\to R_2/5; then R1→R1−1⋅R2newR_1\to R_1-1\cdot R_2^{\text{new}}, R3→R3−3⋅R2newR_3\to R_3-3\cdot R_2^{\text{new}}.

cj→c_j\rightarrow441010000000
cBc_BBasisxBx_Bx1x_1x2x_2s1s_1s2s_2s3s_3Ratio xB/yi1x_B/y_{i1}
00s1s_1668/5\mathbf{8/5}0011−1/5-1/5006÷85=15/4  ←6\div\frac85=\mathbf{15/4}\;\leftarrow
1010x2x_2442/52/511001/51/5004÷25=104\div\frac25=10
00s3s_3664/54/50000−3/5-3/5116÷45=15/26\div\frac45=15/2
zjz_jZ=40Z=40441010002200
cj−zjc_j-z_j0\mathbf{0}0000−2-200

Here cB=(0,10,0)c_B=(0,10,0) and zj=∑icBiyijz_j=\sum_i c_{Bi}y_{ij}; e.g. z1=0⋅85+10⋅25+0⋅45=4z_1=0\cdot\frac85+10\cdot\frac25+0\cdot\frac45=4 and z4=10⋅15=2z_4=10\cdot\frac15=2. The objective value is Z=cB⋅xB=0⋅6+10⋅4+0⋅6=40Z=c_B\cdot x_B=0\cdot6+10\cdot4+0\cdot6=40.

Optimality test. Every cj−zj≤0c_j-z_j\le0. Hence Table II is optimal:

x1=0,x2=4,s1=6, s2=0, s3=6,Zmax⁡=40.x_1=0,\quad x_2=4,\quad s_1=6,\ s_2=0,\ s_3=6,\qquad Z_{\max}=40 .

(All basic variables are strictly positive, so this optimal basic feasible solution is non-degenerate. That matters in Step 4.)

Step 4 — Does an alternate optimum exist? The diagnostic, stated as a rule.

Rule. At an optimal Simplex table, if some non-basic variable has net evaluation cj−zj=0c_j-z_j=\mathbf 0, then bringing it into the basis changes the basic feasible solution but leaves ZZ unchanged (the objective changes by (cj−zj)θ=0(c_j-z_j)\theta=0, where θ\theta is the entering value). Hence an alternate optimal basic feasible solution exists, and every convex combination of the two is optimal too. If instead cj−zj<0c_j-z_j<0 for every non-basic jj, the optimum is unique.

In Table II the non-basic variables are x1x_1 and s2s_2, with

c1−z1=0  (non-basic x1),c4−z4=−2<0  (non-basic s2).c_1-z_1=0\ \ (\text{non-basic }x_1),\qquad c_4-z_4=-2<0\ \ (\text{non-basic }s_2).

The zero at the non-basic column x1x_1 is exactly the signature above, so an alternate optimal solution exists. Moreover the table is non-degenerate and the entering value will be θ=15/4>0\theta=15/4>0, so the pivot genuinely moves to a different vertex — it is not the degenerate false alarm in which a zero cj−zjc_j-z_j merely relabels the same point.

Step 5 — Perform the extra pivot   ⇒  \;\Rightarrow\; Table III (the second optimal vertex).

Enter x1x_1. Minimum ratio test (column x1x_1, all entries positive): 6÷85=1546\div\frac85=\frac{15}{4}, 4÷25=104\div\frac25=10, 6÷45=1526\div\frac45=\frac{15}{2}. Minimum 154\frac{15}{4} in row 1 ⇒\Rightarrow s1s_1 leaves; pivot element 85\frac85.

Row operations: R1→58R1R_1\to\frac58R_1; then R2→R2−25R1newR_2\to R_2-\frac25R_1^{\text{new}}, R3→R3−45R1newR_3\to R_3-\frac45R_1^{\text{new}}.

cj→c_j\rightarrow441010000000
cBc_BBasisxBx_Bx1x_1x2x_2s1s_1s2s_2s3s_3
44x1x_115/415/411005/85/8−1/8-1/800
1010x2x_25/25/20011−1/4-1/41/41/400
00s3s_3330000−1/2-1/2−1/2-1/211
zjz_jZ=40Z=40441010002200
cj−zjc_j-z_j00000\mathbf{0}−2-200

Check of the new zjz_j: z3=4⋅58+10⋅(−14)+0=52−52=0z_3=4\cdot\frac58+10\cdot(-\frac14)+0=\frac52-\frac52=0, so c3−z3=0−0=0c_3-z_3=0-0=0; and z4=4⋅(−18)+10⋅14+0=−12+52=2z_4=4\cdot(-\frac18)+10\cdot\frac14+0=-\frac12+\frac52=2, so c4−z4=−2c_4-z_4=-2. The objective is

Z=4⋅154+10⋅52+0⋅3=15+25=40,Z=4\cdot\tfrac{15}{4}+10\cdot\tfrac52+0\cdot3=15+25=40 ,

unchanged, as the rule predicted. All cj−zj≤0c_j-z_j\le0, so this table is optimal as well. Note the mirror image of the diagnostic: now s1s_1 is non-basic with c3−z3=0c_3-z_3=0 — pivoting on it returns to Table II, confirming the two vertices are the endpoints of one optimal edge.

Second optimal basic feasible solution:

x1=154=3.75,x2=52=2.5,s1=0, s2=0, s3=3,Z=40.x_1=\tfrac{15}{4}=3.75,\quad x_2=\tfrac52=2.5,\quad s_1=0,\ s_2=0,\ s_3=3,\qquad Z=40 .

Feasibility check of this point in the original constraints: 2(3.75)+2.5=10≤102(3.75)+2.5=10\le10 (tight), 2(3.75)+5(2.5)=7.5+12.5=20≤202(3.75)+5(2.5)=7.5+12.5=20\le20 (tight), 2(3.75)+3(2.5)=7.5+7.5=15≤182(3.75)+3(2.5)=7.5+7.5=15\le18 (slack 33). ✓

Step 6 — The full set of optimal solutions (this, not two points, is the answer to “obtain an alternate optimal solution”).

The optimal set of an LP is a face of the feasible polyhedron, hence convex. Both

P1=(0,4)andP2=(154,52)P_1=(0,4)\quad\text{and}\quad P_2=\left(\tfrac{15}{4},\tfrac52\right)

are optimal with Z=40Z=40, so every convex combination of them is feasible (convexity of the feasible region) and gives

Z=4x1+10x2=λ⋅40+(1−λ)⋅40=40.Z=4x_1+10x_2=\lambda\cdot40+(1-\lambda)\cdot40=40 .

Therefore the complete solution set is the line segment

  (x1,x2)=λ (0,4)+(1−λ)(154,52)=(154(1−λ),  5+3λ2),0≤λ≤1,  \boxed{\;(x_1,x_2)=\lambda\,(0,4)+(1-\lambda)\left(\tfrac{15}{4},\tfrac52\right) =\left(\tfrac{15}{4}(1-\lambda),\;\tfrac{5+3\lambda}{2}\right),\qquad 0\le\lambda\le1,\;}

equivalently, in the more usable parametric form

x1=t,x2=4−25t,0≤t≤154,Z≡40.x_1=t,\qquad x_2=4-\tfrac25t,\qquad 0\le t\le\tfrac{15}{4},\qquad Z\equiv 40 .

(λ=1\lambda=1 recovers P1P_1; λ=0\lambda=0 recovers P2P_2; t=x1t=x_1.) The two basic feasible solutions found by the Simplex method are precisely the two end points of this segment; the infinitely many optimal points strictly between them are non-basic (they are not vertices), which is why the Simplex method can only ever produce the endpoints.

Step 7 — The structural reason (why the optimum had to be an edge, and an independent proof that Zmax⁡=40Z_{\max}=40).

The objective is an exact multiple of the second constraint’s left-hand side:

Z=4x1+10x2=2 (2x1+5x2).Z=4x_1+10x_2=2\,(2x_1+5x_2).

Hence for every feasible point,

Z=2(2x1+5x2)≤2⋅20=40,Z=2(2x_1+5x_2)\le 2\cdot 20=40 ,

with equality iff 2x1+5x2=202x_1+5x_2=20, i.e. iff the second constraint is tight (s2=0s_2=0). So:

Determining that feasible part: on the line, x2=4−25x1x_2=4-\frac25x_1, and

x2≥0  ⟺  x1≤10;x1≥0;x_2\ge0\iff x_1\le10;\qquad x_1\ge0; 2x1+x2≤10  ⟺  2x1+4−25x1≤10  ⟺  85x1≤6  ⟺  x1≤154;2x_1+x_2\le10\iff 2x_1+4-\tfrac25x_1\le10\iff \tfrac85x_1\le6\iff x_1\le\tfrac{15}{4}; 2x1+3x2≤18  ⟺  2x1+12−65x1≤18  ⟺  45x1≤6  ⟺  x1≤152.2x_1+3x_2\le18\iff 2x_1+12-\tfrac65x_1\le18\iff \tfrac45x_1\le6\iff x_1\le\tfrac{15}{2}.

The binding restriction is 0≤x1≤1540\le x_1\le\frac{15}{4} — precisely the segment of Step 6. This confirms the Simplex output completely and independently, and it explains the phenomenon: the objective line is parallel to (indeed coincident with) the boundary line of constraint 2, which is the geometric signature of alternate optima. In the table language, the parallelism shows up as the zero net evaluation on a non-basic column.

Two further structural observations worth one line each:

A sketch is optional here, and should be the first thing sacrificed. The question prescribes the Simplex method, so the tables carry the marks and the algebra of Step 7 already proves everything a picture could show — more sharply, in fact, since Z=2(2x1+5x2)≤40Z=2(2x_1+5x_2)\le40 is a proof and a drawing is not. If two minutes are genuinely spare after Steps 1–6, a small graph of the quadrilateral O(0,0)→A(5,0)→B(154,52)→C(0,4)O(0,0)\to A(5,0)\to B\left(\frac{15}{4},\frac52\right)\to C(0,4), with each vertex labelled by its coordinates and its ZZ value and with the optimal iso-profit line 4x1+10x2=404x_1+10x_2=40 drawn along the whole edge CBCB, makes the alternate optimum visible at a glance. Draw 2x1+3x2=182x_1+3x_2=18 too if you draw anything: its lying entirely outside the region is the redundancy claim. But do not start the graph before the second pivot is on the page.

Answer

  Optimum: Zmax⁡=40.First optimal BFS (Table II): x1=0, x2=4;s1=6, s2=0, s3=6.Alternate optimum exists because the non-basic variable x1 has c1−z1=0 at optimality.Second optimal BFS (Table III): x1=154, x2=52;s1=0, s2=0, s3=3;Z=40.Complete optimal set = the segment(x1,x2)=λ(0,4)+(1−λ) ⁣(154,52),  0≤λ≤1[i.e. x1=t, x2=4−25t, 0≤t≤154].Reason: Z=4x1+10x2=2(2x1+5x2)≤2(20)=40, equality iff 2x1+5x2=20;the objective line is coincident with the second constraint’s boundary, so the optimum is an edge, not a vertex.  \boxed{\; \begin{aligned} &\textbf{Optimum: } Z_{\max}=40 .\\[3pt] &\textbf{First optimal BFS (Table II): } x_1=0,\ x_2=4;\quad s_1=6,\ s_2=0,\ s_3=6 .\\[3pt] &\textbf{Alternate optimum exists}\ \text{because the non-basic variable } x_1 \text{ has } c_1-z_1=0 \text{ at optimality.}\\[3pt] &\textbf{Second optimal BFS (Table III): } x_1=\tfrac{15}{4},\ x_2=\tfrac52;\quad s_1=0,\ s_2=0,\ s_3=3;\quad Z=40 .\\[3pt] &\textbf{Complete optimal set } =\ \text{the segment}\\ &\qquad (x_1,x_2)=\lambda(0,4)+(1-\lambda)\!\left(\tfrac{15}{4},\tfrac52\right),\ \ 0\le\lambda\le1 \quad\Bigl[\text{i.e. } x_1=t,\ x_2=4-\tfrac25 t,\ 0\le t\le\tfrac{15}{4}\Bigr].\\[3pt] &\textbf{Reason: } Z=4x_1+10x_2=2(2x_1+5x_2)\le 2(20)=40,\ \text{equality iff } 2x_1+5x_2=20 ;\\ &\text{the objective line is coincident with the second constraint's boundary, so the optimum is an }\textbf{edge}\text{, not a vertex.} \end{aligned}\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 14 years, mapped. Get the take-away PDF free.