Mechanical Engineering‹›⌂ 0:00 studied

Module 16 · 10 min read · Free chapter

Operations research: linear programming, transportation, assignment and queuing

In short

Linear programming finds the best value of a linear objective under linear limits, and the answer always sits at a corner of the feasible region. Transportation problems need m plus n minus 1 occupied cells and are checked by the MODI method, while assignment uses the Hungarian method. In an M/M/1 queue, time in system is one over service rate minus arrival rate.

What are you preparing for? We show the practice and previous year questions of your exam.

Start from zero: making the best decision with numbers

A furniture unit makes tables and chairs. Each needs carpentry hours and polishing hours, and each earns a different profit. How many of each should it make this week?

A cement company must ship from three plants to four sites at least cost. A workshop must give four jobs to four machinists so the total time is least. A tool crib sees mechanics queueing for tools; is one attendant enough?

These are all operations research problems: choosing the best decision under limits. The tools here are linear programming, the transportation and assignment models, queuing theory and sequencing. Project scheduling with PERT and CPM is covered in Engineering economics and project management: PERT and CPM, and inventory models in Inventory control: EOQ, reorder point, safety stock and ABC analysis.

This chapter covers linear programming by graph and simplex with duality, the transportation and assignment problems, queuing models, and sequencing with a word on replacement and games.

Why it matters. GATE asks LP corner points, transportation degeneracy, the Hungarian method and M/M/1 numericals. ESE and BPSC AE add simplex, duality and Johnson's rule.

Linear programming: graphical, simplex and duality

Formulation. Choose decision variables, write a linear objective, and list linear constraints with non-negativity. For the furniture unit, with x tables and y chairs:

  • Maximise Z=60x+40yZ = 60x + 40y.
  • Carpentry: 4x+2y≤1204x + 2y \le 120 hours; polishing: 2x+3y≤902x + 3y \le 90 hours; x,y≥0x, y \ge 0.

Graphical method (two variables). Plot each constraint, shade the feasible region, and evaluate Z at each corner point; the optimum lies at a corner.

Here the corners are (0, 0), (30, 0), (0, 30) and the intersection of the two lines. Solving 4x+2y=1204x + 2y = 120 and 2x+3y=902x + 3y = 90 gives x = 22.5 and y = 15. Then Z = 1350 + 600 = 1950, which beats Z = 1800 at (30, 0) and 1200 at (0, 30). So the best plan is 22.5 tables and 15 chairs a week, for a profit of ₹1950.

Special cases. An unbounded solution when the region opens in the improving direction; infeasible when no point meets all constraints; multiple optima when the objective line is parallel to a binding constraint; and a redundant constraint that does not touch the region.

Simplex method. Convert inequalities to equations:

  • ≤\le constraints get a slack variable.
  • ≥\ge constraints get a surplus variable minus, plus an artificial variable, handled by the Big M or two-phase method.
  • Start at a basic feasible solution. The entering variable has the most negative entry in the Z row (for maximisation). The leaving variable has the smallest positive ratio of right-hand side to the pivot column (minimum ratio test). Pivot and repeat until no negative entry remains.

Duality. Every primal LP has a dual: a maximisation with m constraints and n variables becomes a minimisation with n constraints and m variables. The objective coefficients and right-hand sides swap, and the constraint matrix is transposed. At optimum the two objective values are equal. The dual variables are shadow prices, the gain in Z per extra unit of each resource.

Transportation and assignment problems

The transportation problem. Ship goods from m sources with supplies aia_i to n destinations with demands bjb_j at unit costs cijc_{ij}, minimising total cost. It is balanced when total supply equals total demand; otherwise add a dummy row or column with zero cost.

Initial basic feasible solution.

  • North-west corner rule: start at the top-left cell and allocate as much as possible, moving right or down. Quick but ignores cost.
  • Least cost method: allocate first to the cheapest cell.
  • Vogel's approximation method (VAM): for each row and column find the penalty, the difference between the two lowest costs, and allocate to the cheapest cell in the line with the highest penalty. It usually gives a solution close to optimal.

Degeneracy. A basic solution must have exactly m + n - 1 occupied cells. If fewer, the solution is degenerate; place a tiny quantity ε\varepsilon in an independent empty cell to proceed.

Optimality test: MODI (u-v) method.

  • For each occupied cell, set ui+vj=ciju_i + v_j = c_{ij}, starting with one u equal to zero.
  • For each empty cell, compute the opportunity cost dij=cij−(ui+vj)d_{ij} = c_{ij} - (u_i + v_j).
  • If all dij≥0d_{ij} \ge 0, the solution is optimal. Otherwise bring in the cell with the most negative dijd_{ij}, using a closed loop of plus and minus shifts.

The assignment problem. Assign n jobs to n workers, one each, to minimise total cost or time. It is a special transportation problem with all supplies and demands equal to 1. The Hungarian method solves it:

  1. Subtract each row's minimum from that row, then each column's minimum from that column.
  2. Cover all zeros with the fewest straight lines.
  3. If the number of lines equals n, make assignments on zeros, one per row and column.
  4. Otherwise subtract the smallest uncovered number from all uncovered cells, add it at intersections of lines, and repeat.

For maximisation, subtract every entry from the largest first. An unbalanced problem gets a dummy row or column of zeros. A forbidden assignment gets a very large cost M.

Queuing theory

Elements of a queue. Arrivals (often Poisson with mean rate λ\lambda), service times (often exponential with mean rate μ\mu), the number of servers, queue discipline (first come first served, priority), and the calling population. Kendall's notation A/B/c writes arrival distribution, service distribution and number of servers; M stands for Markovian (Poisson arrivals or exponential service).

The M/M/1 model. One server, Poisson arrivals, exponential service, infinite queue, first come first served. It needs λ<μ\lambda < \mu, or the queue grows without limit.

  • Utilisation: ρ=λμ\rho = \dfrac{\lambda}{\mu}; probability the system is empty: P0=1−ρP_0 = 1 - \rho; probability of n in system: Pn=(1−ρ)ρnP_n = (1 - \rho)\rho^n.
  • Average number in system: L=λμ−λ=ρ1−ρL = \dfrac{\lambda}{\mu - \lambda} = \dfrac{\rho}{1 - \rho}.
  • Average number in queue: Lq=λ2μ(μ−λ)L_q = \dfrac{\lambda^2}{\mu(\mu - \lambda)}.
  • Average time in system: W=1μ−λW = \dfrac{1}{\mu - \lambda}.
  • Average waiting time in queue: Wq=λμ(μ−λ)W_q = \dfrac{\lambda}{\mu(\mu - \lambda)}.
  • Little's law: L=λWL = \lambda W and Lq=λWqL_q = \lambda W_q, true for very general queues.

A worked example. Mechanics arrive at a tool crib at 8 per hour and the attendant serves 10 per hour. Then ρ=0.8\rho = 0.8, L=82=4L = \dfrac{8}{2} = 4 mechanics, Lq=6410×2=3.2L_q = \dfrac{64}{10 \times 2} = 3.2, W=12W = \dfrac{1}{2} hour = 30 min, and Wq=820W_q = \dfrac{8}{20} hour = 24 min. If a mechanic's time costs much more than an attendant's, a second attendant may well pay for itself.

The lesson of utilisation. As ρ\rho approaches 1, L grows like ρ1−ρ\dfrac{\rho}{1 - \rho}: at 0.5 it is 1, at 0.9 it is 9, at 0.95 it is 19. Systems run close to full load always have long queues.

Multi-server queues (M/M/c) spread arrivals over c servers with utilisation λcμ\dfrac{\lambda}{c \mu}; formulas are more involved and tables are used.

Sequencing, replacement and games

Single-machine sequencing rules.

  • Shortest processing time (SPT): minimises mean flow time and mean number of jobs waiting.
  • Earliest due date (EDD): minimises maximum lateness.
  • First come first served: fair but rarely optimal.
  • Flow time of a job is its completion time measured from time zero; mean flow time is their average.

Johnson's rule: n jobs on two machines. All jobs go through machine 1, then machine 2, in the same order. To minimise total elapsed time (makespan):

  1. Find the smallest processing time among all jobs on both machines.
  2. If it is on machine 1, put that job as early as possible; if on machine 2, as late as possible.
  3. Remove the job and repeat until all are placed.

A worked example. Jobs A to D take (M1, M2) times of A (5, 2), B (1, 6), C (9, 7), D (3, 8). The smallest time is 1 on M1 for B, so B goes first. Next is 2 on M2 for A, so A goes last. Next is 3 on M1 for D, so D goes second, leaving C third.

The order is B, D, C, A. M1 finishes jobs at 1, 4, 13 and 18. M2 finishes them at 7, 15, 22 and 24, so the makespan is 24.

Replacement analysis. For items that wear out gradually, such as machines and vehicles, replace when the average annual cost (capital cost less resale plus cumulative running cost, divided by years) is at its minimum. For items that fail suddenly, like bulbs, compare group replacement of all items at intervals with individual replacement on failure.

Game theory basics. In a two-person zero-sum game, a saddle point exists when the maximin equals the minimax; the value of the game is that entry and both players use pure strategies. Without a saddle point, players mix strategies; for a 2 by 2 game the odds method or algebra gives the probabilities.

Descriptive lens: how this topic is asked in written papers

Written papers test this chapter in four ways:

  1. Formulate and solve: an LP by the graphical or simplex method, and write its dual.
  2. Solve: a transportation problem by VAM and MODI, or an assignment by the Hungarian method.
  3. Calculate: M/M/1 measures and decide on adding a server.
  4. Sequence: jobs by Johnson's rule and find the makespan.

Practice questions (our own, not previous-year questions).

  1. Solve graphically: maximise Z=3x+5yZ = 3x + 5y subject to x≤4x \le 4, 2y≤122y \le 12, 3x+2y≤183x + 2y \le 18, x,y≥0x, y \ge 0. (10 marks)
  2. Customers arrive at a single counter at 12 per hour and are served at 15 per hour. Find utilisation, average queue length and average waiting time in queue. (5 marks)
  3. Explain degeneracy in the transportation problem and how it is resolved. (5 marks)

Answer plan for question 1.

  • Corners: (0, 0), (4, 0), (4, 3), (2, 6), (0, 6).
  • Z values: 0, 12, 27, 36, 30.
  • Optimum at (2, 6) with Z = 36.

Answer plan for question 2.

  • ρ=1215=0.8\rho = \dfrac{12}{15} = 0.8; Lq=14415×3=3.2L_q = \dfrac{144}{15 \times 3} = 3.2; Wq=1215×3=415W_q = \dfrac{12}{15 \times 3} = \dfrac{4}{15} hour, 16 min.

Quick revision

  • LP optimum at a corner; slack for ≤\le, surplus and artificial for ≥\ge; minimum ratio test for leaving variable.
  • Dual: swap objective and right-hand side, transpose matrix; equal optimum values; dual variables are shadow prices.
  • Transportation: m + n - 1 occupied cells; NWC, least cost, VAM; MODI dij=cij−(ui+vj)d_{ij} = c_{ij} - (u_i + v_j).
  • Assignment: Hungarian method; lines equal n means optimal.
  • M/M/1: ρ=λμ\rho = \dfrac{\lambda}{\mu}, L=λμ−λL = \dfrac{\lambda}{\mu - \lambda}, W=1μ−λW = \dfrac{1}{\mu - \lambda}, L=λWL = \lambda W.
  • SPT minimises mean flow time; Johnson's rule for two machines.
  • PERT and CPM are in project management.

Check yourself

Exam-style questions on this chapter. Pick an answer to see the explanation. 0 of 16 answered

  1. In a linear programming problem, the optimal solution, if it exists, lies:

  2. Maximise Z=60x+40yZ = 60x + 40y subject to 4x+2y≤1204x + 2y \le 120, 2x+3y≤902x + 3y \le 90, x,y≥0x, y \ge 0. The maximum Z is:

  3. In the simplex method, a 'greater than or equal to' constraint is converted to an equation by:

  4. In simplex, the leaving variable is selected by:

  5. The dual variables of an LP are interpreted as:

  6. A non-degenerate basic feasible solution of a transportation problem with 3 sources and 4 destinations has how many occupied cells?

  7. Vogel's approximation method allocates on the basis of:

  8. The optimality of a transportation solution is tested by the:

  9. The assignment problem is usually solved by the:

  10. In an M/M/1 queue with arrival rate 8 per hour and service rate 10 per hour, the average number in the system is:

  11. For the same queue (8 per hour arriving, 10 per hour served), the average waiting time in the queue is:

  12. Little's law states that:

  13. In Kendall's notation M/M/1, the letter M stands for:

  14. For a single machine, mean flow time is minimised by sequencing jobs in order of:

  15. Jobs with (M1, M2) times A (5, 2), B (1, 6), C (9, 7), D (3, 8) are sequenced by Johnson's rule. The order is:

  16. In a two-person zero-sum game, a saddle point exists when:

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

Frequently asked questions

Where does the optimum of a linear programming problem lie?

At a corner point of the feasible region, which is why the graphical and simplex methods check corner points.

What is degeneracy in a transportation problem?

It occurs when the number of occupied cells is less than m plus n minus 1; a tiny quantity is placed in an empty independent cell to continue.

What is Little's law in queuing?

The average number in the system equals the arrival rate times the average time spent in the system.

More in this module: Industrial engineering and operations research

Official sources

Facts in this chapter were checked against these official sources.

  1. BPSC Assistant Engineer (Mechanical), Advt 30/2025, and Bihar Engineering Service Class-II Recruitment Rules 2019, Papers 5-6
  2. NPTEL Fundamentals of Operations Research (IIT Madras, 110106062)
  3. GATE Mechanical Engineering syllabus (IIT organising institute)