UPSC 2023 Maths Optional Paper 2 Q4c — Step-by-Step Solution
20 marks · Section A
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:
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 cannot be assigned job .
Technique
Hungarian algorithm — row/column reduction; cover zeros with minimum lines; if fewer than lines, subtract uncovered min from uncovered and add to doubly-covered; repeat.
Solution
Apply the Hungarian algorithm (minimization, ).
Part 1 — Unrestricted optimum
Step 1.1 — Row reduction. Subtract the row minimum from each row.
| A | B | C | D | E | (row min) | |
|---|---|---|---|---|---|---|
| I | 0 | 5 | 0 | 8 | 0 | (4) |
| II | 10 | 6 | 15 | 0 | 3 | (5) |
| III | 10 | 0 | 8 | 5 | 11 | (7) |
| IV | 0 | 4 | 2 | 0 | 5 | (9) |
| V | 0 | 5 | 6 | 3 | 8 | (6) |
Step 1.2 — Column reduction. Every column minimum is already ; 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:
- Mark unassigned row IV.
- From row IV, mark columns A, D (containing zeros).
- From column A, mark row V (assigned at A); from column D, mark row II (assigned at D).
- No new marks possible.
Lines: unmarked rows {I, III} and marked columns {A, D}. Total: 4 lines , so optimum not yet reached.
Step 1.5 — Revise the matrix.
Smallest uncovered element (in rows {II, IV, V} × columns {B, C, E}):
Subtract from every uncovered element; add to every element covered twice (rows {I, III} × columns {A, D}); leave singly-covered elements unchanged.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| I | 2 | 5 | 0 | 10 | 0 |
| II | 10 | 4 | 13 | 0 | 1 |
| III | 12 | 0 | 8 | 7 | 11 |
| IV | 0 | 2 | 0 | 0 | 3 |
| V | 0 | 3 | 4 | 3 | 6 |
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.
Part 2 — With restriction IV ≠ C
Replace entry by (so the Hungarian algorithm cannot select it) and rerun. Row reductions through Step 1.5 are unaffected by this change because:
- IV’s row minimum is still (at A and D, not C);
- column C’s minimum is still (from row I).
Hence the matrix after Step 1.5 differs only in the (IV, C) entry, which is instead of — but was the smallest uncovered element, so the smallest uncovered element here is now:
Step 2.1 — Revise with .
Subtract from uncovered, add to doubly-covered. The (IV, C) cell stays .
| A | B | C | D | E | |
|---|---|---|---|---|---|
| I | 3 | 5 | 0 | 11 | 0 |
| II | 10 | 3 | 12 | 0 | 0 |
| III | 13 | 0 | 8 | 8 | 11 |
| IV | 0 | 1 | 0 | 2 | |
| V | 0 | 2 | 3 | 3 | 5 |
Step 2.2 — Assign.
Singletons: III→B. Then:
- V has only A: V→A.
- IV has zeros at A (taken) and D; assign IV→D.
- II has zeros at D (taken) and E; assign II→E.
- I has zeros at C and E (taken); assign I→C.
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 , II–E , III–B , IV–D , V–A .
The restriction costs the department exactly one extra hour ().