← 2017 Paper 2

UPSC 2017 Maths Optional Paper 2 Q3c — Step-by-Step Solution

20 marks · Section A

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

Question

Solve the following linear programming problem by simplex method:

Maximize z=3x1+5x2+4x3\text{Maximize } z=3x_1+5x_2+4x_3

subject to

2x1+3x282x2+5x3103x1+2x2+4x315x1,x2,x30.\begin{aligned}2x_1+3x_2&\le 8\\ 2x_2+5x_3&\le 10\\ 3x_1+2x_2+4x_3&\le 15\\ x_1,x_2,x_3&\ge 0.\end{aligned}

Technique

Primal simplex in tableau form; slack variables for the initial basis; entering variable = most positive cjzjc_j-z_j, leaving variable = minimum ratio test; iterate to non-positive cjzjc_j-z_j.

Solution

Step 1 — Standard form with slack variables

Add slacks s1,s2,s30s_1,s_2,s_3\ge0:

2x1+3x2+0x3+s1=82x2+5x3+s2=103x1+2x2+4x3+s3=15z3x15x24x3=0.\begin{aligned}2x_1+3x_2\phantom{+0x_3}+s_1&=8\\ 2x_2+5x_3+s_2&=10\\ 3x_1+2x_2+4x_3+s_3&=15\end{aligned}\qquad z-3x_1-5x_2-4x_3=0.

Initial basis (s1,s2,s3)=(8,10,15)(s_1,s_2,s_3)=(8,10,15) with z=0z=0.

Step 2 — Iteration 0 (initial tableau)

Basis {s1,s2,s3}\{s_1,s_2,s_3\}. Row cjzj=(3,5,4,0,0,0)c_j-z_j=(3,5,4,0,0,0).

Basisx1x_1x2x_2x3x_3s1s_1s2s_2s3s_3RHSratio (RHS/x2x_2)
s1s_123010088/38/3 ← min
s2s_20250101055
s3s_33240011515/215/2

Most positive cjzj=5c_j-z_j=5 at x2x_2x2x_2 enters; min ratio 8/38/3s1s_1 leaves. Pivot on 33.

Step 3 — Iteration 1

Basis {x2,s2,s3}\{x_2,s_2,s_3\}, z=40/3z=40/3. Row cjzj=(13,0,4,53,0,0)c_j-z_j=\left(-\tfrac13,\,0,\,4,\,-\tfrac53,\,0,\,0\right).

Basisx1x_1x2x_2x3x_3s1s_1s2s_2s3s_3RHSratio (RHS/x3x_3)
x2x_22/32/3101/31/3008/38/3
s2s_24/3-4/3052/3-2/31014/314/314/1514/15 ← min
s3s_35/35/3042/3-2/30129/329/329/1229/12

Most positive cjzj=4c_j-z_j=4 at x3x_3x3x_3 enters; min ratio 14/1514/15s2s_2 leaves. Pivot on 55.

Step 4 — Iteration 2

Basis {x2,x3,s3}\{x_2,x_3,s_3\}, z=256/15z=256/15. Row cjzj=(1115,0,0,1715,45,0)c_j-z_j=\left(\tfrac{11}{15},\,0,\,0,\,-\tfrac{17}{15},\,-\tfrac45,\,0\right).

Basisx1x_1x2x_2x3x_3s1s_1s2s_2s3s_3RHSratio (RHS/x1x_1)
x2x_22/32/3101/31/3008/38/344
x3x_34/15-4/15012/15-2/151/51/5014/1514/15
s3s_341/1541/15002/15-2/154/5-4/5189/1589/1589/4189/41 ← min

Most positive cjzj=1115c_j-z_j=\tfrac{11}{15} at x1x_1x1x_1 enters; min ratio 89/4189/41s3s_3 leaves. Pivot on 41/1541/15.

Step 5 — Iteration 3 (optimal)

Basis {x2,x3,x1}\{x_2,x_3,x_1\}. Row cjzj=(0,0,0,4541,2441,1141)0c_j-z_j=\left(0,\,0,\,0,\,-\tfrac{45}{41},\,-\tfrac{24}{41},\,-\tfrac{11}{41}\right)\le0optimal.

Basisx1x_1x2x_2x3x_3s1s_1s2s_2s3s_3RHS
x2x_201015/4115/418/418/4110/41-10/4150/4150/41
x3x_30016/41-6/415/415/414/414/4162/4162/41
x1x_11002/41-2/4112/41-12/4115/4115/4189/4189/41

All cjzj0c_j-z_j\le0, so the current solution is optimal:

x1=8941,x2=5041,x3=6241,x_1=\frac{89}{41},\quad x_2=\frac{50}{41},\quad x_3=\frac{62}{41}, z=38941+55041+46241=267+250+24841=76541.z=3\cdot\frac{89}{41}+5\cdot\frac{50}{41}+4\cdot\frac{62}{41}=\frac{267+250+248}{41}=\frac{765}{41}.

Answer

  zmax=7654118.66at(x1,x2,x3)=(8941,5041,6241).  \boxed{\;z_{\max}=\frac{765}{41}\approx18.66\quad\text{at}\quad \left(x_1,x_2,x_3\right)=\left(\frac{89}{41},\frac{50}{41},\frac{62}{41}\right).\;}
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 — 13 years, mapped. Get the take-away PDF free.