Menu Close

Linear programming: graphical and simplex methods: UPSC Maths Optional PYQ Solutions (2009–2026)

All 30 questions UPSC has asked on linear programming: graphical and simplex methods in the Mathematics Optional (Paper II, Linear Programming) from 2009 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Linear Programming topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the answer was worked out again independently with a linear-programming solver (SciPy/HiGHS), with the simplex tables recomputed in exact fractions.
  • ✓ Proof checked step by step for “prove that” questions, every step was checked against the definitions.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 1e 2026 · 4c 2025 · 1e 2024 · 1e 2023 · 1e 2023 · 3c 2022 · 1e 2022 · 3c 2021 · 4c 2020 · 1e 2020 · 3b 2019 · 1e 2019 · 3b 2018 · 1e 2018 · 2b 2018 · 3c 2017 · 1e 2017 · 3c 2016 · 1e 2016 · 2c 2015 · 3c 2015 · 4c 2014 · 1e 2014 · 4c 2013 · 1e 2013 · 4c 2012 · 1d 2011 · 1d 2009 · 1f 2009 · 4b

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Solve the dual problem of the following linear programming problem by the graphical method : Minimize Y=10y1+6y2+2y3+y4 subject to the constraints : y1+y2+y3+y4≥22y1+y2−y3−2y4≥1y1,y2,y3,y4≥0

2026 · Paper II · Q1e · 10 marks

Solution

The problem has 4 variables but only 2 constraints, so its dual has 2 variables and can be drawn.

Dual. With dual variables x1,x2≥0x_1,x_2\ge0 for the two ≥\ge constraints: Maximize W=2x1+x2\text{Maximize } W=2x_1+x_2 subject to x1+2x2≤10x1+x2≤6x1−x2≤2x1−2x2≤1x1,x2≥0.\begin{aligned}&x_1+2x_2\le10\\ &x_1+x_2\le6\\ &x_1-x_2\le2\\ &x_1-2x_2\le1\\ &x_1,x_2\ge0.\end{aligned}

Graphical solution. Draw the four lines x1+2x2=10x_1+2x_2=10, x1+x2=6x_1+x_2=6, x1−x2=2x_1-x_2=2, x1−2x2=1x_1-2x_2=1. The feasible region is the polygon on the origin side of all four lines, in the first quadrant. Its corner points come from intersecting neighbouring lines:

Corner Lines meeting W=2x1+x2W=2x_1+x_2
O(0,0)O(0,0) axes 00
A(1,0)A(1,0) x2=0x_2=0, x1−2x2=1x_1-2x_2=1 22
B(3,1)B(3,1) x1−2x2=1x_1-2x_2=1, x1−x2=2x_1-x_2=2 77
C(4,2)C(4,2) x1−x2=2x_1-x_2=2, x1+x2=6x_1+x_2=6 𝟏𝟎\mathbf{10}
D(2,4)D(2,4) x1+x2=6x_1+x_2=6, x1+2x2=10x_1+2x_2=10 88
E(0,5)E(0,5) x1+2x2=10x_1+2x_2=10, x1=0x_1=0 55

So the dual optimum is Wmax=10W_{\max}=10 at x1=4,x2=2x_1=4,\ x_2=2.

Back to the original problem. By the duality theorem, Ymin=Wmax=10Y_{\min}=W_{\max}=10. Complementary slackness gives the primal solution:

  • At CC, x1+2x2=8<10x_1+2x_2=8<10 and x1−2x2=0<1x_1-2x_2=0<1, so y1=0y_1=0 and y4=0y_4=0.
  • x1,x2>0x_1,x_2>0, so both primal constraints hold with equality: y2+y3=2y_2+y_3=2 and y2−y3=1y_2-y_3=1.

Hence y2=32,y3=12y_2=\tfrac32,\ y_3=\tfrac12 and Ymin=6⋅32+2⋅12=10at (y1,y2,y3,y4)=(0,32,12,0).\begin{aligned}&Y_{\min}=6\cdot\tfrac32+2\cdot\tfrac12=10\\ &\text{at } (y_1,y_2,y_3,y_4)=\left(0,\tfrac32,\tfrac12,0\right).\end{aligned}

✓ Checked by computer We checked by computer: an LP solver gives maxW=10\max W=10 at (4,2)(4,2) for the dual and minY=10\min Y=10 for the original problem.

↑ Back to the question list

Solve the following linear programming problem by the Simplex method : Maximize Z=4x1+10x2 subject to the constraints 2x1+x2≤102x1+5x2≤202x1+3x2≤18x1,x2≥0 Obtain an alternate optimal solution, if it exists, with explanation.

2026 · Paper II · Q4c · 20 marks

Solution

Add slack variables s1,s2,s3≥0s_1,s_2,s_3\ge0: 2x1+x2+s1=102x1+5x2+s2=202x1+3x2+s3=18.\begin{aligned}&2x_1+x_2+s_1=10\\ &2x_1+5x_2+s_2=20\\ &2x_1+3x_2+s_3=18.\end{aligned} In each table Δj=zj−cj\Delta_j=z_j-c_j; the most negative Δj\Delta_j enters and the least non-negative ratio xB/aijx_B/a_{ij} leaves.

Initial table — x2x_2 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 55 in bold.

Basis cB xB x1 x2 s1 s2 s3 Ratio
cj 4 10 0 0 0
s1 0 10 2 1 1 0 0 10
s2 0 20 2 5 0 1 0 4
s3 0 18 2 3 0 0 1 6
Δj 0 −4 −10 0 0 0

Table 2 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj 4 10 0 0 0
s1 0 6 8/5 0 1 −1/5 0
x2 10 4 2/5 1 0 1/5 0
s3 0 6 4/5 0 0 −3/5 1
Δj 40 0 0 0 2 0

So x1=0,x2=4x_1=0,\ x_2=4, Zmax=40Z_{\max}=40.

Alternate optimum. In the optimal table the non-basic variable x1x_1 has Δ1=0\Delta_1=0. Bringing it into the basis cannot change ZZ, so a different optimal vertex exists (the objective 4x1+10x2=2(2x1+5x2)4x_1+10x_2=2(2x_1+5x_2) is parallel to the second constraint).

Table 3 — x1x_1 is non-basic with Δj=0\Delta_j=0; bringing it in: x1x_1 enters, s1s_1 leaves (least ratio); pivot 8/58 / 5 in bold.

Basis cB xB x1 x2 s1 s2 s3 Ratio
cj 4 10 0 0 0
s1 0 6 8/5 0 1 −1/5 0 15/4
x2 10 4 2/5 1 0 1/5 0 10
s3 0 6 4/5 0 0 −3/5 1 15/2
Δj 40 0 0 0 2 0

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj 4 10 0 0 0
x1 4 15/4 1 0 5/8 −1/8 0
x2 10 5/2 0 1 −1/4 1/4 0
s3 0 3 0 0 −1/2 −1/2 1
Δj 40 0 0 0 2 0

This gives the alternate optimal solution x1=154,x2=52x_1=\tfrac{15}{4},\ x_2=\tfrac52, again with Z=40Z=40.

Every point of the segment joining (0,4)(0,4) and (154,52)\left(\tfrac{15}{4},\tfrac52\right) is optimal: x1=154λx2=4−32λ0≤λ≤1Zmax=40.\begin{aligned}&x_1=\tfrac{15}{4}\lambda\\ &x_2=4-\tfrac32\lambda\\ &0\le\lambda\le1\\ &Z_{\max}=40.\end{aligned}

✓ Checked by computer We checked by computer: an LP solver gives Zmax=40Z_{\max}=40; both (0,4)(0,4) and (154,52)\left(\tfrac{15}{4},\tfrac52\right) give Z=40Z=40 and satisfy all constraints.

↑ Back to the question list

How many basic solutions are there for the following system of equations? 2x1−x2+3x3+x4=64x1−2x2−x3+2x4=10 Find all of them. Furthermore, find the number of basic solutions, which are feasible/non-feasible/non-degenerate.

2025 · Paper II · Q1e · 10 marks

Solution

There are 2 equations in 4 unknowns. A basic solution sets 4−2=24-2=2 variables to zero and solves for the other two, provided their columns are linearly independent. So there are at most (42)=6\binom42=6 basic solutions.

The columns are a1=(2,4)a_1=(2,4), a2=(−1,−2)a_2=(-1,-2), a3=(3,−1)a_3=(3,-1), a4=(1,2)a_4=(1,2). Since a2=−12a1a_2=-\tfrac12a_1 and a4=12a1a_4=\tfrac12a_1, any pair taken from a1,a2,a4a_1,a_2,a_4 is linearly dependent and gives no basic solution.

Basic variables Equations Solution (x1,x2,x3,x4)(x_1,x_2,x_3,x_4) Type
x1,x2x_1,x_2 singular — —
x1,x3x_1,x_3 2x1+3x3=6,4x1−x3=102x_1+3x_3=6,\ 4x_1-x_3=10 (187,0,27,0)\left(\tfrac{18}{7},0,\tfrac27,0\right) feasible, non-degenerate
x1,x4x_1,x_4 singular — —
x2,x3x_2,x_3 −x2+3x3=6,−2x2−x3=10-x_2+3x_3=6,\ -2x_2-x_3=10 (0,−367,27,0)\left(0,-\tfrac{36}{7},\tfrac27,0\right) infeasible (x2<0x_2<0), non-degenerate
x2,x4x_2,x_4 singular — —
x3,x4x_3,x_4 3x3+x4=6,−x3+2x4=103x_3+x_4=6,\ -x_3+2x_4=10 (0,0,27,367)\left(0,0,\tfrac27,\tfrac{36}{7}\right) feasible, non-degenerate

(For example, with x1,x3x_1,x_3 basic: from 4x1−x3=104x_1-x_3=10, x3=4x1−10x_3=4x_1-10; then 2x1+12x1−30=62x_1+12x_1-30=6 gives x1=187x_1=\tfrac{18}{7}, x3=27x_3=\tfrac27.)

Summary. There are 3 basic solutions:

  • 2 are feasible: (187,0,27,0)\left(\tfrac{18}{7},0,\tfrac27,0\right) and (0,0,27,367)\left(0,0,\tfrac27,\tfrac{36}{7}\right).
  • 1 is non-feasible: (0,−367,27,0)\left(0,-\tfrac{36}{7},\tfrac27,0\right).
  • All 3 are non-degenerate, since no basic variable is zero.

✓ Checked by computer We checked by computer: the three non-singular 2×22\times2 bases were solved exactly, and the other three are singular.

↑ Back to the question list

Use two phase method to solve the following linear programming problem : Maximize z=x1+2x2 subject to x1−x2≥32x1+x2≤10x1,x2≥0

2024 · Paper II · Q1e · 10 marks

Solution

Write the constraints with surplus s1s_1, slack s2s_2 and an artificial variable A1A_1: x1−x2−s1+A1=32x1+x2+s2=10.\begin{aligned}&x_1-x_2-s_1+A_1=3\\ &2x_1+x_2+s_2=10.\end{aligned}

Phase I. Maximize z*=−A1z^*=-A_1 (that is, drive the artificial variable to zero).

Initial table — x1x_1 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 11 in bold.

Basis cB xB x1 x2 s1 s2 A1 Ratio
cj 0 0 0 0 −1
A1 −1 3 1 −1 −1 0 1 3
s2 0 10 2 1 0 1 0 5
Δj −3 −1 1 1 0 0

Table 2 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2
cj 0 0 0 0
x1 0 3 1 −1 −1 0
s2 0 4 0 3 2 1
Δj 0 0 0 0 0

Phase I ends with z*=0z^*=0 and A1A_1 out of the basis, so the problem is feasible. Drop the A1A_1 column.

Phase II. Restore the original objective z=x1+2x2z=x_1+2x_2.

Table 3 — x2x_2 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 33 in bold.

Basis cB xB x1 x2 s1 s2 Ratio
cj 1 2 0 0
x1 1 3 1 −1 −1 0 –
s2 0 4 0 3 2 1 4/3
Δj 3 0 −3 −1 0

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2
cj 1 2 0 0
x1 1 13/3 1 0 −1/3 1/3
x2 2 4/3 0 1 2/3 1/3
Δj 7 0 0 1 1

Optimal solution: x1=133,x2=43x_1=\tfrac{13}{3},\ x_2=\tfrac43, zmax=133+83=7\ z_{\max}=\tfrac{13}{3}+\tfrac83=7.

✓ Checked by computer We checked by computer: an LP solver gives zmax=7z_{\max}=7 at (133,43)\left(\tfrac{13}{3},\tfrac43\right).

↑ Back to the question list

A person requires 24, 24 and 20 units of chemicals A, B and C respectively for his garden. Product P contains 2, 4 and 1 units of chemicals A, B and C respectively per jar and product Q contains 2, 1 and 5 units of chemicals A, B and C respectively per jar. If a jar of P costs ₹ 30 and a jar of Q costs ₹ 50, then how many jars of each should be purchased in order to minimize the cost and meet the requirements?

2023 · Paper II · Q1e · 10 marks

Solution

Let xx = number of jars of PP and yy = number of jars of QQ.

Minimize C=30x+50y\text{Minimize } C=30x+50y subject to 2x+2y≥24(chemical A)4x+y≥24(chemical B)x+5y≥20(chemical C)x,y≥0.\begin{aligned}2x+2y&\ge24 &&\text{(chemical A)}\\ 4x+y&\ge24 &&\text{(chemical B)}\\ x+5y&\ge20 &&\text{(chemical C)}\\ x,y&\ge0.\end{aligned}

Graphical solution. The feasible region lies on the far side (away from the origin) of the three lines x+y=12x+y=12, 4x+y=244x+y=24, x+5y=20x+5y=20. It is unbounded, but the costs are positive, so the minimum is at a corner point:

Corner Lines meeting C=30x+50yC=30x+50y
(0,24)(0,24) x=0x=0, 4x+y=244x+y=24 12001200
(4,8)(4,8) 4x+y=244x+y=24, x+y=12x+y=12 520520
(10,2)(10,2) x+y=12x+y=12, x+5y=20x+5y=20 𝟒𝟎𝟎\mathbf{400}
(20,0)(20,0) x+5y=20x+5y=20, y=0y=0 600600

Answer. Buy 10 jars of PP and 2 jars of QQ; the minimum cost is ₹400. (Check: A =24=24, B =42≥24=42\ge24, C =20=20.)

✓ Checked by computer We checked by computer: an LP solver gives minimum cost ₹400 at P=10,Q=2P=10,\ Q=2.

↑ Back to the question list

Solve the following linear programming problem by Big M method : Minimize Z=2x1+3x2 subject to x1+x2≥9x1+2x2≥152x1−3x2≤9x1,x2≥0 Is the optimal solution unique? Justify your answer.

2023 · Paper II · Q3c · 20 marks

Solution

Since this is a minimisation, we maximise Z′=−Z=−2x1−3x2Z'=-Z=-2x_1-3x_2. Add surplus s1,s2s_1,s_2, slack s3s_3 and artificial A1,A2A_1,A_2 (cost −M-M each, MM very large): x1+x2−s1+A1=9x1+2x2−s2+A2=152x1−3x2+s3=9.\begin{aligned}&x_1+x_2-s_1+A_1=9\\ &x_1+2x_2-s_2+A_2=15\\ &2x_1-3x_2+s_3=9.\end{aligned} An artificial variable that leaves the basis is dropped.

Initial table — x2x_2 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 s1 s2 s3 A1 A2 Ratio
cj −2 −3 0 0 0 −M −M
A1 −M 9 1 1 −1 0 0 1 0 9
A2 −M 15 1 2 0 −1 0 0 1 15/2
s3 0 9 2 −3 0 0 1 0 0 –
Δj −24M −2M + 2 −3M + 3 M M 0 0 0

Table 2 — x1x_1 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 1/21 / 2 in bold.

Basis cB xB x1 x2 s1 s2 s3 A1 Ratio
cj −2 −3 0 0 0 −M
A1 −M 3/2 1/2 0 −1 1/2 0 1 3
x2 −3 15/2 1/2 1 0 −1/2 0 0 15
s3 0 63/2 7/2 0 0 −3/2 1 0 9
Δj −3M/2 − 45/2 −M/2 + 1/2 0 M −M/2 + 3/2 0 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj −2 −3 0 0 0
x1 −2 3 1 0 −2 1 0
x2 −3 6 0 1 1 −1 0
s3 0 21 0 0 7 −5 1
Δj −24 0 0 1 1 0

Optimal solution: x1=3,x2=6x_1=3,\ x_2=6, and Zmin=−Z′max=24Z_{\min}=-Z'_{\max}=24.

Is it unique? Yes. In the optimal table the non-basic variables s1,s2s_1,s_2 have Δj=1>0\Delta_j=1>0. No non-basic variable has Δj=0\Delta_j=0, so no other vertex gives the same value. Graphically, the corners of the (unbounded) feasible region are (0,9)(0,9), (3,6)(3,6) and (9,3)(9,3), with Z=27,24,27Z=27,\ 24,\ 27; only (3,6)(3,6) gives 24.

✓ Checked by computer We checked by computer: an LP solver gives Zmin=24Z_{\min}=24 at (3,6)(3,6); the other corners (0,9)(0,9) and (9,3)(9,3) give 27.

↑ Back to the question list

Use two-phase method to solve the following linear programming problem : Minimize Z=x1+x2 subject to 2x1+x2≥4x1+7x2≥7x1,x2≥0

2022 · Paper II · Q1e · 10 marks

Solution

Write the constraints with surplus s1,s2s_1,s_2 and artificial A1,A2A_1,A_2: 2x1+x2−s1+A1=4x1+7x2−s2+A2=7.\begin{aligned}&2x_1+x_2-s_1+A_1=4\\ &x_1+7x_2-s_2+A_2=7.\end{aligned}

Phase I. Maximize Z*=−A1−A2Z^*=-A_1-A_2.

Initial table — x2x_2 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 77 in bold.

Basis cB xB x1 x2 s1 s2 A1 A2 Ratio
cj 0 0 0 0 −1 −1
A1 −1 4 2 1 −1 0 1 0 4
A2 −1 7 1 7 0 −1 0 1 1
Δj −11 −3 −8 1 1 0 0

Table 2 — x1x_1 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 13/713 / 7 in bold.

Basis cB xB x1 x2 s1 s2 A1 Ratio
cj 0 0 0 0 −1
A1 −1 3 13/7 0 −1 1/7 1 21/13
x2 0 1 1/7 1 0 −1/7 0 7
Δj −3 −13/7 0 1 −1/7 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2
cj 0 0 0 0
x1 0 21/13 1 0 −7/13 1/13
x2 0 10/13 0 1 1/13 −2/13
Δj 0 0 0 0 0

Z*=0Z^*=0 with both artificials out, so the problem is feasible. Drop A1,A2A_1,A_2.

Phase II. Maximize Z′=−Z=−x1−x2Z'=-Z=-x_1-x_2, starting from the final Phase I basis.

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2
cj −1 −1 0 0
x1 −1 21/13 1 0 −7/13 1/13
x2 −1 10/13 0 1 1/13 −2/13
Δj −31/13 0 0 6/13 1/13

Optimal solution: x1=2113,x2=1013x_1=\tfrac{21}{13},\ x_2=\tfrac{10}{13}, Zmin=3113\ Z_{\min}=\tfrac{31}{13}.

✓ Checked by computer We checked by computer: an LP solver gives Zmin=3113Z_{\min}=\tfrac{31}{13} at (2113,1013)\left(\tfrac{21}{13},\tfrac{10}{13}\right).

↑ Back to the question list

Solve the following linear programming problem by the simplex method. Write its dual. Also, write the optimal solution of the dual from the optimal table of the given problem : Maximize Z=x1+x2+x3 subject to 2x1+x2+x3≤24x1+2x2+x3≤2x1,x2,x3≥0

2022 · Paper II · Q3c · 15 marks

Solution

Add slacks s1,s2≥0s_1,s_2\ge0: 2x1+x2+x3+s1=2,4x1+2x2+x3+s2=2\ 2x_1+x_2+x_3+s_1=2,\ \ 4x_1+2x_2+x_3+s_2=2. When several Δj\Delta_j tie, we take the first.

Initial table — x1x_1 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 44 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 1 1 1 0 0
s1 0 2 2 1 1 1 0 1
s2 0 2 4 2 1 0 1 1/2
Δj 0 −1 −1 −1 0 0

Table 2 — x3x_3 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 1/21 / 2 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 1 1 1 0 0
s1 0 1 0 0 1/2 1 −1/2 2
x1 1 1/2 1 1/2 1/4 0 1/4 2
Δj 1/2 0 −1/2 −3/4 0 1/4

Table 3 — x2x_2 enters (most negative Δj\Delta_j), x1x_1 leaves (least ratio); pivot 1/21 / 2 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 1 1 1 0 0
x3 1 2 0 0 1 2 −1 –
x1 1 0 1 1/2 0 −1/2 1/2 0
Δj 2 0 −1/2 0 3/2 −1/2

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2
cj 1 1 1 0 0
x3 1 2 0 0 1 2 −1
x2 1 0 2 1 0 −1 1
Δj 2 1 0 0 1 0

Optimal solution: x1=0,x2=0,x3=2x_1=0,\ x_2=0,\ x_3=2, Zmax=2\ Z_{\max}=2. (The basic variable x2x_2 is zero, so this solution is degenerate. It is still the only optimum: from the second constraint, x1+x2+x3≤2−3x1−x2≤2x_1+x_2+x_3\le 2-3x_1-x_2\le2, with equality only at (0,0,2)(0,0,2).)

Dual. With dual variables w1,w2w_1,w_2: Minimize W=2w1+2w2\text{Minimize } W=2w_1+2w_2 subject to 2w1+4w2≥1w1+2w2≥1w1+w2≥1w1,w2≥0.\begin{aligned}&2w_1+4w_2\ge1\\ &w_1+2w_2\ge1\\ &w_1+w_2\ge1\\ &w_1,w_2\ge0.\end{aligned}

Dual solution from the optimal table. The optimal dual values are the Δj\Delta_j of the starting slack columns: w1=Δs1=1w_1=\Delta_{s_1}=1, w2=Δs2=0w_2=\Delta_{s_2}=0. Then Wmin=2⋅1+2⋅0=2=ZmaxW_{\min}=2\cdot1+2\cdot0=2=Z_{\max}, as the duality theorem requires.

✓ Checked by computer We checked by computer: an LP solver gives Zmax=2Z_{\max}=2 at (0,0,2)(0,0,2) and Wmin=2W_{\min}=2 for the dual.

↑ Back to the question list

Solve the following linear programming problem using Big M method : Maximize Z=4x1+5x2+2x3 subject to 2x1+x2+x3≥10x1+3x2+x3≤12x1+x2+x3=6x1,x2,x3≥0

2021 · Paper II · Q4c · 15 marks

Solution

Add surplus s1s_1, slack s2s_2 and artificial variables A1,A2A_1,A_2 (cost −M-M): 2x1+x2+x3−s1+A1=10x1+3x2+x3+s2=12x1+x2+x3+A2=6\begin{aligned}2x_1+x_2+x_3-s_1+A_1&=10\\ x_1+3x_2+x_3+s_2&=12\\ x_1+x_2+x_3+A_2&=6\end{aligned} An artificial variable that leaves the basis is dropped.

Initial table — x1x_1 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 s1 s2 A1 A2 Ratio
cj 4 5 2 0 0 −M −M
A1 −M 10 2 1 1 −1 0 1 0 5
s2 0 12 1 3 1 0 1 0 0 12
A2 −M 6 1 1 1 0 0 0 1 6
Δj −16M −3M − 4 −2M − 5 −2M − 2 M 0 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 1/21 / 2 in bold.

Basis cB xB x1 x2 x3 s1 s2 A2 Ratio
cj 4 5 2 0 0 −M
x1 4 5 1 1/2 1/2 −1/2 0 0 10
s2 0 7 0 5/2 1/2 1/2 1 0 14/5
A2 −M 1 0 1/2 1/2 1/2 0 1 2
Δj −M + 20 0 −M/2 − 3 −M/2 −M/2 − 2 0 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2
cj 4 5 2 0 0
x1 4 4 1 0 0 −1 0
s2 0 2 0 0 −2 −2 1
x2 5 2 0 1 1 1 0
Δj 26 0 0 3 1 0

Optimal solution: x1=4,x2=2,x3=0x_1=4,\ x_2=2,\ x_3=0, Zmax=16+10=26\ Z_{\max}=16+10=26.

✓ Checked by computer We checked by computer: an LP solver gives Zmax=26Z_{\max}=26 at (4,2,0)(4,2,0).

↑ Back to the question list

UPSC maintenance section has purchased sufficient number of curtain cloth pieces to meet the curtain requirement of its building. The length of each piece is 17 feet. The requirement according to curtain length is as follows : Curtain length (in feet)Number required570094007300 The width of all curtains is same as that of available pieces. Form a linear programming problem in standard form that decides the number of pieces cut in different ways so that the total trim loss is minimum. Also give a basic feasible solution to it.

2020 · Paper II · Q1e · 10 marks

Solution

Cutting patterns. A 17 ft piece can be cut into aa pieces of 5 ft, bb of 9 ft and cc of 7 ft if 5a+9b+7c≤175a+9b+7c\le17. We keep only patterns whose leftover (trim) is shorter than 5 ft, since otherwise another curtain could still be cut:

Pattern 5 ft 9 ft 7 ft Length used Trim loss (ft)
P1P_1 3 0 0 15 2
P2P_2 2 0 1 17 0
P3P_3 1 1 0 14 3
P4P_4 0 1 1 16 1
P5P_5 0 0 2 14 3

Variables. xjx_j = number of pieces cut by pattern PjP_j (j=1,…,5j=1,\dots,5).

Constraints. The requirements must be met. Write s1,s2,s3≥0s_1,s_2,s_3\ge0 for the extra curtains cut beyond the requirement: 3x1+2x2+x3−s1=700(5 ft)x3+x4−s2=400(9 ft)x2+x4+2x5−s3=300(7 ft)\begin{aligned}3x_1+2x_2+x_3-s_1&=700 &&(5\text{ ft})\\ x_3+x_4-s_2&=400 &&(9\text{ ft})\\ x_2+x_4+2x_5-s_3&=300 &&(7\text{ ft})\end{aligned}

Objective. Extra curtains are also wasted cloth, so the total trim loss is Minimize Z=2x1+3x3+x4+3x5+5s1+9s2+7s3,\begin{aligned}\text{Minimize } Z={}&2x_1+3x_3+x_4+3x_5\\&+5s_1+9s_2+7s_3,\end{aligned} with all xj,si≥0x_j,s_i\ge0. This is the LPP in standard form (equality constraints, non-negative variables).

A basic feasible solution. Take x2,x3,s1x_2,x_3,s_1 as basic and set the rest to zero. The second equation gives x3=400x_3=400, the third gives x2=300x_2=300, and the first gives s1=600+400−700=300s_1=600+400-700=300. So x2=300x3=400s1=300all other variables 0.\begin{aligned}&x_2=300\\ &x_3=400\\ &s_1=300\\ &\text{all other variables }0.\end{aligned} The columns of x2,x3,s1x_2,x_3,s_1 are independent (their determinant is 11) and all values are ≥0\ge0, so this is a basic feasible solution. Its trim loss is Z=3(400)+5(300)=2700Z=3(400)+5(300)=2700 ft.

✓ Checked by computer We checked by computer: every pattern was checked against 5a+9b+7c≤175a+9b+7c\le17, and the basic feasible solution satisfies all three equations.

↑ Back to the question list

Solve the linear programming problem using simplex method : Minimize z=−6x1−2x2−5x3 subject to 2x1−3x2+x3≤14−4x1+4x2+10x3≤462x1+2x2−4x3≤37x1≥2,x2≥1,x3≥3

2020 · Paper II · Q3b · 15 marks

Solution

Remove the lower bounds. Put x1=y1+2,x2=y2+1,x3=y3+3x_1=y_1+2,\ x_2=y_2+1,\ x_3=y_3+3 with y1,y2,y3≥0y_1,y_2,y_3\ge0. The constraints become 2y1−3y2+y3≤10−4y1+4y2+10y3≤202y1+2y2−4y3≤43\begin{aligned}2y_1-3y_2+y_3&\le10\\ -4y_1+4y_2+10y_3&\le20\\ 2y_1+2y_2-4y_3&\le43\end{aligned} and z=−6y1−2y2−5y3−29z=-6y_1-2y_2-5y_3-29. Minimising zz is the same as maximising Z′=6y1+2y2+5y3(then z=−Z′−29).\begin{aligned}&Z'=6y_1+2y_2+5y_3\\ &(\text{then } z=-Z'-29).\end{aligned} Add slacks s1,s2,s3s_1,s_2,s_3.

Initial table — y1y_1 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 22 in bold.

Basis cB xB y1 y2 y3 s1 s2 s3 Ratio
cj 6 2 5 0 0 0
s1 0 10 2 −3 1 1 0 0 5
s2 0 20 −4 4 10 0 1 0 –
s3 0 43 2 2 −4 0 0 1 43/2
Δj 0 −6 −2 −5 0 0 0

Table 2 — y2y_2 enters (most negative Δj\Delta_j), s3s_3 leaves (least ratio); pivot 55 in bold.

Basis cB xB y1 y2 y3 s1 s2 s3 Ratio
cj 6 2 5 0 0 0
y1 6 5 1 −3/2 1/2 1/2 0 0 –
s2 0 40 0 −2 12 2 1 0 –
s3 0 33 0 5 −5 −1 0 1 33/5
Δj 30 0 −11 −2 3 0 0

Table 3 — y3y_3 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 1010 in bold.

Basis cB xB y1 y2 y3 s1 s2 s3 Ratio
cj 6 2 5 0 0 0
y1 6 149/10 1 0 −1 1/5 0 3/10 –
s2 0 266/5 0 0 10 8/5 1 2/5 133/25
y2 2 33/5 0 1 −1 −1/5 0 1/5 –
Δj 513/5 0 0 −13 4/5 0 11/5

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB y1 y2 y3 s1 s2 s3
cj 6 2 5 0 0 0
y1 6 1011/50 1 0 0 9/25 1/10 17/50
y3 5 133/25 0 0 1 4/25 1/10 1/25
y2 2 298/25 0 1 0 −1/25 1/10 6/25
Δj 4294/25 0 0 0 72/25 13/10 68/25

So y1=101150,y2=29825,y3=13325y_1=\tfrac{1011}{50},\ y_2=\tfrac{298}{25},\ y_3=\tfrac{133}{25} and Z′max=429425Z'_{\max}=\tfrac{4294}{25}. Returning to xx: x1=111150=22.22x2=32325=12.92x3=20825=8.32,\begin{aligned}&x_1=\tfrac{1111}{50}=22.22\\ &x_2=\tfrac{323}{25}=12.92\\ &x_3=\tfrac{208}{25}=8.32,\end{aligned} zmin=−429425−29=−501925=−200.76.z_{\min}=-\tfrac{4294}{25}-29=-\tfrac{5019}{25}=-200.76 . (All three constraints are tight at this point.)

✓ Checked by computer We checked by computer: an LP solver with the bounds x1≥2,x2≥1,x3≥3x_1\ge2,\ x_2\ge1,\ x_3\ge3 gives zmin=−501925=−200.76z_{\min}=-\tfrac{5019}{25}=-200.76 at the same point.

↑ Back to the question list

Use graphical method to solve the linear programming problem. Maximize Z=3x1+2x2 subject to x1−x2≥1,x1+x3≥3 and x1,x2,x3≥0

2019 · Paper II · Q1e · 10 marks

Solution

As printed, the second constraint is x1+x3≥3x_1+x_3\ge3, and x3x_3 does not appear in ZZ. Whatever value x1x_1 takes, we can choose x3≥3x_3\ge3, so that constraint never binds. The problem reduces to Maximize Z=3x1+2x2subject tox1−x2≥1x1,x2≥0.\begin{aligned}&\text{Maximize } Z=3x_1+2x_2\\ &\text{subject to}\\ &x_1-x_2\ge1\\ &x_1,x_2\ge0.\end{aligned}

Graph. The feasible region is the part of the first quadrant below the line x1−x2=1x_1-x_2=1, i.e. on the side away from the origin. It contains the points (t,0)(t,0) for every t≥1t\ge1, so it is unbounded in the direction of increasing x1x_1.

Along these points Z=3t→∞Z=3t\to\infty. So ZZ has no finite maximum: the solution is unbounded.

(If the second constraint is read as x1+x2≥3x_1+x_2\ge3, the conclusion is the same: (t,0)(t,0) is feasible for all t≥3t\ge3, and Z=3tZ=3t grows without limit.)

✓ Checked by computer We checked by computer: an LP solver reports the problem unbounded, both as printed and with x1+x2≥3x_1+x_2\ge3.

↑ Back to the question list

Solve the linear programming problem using Simplex method. Minimize Z=x1+2x2−3x3−2x4 subject to x1+2x2−3x3+x4=4x1+2x2+x3+2x4=4 and x1,x2,x3,x4≥0

2019 · Paper II · Q3b · 15 marks

Solution

Maximise Z′=−Z=−x1−2x2+3x3+2x4Z'=-Z=-x_1-2x_2+3x_3+2x_4. Both constraints are equations, so add artificial variables A1,A2A_1,A_2 (cost −M-M): x1+2x2−3x3+x4+A1=4x1+2x2+x3+2x4+A2=4.\begin{aligned}&x_1+2x_2-3x_3+x_4+A_1=4\\ &x_1+2x_2+x_3+2x_4+A_2=4.\end{aligned} An artificial variable that leaves the basis is dropped.

Initial table — x2x_2 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 x4 A1 A2 Ratio
cj −1 −2 3 2 −M −M
A1 −M 4 1 2 −3 1 1 0 2
A2 −M 4 1 2 1 2 0 1 2
Δj −8M −2M + 1 −4M + 2 2M − 3 −3M − 2 0 0

Table 2 — x3x_3 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 44 in bold.

Basis cB xB x1 x2 x3 x4 A2 Ratio
cj −1 −2 3 2 −M
x2 −2 2 1/2 1 −3/2 1/2 0 –
A2 −M 0 0 0 4 1 1 0
Δj −4 0 0 −4M −M − 3 0

Table 3 — x4x_4 enters (most negative Δj\Delta_j), x3x_3 leaves (least ratio); pivot 1/41 / 4 in bold.

Basis cB xB x1 x2 x3 x4 Ratio
cj −1 −2 3 2
x2 −2 2 1/2 1 0 7/8 16/7
x3 3 0 0 0 1 1/4 0
Δj −4 0 0 0 −3

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 x4
cj −1 −2 3 2
x2 −2 2 1/2 1 −7/2 0
x4 2 0 0 0 4 1
Δj −4 0 0 12 0

Optimal solution: x1=0,x2=2,x3=0,x4=0x_1=0,\ x_2=2,\ x_3=0,\ x_4=0 (x4x_4 is basic at zero, so the solution is degenerate), and Zmin=−Z′max=4.Z_{\min}=-Z'_{\max}=4 .

Other optima. The non-basic x1x_1 has Δ1=0\Delta_1=0, so the optimum is not unique. In fact, subtracting the two equations gives 4x3+x4=04x_3+x_4=0, so x3=x4=0x_3=x_4=0 for every feasible point. The problem is then just x1+2x2=4x_1+2x_2=4, on which Z=x1+2x2=4Z=x_1+2x_2=4 everywhere. Every feasible solution, e.g. (4,0,0,0)(4,0,0,0) or (2,1,0,0)(2,1,0,0), is optimal with Z=4Z=4.

✓ Checked by computer We checked by computer: an LP solver gives Zmin=4Z_{\min}=4; the points (0,2,0,0)(0,2,0,0) and (4,0,0,0)(4,0,0,0) both give Z=4Z=4.

↑ Back to the question list

An agricultural firm has 180 tons of nitrogen fertilizer, 250 tons of phosphate and 220 tons of potash. It will be able to sell a mixture of these substances in their respective ratio 3:3:4 at a profit of Rs. 1500 per ton and a mixture in the ratio 2:4:2 at a profit of Rs. 1200 per ton. Pose a linear programming problem to show how many tons of these two mixtures should be prepared to obtain the maximum profit.

2018 · Paper II · Q1e · 10 marks

Solution

Let x1x_1 = tons of mixture I (ratio 3:3:43:3:4) and x2x_2 = tons of mixture II (ratio 2:4:22:4:2).

One ton of mixture I contains 310\tfrac{3}{10} t nitrogen, 310\tfrac{3}{10} t phosphate and 410\tfrac{4}{10} t potash. One ton of mixture II contains 28=14\tfrac28=\tfrac14 t nitrogen, 48=12\tfrac48=\tfrac12 t phosphate and 14\tfrac14 t potash.

LPP. Maximize Z=1500x1+1200x2\text{Maximize } Z=1500x_1+1200x_2 subject to 0.3x1+0.25x2≤180(nitrogen)0.3x1+0.5x2≤250(phosphate)0.4x1+0.25x2≤220(potash)x1,x2≥0.\begin{aligned}0.3x_1+0.25x_2&\le180 &&\text{(nitrogen)}\\ 0.3x_1+0.5x_2&\le250 &&\text{(phosphate)}\\ 0.4x_1+0.25x_2&\le220 &&\text{(potash)}\\ x_1,x_2&\ge0 .\end{aligned} (Multiplying through, these are 6x1+5x2≤36006x_1+5x_2\le3600, 3x1+5x2≤25003x_1+5x_2\le2500, 8x1+5x2≤44008x_1+5x_2\le4400.)

Its solution (for completeness). The feasible region is bounded by the three lines and the axes. Its corner points are:

Corner Lines meeting ZZ (Rs)
(0,0)(0,0) axes 00
(550,0)(550,0) potash, x2=0x_2=0 8,25,0008{,}25{,}000
(400,240)(400,240) potash, nitrogen 𝟖,𝟖𝟖,𝟎𝟎𝟎\mathbf{8{,}88{,}000}
(11003,280)(\tfrac{1100}{3},280) nitrogen, phosphate 8,86,0008{,}86{,}000
(0,500)(0,500) phosphate, x1=0x_1=0 6,00,0006{,}00{,}000

So the firm should prepare 400 tons of mixture I and 240 tons of mixture II, for a maximum profit of Rs 8,88,000.

✓ Checked by computer We checked by computer: an LP solver gives 400 t and 240 t, profit Rs 8,88,000.

↑ Back to the question list

Solve the following linear programming problem by Big M-method and show that the problem has finite optimal solutions. Also find the value of the objective function : Minimize z=3x1+5x2 subject to x1+2x2≥83x1+2x2≥125x1+6x2≤60,x1,x2≥0.

2018 · Paper II · Q2b · 20 marks

Solution

Maximise z′=−z=−3x1−5x2z'=-z=-3x_1-5x_2. Add surplus s1,s2s_1,s_2, slack s3s_3 and artificial A1,A2A_1,A_2 (cost −M-M): x1+2x2−s1+A1=83x1+2x2−s2+A2=125x1+6x2+s3=60.\begin{aligned}&x_1+2x_2-s_1+A_1=8\\ &3x_1+2x_2-s_2+A_2=12\\ &5x_1+6x_2+s_3=60.\end{aligned} An artificial variable that leaves the basis is dropped.

Initial table — x1x_1 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 33 in bold.

Basis cB xB x1 x2 s1 s2 s3 A1 A2 Ratio
cj −3 −5 0 0 0 −M −M
A1 −M 8 1 2 −1 0 0 1 0 8
A2 −M 12 3 2 0 −1 0 0 1 4
s3 0 60 5 6 0 0 1 0 0 12
Δj −20M −4M + 3 −4M + 5 M M 0 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 4/34 / 3 in bold.

Basis cB xB x1 x2 s1 s2 s3 A1 Ratio
cj −3 −5 0 0 0 −M
A1 −M 4 0 4/3 −1 1/3 0 1 3
x1 −3 4 1 2/3 0 −1/3 0 0 6
s3 0 40 0 8/3 0 5/3 1 0 15
Δj −4M − 12 0 −4M/3 + 3 M −M/3 + 1 0 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj −3 −5 0 0 0
x2 −5 3 0 1 −3/4 1/4 0
x1 −3 2 1 0 1/2 −1/2 0
s3 0 32 0 0 2 1 1
Δj −21 0 0 9/4 1/4 0

All Δj≥0\Delta_j\ge0 with no artificial variable left in the basis, so the problem has a finite optimal solution: x1=2x2=3zmin=−z′max=3(2)+5(3)=21.\begin{aligned}&x_1=2\\ &x_2=3\\ &z_{\min}=-z'_{\max}=3(2)+5(3)=21.\end{aligned} (The feasible region is bounded above by 5x1+6x2≤605x_1+6x_2\le60, so zz cannot run off to infinity in either direction.) The solution is unique, since the non-basic variables s1,s2s_1,s_2 have Δj>0\Delta_j>0.

✓ Checked by computer We checked by computer: an LP solver gives zmin=21z_{\min}=21 at (2,3)(2,3).

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

How many basic solutions are there in the following linearly independent set of equations ? Find all of them. 2x1−x2+3x3+x4=64x1−2x2−x3+2x4=10.

2018 · Paper II · Q3c · 15 marks

Solution

This is the same system as in 2025 (Q1e). With 2 equations and 4 unknowns there are at most (42)=6\binom42=6 basic solutions, one for each choice of two basic variables.

The columns are a1=(2,4)a_1=(2,4), a2=(−1,−2)a_2=(-1,-2), a3=(3,−1)a_3=(3,-1), a4=(1,2)a_4=(1,2). Since a2=−12a1a_2=-\tfrac12a_1 and a4=12a1a_4=\tfrac12a_1, the pairs {x1,x2}\{x_1,x_2\}, {x1,x4}\{x_1,x_4\}, {x2,x4}\{x_2,x_4\} are linearly dependent and give no basic solution. The other three pairs give:

Basic variables Solution (x1,x2,x3,x4)(x_1,x_2,x_3,x_4) Nature
x1,x3x_1,x_3 (187,0,27,0)\left(\tfrac{18}{7},0,\tfrac27,0\right) basic feasible, non-degenerate
x2,x3x_2,x_3 (0,−367,27,0)\left(0,-\tfrac{36}{7},\tfrac27,0\right) basic, not feasible
x3,x4x_3,x_4 (0,0,27,367)\left(0,0,\tfrac27,\tfrac{36}{7}\right) basic feasible, non-degenerate

(For x1,x3x_1,x_3: 2x1+3x3=62x_1+3x_3=6 and 4x1−x3=104x_1-x_3=10 give x1=187x_1=\tfrac{18}{7}, x3=27x_3=\tfrac27. For x3,x4x_3,x_4: 3x3+x4=63x_3+x_4=6 and −x3+2x4=10-x_3+2x_4=10 give x3=27x_3=\tfrac27, x4=367x_4=\tfrac{36}{7}.)

So there are 3 basic solutions, of which 2 are feasible.

✓ Checked by computer We checked by computer: the three non-singular 2×22\times2 bases were solved exactly, and the other three are singular.

↑ Back to the question list

Using graphical method, find the maximum value of 2x+y subject to 4x+3y≤124x+y≤84x−y≤8x,y≥0.

2017 · Paper II · Q1e · 10 marks

Solution

Draw the lines 4x+3y=124x+3y=12, 4x+y=84x+y=8, 4x−y=84x-y=8 in the first quadrant. The feasible region is the polygon on the origin side of all three. Its corner points are:

Corner Lines meeting 2x+y2x+y
(0,0)(0,0) axes 00
(2,0)(2,0) y=0y=0, 4x+y=84x+y=8 (also on 4x−y=84x-y=8) 44
(32,2)\left(\tfrac32,2\right) 4x+y=84x+y=8, 4x+3y=124x+3y=12 𝟓\mathbf5
(0,4)(0,4) x=0x=0, 4x+3y=124x+3y=12 44

(The constraint 4x−y≤84x-y\le8 only touches the region at (2,0)(2,0), so it is redundant.)

Maximum value of 2x+y2x+y is 5, at x=32,y=2x=\tfrac32,\ y=2.

✓ Checked by computer We checked by computer: an LP solver gives the maximum 5 at (1.5,2)(1.5,2).

↑ Back to the question list

Solve the following linear programming problem by simplex method : Maximize z=3x1+5x2+4x3 subject to 2x1+3x2≤82x2+5x3≤103x1+2x2+4x3≤15x1,x2,x3≥0.

2017 · Paper II · Q3c · 20 marks

Solution

Add slacks s1,s2,s3s_1,s_2,s_3: 2x1+3x2+s1=82x2+5x3+s2=103x1+2x2+4x3+s3=15.\begin{aligned}&2x_1+3x_2+s_1=8\\ &2x_2+5x_3+s_2=10\\ &3x_1+2x_2+4x_3+s_3=15.\end{aligned}

Initial table — x2x_2 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 33 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
s1 0 8 2 3 0 1 0 0 8/3
s2 0 10 0 2 5 0 1 0 5
s3 0 15 3 2 4 0 0 1 15/2
Δj 0 −3 −5 −4 0 0 0

Table 2 — x3x_3 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 55 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
x2 5 8/3 2/3 1 0 1/3 0 0 –
s2 0 14/3 −4/3 0 5 −2/3 1 0 14/15
s3 0 29/3 5/3 0 4 −2/3 0 1 29/12
Δj 40/3 1/3 0 −4 5/3 0 0

Table 3 — x1x_1 enters (most negative Δj\Delta_j), s3s_3 leaves (least ratio); pivot 41/1541 / 15 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
x2 5 8/3 2/3 1 0 1/3 0 0 4
x3 4 14/15 −4/15 0 1 −2/15 1/5 0 –
s3 0 89/15 41/15 0 0 −2/15 −4/5 1 89/41
Δj 256/15 −11/15 0 0 17/15 4/5 0

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2 s3
cj 3 5 4 0 0 0
x2 5 50/41 0 1 0 15/41 8/41 −10/41
x3 4 62/41 0 0 1 −6/41 5/41 4/41
x1 3 89/41 1 0 0 −2/41 −12/41 15/41
Δj 765/41 0 0 0 45/41 24/41 11/41

Optimal solution: x1=8941x2=5041x3=6241zmax=76541≈18.66.\begin{aligned}&x_1=\tfrac{89}{41}\\ &x_2=\tfrac{50}{41}\\ &x_3=\tfrac{62}{41}\\ &z_{\max}=\tfrac{765}{41}\approx18.66.\end{aligned} (Check: 2x1+3x2=32841=82x_1+3x_2=\tfrac{328}{41}=8, 2x2+5x3=41041=102x_2+5x_3=\tfrac{410}{41}=10, 3x1+2x2+4x3=61541=153x_1+2x_2+4x_3=\tfrac{615}{41}=15.)

✓ Checked by computer We checked by computer: an LP solver gives zmax=76541z_{\max}=\tfrac{765}{41} at (8941,5041,6241)\left(\tfrac{89}{41},\tfrac{50}{41},\tfrac{62}{41}\right).

↑ Back to the question list

Find the maximum value of 5x+2y with constraints x+2y≥1,2x+y≤1,x≥0 and y≥0 by graphical method.

2016 · Paper II · Q1e · 10 marks

Solution

Draw x+2y=1x+2y=1 and 2x+y=12x+y=1. The feasible region lies on or above the first line, on or below the second, and in the first quadrant. It is the triangle with corners:

Corner Lines meeting 5x+2y5x+2y
(0,12)\left(0,\tfrac12\right) x=0x=0, x+2y=1x+2y=1 11
(0,1)(0,1) x=0x=0, 2x+y=12x+y=1 22
(13,13)\left(\tfrac13,\tfrac13\right) x+2y=1x+2y=1, 2x+y=12x+y=1 𝟕𝟑\mathbf{\tfrac73}

Maximum value is 73\tfrac73, at x=13,y=13x=\tfrac13,\ y=\tfrac13.

✓ Checked by computer We checked by computer: an LP solver gives the maximum 73\tfrac73 at (13,13)\left(\tfrac13,\tfrac13\right).

↑ Back to the question list

Maximize z=2x1+3x2+6x3 subject to 2x1+x2+x3≤53x2+2x3≤6x1≥0,x2≥0,x3≥0. Is the optimal solution unique ? Justify your answer.

2016 · Paper II · Q2c · 20 marks

Solution

Add slacks s1,s2s_1,s_2: 2x1+x2+x3+s1=5,3x2+2x3+s2=6\ 2x_1+x_2+x_3+s_1=5,\ \ 3x_2+2x_3+s_2=6.

Initial table — x3x_3 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 2 3 6 0 0
s1 0 5 2 1 1 1 0 5
s2 0 6 0 3 2 0 1 3
Δj 0 −2 −3 −6 0 0

Table 2 — x1x_1 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 2 3 6 0 0
s1 0 2 2 −1/2 0 1 −1/2 1
x3 6 3 0 3/2 1 0 1/2 –
Δj 18 −2 6 0 0 3

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2
cj 2 3 6 0 0
x1 2 1 1 −1/4 0 1/2 −1/4
x3 6 3 0 3/2 1 0 1/2
Δj 20 0 11/2 0 1 5/2

Optimal solution: x1=1,x2=0,x3=3x_1=1,\ x_2=0,\ x_3=3, zmax=2+18=20\ z_{\max}=2+18=20.

Uniqueness. In the optimal table the non-basic variables are x2,s1,s2x_2,s_1,s_2, with Δj=112,1,52\Delta_j=\tfrac{11}{2},\,1,\,\tfrac52, all strictly positive. Bringing any of them into the basis would lower zz. So no other basic feasible solution is optimal, and the optimal solution is unique.

✓ Checked by computer We checked by computer: an LP solver gives zmax=20z_{\max}=20 at (1,0,3)(1,0,3).

↑ Back to the question list

Consider the following linear programming problem : Maximize Z=x1+2x2−3x3+4x4subject tox1+x2+2x3+3x4=12x2+2x3+x4=8x1,x2,x3,x4≥0 (i) Using the definition, find its all basic solutions. Which of these are degenerate basic feasible solutions and which are non-degenerate basic feasible solutions? (ii) Without solving the problem, show that it has an optimal solution. Which of the basic feasible solution(s) is/are optimal?

2015 · Paper II · Q3c · 20 marks

Solution

(i) Basic solutions. Two equations in four unknowns: choose 2 basic variables (at most (42)=6\binom42=6 ways), set the other two to zero and solve.

Basic variables Solution (x1,x2,x3,x4)(x_1,x_2,x_3,x_4) Nature ZZ
x1,x2x_1,x_2 (4,8,0,0)(4,8,0,0) BFS, non-degenerate 2020
x1,x3x_1,x_3 (4,0,4,0)(4,0,4,0) BFS, non-degenerate −8-8
x1,x4x_1,x_4 (−12,0,0,8)(-12,0,0,8) not feasible —
x2,x3x_2,x_3 columns (1,1),(2,2)(1,1),(2,2) dependent no basic solution —
x2,x4x_2,x_4 (0,6,0,2)(0,6,0,2) BFS, non-degenerate 2020
x3,x4x_3,x_4 (0,0,3,2)(0,0,3,2) BFS, non-degenerate −1-1

So there are 5 basic solutions. Four are basic feasible solutions, all non-degenerate (no basic variable is zero). There is no degenerate basic feasible solution.

(ii) An optimum exists. From the second equation, x2,x3,x4≤8x_2,x_3,x_4\le8. Then from the first equation, x1≤12x_1\le12. So the feasible set is non-empty (e.g. (4,8,0,0)(4,8,0,0)) and bounded, and a linear function attains its maximum on a non-empty, closed, bounded convex polyhedron. Hence an optimal solution exists, and some basic feasible solution is optimal.

Comparing the four BFS, Zmax=20Z_{\max}=20, attained at both (4,8,0,0)(4,8,0,0) and (0,6,0,2)(0,6,0,2). So these two BFS are optimal, and so is every point on the segment joining them.

✓ Checked by computer We checked by computer: all six 2×22\times2 bases were solved exactly, and an LP solver gives Zmax=20Z_{\max}=20.

↑ Back to the question list

Solve the following linear programming problem by the simplex method. Write its dual. Also, write the optimal solution of the dual from the optimal table of the given problem : Maximize Z=2x1−4x2+5x3subject tox1+4x2−2x3≤2−x1+2x2+3x3≤1x1,x2,x3≥0

2015 · Paper II · Q4c · 20 marks

Solution

Add slacks s1,s2s_1,s_2: x1+4x2−2x3+s1=2,−x1+2x2+3x3+s2=1\ x_1+4x_2-2x_3+s_1=2,\ \ -x_1+2x_2+3x_3+s_2=1.

Initial table — x3x_3 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 33 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 2 −4 5 0 0
s1 0 2 1 4 −2 1 0 –
s2 0 1 −1 2 3 0 1 1/3
Δj 0 −2 4 −5 0 0

Table 2 — x1x_1 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 1/31 / 3 in bold.

Basis cB xB x1 x2 x3 s1 s2 Ratio
cj 2 −4 5 0 0
s1 0 8/3 1/3 16/3 0 1 2/3 8
x3 5 1/3 −1/3 2/3 1 0 1/3 –
Δj 5/3 −11/3 22/3 0 0 5/3

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2
cj 2 −4 5 0 0
x1 2 8 1 16 0 3 2
x3 5 3 0 6 1 1 1
Δj 31 0 66 0 11 9

Optimal solution: x1=8,x2=0,x3=3x_1=8,\ x_2=0,\ x_3=3, Zmax=16+15=31\ Z_{\max}=16+15=31.

Dual. With dual variables y1,y2≥0y_1,y_2\ge0: Minimize W=2y1+y2\text{Minimize } W=2y_1+y_2 subject to y1−y2≥24y1+2y2≥−4−2y1+3y2≥5y1,y2≥0.\begin{aligned}&y_1-y_2\ge2\\ &4y_1+2y_2\ge-4\\ &-2y_1+3y_2\ge5\\ &y_1,y_2\ge0.\end{aligned}

Dual solution from the optimal table. The dual values are the Δj\Delta_j under the starting slack columns: y1=Δs1=11y_1=\Delta_{s_1}=11, y2=Δs2=9y_2=\Delta_{s_2}=9. Then Wmin=2(11)+9=31=Zmax.W_{\min}=2(11)+9=31=Z_{\max}. (Check: 11−9=211-9=2, 44+18=62≥−444+18=62\ge-4, −22+27=5-22+27=5.)

✓ Checked by computer We checked by computer: an LP solver gives Zmax=31Z_{\max}=31 at (8,0,3)(8,0,3) and Wmin=31W_{\min}=31 at (11,9)(11,9) for the dual.

↑ Back to the question list

Solve graphically : Maximize Z=6x1+5x2 subject to 2x1+x2≤16x1+x2≤11x1+2x2≥65x1+6x2≤90x1,x2≥0

2014 · Paper II · Q1e · 10 marks

Solution

Draw 2x1+x2=162x_1+x_2=16, x1+x2=11x_1+x_2=11, x1+2x2=6x_1+2x_2=6, 5x1+6x2=905x_1+6x_2=90 in the first quadrant. The region lies below the first two lines, above x1+2x2=6x_1+2x_2=6, and below 5x1+6x2=905x_1+6x_2=90. The last constraint is redundant, since every point with x1+x2≤11x_1+x_2\le11 has 5x1+6x2≤665x_1+6x_2\le66.

Corner Lines meeting Z=6x1+5x2Z=6x_1+5x_2
(6,0)(6,0) x2=0x_2=0, x1+2x2=6x_1+2x_2=6 3636
(8,0)(8,0) x2=0x_2=0, 2x1+x2=162x_1+x_2=16 4848
(5,6)(5,6) 2x1+x2=162x_1+x_2=16, x1+x2=11x_1+x_2=11 𝟔𝟎\mathbf{60}
(0,11)(0,11) x1=0x_1=0, x1+x2=11x_1+x_2=11 5555
(0,3)(0,3) x1=0x_1=0, x1+2x2=6x_1+2x_2=6 1515

Zmax=60Z_{\max}=60 at x1=5,x2=6x_1=5,\ x_2=6.

✓ Checked by computer We checked by computer: an LP solver gives Zmax=60Z_{\max}=60 at (5,6)(5,6).

↑ Back to the question list

Find all optimal solutions of the following linear programming problem by the simplex method : Maximize Z=30x1+24x2 subject to 5x1+4x2≤200x1≤32x2≤40x1,x2≥0

2014 · Paper II · Q4c · 20 marks

Solution

Add slacks s1,s2,s3s_1,s_2,s_3: 5x1+4x2+s1=200,x1+s2=32,x2+s3=40\ 5x_1+4x_2+s_1=200,\ \ x_1+s_2=32,\ \ x_2+s_3=40.

Initial table — x1x_1 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 11 in bold.

Basis cB xB x1 x2 s1 s2 s3 Ratio
cj 30 24 0 0 0
s1 0 200 5 4 1 0 0 40
s2 0 32 1 0 0 1 0 32
s3 0 40 0 1 0 0 1 –
Δj 0 −30 −24 0 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 44 in bold.

Basis cB xB x1 x2 s1 s2 s3 Ratio
cj 30 24 0 0 0
s1 0 40 0 4 1 −5 0 10
x1 30 32 1 0 0 1 0 –
s3 0 40 0 1 0 0 1 40
Δj 960 0 −24 0 30 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj 30 24 0 0 0
x2 24 10 0 1 1/4 −5/4 0
x1 30 32 1 0 0 1 0
s3 0 30 0 0 −1/4 5/4 1
Δj 1200 0 0 6 0 0

One optimum is x1=32,x2=10x_1=32,\ x_2=10, Z=1200Z=1200. But the non-basic s2s_2 has Δ=0\Delta=0, so there is an alternate optimum. Bring s2s_2 in:

Table 4 — s2s_2 is non-basic with Δj=0\Delta_j=0; bringing it in: s2s_2 enters, s3s_3 leaves (least ratio); pivot 5/45 / 4 in bold.

Basis cB xB x1 x2 s1 s2 s3 Ratio
cj 30 24 0 0 0
x2 24 10 0 1 1/4 −5/4 0 –
x1 30 32 1 0 0 1 0 32
s3 0 30 0 0 −1/4 5/4 1 24
Δj 1200 0 0 6 0 0

Table 5 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2 s3
cj 30 24 0 0 0
x2 24 40 0 1 0 0 1
x1 30 8 1 0 1/5 0 −4/5
s2 0 24 0 0 −1/5 1 4/5
Δj 1200 0 0 6 0 0

This gives the second optimal vertex x1=8,x2=40x_1=8,\ x_2=40, again Z=1200Z=1200. (The reason: 30x1+24x2=6(5x1+4x2)30x_1+24x_2=6(5x_1+4x_2), so the objective is parallel to the first constraint.)

All optimal solutions are the points of the segment joining (32,10)(32,10) and (8,40)(8,40): x1=32−24λx2=10+30λ0≤λ≤1Zmax=1200.\begin{aligned}&x_1=32-24\lambda\\ &x_2=10+30\lambda\\ &0\le\lambda\le1\\ &Z_{\max}=1200.\end{aligned}

✓ Checked by computer We checked by computer: (32,10)(32,10) and (8,40)(8,40) both give Z=1200Z=1200 and satisfy the constraints; an LP solver gives Zmax=1200Z_{\max}=1200.

↑ Back to the question list

Maximize z=2x1+3x2−5x3 subject to x1+x2+x3=7and2x1−5x2+x3≥10,xi≥0.

2013 · Paper II · Q1e · 10 marks

Solution

Add surplus s1s_1 and artificial variables A1,A2A_1,A_2 (cost −M-M) — the Big M method: x1+x2+x3+A1=72x1−5x2+x3−s1+A2=10.\begin{aligned}&x_1+x_2+x_3+A_1=7\\ &2x_1-5x_2+x_3-s_1+A_2=10.\end{aligned} An artificial variable that leaves the basis is dropped.

Initial table — x1x_1 enters (most negative Δj\Delta_j), A2A_2 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 s1 A1 A2 Ratio
cj 2 3 −5 0 −M −M
A1 −M 7 1 1 1 0 1 0 7
A2 −M 10 2 −5 1 −1 0 1 5
Δj −17M −3M − 2 4M − 3 −2M + 5 M 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), A1A_1 leaves (least ratio); pivot 7/27 / 2 in bold.

Basis cB xB x1 x2 x3 s1 A1 Ratio
cj 2 3 −5 0 −M
A1 −M 2 0 7/2 1/2 1/2 1 4/7
x1 2 5 1 −5/2 1/2 −1/2 0 –
Δj −2M + 10 0 −7M/2 − 8 −M/2 + 6 −M/2 − 1 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1
cj 2 3 −5 0
x2 3 4/7 0 1 1/7 1/7
x1 2 45/7 1 0 6/7 −1/7
Δj 102/7 0 0 50/7 1/7

Optimal solution: x1=457x2=47x3=0zmax=907+127=1027.\begin{aligned}&x_1=\tfrac{45}{7}\\ &x_2=\tfrac47\\ &x_3=0\\ &z_{\max}=\tfrac{90}{7}+\tfrac{12}{7}=\tfrac{102}{7}.\end{aligned}

✓ Checked by computer We checked by computer: an LP solver gives zmax=1027z_{\max}=\tfrac{102}{7} at (457,47,0)\left(\tfrac{45}{7},\tfrac47,0\right).

↑ Back to the question list

Minimize z=5x1−4x2+6x3−8x4 subject to the constraints x1+2x2−2x3+4x4≤402x1−x2+x3+2x4≤84x1−2x2+x3−x4≤10xi≥0

2013 · Paper II · Q4c · 20 marks

Solution

Maximise z′=−z=−5x1+4x2−6x3+8x4z'=-z=-5x_1+4x_2-6x_3+8x_4. Add slacks s1,s2,s3s_1,s_2,s_3: x1+2x2−2x3+4x4+s1=402x1−x2+x3+2x4+s2=84x1−2x2+x3−x4+s3=10\begin{aligned}x_1+2x_2-2x_3+4x_4+s_1&=40\\ 2x_1-x_2+x_3+2x_4+s_2&=8\\ 4x_1-2x_2+x_3-x_4+s_3&=10\end{aligned}

Initial table — x4x_4 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 22 in bold.

Basis cB xB x1 x2 x3 x4 s1 s2 s3 Ratio
cj −5 4 −6 8 0 0 0
s1 0 40 1 2 −2 4 1 0 0 10
s2 0 8 2 −1 1 2 0 1 0 4
s3 0 10 4 −2 1 −1 0 0 1 –
Δj 0 5 −4 6 −8 0 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 44 in bold.

Basis cB xB x1 x2 x3 x4 s1 s2 s3 Ratio
cj −5 4 −6 8 0 0 0
s1 0 24 −3 4 −4 0 1 −2 0 6
x4 8 4 1 −1/2 1/2 1 0 1/2 0 –
s3 0 14 5 −5/2 3/2 0 0 1/2 1 –
Δj 32 13 −8 10 0 0 4 0

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 x4 s1 s2 s3
cj −5 4 −6 8 0 0 0
x2 4 6 −3/4 1 −1 0 1/4 −1/2 0
x4 8 7 5/8 0 0 1 1/8 1/4 0
s3 0 29 25/8 0 −1 0 5/8 −3/4 1
Δj 80 7 0 2 0 2 0 0

So x1=0,x2=6,x3=0,x4=7x_1=0,\ x_2=6,\ x_3=0,\ x_4=7, with z′max=80z'_{\max}=80, i.e. zmin=−80.z_{\min}=-80 .

Alternate optima. The non-basic s2s_2 has Δ=0\Delta=0, so the minimum is also attained elsewhere. Bringing s2s_2 in (ratio test on the s2s_2 column) gives x2=20,x4=0x_2=20,\ x_4=0. Indeed z=−4(x2+2x4)−5x1−6x3z=-4(x_2+2x_4)-5x_1-6x_3 and the first constraint gives x2+2x4≤20x_2+2x_4\le20, so z≥−80z\ge-80. Every point with x1=x3=0x_1=x_3=0, x2+2x4=20x_2+2x_4=20, 0≤x4≤70\le x_4\le7 is optimal, for example (0,20,0,0)(0,20,0,0) and (0,6,0,7)(0,6,0,7).

✓ Checked by computer We checked by computer: an LP solver gives zmin=−80z_{\min}=-80; both (0,6,0,7)(0,6,0,7) and (0,20,0,0)(0,20,0,0) give −80-80 and satisfy the constraints.

↑ Back to the question list

For each hour per day that Ashok studies mathematics, it yields him 10 marks and for each hour that he studies physics, it yields him 5 marks. He can study at most 14 hours a day and he must get at least 40 marks in each. Determine graphically how many hours a day he should study mathematics and physics each, in order to maximize his marks ?

2012 · Paper II · Q1d · 12 marks

Solution

Let xx = hours of mathematics and yy = hours of physics per day. Marks: 10x10x in mathematics, 5y5y in physics.

Maximize Z=10x+5y\text{Maximize } Z=10x+5y subject to x+y≤1410x≥40(x≥4)5y≥40(y≥8)x,y≥0.\begin{aligned}&x+y\le14\\ &10x\ge40\ (x\ge4)\\ &5y\ge40\ (y\ge8)\\ &x,y\ge0.\end{aligned}

Graph. The region is the triangle cut off by x=4x=4, y=8y=8 and x+y=14x+y=14:

Corner Lines meeting Z=10x+5yZ=10x+5y
(4,8)(4,8) x=4x=4, y=8y=8 8080
(6,8)(6,8) y=8y=8, x+y=14x+y=14 𝟏𝟎𝟎\mathbf{100}
(4,10)(4,10) x=4x=4, x+y=14x+y=14 9090

Answer. Ashok should study 6 hours of mathematics and 8 hours of physics a day, for maximum total marks of 100 (60 in mathematics, 40 in physics).

✓ Checked by computer We checked by computer: an LP solver gives the maximum of 100 marks at 6 hours of mathematics and 8 hours of physics.

↑ Back to the question list

Solve by Simplex method, the following LP Problem : Maximize, Z=5x1+3x2 Constraints, 3x1+5x2≤155x1+2x2≤10x1,x2≥0

2011 · Paper II · Q1d · 12 marks

Solution

Add slacks s1,s2s_1,s_2: 3x1+5x2+s1=15,5x1+2x2+s2=10\ 3x_1+5x_2+s_1=15,\ \ 5x_1+2x_2+s_2=10.

Initial table — x1x_1 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 55 in bold.

Basis cB xB x1 x2 s1 s2 Ratio
cj 5 3 0 0
s1 0 15 3 5 1 0 5
s2 0 10 5 2 0 1 2
Δj 0 −5 −3 0 0

Table 2 — x2x_2 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 19/519 / 5 in bold.

Basis cB xB x1 x2 s1 s2 Ratio
cj 5 3 0 0
s1 0 9 0 19/5 1 −3/5 45/19
x1 5 2 1 2/5 0 1/5 5
Δj 10 0 −1 0 1

Table 3 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 s1 s2
cj 5 3 0 0
x2 3 45/19 0 1 5/19 −3/19
x1 5 20/19 1 0 −2/19 5/19
Δj 235/19 0 0 5/19 16/19

Optimal solution: x1=2019x2=4519Zmax=10019+13519=23519≈12.37.\begin{aligned}&x_1=\tfrac{20}{19}\\ &x_2=\tfrac{45}{19}\\ &Z_{\max}=\tfrac{100}{19}+\tfrac{135}{19}=\tfrac{235}{19}\approx12.37.\end{aligned}

✓ Checked by computer We checked by computer: an LP solver gives Zmax=23519Z_{\max}=\tfrac{235}{19} at (2019,4519)\left(\tfrac{20}{19},\tfrac{45}{19}\right).

↑ Back to the question list

A paint factory produces both interior and exterior paint from two raw materials M1 and M2. The basic data is as follows : Tons of raw material per ton ofMaximumExterior paintInterior paintdaily availabilityRaw Material M16424Raw Material M2126Profit per ton (Rs. 1,000)54 A market survey indicates that the daily demand for interior paint cannot exceed that of exterior paint by more than 1 ton. The maximum daily demand of interior paint is 2 tons. The factory wants to determine the optimum product mix of interior and exterior paint that maximizes daily profits. Formulate the LP problem for this situation.

2009 · Paper II · Q1f · 12 marks

Solution

Decision variables. x1x_1 = tons of exterior paint and x2x_2 = tons of interior paint produced per day.

Objective. Daily profit, in thousands of rupees: Maximize Z=5x1+4x2.\text{Maximize } Z=5x_1+4x_2 .

Constraints. 6x1+4x2≤24(raw material M1)x1+2x2≤6(raw material M2)x2−x1≤1(interior exceeds exterior by at most 1 t)x2≤2(demand for interior paint)x1,x2≥0.\begin{aligned}6x_1+4x_2&\le24 &&\text{(raw material } M_1)\\ x_1+2x_2&\le6 &&\text{(raw material } M_2)\\ x_2-x_1&\le1 &&\text{(interior exceeds exterior by at most 1 t)}\\ x_2&\le2 &&\text{(demand for interior paint)}\\ x_1,x_2&\ge0 .\end{aligned}

This is the required LP model. (Solving it graphically, the best corner is where 6x1+4x2=246x_1+4x_2=24 meets x1+2x2=6x_1+2x_2=6: x1=3,x2=1.5x_1=3,\ x_2=1.5, giving Z=21Z=21, i.e. Rs 21,000 per day.)

✓ Checked by computer We checked by computer: an LP solver gives the optimum 3 t exterior and 1.5 t interior, profit Rs 21,000.

↑ Back to the question list

Maximize : Z=3x1+5x2+4x3 subject to : 2x1+3x2≤8,3x1+2x2+4x3≤15,2x2+5x3≤10,xi≥0.

2009 · Paper II · Q4b · 30 marks

Solution

This is the same problem as 2017 (Q3c), with the constraints in a different order. Add slacks s1,s2,s3s_1,s_2,s_3: 2x1+3x2+s1=83x1+2x2+4x3+s2=152x2+5x3+s3=10.\begin{aligned}&2x_1+3x_2+s_1=8\\ &3x_1+2x_2+4x_3+s_2=15\\ &2x_2+5x_3+s_3=10.\end{aligned}

Initial table — x2x_2 enters (most negative Δj\Delta_j), s1s_1 leaves (least ratio); pivot 33 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
s1 0 8 2 3 0 1 0 0 8/3
s2 0 15 3 2 4 0 1 0 15/2
s3 0 10 0 2 5 0 0 1 5
Δj 0 −3 −5 −4 0 0 0

Table 2 — x3x_3 enters (most negative Δj\Delta_j), s3s_3 leaves (least ratio); pivot 55 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
x2 5 8/3 2/3 1 0 1/3 0 0 –
s2 0 29/3 5/3 0 4 −2/3 1 0 29/12
s3 0 14/3 −4/3 0 5 −2/3 0 1 14/15
Δj 40/3 1/3 0 −4 5/3 0 0

Table 3 — x1x_1 enters (most negative Δj\Delta_j), s2s_2 leaves (least ratio); pivot 41/1541 / 15 in bold.

Basis cB xB x1 x2 x3 s1 s2 s3 Ratio
cj 3 5 4 0 0 0
x2 5 8/3 2/3 1 0 1/3 0 0 4
s2 0 89/15 41/15 0 0 −2/15 1 −4/5 89/41
x3 4 14/15 −4/15 0 1 −2/15 0 1/5 –
Δj 256/15 −11/15 0 0 17/15 0 4/5

Table 4 — all Δj≥0\Delta_j\ge0, so this table is optimal.

Basis cB xB x1 x2 x3 s1 s2 s3
cj 3 5 4 0 0 0
x2 5 50/41 0 1 0 15/41 −10/41 8/41
x1 3 89/41 1 0 0 −2/41 15/41 −12/41
x3 4 62/41 0 0 1 −6/41 4/41 5/41
Δj 765/41 0 0 0 45/41 11/41 24/41

Optimal solution: x1=8941x2=5041x3=6241Zmax=267+250+24841=76541≈18.66.\begin{aligned}&x_1=\tfrac{89}{41}\\ &x_2=\tfrac{50}{41}\\ &x_3=\tfrac{62}{41}\\ &Z_{\max}=\tfrac{267+250+248}{41}=\tfrac{765}{41}\approx18.66.\end{aligned}

✓ Checked by computer We checked by computer: an LP solver gives Zmax=76541Z_{\max}=\tfrac{765}{41} at (8941,5041,6241)\left(\tfrac{89}{41},\tfrac{50}{41},\tfrac{62}{41}\right).

↑ Back to the question list

More on Linear Programming

Questions: UPSC Civil Services (Main) Examination, Mathematics Paper II, 2009–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted