Operations Research in Numbers: Simplex, Duality and Sensitivity, Transportation (NWC, VAM, MODI), Assignment, Branch and Bound, Markovian Queues and Simulation
Transportation and Assignment
Three sources supply 20, 30 and 25 units and four destinations need 10, 25, 15 and 25 (balanced, 75 each). Unit costs are 8, 6, 10, 9 / 9, 12, 13, 7 / 14, 9, 16, 5. The north-west corner rule ignores cost and fills from the top-left: cost 640. Vogel's approximation (VAM) takes the row or column with the largest penalty (gap between the two smallest costs) and ships as much as possible at its cheapest cell: cost 590, usually within a unit or two of the optimum. The optimum, confirmed by MODI (all cell evaluations u_i + v_j − c_ij ≤ 0 on empty cells) and an independent LP solve, is 585: S1→D2 20; S2→D1 10, D3 15, D4 5; S3→D2 5, D4 20. A balanced m × n problem has m + n − 1 basic cells (here 6); fewer means degeneracy, repaired with a zero allocation; an unbalanced problem gets a dummy row or column of zero cost. Assignment is the transportation problem with every supply and demand equal to 1. The Hungarian method subtracts row minima, then column minima, and covers the zeros with the minimum number of lines; with the matrix 9, 11, 14, 11 / 6, 15, 13, 13 / 12, 13, 6, 8 / 11, 9, 10, 12 the optimum is job 1 → machine 4, 2 → 1, 3 → 3, 4 → 2 at cost 32, which agrees with checking all 24 permutations. A maximisation problem is converted by subtracting every entry from the largest.
| Method | Idea | Cost |
|---|---|---|
| North-west corner | Ignores costs | 640 |
| Vogel (VAM) | Largest penalty first | 590 |
| MODI optimum | All cell evaluations ≤ 0 | 585 |
Three sources supply 20, 30 and 25 units and four destinations need 10, 25, 15 and 25 (balanced, 75 each). Unit costs are 8, 6, 10, 9 / 9, 12, 13, 7 / 14, 9, 16, 5. The north-west corner…
Integer Programming and Branch and Bound
Maximise Z = 8x₁ + 5x₂ subject to x₁ + x₂ ≤ 6 and 9x₁ + 5x₂ ≤ 45 with x₁, x₂ non-negative integers. The LP relaxation (drop integrality) gives x = (3.75, 2.25) and Z = 41.25, an upper bound for the integer problem. Branch and bound splits on a fractional variable: x₁ ≤ 3 gives (3, 3), Z = 39 (integer, so a feasible solution and a lower bound of 39); x₁ ≥ 4 gives the relaxation (4, 1.8), Z = 41; branch it on x₂: x₂ ≤ 1 gives (4.44, 1), Z = 40.56 and then x₁ ≤ 4 gives (4, 1) Z = 37, while x₁ ≥ 5 gives (5, 0), Z = 40, an integer, which beats 39; x₂ ≥ 2 is infeasible at x₁ ≥ 4. Every other branch has a bound below 40 and is fathomed. The integer optimum is x = (5, 0), Z = 40 — rounding the relaxation, (4, 2), is not even feasible (36 + 10 = 46 > 45) and (3, 2) is feasible but worth only 34. The relaxation's bound is never lower than the integer optimum for a maximisation, so Z_integer ≤ 41.25 and, because the objective has integer coefficients, ≤ 41. Gomory cuts shave off the fractional corner; 0–1 programs model yes/no choices (site selection, set cover); binary variables with big-M constraints linearise 'either-or' conditions.
| Candidate | Feasible? | Z |
|---|---|---|
| LP relaxation (3.75, 2.25) | Not integer | 41.25 |
| Rounded (4, 2) | No (46 > 45) | — |
| (3, 3) | Yes | 39 |
| (5, 0) | Yes — optimal | 40 |
Maximise Z = 8x₁ + 5x₂ subject to x₁ + x₂ ≤ 6 and 9x₁ + 5x₂ ≤ 45 with x₁, x₂ non-negative integers. The LP relaxation (drop integrality) gives x = (3.75, 2.25) and Z = 41.25, an upper bound…
Markovian Queues and Discrete-Event Simulation
In an M/M/1 queue (Poisson arrivals at λ, exponential service at μ, one server) the utilisation is ρ = λ/μ, and for λ = 8/h, μ = 10/h: ρ = 0.8; the average number in the system L = ρ/(1 − ρ) = 4.0, in the queue L_q = ρ²/(1 − ρ) = 3.2, the time in the system W = 1/(μ − λ) = 0.5 h (30 min) and in the queue W_q = ρW = 0.4 h (24 min); Little's law L = λW (8 × 0.5 = 4) ties them together, and P(n ≥ k) = ρᵏ, so P(5 or more) = 0.328. Stability needs ρ < 1: as ρ → 1 waiting explodes. An M/M/c queue with c = 2 servers each at μ = 5 and λ = 8 (a = λ/μ = 1.6, ρ = 0.8) has P₀ = 0.1111, L_q = P₀aᶜρ/(c!(1 − ρ)²) = 2.84, W_q = L_q/λ = 0.356 h (21.3 min) and L = L_q + a = 4.44; compared with one server of speed 10 (W_q = 0.4 h, W = 0.5 h) two slower servers shorten the queue wait but lengthen the time in the system to 0.556 h, because a lone customer cannot use both. Simulation replaces the formula by sampled events: a linear congruential generator x_(n+1) = (5x_n + 3) mod 16 with x₀ = 7 gives 6, 1, 8, 11, 10, 5, 12, 15, i.e. random numbers u = x/16 = 0.375, 0.062, 0.500, 0.688…; the inverse-transform method turns u into an exponential interarrival time −ln(1 − u)/λ, so u = 0.375 at λ = 8/h gives 3.5 min. The cycle length of a good generator must be long, and the stream is fully periodic — this one repeats after at most 16 draws. A discrete-event simulation advances a clock from event to event (arrival, start of service, departure) keeping an event list, which is why it handles non-Markovian systems the formulas cannot.
| Measure | M/M/1 formula | λ = 8, μ = 10 |
|---|---|---|
| Utilisation | ρ = λ/μ | 0.8 |
| L | ρ/(1 − ρ) | 4.0 |
| W | 1/(μ − λ) | 0.5 h |
| W_q | ρ/(μ − λ) | 0.4 h |
In an M/M/1 queue (Poisson arrivals at λ, exponential service at μ, one server) the utilisation is ρ = λ/μ, and for λ = 8/h, μ = 10/h: ρ = 0.8; the average number in the system L = ρ/(1 −…
Key takeaways
- Simplex pivots along edges using the entering coefficient and the minimum-ratio test; at the optimum the dual values are the shadow prices and the objectives are equal.
- A shadow price holds only within its right-hand-side range; a constraint with slack has a zero price.
- Transportation: NWC is crude, VAM is close, MODI proves optimality; basic cells = m + n − 1; assignment is the 1-to-1 case.
- Integer optimum ≤ LP relaxation optimum for maximisation; rounding may be infeasible or suboptimal, so use branch and bound.
- M/M/1: L = ρ/(1 − ρ), W = 1/(μ − λ), Little L = λW; simulation turns random numbers into events by inverse transform.
Practice questions (24)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
Maximise Z = 50x₁ + 40x₂ subject to 2x₁ + x₂ ≤ 100, x₁ + 2x₂ ≤ 80 and x₁ ≤ 45. The optimal Z is:
Numerical answer — type the value.
Show answer
Answer: 2800
The binding constraints are the machine and labour rows: 2x₁ + x₂ = 100 and x₁ + 2x₂ = 80 give (40, 20), Z = 2000 + 800 = 2800. The vertex (45, 10) is feasible but worth only 2650.In the same problem the shadow price of one extra machine hour (₹) is:
Numerical answer — type the value.
Show answer
Answer: 20
The dual solves 2y₁ + y₂ = 50 and y₁ + 2y₂ = 40: y₁ = 20, y₂ = 10. Check: Z rises from 2800 to 2820 if the machine limit becomes 101 h.At the optimum of a linear programme, a constraint that has slack has a shadow price that is:
Show answer
Answer: C — Zero, by complementary slackness
An unused resource has no marginal value: adding more of it cannot improve the objective. That is complementary slackness — slack and price are never both positive.
Show the other 21 questions
A balanced transportation problem with 3 sources and 4 destinations has how many basic cells in a non-degenerate solution?
Show answer
Answer: A — 6, which is m + n − 1
One of the m + n supply/demand equations is redundant because total supply equals total demand, so the rank is m + n − 1 = 6. Fewer allocated cells means degeneracy.The optimal cost of the 4 × 4 assignment with rows 9 11 14 11 / 6 15 13 13 / 12 13 6 8 / 11 9 10 12 is:
Numerical answer — type the value.
Show answer
Answer: 32
The optimal assignment is 1→4 (11), 2→1 (6), 3→3 (6), 4→2 (9): total 32, verified over all 24 permutations. Picking each row minimum greedily (9, 6, 6, 9, total 30) is not an assignment: rows 1 and 2 both choose column 1.In the integer programme max 8x₁ + 5x₂ with x₁ + x₂ ≤ 6 and 9x₁ + 5x₂ ≤ 45, the LP relaxation value is 41.25. The integer optimum is:
Show answer
Answer: B — 40 at (5, 0)
(4, 2) violates 9x₁ + 5x₂ ≤ 45 (46). Among feasible integer points (5, 0) gives 40 and (3, 3) gives 39; rounding the relaxation gives an infeasible or inferior point.For an M/M/1 queue with arrival rate 8 per hour and service rate 10 per hour, the average time a customer spends in the system, in minutes, is:
Numerical answer — type the value.
Show answer
Answer: 30
W = 1/(μ − λ) = 1/2 h = 30 min. The waiting time in the queue alone is ρW = 24 min; 6 min is the service time 1/μ.An M/M/1 queue has λ = 8/h and μ = 10/h. The probability that five or more customers are in the system (three decimals) is:
Numerical answer — type the value.
Show answer
Answer: 0.328
P(n ≥ 5) = ρ⁵ = 0.8⁵ = 0.328. The probability of exactly 5 would be (1 − ρ)ρ⁵ = 0.066.Which statements are correct?
Show answer
Answer: A — The LP relaxation of a maximisation integer programme gives an upper bound; B — Discrete-event simulation advances the clock from event to event; D — Little's law L = λW holds for a stable queue in steady state
VAM is a good starting solution, here 590 against the optimum 585, but optimality needs the MODI test. The other three statements are standard.A slack variable is added to a "less-than-or-equal-to" constraint in linear programming to
Show answer
Answer: D — convert the inequality into an equality
A non-negative slack takes up the unused capacity so ≤ becomes =. It does not change the objective or remove variables, the tempting distractors.A transportation problem has a feasible solution only if
Show answer
Answer: A — total supply equals total demand (balanced), else a dummy is added
A balanced problem (Σsupply = Σdemand) is required; an imbalance is handled by a dummy row or column. Equal costs or a single source are not conditions for feasibility, the tempting errors.A transportation problem with 3 sources and 4 destinations has, for a non-degenerate basic feasible solution, how many occupied (basic) cells? ____
Numerical answer — type the value.
Show answer
Answer: 6
Basic cells = m + n − 1 = 3 + 4 − 1 = 6. Using m × n = 12 counts all cells, not just the basic ones. Substituting the answer back into the relation confirms it.Integer programming differs from linear programming in that integer programming
Show answer
Answer: A — requires some or all variables to take integer values
IP adds integrality restrictions to an otherwise linear model, and is generally harder (NP-hard), not easier. The objective stays linear, so "nonlinear" is the tempting confusion.In an M/M/1 queue the arrival rate is 6 per hour and the service rate 10 per hour. The utilisation ρ is ____.
Numerical answer — type the value.
Show answer
Answer: 0.6
ρ = λ/μ = 6/10 = 0.6. Inverting (10/6 = 1.67) exceeds 1 and would wrongly imply an unstable queue. Substituting the answer back into the relation confirms it.For the M/M/1 queue above (ρ = 0.6), the mean number waiting in the queue L_q = ρ²/(1 − ρ) is ____.
Numerical answer — type the value.
Show answer
Answer: 0.9
L_q = 0.36/0.4 = 0.9. Using ρ/(1 − ρ) = 1.5 gives L (number in the system), not L_q, the common mix-up. Substituting the answer back into the relation confirms it.For an M/M/1 queue with λ = 6/h and μ = 10/h, the mean time a customer spends in the system W = 1/(μ − λ), in hours, is ____.
Numerical answer — type the value.
Show answer
Answer: 0.25
W = 1/(μ − λ) = 1/4 = 0.25 h (15 min). Using 1/μ = 0.1 gives only the service time, omitting the waiting. Substituting the answer back into the relation confirms it.Which statements about a linear programming problem are correct?
Show answer
Answer: A — The feasible region is a convex set; C — The objective and constraints are linear; D — An optimum, if finite, lies at a vertex
The feasible region is convex, a finite optimum sits at a vertex, and all functions are linear. The optimum need not be unique (it can be an edge of alternative optima), so the last statement is the trap.The Vogel’s approximation method (VAM) for a transportation problem generally gives
Show answer
Answer: C — a good initial basic feasible solution, often near optimal
VAM uses opportunity-cost penalties to build a strong starting solution, which is then improved (e.g. by MODI). It does not by itself guarantee optimality, the tempting overstatement.In a transportation plan, 10 units move on a route costing ₹2/unit and 5 units on a route costing ₹3/unit. The total cost of these moves, in ₹, is ____.
Numerical answer — type the value.
Show answer
Answer: 35
Cost = 10 × 2 + 5 × 3 = 20 + 15 = 35. Adding the unit costs (2 + 3 = 5) ignores the quantities shipped. Substituting the answer back into the relation confirms it.For the M/M/1 queue (λ = 6/h, L_q = 0.9), the mean waiting time in the queue W_q = L_q/λ, in hours (two decimals), is ____.
Numerical answer — type the value.
Show answer
Answer: 0.15
By Little’s law W_q = L_q/λ = 0.9/6 = 0.15 h (9 min). Dividing by μ instead of λ misapplies Little’s law. Substituting the answer back into the relation confirms it.A 0–1 (binary) integer variable is most naturally used to model
Show answer
Answer: B — a yes/no decision such as whether to open a facility
A binary variable captures an all-or-nothing (open/close, select/not) choice. Continuous flows and fractional levels need continuous variables, the tempting mismatches.In the simplex method, the entering variable (for a maximisation problem) is chosen as the one with
Show answer
Answer: A — the most positive coefficient in the objective (Z) row (most negative reduced cost)
The entering variable is the non-basic one that improves Z fastest (most positive c_j − z_j in a max problem). The leaving variable, not the entering one, is found from the minimum ratio of RHS, the tempting confusion.For an M/M/1 queue with ρ = 0.6, the probability of exactly 2 customers in the system, P₂ = (1 − ρ)ρ², is ____ (three decimals).
Numerical answer — type the value.
Show answer
Answer: 0.144
P₂ = (1 − 0.6)(0.6²) = 0.4 × 0.36 = 0.144. Omitting the (1 − ρ) factor (using 0.36) ignores the geometric normalisation.The branch-and-bound method for integer programming works by
Show answer
Answer: A — solving LP relaxations and branching on fractional variables, pruning by bounds
Branch-and-bound solves the LP relaxation, branches on a fractional variable into subproblems, and prunes those that cannot beat the incumbent bound. Simply rounding the LP solution can give infeasible or suboptimal answers, the tempting shortcut.