← 2015 Paper 2

UPSC 2015 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 LPP 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+5x3\text{Maximize } Z=2x_1-4x_2+5x_3

subject to x1+4x2−2x3≤2x_1+4x_2-2x_3\le 2, −x1+2x2+3x3≤1-x_1+2x_2+3x_3\le 1, x1,x2,x3≥0x_1,x_2,x_3\ge 0.

Technique

Standard simplex on the standard form (max with ≤\le, slack variables); iterate till all reduced costs ≥0\ge 0; dual optimum = zj−cjz_j-c_j row at slack-variable columns of optimal tableau (this is the standard “shadow price” reading).

Solution

Step 1 — Convert to standard form (add slacks s1,s2s_1,s_2)

Max Z=2x1−4x2+5x3+0⋅s1+0⋅s2\text{Max } Z=2x_1-4x_2+5x_3+0\cdot s_1+0\cdot s_2

subject to

x1+4x2−2x3+s1=2,x_1+4x_2-2x_3+s_1=2, −x1+2x2+3x3+s2=1,-x_1+2x_2+3x_3+s_2=1, x1,x2,x3,s1,s2≥0.x_1,x_2,x_3,s_1,s_2\ge 0.

Step 2 — Initial simplex tableau

Basis: {s1,s2}\{s_1,s_2\}.

Basisx1x_1x2x_2x3x_3s1s_1s2s_2RHS
s1s_114-2102
s2s_2-123011
zj−cjz_j-c_j-24-5000

(zj−cjz_j-c_j for the negative-of-coefficient form: −cj-c_j initially. Most-negative is −5-5 for x3x_3.)

Step 3 — Iteration 1: x3x_3 enters

Ratio test on positive entries in x3x_3 column:

So s2s_2 leaves; pivot on row s2s_2, column x3x_3.

New row s2s_2 (becomes x3x_3): divide by 3: (−1/3,  2/3,  1,  0,  1/3  ∣  1/3)(-1/3,\;2/3,\;1,\;0,\;1/3\;|\;1/3).

New row s1s_1: Rs1+2⋅Rx3R_{s_1}+2\cdot R_{x_3} (to make −2-2 become 00):

New zj−cjz_j-c_j row: subtract −5×-5\times new pivot row from old zj−cjz_j-c_j:

Actually let me redo. Standard: (zj−cj)(z_j-c_j) becomes (zj−cj)+5⋅(z_j-c_j)+5\cdot (pivot row). The pivot was at the x3x_3 column with zj−cj=−5z_j-c_j=-5. So:

New zj−cjz_j-c_j:

Standard simplex update for zj−cjz_j-c_j: new=old−(old pivot col entry)⋅(new pivot row)\text{new}=\text{old}-\text{(old pivot col entry)}\cdot\text{(new pivot row)}.

Old (zj−cj)(z_j-c_j) row: (−2,4,−5,0,0  ∣  0)(-2, 4, -5, 0, 0\;|\;0). Pivot column was x3x_3 with old value −5-5.

New (zj−cj)=old−(−5)⋅(new pivot row)=old+5⋅(new pivot row)(z_j-c_j)=\text{old}-(-5)\cdot\text{(new pivot row)} = \text{old}+5\cdot\text{(new pivot row)}:

Tableau:

Basisx1x_1x2x_2x3x_3s1s_1s2s_2RHS
s1s_11/316/3012/38/3
x3x_3-1/32/3101/31/3
zj−cjz_j-c_j-11/322/3005/35/3

Most-negative: −11/3-11/3 at x1x_1. x1x_1 enters.

Step 4 — Iteration 2: x1x_1 enters

Ratio test on positive entries in x1x_1 column:

s1s_1 leaves. Pivot on row s1s_1, column x1x_1.

New row s1s_1 (becomes x1x_1): divide by 1/31/3 = multiply by 3: (1,16,0,3,2  ∣  8)(1, 16, 0, 3, 2 \;|\; 8).

New row x3x_3: Rx3+(1/3)⋅Rx1R_{x_3}+(1/3)\cdot R_{x_1}:

New (zj−cj)(z_j-c_j): old+(11/3)⋅Rx1 new\text{old}+(11/3)\cdot R_{x_1\text{ new}}:

Tableau:

Basisx1x_1x2x_2x3x_3s1s_1s2s_2RHS
x1x_11160328
x3x_3061113
zj−cjz_j-c_j066011931

All zj−cj≥0z_j-c_j\ge 0 ⇒ optimal.

Step 5 — Optimal solution

x1=8x_1=8, x3=3x_3=3, x2=0x_2=0, s1=0s_1=0, s2=0s_2=0.

Zmax⁡=2(8)−4(0)+5(3)=16+15=31Z_{\max}=2(8)-4(0)+5(3)=16+15=31. ✓

Answer

  x1=8,  x2=0,  x3=3,  Zmax⁡=31.  \boxed{\;x_1=8,\;x_2=0,\;x_3=3,\;Z_{\max}=31.\;}
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.