UPSC 2026 Maths Optional Paper 2 Q3c — Step-by-Step Solution
15 marks · Section A
Question
The following table represents the estimated costs of assigning jobs to machines. Solve this assignment problem to minimize the total cost.
| Job \ Machine | ||||
|---|---|---|---|---|
| 8 | 24 | 28 | 32 | |
| 8 | 13 | 17 | 19 | |
| 8 | 15 | 19 | 22 |
Is the assignment unique for the total minimum cost? Justify your answer and obtain an alternate assignment, if it exists.
Technique
The matrix is — unbalanced — so the Hungarian method does not apply until a dummy job (a fourth row of zeros) is added; the machine that receives the dummy job is the one left idle. Then run the Hungarian algorithm proper: row reduction, column reduction, minimum line cover, and the “subtract the smallest uncovered element, add it at the crossings” update, iterating until the minimum number of covering lines equals the order . Uniqueness is not answered by “the Hungarian gave one answer” — it is answered by counting the complete matchings available in the zero set of the final reduced matrix, and confirming the second assignment has the same cost.
Solution
Step 1 — Balance the problem.
An assignment problem requires a square matrix: a one-to-one correspondence between rows and columns. Here there are jobs and machines, so one machine must go unused. Introduce a dummy job (fictitious — it represents “no job at all”) with cost against every machine, since a machine that is left idle incurs no assignment cost:
| Job \ Machine | row min | ||||
|---|---|---|---|---|---|
| 8 | 24 | 28 | 32 | 8 | |
| 8 | 13 | 17 | 19 | 8 | |
| 8 | 15 | 19 | 22 | 8 | |
| (dummy) | 0 | 0 | 0 | 0 | 0 |
Operational meaning: whichever machine ends up paired with does no real work — that machine stays idle, and its “cost” correctly contributes nothing to the total. This is the only legitimate balancing here; adding a dummy machine (a fifth column) would be wrong, since it is machines that are in surplus, not jobs.
Step 2 — Row reduction.
Subtract from each row its row minimum (this changes every assignment’s total by the same constant , hence does not change which assignment is optimal — that is the whole justification for the method, and it is worth one line):
| 0 | 16 | 20 | 24 | |
| 0 | 5 | 9 | 11 | |
| 0 | 7 | 11 | 14 | |
| 0 | 0 | 0 | 0 |
Step 3 — Column reduction.
Column minima are (column from rows –, and the rest from row ). The matrix is unchanged. Note why: is simultaneously the constant entry of column and the minimum of each of the first three rows, so the row step has already done the column- step.
Step 4 — Iteration 1: cover the zeros with the minimum number of lines.
| line? | |||||
|---|---|---|---|---|---|
| 0 | 16 | 20 | 24 | — | |
| 0 | 5 | 9 | 11 | — | |
| 0 | 7 | 11 | 14 | — | |
| 0 | 0 | 0 | 0 | row line | |
| line? | col line | — | — | — |
Minimality check (König’s theorem: minimum lines maximum number of independent zeros). The zeros are . Rows each have their only zero in , so at most one of them can be assigned; with that gives at most independent zeros. Hence is minimal, and : not yet optimal.
Smallest uncovered element (rows columns ): . Subtract from every uncovered entry; add at the crossing ; leave singly-covered entries alone.
Step 5 — Iteration 2.
| line? | |||||
|---|---|---|---|---|---|
| 0 | 11 | 15 | 19 | — | |
| 0 | 0 | 4 | 6 | row line | |
| 0 | 2 | 6 | 9 | — | |
| 5 | 0 | 0 | 0 | row line | |
| line? | col line | — | — | — |
Minimality: a maximum set of independent zeros is — size ; it cannot be , because rows and both have their only zeros in column and cannot both be assigned. So : not yet optimal.
Smallest uncovered element (rows columns ): . Subtract from those; add at the two crossings and .
Step 6 — Iteration 3.
| line? | |||||
|---|---|---|---|---|---|
| 0 | 9 | 13 | 17 | — | |
| 2 | 0 | 4 | 6 | — | |
| 0 | 0 | 4 | 7 | — | |
| 7 | 0 | 0 | 0 | row line | |
| line? | col line | col line | — | — |
Minimality: maximum independent zeros , size ; ‘s zeros lie only in , both already used, and no rearrangement helps ( is confined to ). So : not yet optimal.
Smallest uncovered element (rows columns ): . Subtract from those six entries; add at the crossings and .
Step 7 — Iteration 4: the optimal reduced matrix.
| 0 | 9 | 9 | 13 | |
| 2 | 0 | 0 | 2 | |
| 0 | 0 | 0 | 3 | |
| 11 | 4 | 0 | 0 |
Four independent zeros now exist, e.g. , so the minimum cover needs lines order of the matrix. The algorithm terminates: this reduced matrix yields an optimal assignment.
Step 8 — Read off the assignment(s) and the cost.
Zero positions of the final matrix, listed by row:
Row has a single zero, so is forced; column is then exhausted, leaving . Enumerating the complete selections of independent zeros:
- would force both and into — impossible. Hence .
- That leaves to fill , and both ways are zeros:
- ;
- .
So the zero set supports exactly two complete assignments:
Costs from the original table:
Equal, as they must be. Minimum total cost , with machine left idle in either plan.
Step 9 — Uniqueness: justified independently of the algorithm.
The Hungarian tableau exhibits two optima, but a complete justification should not rest on the bookkeeping. Two short arguments settle it outright.
(i) in every optimal assignment. Note and for every (row is strictly the dearest on all non- columns), while column is constant at . Suppose an optimal assignment gave to and put on some , . Exchanging the two changes the total by
a strict improvement — contradicting optimality. The same computation rules out . Finally, is used: if were the idle machine, move any one of the three jobs onto it from wherever it sits; the cost strictly falls, because in the original table every entry outside column is at least . Hence every optimum has , contributing .
(ii) The residual problem. With fixed on , the remaining choice is to place on two distinct machines from :
| 13 | 17 | 19 | |
| 15 | 19 | 22 |
All six possibilities:
The minimum is attained exactly twice: and . Adding the forced :
Step 10 — Why column being constant matters.
Every entry of column equals . Three consequences, each worth stating:
- is therefore the minimum of every one of the first three rows, so the row-reduction step simultaneously performs the column reduction on — which is exactly why Step 3 produced no change and why the first line cover needed only lines. The algorithm then had to grind through three update iterations.
- Because the column is constant, carries no information about which job should be put on it. The cost of an assignment using is ; the identity of the job sent to matters only through which jobs are left over. That is precisely the exchange argument of Step 9(i), and it is what makes — the job that is dearest everywhere else — the one to park on .
- Since is strictly below every entry outside column , is used in every optimum; the idle machine is never .
Step 11 — Sensitivity remark (one line, cheap, and shows the structure).
The two optima differ by the transposition of between and , and are tied because
i.e. the submatrix on rows , columns has vanishing cross-difference
(It is this quantity, not the determinant, that decides a assignment tie: the two admissible pairings differ in cost by exactly the cross-difference.) Perturb any one of those four entries and the tie breaks, leaving a unique optimum. This is the algebraic reason the alternate assignment exists — it is not a coincidence of the arithmetic.
Answer
The assignment is not unique: there are exactly two optimal assignments, (A) and (B), each of total cost ; (B) is the required alternate assignment. In both, machine is left idle.