← 2023 Paper 2

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

20 marks · Section A

Assignment problem (Hungarian method) · Linear Programming · asked 6× in 13 yrs · Read the full method →

Question

A department head has 5 subordinates and 5 jobs to be performed. The time (in hours) that each subordinate will take to perform each job is given in the matrix below:

ABCDEI494124II15112058III177151218IV91311914V61112914\begin{array}{c|ccccc} & A & B & C & D & E\\\hline I & 4 & 9 & 4 & 12 & 4\\ II & 15 & 11 & 20 & 5 & 8\\ III & 17 & 7 & 15 & 12 & 18\\ IV & 9 & 13 & 11 & 9 & 14\\ V & 6 & 11 & 12 & 9 & 14\end{array}

How should the jobs be assigned, one to each subordinate, so as to minimize the total time? Also, obtain the total minimum time to perform all the jobs if the subordinate IVIV cannot be assigned job CC.

Technique

Hungarian algorithm — row/column reduction; cover zeros with minimum lines; if fewer than nn lines, subtract uncovered min from uncovered and add to doubly-covered; repeat.

Solution

Apply the Hungarian algorithm (minimization, 5×55\times 5).

Part 1 — Unrestricted optimum

Step 1.1 — Row reduction. Subtract the row minimum from each row.

ABCDE(row min)
I05080(4)
II1061503(5)
III1008511(7)
IV04205(9)
V05638(6)

Step 1.2 — Column reduction. Every column minimum is already 00; matrix unchanged.

Step 1.3 — Attempt an assignment of zeros.

Singleton-zero rows first: II→D, III→B, V→A (V has a single zero at A). Remaining rows: I has zeros at A (taken), C, E; IV has zeros at A (taken), D (taken). IV has no available zero — assignment incomplete. (Only 4 zeros assignable so far.)

Step 1.4 — Cover all zeros with the minimum number of lines.

Standard marking:

Lines: unmarked rows {I, III} and marked columns {A, D}. Total: 4 lines <5<5, so optimum not yet reached.

Step 1.5 — Revise the matrix.

Smallest uncovered element (in rows {II, IV, V} × columns {B, C, E}):

min{6,15,3;  4,2,5;  5,6,8}=2(at IV–C).\min\{6,15,3;\;4,2,5;\;5,6,8\}=2\quad(\text{at IV–C}).

Subtract 22 from every uncovered element; add 22 to every element covered twice (rows {I, III} × columns {A, D}); leave singly-covered elements unchanged.

ABCDE
I250100
II1041301
III1208711
IV02003
V03436

Step 1.6 — Re-attempt assignment.

Singletons: II→D, III→B, V→A. IV now has zeros at A (taken), C, D (taken); assign IV→C. I has zeros at C (taken), E; assign I→E.

Complete assignment: I–E, II–D, III–B, IV–C, V–A.

Step 1.7 — Total time.

T=4+5+7+11+6=33 hours.T=4+5+7+11+6=\boxed{33\text{ hours}.}

Part 2 — With restriction IV ≠ C

Replace entry (IV,C)=11(IV,C)=11 by \infty (so the Hungarian algorithm cannot select it) and rerun. Row reductions through Step 1.5 are unaffected by this change because:

Hence the matrix after Step 1.5 differs only in the (IV, C) entry, which is \infty instead of 22 — but (IV,C)(IV,C) was the smallest uncovered element, so the smallest uncovered element here is now:

min{6,15,3;  4,,5;  5,6,8}=3(at II–E).\min\{6,15,3;\;4,\infty,5;\;5,6,8\}=3\quad(\text{at II–E}).

Step 2.1 — Revise with θ=3\theta=3.

Subtract 33 from uncovered, add 33 to doubly-covered. The (IV, C) cell stays \infty.

ABCDE
I350110
II1031200
III1308811
IV01\infty02
V02335

Step 2.2 — Assign.

Singletons: III→B. Then:

Complete assignment: I–C, II–E, III–B, IV–D, V–A.

(Uniqueness: any swap fails. E.g. I→E forces II→D; then V→A; IV needs D or A — both taken — fail. So the assignment is unique.)

Step 2.3 — Total time (with restriction).

Costs: I–C =4=4, II–E =8=8, III–B =7=7, IV–D =9=9, V–A =6=6.

T=4+8+7+9+6=34 hours.T'=4+8+7+9+6=\boxed{34\text{ hours}.}

The restriction costs the department exactly one extra hour (3433=134-33=1).

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.