
Operations Research
Step a simplex tableau, draw a stepping-stone loop, sequence jobs by Johnson's rule, watch a queue build up and find the critical path
28 chapters, 28 interactives, few words. Every chapter is mapped to the Anna University, VTU, SPPU, Mumbai University and KTU units it covers: LP formulation, the graphical and simplex methods, Big M and two-phase, duality and sensitivity, integer programming, network models, transportation and assignment, sequencing, decision analysis and game theory, queuing, Monte Carlo simulation, dynamic programming, inventory models, CPM, PERT and crashing, replacement and metaheuristics. MRP, group technology and FMS models are in the CAD/CAM and CIM book.
- AUOMA352Operations Research
- VTUBME755COperations Research
- SPPU402045DOperations Research
- MUILO7015, MEDLO5011Operations Research; Optimization Techniques
- KTUPEMET528Operations Research
By Skill-Lync · Updated 19 Nov 2026 · 28 chapters · 28 interactives · free, no sign-up
Operations research and formulating a linear programme
Which syllabus covers thisAU OMA352 Unit IVTU BME755C Module 1SPPU 402045D Units 1, 3MU ILO7015 Module 1KTU PEMET528 Module 1
What is operations research?
Operations research (OR) is the use of models and data to choose the best action when resources are limited: how many of each part to make, which truck goes where, how much stock to hold, how many service counters to open. Modern OR began at the Bawdsey Research Station in the UK in 1937, where A. P. Rowe's team studied how to get more out of the early-warning radar, and it grew fast during the Second World War. George Dantzig's simplex method of 1947 turned one family of these models, linear programmes, into routine arithmetic. GATE PI examines the same methods.
What are the phases of an OR study?
First, define the problem: what is being decided, what is the goal, and what limits apply. Second, build a model that links the decisions to the goal. Third, collect the data: hours per batch, hours available, profit per batch. Fourth, solve the model. Fifth, test it: does the answer make sense, and does it hold if the data shift a little? Last, put it to work and keep checking it. In the bracket shop below, a model that ignores the steel limit suggests 25 t of steel a week when only 24 t arrive, so testing matters.
What kinds of models does OR use?
An iconic model looks like the real thing at a different scale: a scale model of a shop layout. An analogue model uses one quantity to stand for another: a chart of stock against time, or a flow diagram. A symbolic (mathematical) model writes the problem as equations, which is what OR mostly uses. Models are also deterministic (every number known, as in linear programming) or probabilistic (arrivals and demand random, as in queuing and simulation), and static (one decision) or dynamic (a sequence of decisions over time).
How do you formulate a linear programme?
Name the decision variables, write the objective as a sum of (value per unit × quantity), then one constraint per limited resource, plus non-negativity. For an illustrative Pune bracket shop: x1, x2 = batches of brackets A and B per week; Max Z = 30x1 + 40x2 (₹ thousand); machining x1 + 2x2 ≤ 40 h, welding 3x1 + 2x2 ≤ 60 h, steel x1 + x2 ≤ 24 t. The best plan is x1 = 8, x2 = 16, Z = 880. Without the steel row it would be (10, 15) for 900; a contract for at least 10 batches of A gives (10, 14) for 860.
What does a linear programme assume?
Proportionality: profit and resource use grow in step with each variable, so 2 batches use twice the hours of 1. Additivity: the totals are sums, with no interaction between products. Divisibility: fractions such as 8.5 batches are allowed. Certainty: every coefficient is known and fixed. Non-negativity: you cannot make −3 batches. A set-up cost paid once per run breaks proportionality, whole trucks break divisibility (integer programming, chapter 7), and uncertain demand breaks certainty (simulation, chapter 20).
Bracket A earns ₹30 thousand per batch, but a ₹5 thousand set-up is paid once whenever A is made at all. Which LP assumption does this break?
With the set-up, 1 batch earns 30 − 5 = 25 but 2 batches earn 60 − 5 = 55, not 2 × 25 = 50: profit no longer grows in step with x1. A fixed charge needs a 0-1 variable, which is integer programming.
Worked examples
Formulate the bracket model and test two plans · Illustrative: bracket A takes 1 h machining and 3 h welding per batch, B takes 2 h and 2 h; 40 machining hours and 60 welding hours a week; each batch uses 1 t of steel, 24 t a week; profit ₹30 and ₹40 thousand per batch
- Variables: x1, x2 = batches of A and B per week
- Max Z = 30x1 + 40x2 subject to x1 + 2x2 ≤ 40, 3x1 + 2x2 ≤ 60, x1 + x2 ≤ 24, x1, x2 ≥ 0
- Plan (10, 15): machining 40 h, welding 60 h, steel 25 t: steel exceeds 24, so it is infeasible even though Z would be 900
- Plan (8, 16): machining 40 h, welding 56 h, steel 24 t: feasible, welding has 4 h spare
- Z = 30 × 8 + 40 × 16 = 880
Answer: Plan (8, 16) is feasible with Z = ₹880 thousand a week; chapter 2 shows no corner does better
A minimum-cost coolant blend · Illustrative: a sump needs at least 12 L of oil and 5 L of additive from two concentrates; rich concentrate ₹150/L (60 % oil, 10 % additive), lean ₹90/L (30 % oil, 20 % additive); at most 36 L of concentrate in total
- x1, x2 = litres of rich and lean concentrate
- Min Z = 150x1 + 90x2 subject to 0.6x1 + 0.3x2 ≥ 12 (oil), 0.1x1 + 0.2x2 ≥ 5 (additive), x1 + x2 ≤ 36, x1, x2 ≥ 0
- Blend (10, 20): oil 12 L, additive 5 L, total 30 L: feasible, cost 3300
- Blend (15, 15): oil 13.5 L, additive 4.5 L: short of additive, infeasible
- The corners of the region are (4, 32) ₹3480, (10, 20) ₹3300 and (22, 14) ₹4560
Answer: Min Z = ₹3300 with 10 L rich and 20 L lean concentrate
When the LP assumptions break: a set-up cost · The bracket model of Example 1, plus a die set-up cost K (₹ thousand) paid once per week if any bracket A is made (illustrative)
- Plan (8, 16): Z = 880 − K; plan (0, 20) makes no A, so Z = 40 × 20 = 800 with no set-up
- K = 50: 880 − 50 = 830, still better than 800
- K = 90: 880 − 90 = 790, now worse than 800: dropping A is best
- A plain LP cannot see this jump: model it with a 0-1 variable y (y = 1 if A is made, x1 ≤ 20y) and integer programming
Answer: Above K = 80 the best plan switches from (8, 16) to (0, 20)
The graphical method: feasible region, iso-profit line and special cases
Which syllabus covers thisAU OMA352 Unit IVTU BME755C Module 1SPPU 402045D Unit 3MU ILO7015 Module 1KTU PEMET528 Module 1
How does the graphical method solve a two-variable LP?
Draw each constraint as a line (its two intercepts are enough), shade the side that satisfies it, and keep the area every row allows, with x1, x2 ≥ 0: the feasible region. Its corner points are where two lines meet. An optimum, if one exists, sits at a corner, so evaluate Z at each one. For the bracket model the corners and profits are (0, 0) 0, (20, 0) 600, (12, 12) 840, (8, 16) 880 and (0, 20) 800: the best plan is (8, 16), Z = 880.
What is the iso-profit line?
It is the set of points with the same Z, a straight line 30x1 + 40x2 = Z with slope −c1/c2 = −3/4. Raising Z slides the line parallel to itself, away from the origin. The last point of the feasible region it touches is the optimum. Here the line leaves the region at (8, 16), Z = 880. For a minimisation, slide the iso-cost line towards the origin instead and take the first point it touches.
What special cases can the graph show?
Alternate optima: the objective is parallel to a binding edge. With Z = 30x1 + 30x2, every point from (12, 12) to (8, 16), (10, 14) included, gives 720. Unbounded: the region is open in the direction Z improves, so Z grows without limit, which usually means a missing constraint. Infeasible: no point meets every row; a contract x1 + x2 ≥ 28 is impossible when machining and welding allow at most 25. Redundant: a row that never touches the region, such as steel ≤ 28 when the other rows already cap x1 + x2 at 25.
How does a minimisation with ≥ constraints look on the graph?
The ≥ rows keep the region away from the origin, and the region is usually open to the top-right. With positive costs that is fine: the iso-cost line moves down towards the origin and stops at the first corner it meets. In the interactive's minimise case (Min Z = 40x1 + 30x2 with 2x1 + x2 ≥ 16, x1 + x2 ≥ 11, x1 + 3x2 ≥ 15) the corners cost 480, 380, 420 and 600, so the cheapest plan is (5, 6) at 380. An open region only means an unbounded answer when the objective improves along the opening.
On the bracket region, the objective is changed to Max Z = 30x1 + 30x2, parallel to the steel edge x1 + x2 = 24. How many optimal plans are there?
Z = 30(x1 + x2) = 30 × 24 = 720 at every point of the steel edge from (12, 12) to (8, 16), for example (10, 14). Both corners and everything between them are optimal: alternate optima.
Worked examples
Solve the bracket model graphically · Max Z = 30x1 + 40x2 subject to x1 + 2x2 ≤ 40, 3x1 + 2x2 ≤ 60, x1 + x2 ≤ 24, x1, x2 ≥ 0 (illustrative)
- Intercepts: machining (40, 0) and (0, 20); welding (20, 0) and (0, 30); steel (24, 0) and (0, 24)
- Machining ∩ welding: subtract the rows, 2x1 = 20, so (10, 15); it needs 25 t of steel, outside the region
- Machining ∩ steel: x2 = 40 − 24 = 16, x1 = 8, so (8, 16); welding 56 ≤ 60
- Welding ∩ steel: 3x1 + 2(24 − x1) = 60, x1 = 12, so (12, 12); machining 36 ≤ 40
- Z at the corners: (0, 0) 0, (20, 0) 600, (12, 12) 840, (8, 16) 880, (0, 20) 800
Answer: x1 = 8, x2 = 16, Z = ₹880 thousand a week; machining and steel are binding, welding has 4 h spare
The coolant blend by the graphical method · Min Z = 150x1 + 90x2 subject to 0.6x1 + 0.3x2 ≥ 12, 0.1x1 + 0.2x2 ≥ 5, x1 + x2 ≤ 36 (chapter 1, illustrative)
- Scale the rows: oil 2x1 + x2 ≥ 40, additive x1 + 2x2 ≥ 50, total x1 + x2 ≤ 36
- Oil ∩ additive: 2x1 + x2 = 40 and x1 + 2x2 = 50 give 3x1 = 30, so (10, 20); total 30 ≤ 36
- Oil ∩ total: x1 = 40 − 36 = 4, x2 = 32 (additive 6.8 L ≥ 5)
- Additive ∩ total: x2 = 50 − 36 = 14, x1 = 22 (oil 17.4 L ≥ 12)
- Costs: (10, 20) ₹3300, (4, 32) ₹3480, (22, 14) ₹4560
Answer: 10 L rich + 20 L lean concentrate, Z = ₹3300; the region is a triangle and both content rows are binding
Spot the special case · The bracket rows (machining ≤ 40, welding ≤ 60, steel ≤ 24) with (a) Max Z = 20x1 + 40x2; (b) machining and welding only, plus a contract x1 + x2 ≥ 28 (illustrative)
- (a) The objective 20x1 + 40x2 = 20(x1 + 2x2) is parallel to the machining edge
- Corners: (0, 20) gives 800, (8, 16) gives 800, (12, 12) gives 720: a tie at the top
- Every point between, e.g. (4, 18), also gives 20 × 4 + 40 × 18 = 800: alternate optima
- (b) The largest x1 + x2 that machining and welding allow is 25, at (10, 15)
- So x1 + x2 ≥ 28 can never hold: the region is empty
Answer: (a) alternate optima, Z = 800 along the edge (0, 20)–(8, 16); (b) infeasible (a contract of 25 or less would be feasible)
The simplex method: slack variables, the tableau and pivoting
Which syllabus covers thisAU OMA352 Unit IVTU BME755C Module 1SPPU 402045D Unit 3MU ILO7015 Module 1KTU PEMET528 Module 1
How do you set a problem up for the simplex method?
Turn each ≤ row into an equation with a slack variable: x1 + 2x2 + s1 = 40, where s1 is the unused machining hours. The bracket model then has 5 variables and 3 equations. Set any 2 to zero and solve for the other 3: a basic solution. There are 10 ways to choose the 3 basic variables, but only 5 give a feasible corner. The easy start is x1 = x2 = 0 with the slacks basic: s1 = 40, s2 = 60, s3 = 24, Z = 0. The simplex method then moves from corner to neighbouring corner, never lowering Z.
How do you read the tableau and the Cj − Zj row?
Each row holds a basic variable (with its profit CB) and the coefficients of its equation. Zj = Σ CB × (column entry) is the profit given up by bringing one unit of column j in; Cj − Zj is the net gain per unit. For a maximisation, the most positive Cj − Zj enters; when every Cj − Zj ≤ 0, no neighbour is better and the tableau is optimal. In the first bracket tableau Cj − Zj is 30 for x1 and 40 for x2, so x2 enters. Some books print Zj − Cj instead: the signs flip and the most negative enters. Ties go to the smaller subscript.
How does one pivot work?
Divide each b by the entering column's entry in that row, using only positive entries: the smallest ratio is the key row, and its basic variable leaves (it is the first to hit zero as the entering variable grows). The entry at the crossing is the key element. Divide the key row by it, then subtract multiples of the new key row from every other row to clear the column. For the brackets the ratios are 40/2 = 20, 60/2 = 30 and 24/1 = 24, so s1 leaves and the key element is 2. Two pivots reach Z = 0, then 800, then 880.
What else does the final tableau tell you?
The b column gives the basic values: x2 = 16, s2 = 4 (spare welding hours), x1 = 8, and Z = 880. Under each slack, −(Cj − Zj) is that resource's shadow price: ₹10 thousand per extra machining hour, ₹20 thousand per extra tonne of steel, and 0 for welding, which is not used up. Check: 40 × 10 + 24 × 20 = 880. A zero Cj − Zj under a non-basic variable signals alternate optima; an entering column with no positive entry means the problem is unbounded. The method is George Dantzig's, from 1947.
After the first pivot of the bracket model, Z = 800 at (0, 20) and the Cj − Zj of x1 is +10. What does the +10 mean?
A earns 30, but each batch of A uses 1 machining hour, which forces out half a batch of B worth 40 × 1/2 = 20: Zj = 20, so the net gain is 30 − 20 = 10. It is positive, so x1 enters and Z rises to 880.
Worked examples
The bracket model by the simplex method · Max Z = 30x1 + 40x2; x1 + 2x2 + s1 = 40, 3x1 + 2x2 + s2 = 60, x1 + x2 + s3 = 24 (illustrative)
- Start: basis s1, s2, s3 = 40, 60, 24; Cj − Zj = 30, 40, 0, 0, 0; x2 enters (40)
- Ratios 40/2 = 20, 60/2 = 30, 24/1 = 24: s1 leaves, key element 2
- R1 ÷ 2: x2 row = 1/2, 1, 1/2, 0, 0 | 20; R2 − 2 × new R1 = 2, 0, −1, 1, 0 | 20; R3 − new R1 = 1/2, 0, −1/2, 0, 1 | 4
- Z = 800; Cj − Zj = 10, 0, −20, 0, 0: x1 enters; ratios 20 ÷ 1/2 = 40, 20 ÷ 2 = 10, 4 ÷ 1/2 = 8: s3 leaves
- R3 × 2: x1 row = 1, 0, −1, 0, 2 | 8; then x2 row = 0, 1, 1, 0, −1 | 16, s2 row = 0, 0, 1, 1, −4 | 4
- Cj − Zj = 0, 0, −10, 0, −20: all ≤ 0, optimal
Answer: x1 = 8, x2 = 16, s2 = 4 h of welding spare, Z = ₹880 thousand
Three products, three pivots · Illustrative: brackets, flanges and housings (x1, x2, x3 batches); Max Z = 60x1 + 20x2 + 40x3 subject to foundry 4x1 + 2x3 ≤ 88, machining 2x1 + x2 + 2x3 ≤ 64, finishing 4x1 + x2 + x3 ≤ 100 (hours)
- Start: x1 enters (60); ratios 88/4 = 22, 64/2 = 32, 100/4 = 25: s1 leaves, Z = 60 × 22 = 1320
- Cj − Zj: x2 = 20, x3 = 10, s1 = −15: x2 enters; ratios 20/1 = 20, 12/1 = 12: s3 leaves, Z = 1320 + 20 × 12 = 1560
- Cj − Zj: x3 = 30, s1 = 5: x3 enters; ratios 22 ÷ 1/2 = 44, 8 ÷ 2 = 4: s2 leaves, Z = 1560 + 30 × 4 = 1680
- Final Cj − Zj under s1, s2, s3: −5/2, −15, −5; all others 0: optimal
- Check: 60 × 20 + 20 × 16 + 40 × 4 = 1680, and every basic solution enumerated gives at most 1680
Answer: x1 = 20, x2 = 16, x3 = 4, Z = ₹1,680 thousand; all three resources are used up
Shadow prices from the final tableau · The final bracket tableau of Example 1: Cj − Zj = −10 under s1 (machining), 0 under s2 (welding), −20 under s3 (steel)
- Shadow prices: machining ₹10 thousand per hour, welding 0, steel ₹20 thousand per tonne
- Check machining: re-solve with 41 h; the corner moves to (7, 17), Z = 30 × 7 + 40 × 17 = 890 = 880 + 10
- Check steel: re-solve with 25 t; the corner moves to (10, 15), Z = 900 = 880 + 20
- Check welding: 61 h leaves Z = 880, because 4 h are already spare
- Strong duality: 40 × 10 + 60 × 0 + 24 × 20 = 880 = Z
Answer: Pay up to ₹10 thousand for an extra machining hour and ₹20 thousand for an extra tonne of steel; extra welding is worth nothing
Artificial variables: the Big M and two-phase methods, and degeneracy
Which syllabus covers thisAU OMA352 Unit IVTU not in syllabusSPPU 402045D Unit 3MU ILO7015 Module 1KTU PEMET528 Module 1
Why do ≥ and = rows need artificial variables?
A ≤ row gets a slack with coefficient +1, which can start the basis at x = 0. A ≥ row gets a surplus with coefficient −1: at x = 0 it would be negative, so it cannot start. An = row has nothing at all. So each ≥ or = row gets an artificial variable A ≥ 0, a placeholder with no physical meaning: 2x1 + x2 − s1 + A1 = 16 and x1 + x2 + A2 = 14. Any solution with an artificial above zero breaks a real row, so the method must drive every artificial to 0.
How does the Big M method work?
Give each artificial a huge cost M (+M in a minimisation, −M in a maximisation), then run the simplex method with entries of the form a + bM: compare the M terms first, and the constants only when the M terms tie. For an illustrative foundry blend, Min Z = 6x1 + 5x2 with 2x1 + x2 ≥ 16, x1 + x2 = 14, x1 ≤ 7, Z falls 30M → 9M+42 → 5M+52 → 72 at x1 = 2, x2 = 12. If the method stops with an artificial still positive (P stock cut to 1 t leaves A1 = 1), no feasible blend exists.
What does the two-phase method do differently?
Phase 1 ignores the real costs and minimises W = A1 + A2, the total of the artificials. If W reaches 0, every artificial is out and the tableau is a genuine corner; if W stays above 0, the problem is infeasible. Phase 2 drops the artificial columns, puts the real Cj back and carries on. For the blend, W goes 30 → 9 → 5 → 0 at (7, 7), then one phase-2 pivot reaches (2, 12), Z = 72, the Big M answer. No huge M appears, so a computer meets no rounding trouble.
What is degeneracy, and can the simplex method cycle?
A tie in the ratio test means two basic variables hit zero together; one leaves and the other stays basic at 0. That corner is degenerate: more lines meet there than needed. In a steel-short bracket week (steel ≤ 20) the first ratios are 20, 30 and 20: s1 leaves and s3 stays at 0. The next pivot has ratio 0, so the basis changes while the point and Z = 800 stay put. In rare cases such pivots can cycle forever. Bland's rule (1977) prevents it: enter the lowest-subscript improving variable and, on a ratio tie, remove the lowest-subscript one.
A Big M run stops with every Cj − Zj ≥ 0 (a minimisation), but the artificial A1 = 1 is still in the basis. What do you conclude?
An artificial above zero means a real row is still broken by 1 unit, and no pivot can improve that. With M large enough, an artificial stays positive at the end only when the problem has no feasible solution.
Worked examples
The foundry blend by Big M · Illustrative: x1 t of alloy-rich scrap P at ₹6 thousand/t, x2 t of plain scrap Q at ₹5 thousand/t; Min Z = 6x1 + 5x2 subject to 2x1 + x2 ≥ 16 (alloy), x1 + x2 = 14 (charge), x1 ≤ 7 (P stock)
- Rows: 2x1 + x2 − s1 + A1 = 16; x1 + x2 + A2 = 14; x1 + s2 = 7; A1, A2 cost M; start basis A1, A2, s2, Z = 30M
- Cj − Zj: x1 = 6−3M, x2 = 5−2M: −3M is the most negative, x1 enters; ratios 8, 14, 7: s2 leaves, Z = 9M+42
- x2 enters (5−2M); ratios 2/1 = 2, 7/1 = 7: A1 leaves, Z = 5M+52
- Cj − Zj: s1 = 5−M, s2 = 4−M: equal M terms, so the constants decide, s2 enters; ratios 5, 7: A2 leaves
- Final: x2 = 12, s2 = 5, x1 = 2; Cj − Zj under s1 = 1 ≥ 0: optimal
- Check by corners of the = line: (7, 7) costs 77, (2, 12) costs 72
Answer: x1 = 2 t of P, x2 = 12 t of Q, Z = ₹72 thousand; 5 t of P stock unused
Two-phase on a contract problem · Illustrative gear press week: Max Z = 3x1 + 5x2 (₹ thousand per lot) subject to x1 + x2 ≤ 12 (press hours) and x1 ≥ 4 (contract for gear A)
- Rows: x1 + x2 + s1 = 12; x1 − s2 + A1 = 4. Phase 1: Min W = A1, start W = 4
- Phase 1 Cj − Zj of x1 = −1: x1 enters; ratios 12/1 = 12, 4/1 = 4: A1 leaves, W = 0
- Phase 2 starts at (4, 0) with s1 row = 0, 1, 1, 1 | 8; with real costs Z = 12, Cj − Zj: x2 = 5, s2 = 3
- x2 enters (5); the only positive entry is in the s1 row, ratio 8: s1 leaves
- Final Cj − Zj: s1 = −5, s2 = −2: optimal
Answer: x1 = 4, x2 = 8, Z = ₹52 thousand: the contract row is binding
A degenerate pivot · Max Z = 30x1 + 40x2 subject to x1 + 2x2 ≤ 40, 3x1 + 2x2 ≤ 60, x1 + x2 ≤ 20 (the bracket model in an illustrative steel-short week)
- x2 enters (40); ratios 40/2 = 20, 60/2 = 30, 20/1 = 20: a tie
- s1 leaves (lower subscript); s3 stays basic with value 0; Z = 800 at (0, 20)
- x1 enters (Cj − Zj = 10); ratios 20 ÷ 1/2 = 40, 20 ÷ 2 = 10, 0 ÷ 1/2 = 0: s3 leaves with θ = 0
- After the pivot x1 is basic at 0: the point is still (0, 20) and Z is still 800
- Cj − Zj = 0, 0, −10, 0, −20: optimal; machining, steel and x1 = 0 all meet at (0, 20)
Answer: x1 = 0, x2 = 20, Z = ₹800 thousand: a degenerate optimum reached after one pivot that changed nothing
Duality: primal and dual, shadow prices, complementary slackness and the dual simplex
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 402045D Unit 3MU ILO7015 Module 1KTU not in syllabus
How do you write the dual of a linear programme?
Every LP has a twin. For a maximisation with ≤ rows and x ≥ 0, the dual minimises b·y subject to Aᵀy ≥ c and y ≥ 0. Each constraint becomes a dual variable, each variable becomes a dual constraint, the right-hand sides become the costs and the matrix is transposed. The illustrative plant, Max Z = 30x1 + 40x2 with 40 press hours, 25 assembly hours and 60 kg of coating powder, has the dual Min W = 40y1 + 25y2 + 60y3 with y1 + y2 + 3y3 ≥ 30 and 2y1 + y2 + y3 ≥ 40. An = row gives a free dual variable; a ≥ row in a maximisation gives y ≤ 0.
What does a dual variable mean in rupees?
yi is the shadow price of resource i: how much the best profit rises for one more unit of it. At the plant's optimum (10, 15), Z = ₹900, the duals are y1 = ₹10 per press hour, y2 = ₹20 per assembly hour and y3 = 0, because 15 kg of coating powder is already spare. The final simplex tableau prints them: they are minus the Cj − Zj entries under the slack columns. A shadow price holds only while the basis stays optimal; for assembly that is 20 to 28 hours. An extra assembly hour pays if it costs less than ₹20.
What do weak and strong duality guarantee?
Weak duality: any feasible plan earns no more than any feasible set of prices charges, Z ≤ W. The plan (0, 0) earns 0 and the prices y = (30, 0, 0) satisfy both dual rows and charge W = ₹1,200, so the optimum lies between 0 and ₹1,200. Strong duality: at the optimum the two meet, Z* = W* = ₹900. Two results follow: if the primal is unbounded the dual has no feasible solution, and if one problem is infeasible the other is infeasible or unbounded.
What is complementary slackness?
At the optimum every resource with spare capacity has a zero price, and every priced resource is used up: si·yi = 0 for each constraint. Every product that is made has its dual row tight: xj·tj = 0, where tj is the dual surplus. In the plant, powder has 15 kg spare, so y3 = 0; both products are made, so y1 + y2 = 30 and 2y1 + y2 = 40, which give y1 = 10 and y2 = 20 at once. This recovers the dual from a primal answer without solving again.
When is the dual simplex method used?
Use it when a tableau already passes the optimality test (all Cj − Zj ≤ 0 for a maximisation) but some right-hand side is negative: a minimisation with ≥ rows written with slacks, or a model after a new constraint is added. The row with the most negative RHS leaves; the entering column has the smallest |(Cj − Zj)/a| over the negative entries of that row. Solving the plant's dual this way takes 2 pivots, ends at W = 900, and the slack columns hand back x1 = 10 and x2 = 15.
At the plant's optimum 15 kg of coating powder is unused. What is the shadow price of powder?
Complementary slackness: a resource with spare capacity is worth nothing at the margin, so s3 = 15 forces y3 = 0. One more kilogram of powder would only add to the unused pile.
Worked examples
Writing a dual with a ≥ row and an = row · Max Z = 8x1 + 5x2 subject to 2x1 + x2 ≤ 20, x1 + 3x2 ≥ 6, x1 + x2 = 12, x1, x2 ≥ 0 (illustrative)
- Three rows give three dual variables and two variables give two dual rows; the dual is a minimisation with costs 20, 6 and 12
- Row 1 (≤ in a max): y1 ≥ 0. Row 2 (≥ in a max): y2 ≤ 0. Row 3 (=): y3 free
- Dual: Min W = 20y1 + 6y2 + 12y3 subject to 2y1 + y2 + y3 ≥ 8 and y1 + 3y2 + y3 ≥ 5
- Primal: along x1 + x2 = 12, Z = 3x1 + 60 grows with x1 until row 1 binds at x1 = 8: x = (8, 4), Z = 84; row 2 has 14 to spare
- Complementary slackness: row 2 slack, so y2 = 0; x1, x2 > 0, so 2y1 + y3 = 8 and y1 + y3 = 5, giving y1 = 3, y3 = 2
- W = 20 × 3 + 6 × 0 + 12 × 2 = 84 = Z
Answer: Min W = 20y1 + 6y2 + 12y3 with y1 ≥ 0, y2 ≤ 0, y3 free; W* = Z* = 84 at y = (3, 0, 2)
Shadow prices from complementary slackness · Max Z = 12x1 + 10x2 (₹ hundred) subject to cutting 2x1 + x2 ≤ 14 h, assembly x1 + 2x2 ≤ 16 h, demand x1 ≤ 6; the optimum is x1 = 4, x2 = 6 (illustrative)
- Rows at the optimum: cutting 2 × 4 + 6 = 14 (tight), assembly 4 + 2 × 6 = 16 (tight), demand 4 ≤ 6 (2 spare)
- Spare demand capacity, so y3 = 0
- x1 > 0 and x2 > 0, so both dual rows are tight: 2y1 + y2 = 12 and y1 + 2y2 = 10
- Solve: y1 = 14/3 ≈ 4.67, y2 = 8/3 ≈ 2.67; both ≥ 0, so the dual is feasible
- Check: W = 14 × 14/3 + 16 × 8/3 = 196/3 + 128/3 = 108 = Z = 12 × 4 + 10 × 6
Answer: y = (14/3, 8/3, 0): a cutting hour is worth about 4.67 and an assembly hour about 2.67 (₹ hundred)
Dual simplex on a minimum-cost blend · Min Z = 5x1 + 4x2 (₹ thousand) for two scrap grades (tonnes), with 2x1 + x2 ≥ 8 units of element A and x1 + 2x2 ≥ 10 units of element B (illustrative)
- Multiply both rows by −1 and add slacks: −2x1 − x2 + s1 = −8, −x1 − 2x2 + s2 = −10; Max (−Z) has Cj − Zj = −5, −4 ≤ 0, optimal but infeasible
- Step 1: s2 leaves (RHS −10 most negative); ratios |Cj − Zj|/|a|: x1 5/1 = 5, x2 4/2 = 2; x2 enters
- New rows: −3/2 x1 + s1 − 1/2 s2 = −3; 1/2 x1 + x2 − 1/2 s2 = 5
- Step 2: s1 leaves (RHS −3); ratios: x1 3 ÷ 3/2 = 2, s2 2 ÷ 1/2 = 4; x1 enters
- All RHS ≥ 0: x1 = 2, x2 = 4; Z = 5 × 2 + 4 × 4 = 26
Answer: x1 = 2 t, x2 = 4 t, minimum cost Z = 26 (₹ thousand), reached in 2 pivots
Sensitivity analysis: ranging the objective coefficients and right-hand sides
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU not in syllabusMU ILO7015 Module 1KTU PEMET528 Module 1
What question does sensitivity analysis answer?
LP data are estimates: a profit of ₹30 a bracket or 25 assembly hours a day may change next month. Sensitivity analysis asks how far each number can move, one at a time, before the optimal basis (the set of basic variables, and so the binding constraints) changes. It reads the answer off the final tableau, so nothing is solved again. Inside the range the plant keeps the same recipe even if the quantities shift; outside it a different corner wins and a few more simplex or dual simplex pivots are needed.
How far can a profit change before the optimal corner moves?
The corner (10, 15) stays optimal while the iso-profit line is no steeper than the assembly edge x1 + x2 (slope 1) and no flatter than the press edge x1 + 2x2 (slope 1/2). With c2 = 40 that means 20 ≤ c1 ≤ 40; with c1 = 30 it means 30 ≤ c2 ≤ 60. The tableau gives the same limits by dividing each non-basic Cj − Zj by the entry in that variable's row. Inside the range Z changes by x1 per rupee of c1: at c1 = 38, Z = 900 + 8 × 10 = ₹980.
How far can a resource change, and what is each unit worth?
Changing bi moves the optimal corner along an edge. The basic variables change by Δ times the slack column of row i, and each must stay ≥ 0. For assembly, the s2 column (2, −1, −5) against the right-hand sides (10, 15, 15) of x1, x2 and s3 allows −5 ≤ Δ ≤ 3: assembly from 20 to 28 hours. Inside that range each hour is worth y2 = ₹20, so at 28 hours Z = ₹960. Beyond 28 hours powder and press bind instead and extra assembly hours earn nothing.
How do you test a new product without solving again?
Price it out with the shadow prices. A new part needing a1 press hours, a2 assembly hours and a3 kg of coating powder uses resources worth 10a1 + 20a2 + 0a3 rupees at the margin. If its profit is larger (a positive reduced cost), bringing it in raises Z; if not, the current plan stays optimal. Example 3 prices a ₹45 cover plate needing 2 h, 1 h and 3 kg: the resources are worth ₹40, each plate adds ₹5 at first, and the new optimum makes 7.5 plates for Z = ₹937.5.
The bracket's profit rises from ₹30 to ₹38; its range is 20 to 40. What happens?
38 is inside the range, so the corner (10, 15) is still optimal: Z = 38 × 10 + 40 × 15 = ₹980, a rise of 8 × 10. More brackets pay only once c1 passes 40.
Worked examples
Ranging both profits from the final tableau · The product-mix LP of this chapter: final tableau with basis x1, x2, s3 (illustrative)
- x1 row: s1 −1, s2 2 | 10. x2 row: s1 1, s2 −1 | 15. Cj − Zj of s1, s2: −10, −20
- c1 (x1 row): s1 gives −10/−1 = 10 (a ≤ limit on Δ, entry negative); s2 gives −20/2 = −10 (a ≥ limit); so −10 ≤ Δ ≤ 10 and 20 ≤ c1 ≤ 40
- c2 (x2 row): s1 gives −10/1 = −10 (≥ limit); s2 gives −20/−1 = 20 (≤ limit); so 30 ≤ c2 ≤ 60
- Graphical check: c1/c2 must lie between 1/2 (press edge) and 1 (assembly edge): 20/40 = 1/2 and 40/40 = 1
- Outside, at c1 = 45: the corner (17.5, 7.5) gives Z = 1087.5, more than 1050 at (10, 15), so the plan changes
Answer: 20 ≤ c1 ≤ 40 and 30 ≤ c2 ≤ 60 (₹ per unit, one at a time)
Ranging a right-hand side and pricing extra hours · Max Z = 12x1 + 10x2 (₹ hundred), cutting 2x1 + x2 ≤ 14 h, assembly x1 + 2x2 ≤ 16 h, demand x1 ≤ 6 (Example 2 of the duality chapter)
- Final tableau, basis x1, x2, s3, RHS 4, 6, 2; the s1 column is (2/3, −1/3, −2/3) and Cj − Zj of s1 is −14/3
- Cutting b1 = 14 + Δ: x1 = 4 + 2Δ/3 ≥ 0 gives Δ ≥ −6; x2 = 6 − Δ/3 ≥ 0 gives Δ ≤ 18; s3 = 2 − 2Δ/3 ≥ 0 gives Δ ≤ 3
- So −6 ≤ Δ ≤ 3: 8 ≤ b1 ≤ 17 hours, with y1 = 14/3 per hour
- Three more cutting hours (b1 = 17): Z = 108 + 3 × 14/3 = 122
- Check by solving again: x = (6, 5), Z = 12 × 6 + 10 × 5 = 122; demand x1 ≤ 6 now binds, so a fourth hour is worth less
Answer: 8 ≤ b1 ≤ 17 h; 3 extra hours raise Z from 108 to 122 (₹ hundred)
Pricing out a new product · The product-mix plant considers a cover plate x3: profit ₹45, using 2 h press, 1 h assembly and 3 kg powder; shadow prices 10, 20, 0 (illustrative)
- Resources used, at shadow prices: 2 × 10 + 1 × 20 + 3 × 0 = ₹40; reduced cost = 45 − 40 = 5 > 0, so x3 should enter
- Column of x3 in the final tableau = B⁻¹a3: x1 row 0, x2 row 1, s3 row 2
- Ratio test: x2 row 15/1 = 15, s3 row 15/2 = 7.5; s3 leaves, x3 = 7.5
- New plan: x1 = 10, x2 = 15 − 7.5 = 7.5, x3 = 7.5; check: press 10 + 15 + 15 = 40, assembly 10 + 7.5 + 7.5 = 25, powder 30 + 7.5 + 22.5 = 60
- Z = 900 + 5 × 7.5 = 937.5; solving the 3-product LP from scratch gives the same 937.5
Answer: Make the plate: x = (10, 7.5, 7.5) a day, Z = ₹937.5, up ₹37.5
Integer programming: branch and bound and Gomory's cutting plane
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU not in syllabusMU ILO7015 Module 1KTU not in syllabus
Why not just round the LP answer?
Machines, trucks and batches come in whole numbers. In the illustrative gear-batch problem, Max Z = 7x1 + 6x2 with 3x1 + 2x2 ≤ 11 and 2x1 + 3x2 ≤ 12, the LP optimum is (1.8, 2.8) with Z = 29.4. Rounding to (2, 3) breaks both constraints. Rounding down to (1, 2) is feasible but earns only 19. The true integer optimum is (3, 1) with Z = 27, nowhere near the rounded point. With many variables, checking every integer point is hopeless, so a search that skips most of them is needed.
How does branch and bound work?
Solve the LP relaxation. If x1 = 1.8 is fractional, split the problem into x1 ≤ 1 and x1 ≥ 2: no integer point is lost and the fractional corner is cut away. Each branch's LP optimum is an upper bound on anything inside it; the best integer answer so far, the incumbent, is a lower bound. A branch is closed when it is infeasible, integer, or its bound cannot beat the incumbent. Land and Doig proposed the method in 1960. Here depth-first search visits 9 nodes and best-bound search 7 before proving Z = 27 optimal.
What is a Gomory cut?
Take a row of the optimal tableau whose right-hand side is fractional and keep only the fractional parts of its entries: Σ fj·vj ≥ f0 is a new constraint that every integer solution satisfies but the current LP optimum does not. The x1 row, x1 + 3/5 s1 − 2/5 s2 = 9/5, gives 3/5 s1 + 3/5 s2 ≥ 4/5, which in x1 and x2 is 3x1 + 3x2 ≤ 13. Solve again by the dual simplex and repeat: a second cut, x1 + x2 ≤ 4, makes (3, 1) a corner. Ralph Gomory proposed cutting planes in the 1950s.
What kinds of integer models are there?
Pure integer programmes have every variable whole; mixed ones keep some continuous, such as tonnes of steel beside a whole number of furnaces. 0-1 variables model yes-or-no decisions: build a cell or not, choose a supplier or not, and logic such as 'project B only if project A' (xB ≤ xA). A fixed setup cost F is charged only when output x > 0 through x ≤ M·y and a cost term F·y. Large models are solved by branch and bound with cuts added (branch and cut), sometimes split into smaller pieces by decomposition.
The LP relaxation of a maximisation gives Z = 29.4. What is certain about the integer optimum?
Adding integrality only removes points, so the integer optimum cannot beat the relaxation: Z ≤ 29.4, and with whole-number profits Z ≤ 29. Here it is 27, and rounding the LP point gives an infeasible or poorer plan.
Worked examples
Branch and bound by hand · Max Z = 3x1 + 5x2 subject to x1 + 3x2 ≤ 16, 4x1 + 5x2 ≤ 35, x1, x2 ≥ 0 and integer (whole fixtures of two kinds, illustrative)
- Node 1 (LP): x = (25/7, 29/7), Z = 220/7 ≈ 31.43; x1 fractional, branch x1 ≤ 3 | x1 ≥ 4
- Node 2 (x1 ≤ 3): x = (3, 13/3), Z = 92/3 ≈ 30.67; branch x2 ≤ 4 | x2 ≥ 5
- Node 3 (x2 ≤ 4): x = (3, 4), Z = 29, integer: incumbent 29
- Node 4 (x2 ≥ 5): x = (1, 5), Z = 28 ≤ 29: pruned
- Node 5 (x1 ≥ 4): x = (4, 19/5), Z = 31 > 29; branch x2 ≤ 3 | x2 ≥ 4
- Node 6 (x2 ≤ 3): x = (5, 3), Z = 30, integer and better: incumbent 30. Node 7 (x2 ≥ 4): infeasible
- No open nodes: checking all lattice points confirms (5, 3), Z = 30
Answer: x1 = 5, x2 = 3, Z = 30 after 7 nodes
Deriving a Gomory cut · The LP of Example 1; its optimal tableau row for x1 is x1 − 5/7 s1 + 3/7 s2 = 25/7, with s1 = 16 − x1 − 3x2 and s2 = 35 − 4x1 − 5x2
- Fractional parts: −5/7 = −1 + 2/7 gives 2/7; 3/7 gives 3/7; 25/7 = 3 + 4/7 gives 4/7
- Cut: 2/7 s1 + 3/7 s2 ≥ 4/7, or 2s1 + 3s2 ≥ 4
- Substitute the slacks: 2(16 − x1 − 3x2) + 3(35 − 4x1 − 5x2) ≥ 4, so 137 − 14x1 − 21x2 ≥ 4
- Divide by 7: 2x1 + 3x2 ≤ 19
- The LP optimum (25/7, 29/7) gives 2 × 25/7 + 3 × 29/7 = 137/7 ≈ 19.57 > 19: it is cut off
- Every integer point of the region satisfies it; the integer optimum (5, 3) lies on it: 2 × 5 + 3 × 3 = 19
Answer: Gomory cut 2x1 + 3x2 ≤ 19
A 0-1 capital budget · Four projects (₹ lakh, cost and NPV): robot cell 12, 18; CNC retrofit 8, 11; rooftop solar 10, 13; MES software 6, 9. Budget ₹25 lakh; the robot cell needs the MES (illustrative)
- Variables x1..x4 = 1 if the project is chosen. Max 18x1 + 11x2 + 13x3 + 9x4
- Constraints: 12x1 + 8x2 + 10x3 + 6x4 ≤ 25; x1 ≤ x4; each x 0 or 1
- Enumerate all 16 choices: 9 are feasible
- With the robot cell the best is robot + MES: cost 18, NPV 27 (nothing else fits)
- Without it: CNC + solar + MES costs 24 and earns 33
- LP relaxation: robot + MES + 7/8 of the CNC retrofit, NPV 293/8 ≈ 36.6: rounding it down keeps the robot cell and earns only 27
Answer: Choose CNC retrofit, rooftop solar and MES: cost ₹24 lakh, NPV ₹33 lakh
Network models: shortest path, minimum spanning tree and maximum flow
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU not in syllabusMU ILO7015 Module 1 (routing; outcome 3)KTU not in syllabus
What is a network model?
A network is a set of nodes (plants, depots, junctions) joined by links (roads, pipes, cables), each carrying a number: a length, a cost or a capacity. Three classic questions are asked of it. The shortest path: the cheapest route between two nodes. The minimum spanning tree: the cheapest set of links that connects every node, as when laying pipe or cable. The maximum flow: the most that can be pushed from a source to a sink through links of limited capacity. All three can be written as LPs, but their own algorithms are far faster.
How does Dijkstra's algorithm find the shortest route?
Give the start a permanent label 0 and every other node a temporary label ∞. Then repeat: make the smallest temporary label permanent and update its neighbours, keeping a new label only if the route through the fixed node is shorter. In the illustrative road network the nodes become permanent in the order P 0, A 5, B 11, C 13, D 15, E 18 and T 21 km, so the port is 21 km away by P-A-C-D-T. Lengths must not be negative. Edsger Dijkstra conceived the method in 1956 and published it three years later.
How do you find a minimum spanning tree?
Kruskal's method sorts the links by length and adds each one unless it would close a cycle, stopping at n − 1 links. In the 7-node network it takes C–D 2, D–E 3, E–T 4 and P–A 5, rejects D–T 6 (D, E and T are already joined), takes A–C 8, rejects C–E 9 and ends with B–C 10: six links, 32 km. Prim's method grows one tree from any node, always adding the shortest link to a new node, and reaches the same total. Joseph Kruskal published his method in 1956.
What is the max-flow min-cut theorem?
Push flow along any path with spare capacity, by the amount of its tightest link, and repeat. A path may run backwards along a link that already carries flow, cancelling some of it. When no path is left, the nodes still reachable from the source form one side of a cut whose links are all full. In the network, five paths deliver 15 trucks per hour, and the cut around P, B and C (P→A 8, C→D 2, C→E 2, B→E 3) also totals 15, so no more is possible. Ford and Fulkerson published the method in 1956.
A network has 7 nodes. How many links does its minimum spanning tree have?
Any spanning tree on n nodes has exactly n − 1 links: fewer leaves a node cut off, more closes a cycle. The lengths decide which 6 links are chosen, not how many.
Worked examples
Dijkstra on a forklift route · Six points in a store, times in minutes: 1–2 7, 1–3 3, 3–2 2, 2–4 4, 3–5 9, 4–5 2, 4–6 6, 5–6 3 (illustrative); fastest route from 1 to 6
- Start: 1 = 0 (permanent); temporary 2 = 7, 3 = 3
- Fix 3 (3): 2 = min(7, 3 + 2) = 5, 5 = 3 + 9 = 12
- Fix 2 (5): 4 = 5 + 4 = 9
- Fix 4 (9): 5 = min(12, 9 + 2) = 11, 6 = 9 + 6 = 15
- Fix 5 (11): 6 = min(15, 11 + 3) = 14. Fix 6 (14)
- Trace back the labels: 6 ← 5 ← 4 ← 2 ← 3 ← 1
Answer: Route 1-3-2-4-5-6, 14 minutes (every simple path checked: it is the only one at 14)
Prim's method for a compressed-air main · Pipe lengths (m) between five shop buildings: A–B 30, A–C 45, A–D 50, B–C 25, B–E 60, C–D 35, C–E 40, D–E 55 (illustrative)
- Start at A: the cheapest link out is A–B 30
- Tree {A, B}: cheapest link to a new building is B–C 25
- Tree {A, B, C}: candidates A–D 50, C–D 35, C–E 40, B–E 60; take C–D 35
- Tree {A, B, C, D}: candidates C–E 40, D–E 55, B–E 60; take C–E 40
- Total 30 + 25 + 35 + 40 = 130 m; Kruskal's order (25, 30, 35, 40) and a check of all 45 spanning trees agree
Answer: Links A–B, B–C, C–D, C–E: 130 m of pipe
Maximum flow and the minimum cut · Source S, sink T; capacities (units per hour): S→1 9, S→2 7, 1→2 3, 1→3 5, 2→3 6, 2→T 4, 3→T 10 (illustrative)
- Shortest augmenting paths first: S-2-T +4; S-1-3-T +5; S-2-3-T +3; S-1-2-3-T +2 (total 14)
- No path left: from S the labelling reaches S, 1, 2, 3
- Cut links 2→T 4 and 3→T 10: capacity 14 = flow 14, so the flow is maximal
- Flow conserves at 1, 2 and 3; links S→1 carries 7, S→2 carries 7
Answer: Maximum flow 14 units per hour; minimum cut {2→T, 3→T}
The transportation problem: formulation and initial solutions by NWC, least cost and VAM
Which syllabus covers thisAU OMA352 Unit IIVTU BME755C Module 2SPPU 402045D Unit 4MU ILO7015 Module 1KTU PEMET528 Module 2
What is a transportation problem?
Goods go from m sources with supplies si to n destinations with demands dj. Shipping one unit from i to j costs cij, and you choose the amounts xij to meet every demand at least total cost. It is an LP with m × n variables and m + n equality rows, but one row is redundant once supply equals demand, so a basic solution has m + n − 1 occupied cells. In this chapter's illustrative case, three plants near Pune (P1-P3: 50, 40, 40 crates a day) supply four warehouses (W1-W4: 35, 35, 25, 35) at ₹4 to ₹25 a crate. That is 12 variables and 7 rows, and a basic plan uses 6 routes.
How do the north-west corner and least-cost methods start?
North-west corner (NWC) fills the top-left cell with as much as its row and column allow, then moves right when a column is used up or down when a row is. It never looks at a cost, so it is quick but poor: ₹1,705 a day here, 27.7 % above the optimum. Least cost (LCM) fills the cheapest open cell first, P2-W3 at ₹4, then the next cheapest, and so on. It gives ₹1,560. Ties are broken by the larger possible allocation, then by row order. Each method stops after m + n − 1 = 6 allocations unless a row and a column run out together.
How does Vogel's approximation method choose cells?
For each row and column, VAM's penalty is the gap between its two cheapest open cells: what you lose if you miss the cheapest. Pick the line with the largest penalty, fill its cheapest cell as far as you can, cross out what is used up, and recompute. In the first round W2 has penalty 20 − 10 = 10, so P3-W2 gets 35 crates. When one row or column is left, its cells are forced. VAM gives ₹1,420, 6.4 % above the optimum of ₹1,335. Step through all three methods in the interactive.
What if total supply and demand do not match?
Add a dummy so that they match. If supply is larger, add a dummy warehouse with zero cost; its 'shipments' are stock left at the plants. If demand is larger, add a dummy plant; what it 'sends' is unmet demand. Put a very large cost M on a route that is not allowed. In the unbalanced preset W2 needs only 25, so a dummy takes 10 spare crates. There VAM gives ₹1,320, slightly worse than least cost at ₹1,310: the zero-cost dummy column cuts every row penalty down to that row's cheapest real cost. Some books leave the dummy out of the penalties.
A transportation problem has 3 plants and 4 warehouses, with supply equal to demand. How many occupied cells does a non-degenerate basic solution have?
There are m + n = 7 rim conditions, but one is redundant because supply equals demand. A basic solution therefore has m + n − 1 = 6 occupied cells. With fewer than 6 it is degenerate, which chapter 10 deals with.
Worked examples
North-west corner and least cost on a 3 × 3 problem · Illustrative costs ₹ per crate: P1 13, 2, 9; P2 10, 12, 5; P3 14, 3, 7 (to W1, W2, W3). Supply P1 15, P2 25, P3 35; demand W1 20, W2 40, W3 15
- Balanced: supply 15 + 25 + 35 = 75 = demand 20 + 40 + 15
- NWC, in order: P1-W1 = 15 × ₹13; P2-W1 = 5 × ₹10; P2-W2 = 20 × ₹12; P3-W2 = 20 × ₹3; P3-W3 = 15 × ₹7
- NWC cost = 195 + 50 + 240 + 60 + 105 = ₹650
- Least cost, cheapest open cell first: P1-W2 (₹2) = 15; P3-W2 (₹3) = 25; P2-W3 (₹5) = 15; P2-W1 (₹10) = 10; P3-W1 (₹14) = 10
- Least-cost cost = 30 + 75 + 75 + 100 + 140 = ₹420
- Both use m + n − 1 = 5 cells. VAM on the same table gives ₹400, which a full enumeration of the basic solutions shows is already optimal
Answer: NWC ₹650, least cost ₹420 (VAM ₹400, optimal)
Vogel's approximation method on the plant-to-warehouse problem · Costs ₹ per crate: P1 14, 25, 6, 17; P2 24, 20, 4, 11; P3 13, 10, 23, 7 (to W1-W4). Supply 50, 40, 40; demand 35, 35, 25, 35 (illustrative)
- Round 1: row penalties P1 8, P2 7, P3 3; column penalties W1 1, W2 10, W3 2, W4 4. Largest: W2; its cheapest open cell is P3-W2 (₹10): allocate 35
- Round 2: row penalties P1 8, P2 7, P3 6; column penalties W1 1, W3 2, W4 4. Largest: P1; its cheapest open cell is P1-W3 (₹6): allocate 25
- Round 3: row penalties P1 3, P2 13, P3 6; column penalties W1 1, W4 4. Largest: P2; its cheapest open cell is P2-W4 (₹11): allocate 35
- Only W1 is left, so its cells are forced: P3-W1 = 5, P1-W1 = 25, P2-W1 = 5
- Cost = 35 × 10 + 25 × 6 + 35 × 11 + 5 × 13 + 25 × 14 + 5 × 24 = ₹1,420
- For comparison: NWC ₹1,705, least cost ₹1,560; the optimum (chapter 10) is ₹1,335
Answer: VAM start: 6 routes, ₹1,420 a day, 6.4 % above the optimum
Unbalanced problem: demand more than supply · The example 1 costs and supplies (75 crates), but demand W1 25, W2 40, W3 20 = 85 crates (illustrative)
- Demand exceeds supply by 10: add a dummy plant Pd with supply 10 and zero cost to every warehouse
- VAM on the 4 × 3 table: largest penalty 10 on W1: Pd-W1 (₹0) gets 10; largest penalty 7 on P1: P1-W2 (₹2) gets 15; largest penalty 9 on W2: P3-W2 (₹3) gets 25; largest penalty 7 on P3: P3-W3 (₹7) gets 10; forced: P2-W3 gets 10; forced: P2-W1 gets 15
- Total = ₹375 for the real shipments (the dummy row costs nothing); 4 + 3 − 1 = 6 cells, not degenerate
- The dummy sends 10 to W1: that warehouse is short by 10 crates
- A brute-force check of every basic solution gives the same minimum, ₹375
Answer: ₹375 a day, with W1 short by 10 crates
Transportation optimality: MODI (u-v), stepping-stone loops, degeneracy and unbalanced problems
Which syllabus covers thisAU OMA352 Unit IIVTU BME755C Module 2SPPU 402045D Unit 4MU ILO7015 Module 1KTU PEMET528 Module 2
How does the MODI method test a plan for optimality?
Give each plant a number ui and each warehouse a number vj with ui + vj = cij on every occupied cell. That is 6 equations in 7 unknowns, so set u1 = 0 and solve the rest one by one. For each empty cell, dij = cij − (ui + vj) is the change in cost per unit if that route were used. If every dij ≥ 0, no route can cut the cost: the plan is optimal. From the chapter 9 VAM start, u = 0, 10, −1 and v = 14, 11, 6, 1, so P2-W3 has d = 4 − (10 + 6) = −12. Each crate moved onto it saves ₹12.
What are the stepping-stone loop and θ?
The entering cell starts a closed loop that turns only at occupied cells, moving along rows and columns in turn. Mark the cells +, −, +, − round the loop. Adding θ on + cells and taking it off − cells keeps every row and column total. θ is the smallest allocation on a − cell, and that cell empties. Here the loop is P2-W3, P1-W3, P1-W1, P2-W1 with θ = min(25, 5) = 5, so the cost falls by 12 × 5 = ₹60 to ₹1,360. One more pivot (P3-W4, d = −5, θ = 5) reaches ₹1,335, and then every dij ≥ 0.
What is degeneracy and how does ε fix it?
A solution with fewer than m + n − 1 occupied cells is degenerate, and the u-v equations can no longer all be solved. It happens when a row and a column run out at the same allocation. Take a week with P1 at 45 crates and W3 at 15 (illustrative): VAM fills only 5 cells. Put ε, a tiny allocation treated as zero, in the cheapest empty cell that does not close a loop, here P2-W3 at ₹4. Then solve as usual. One pivot moves 5 crates through the ε cell and the cost falls from ₹1,365 to ₹1,340. Degeneracy can also appear mid-way, when two − cells tie for θ.
How are maximisation, alternative optima and blocked routes handled?
To maximise profit, subtract every profit from the largest one (40 here) and minimise this 'loss' table. The optimal plan is the same, and profit = 40 × total crates − loss. In the maximise preset, VAM earns ₹4,270 and MODI raises it to ₹4,320. If a final dij is exactly 0, bringing that cell in leaves the cost unchanged: there is an alternative optimal plan. A route that is not allowed gets a cost M large enough that it never enters. Here every final dij is positive, so each optimum is unique.
At the optimum (₹1,335), the empty cell P1-W4 has dij = 4. If a manager insists on sending 5 crates on that route and re-balances along its loop, the daily cost will
dij is the change in cost per crate moved round the loop, so 5 crates add 4 × 5 = ₹20, giving ₹1,355. Every positive dij at the optimum is a penalty for using that route.
Worked examples
MODI from the VAM start · The chapter 9 problem; VAM start P1-W1 25, P1-W3 25, P2-W1 5, P2-W4 35, P3-W1 5, P3-W2 35 (₹1,420)
- u1 = 0 and ui + vj = cij on occupied cells: u = 0, 10, −1; v = 14, 11, 6, 1
- dij = cij − ui − vj: P1-W2 14, P1-W4 16, P2-W2 −1, P2-W3 −12, P3-W3 18, P3-W4 7. Most negative: P2-W3, −12
- Loop: P2-W3(+) → P1-W3(−) → P1-W1(+) → P2-W1(−). θ = smallest on − cells = 5; P2-W1 empties
- New cost = ₹1,420 − 12 × 5 = ₹1,360. Recompute: u = 0, −2, −1; v = 14, 11, 6, 13
- dij: P1-W2 14, P1-W4 4, P2-W1 12, P2-W2 11, P3-W3 18, P3-W4 −5. P3-W4 enters with −5; loop P3-W4(+) → P2-W4(−) → P2-W3(+) → P1-W3(−) → P1-W1(+) → P3-W1(−); θ = 5
- Cost ₹1,360 − 5 × 5 = ₹1,335. Now u = 0, −2, −6; v = 14, 16, 6, 13 and dij: P1-W2 9, P1-W4 4, P2-W1 12, P2-W2 6, P3-W1 5, P3-W3 23, all ≥ 0
- Check: Σ ui·si + Σ vj·dj = 1335 = the cost (the dual gives the same value)
Answer: Optimal plan P1-W1 35, P1-W3 15, P2-W3 10, P2-W4 30, P3-W2 35, P3-W4 5: ₹1,335 a day
A degenerate start needs ε · Same costs; supply P1 45, P2 40, P3 40; demand W1 35, W2 35, W3 15, W4 40 (illustrative)
- VAM: P1-W1 30, P1-W3 15, P2-W4 40, P3-W1 5, P3-W2 35, cost ₹1,365: only 5 cells, but m + n − 1 = 6
- ε goes in the cheapest empty cell that joins two separate parts of the plan: P2-W3 (₹4)
- u = 0, −2, −1; v = 14, 11, 6, 13; dij: P1-W2 14, P1-W4 4, P2-W1 12, P2-W2 11, P3-W3 18, P3-W4 −5
- P3-W4 enters (−5). Loop P3-W4(+) → P2-W4(−) → P2-W3(+) → P1-W3(−) → P1-W1(+) → P3-W1(−); θ = 5, so ε + 5 = 5 crates on P2-W3 and P3-W1 empties
- Cost ₹1,365 − 5 × 5 = ₹1,340; dij now P1-W2 9, P1-W4 4, P2-W1 12, P2-W2 6, P3-W1 5, P3-W3 23, all ≥ 0
Answer: Optimum ₹1,340: P1-W1 35, P1-W3 10, P2-W3 5, P2-W4 35, P3-W2 35, P3-W4 5
Maximising profit · Profit ₹ per crate: P1 22, 23, 32, 30; P2 18, 40, 37, 19; P3 20, 34, 28, 38 (to W1-W4). Supply 50, 40, 40; demand 35, 35, 25, 35 (illustrative)
- Loss = 40 − profit: P1 18, 17, 8, 10; P2 22, 0, 3, 21; P3 20, 6, 12, 2
- VAM on the loss table: P1-W1 25, P1-W3 25, P2-W1 5, P2-W2 35, P3-W1 5, P3-W4 35; loss 930, profit ₹4,270
- Pivot 1: P2-W3 enters (d = −9), θ = 5
- Pivot 2: P3-W2 enters (d = −1), θ = 5
- All dij ≥ 0: loss 880, so profit = 40 × 130 − 880 = ₹4,320
Answer: Plan P1-W1 35, P1-W3 15, P2-W2 30, P2-W3 10, P3-W2 5, P3-W4 35: profit ₹4,320 a day
The assignment problem: Hungarian method, maximisation, unbalanced and travelling salesman
Which syllabus covers thisAU OMA352 Unit IIVTU BME755C Module 2SPPU 402045D Unit 4MU ILO7015 Module 1KTU PEMET528 Module 2
What is the assignment problem?
n workers, n jobs and a cost cij for worker i on job j. Each worker gets exactly one job and each job one worker, at least total cost. It is a transportation problem with every supply and demand equal to 1. A basic solution then has 2n − 1 cells but only n of them are 1, so it is badly degenerate, and a special method works better. Trying every assignment is hopeless beyond small n: 4 workers give 4! = 24 choices, 10 give 3,628,800.
How does the Hungarian method work?
Subtracting a constant from a whole row or column changes every assignment's total by the same amount, so the best assignment stays the best. Subtract each row's minimum, then each column's. Cover all zeros with the fewest lines. If n lines are needed, pick one zero in each row and column. If fewer, subtract the smallest uncovered value θ from every uncovered cell, add it where two lines cross, and cover again. In the 4 × 4 preset (hours, illustrative) the row minima are 9, 4, 4, 5, J1's column minimum is 3, three lines cover the zeros, θ = 2, then four lines: A-J1 (14 h), B-J3 (4 h), C-J4 (4 h), D-J2 (5 h), 27 h.
How are maximisation, unbalanced and blocked assignments handled?
Maximise output by subtracting every entry from the largest (44 parts per shift in the preset) and minimising what is left; the best plan gives 150 parts. If the matrix is not square, add dummy rows or columns of zeros. With four machinists and five jobs, a dummy machinist takes J1, meaning J1 is not done this shift, and the other four jobs take 31 h. A pairing that is not allowed (a machinist not trained on a job) gets a cost M or ∞, so it is never chosen.
Why is the travelling salesman problem harder than assignment?
A van leaves the plant, visits every supplier once and returns, by the shortest route. Put ∞ on the diagonal and solve it as an assignment. The answer may split into separate loops: here 1→2→3→1 and 4→5→4, 59 km, which is not one tour. That is still a lower bound. Enumerating all 24 orders from stop 1 gives the best tour 1-3-2-4-5-1, 70 km. With symmetric distances there are (n − 1)!/2 different tours, 181,440 for 10 stops, so real routing uses branch and bound or heuristics (chapter 28).
After row and column reduction of a 4 × 4 cost matrix, all the zeros can be covered by 3 lines. What is the next step?
Three lines for a 4 × 4 matrix means no complete assignment on zeros exists yet. The θ adjustment creates at least one new zero without making any entry negative, and you cover again until 4 lines are needed.
Worked examples
Four machinists, four jobs · Hours (illustrative), rows A-D, columns J1-J4: A 14, 13, 9, 14; B 14, 10, 4, 15; C 8, 6, 7, 4; D 8, 5, 5, 8
- Row minima 9, 4, 4, 5; after subtracting: A 5, 4, 0, 5; B 10, 6, 0, 11; C 4, 2, 3, 0; D 3, 0, 0, 3
- Column minima 3, 0, 0, 0 (J1 has no zero yet); after subtracting: A 2, 4, 0, 5; B 7, 6, 0, 11; C 1, 2, 3, 0; D 0, 0, 0, 3
- Fewest lines covering every zero: row C, row D, column J3, 3 lines for a 4 × 4 matrix, so adjust
- θ = smallest uncovered = 2: subtract it from uncovered cells, add it where lines cross. New matrix: A 0, 2, 0, 3; B 5, 4, 0, 9; C 1, 2, 5, 0; D 0, 0, 2, 3
- Now 4 lines are needed: pick one zero in each row and column
- Assignment A-J1 (14 h), B-J3 (4 h), C-J4 (4 h), D-J2 (5 h); total = 14 + 4 + 4 + 5 = 27 h; all 24 assignments checked, this is the only one at 27 h
Answer: A-J1 (14 h), B-J3 (4 h), C-J4 (4 h), D-J2 (5 h): 27 h
Maximisation: operators on machines · Parts per hour (illustrative), operators A-C on machines M1-M3: A 24, 15, 21; B 24, 14, 12; C 12, 18, 18
- Largest entry 24; loss = 24 − parts: A 0, 9, 3; B 0, 10, 12; C 12, 6, 6
- Row minima 0, 0, 6, then column minima 0, 0, 0: A 0, 9, 3; B 0, 10, 12; C 6, 0, 0
- Lines: 2 for a 3 × 3 matrix. θ = 3: A 0, 6, 0; B 0, 7, 9; C 9, 0, 0
- Three lines now: assign A-M3 (21), B-M1 (24), C-M2 (18)
- Output = 21 + 24 + 18 = 63 parts per hour; all 6 assignments checked
Answer: 63 parts per hour
A four-stop milk-run: assignment gives subtours · Symmetric distances in km (illustrative): 1-2 8, 1-3 20, 1-4 14, 2-3 15, 2-4 18, 3-4 7; ∞ on the diagonal
- Hungarian method on the 4 × 4 matrix: 1→2, 2→1, 3→4, 4→3, 30 km
- That is two separate loops, 1→2→1 and 3→4→3: not a tour, but no tour can be shorter than 30 km
- With symmetric distances there are (4 − 1)!/2 = 3 different tours: 1-2-3-4-1: 8 + 15 + 7 + 14 = 44 km; 1-2-4-3-1: 8 + 18 + 7 + 20 = 53 km; 1-3-2-4-1: 20 + 15 + 18 + 14 = 67 km
- Best tour 1-2-3-4-1, 44 km, 14 km above the assignment bound
Answer: Tour 1-2-3-4-1, 44 km
Single-machine sequencing: SPT, WSPT and EDD rules
Which syllabus covers thisAU OMA352 Unit IIVTU BME755C Module 5SPPU not in syllabusMU not in syllabusKTU not in syllabus
How do you score a sequence of jobs on one machine?
All jobs are ready now and the machine does one at a time. Job j takes pj hours and finishes at its completion time Cj, which is also its flow time (how long it spends in the shop). Lateness Lj = Cj − dj is negative when the job is early; tardiness Tj = max(0, Lj) counts only lateness. The makespan is Σpj whatever the order, so the sequence only changes the averages and the worst case. The scores are mean flow time, mean lateness, maximum lateness, the number of tardy jobs and the weighted completion Σwj·Cj.
Why does shortest processing time first minimise mean flow time?
A job's time is added to the completion of itself and of every job after it, so the first job counts n times and the last once. Putting short jobs first makes the big multipliers fall on small times. Swapping any adjacent pair that is out of SPT order lowers the total, which proves the rule. In the illustrative six CNC jobs, FCFS gives a mean flow time of 22.5 h and SPT gives 16 h, the lowest of all 720 orders. SPT also minimises mean lateness. Its weakness is that long jobs wait: J1 finishes 14 h late.
When do WSPT and EDD win?
When jobs differ in importance, give each a weight wj and sequence by the smallest pj/wj (WSPT, Smith's rule). This minimises Σwj·Cj: 218 for the six jobs against 231 with SPT. When due dates matter, earliest due date first (EDD) minimises the maximum lateness: 6 h against 14 h with SPT. If EDD still leaves a job late, no order can make every job on time. These rules come up often in GATE PI questions.
Which rule minimises the number of late jobs?
None of the simple rules guarantees it. In the six-job case SPT and EDD both leave 3 jobs late and WSPT 2, but the minimum is 1. Moore and Hodgson's method finds it. Go through the jobs in EDD order. Whenever the job just added would finish late, remove the longest job scheduled so far and move it to the end. The jobs kept are all on time, and the removed ones run late. Which rule is best depends on what the plant is measured on, so the interactive shows all of them side by side.
Three jobs taking 4 h, 1 h and 2 h are all ready now. What is the mean flow time with SPT?
SPT order 1, 2, 4 h finishes at 1, 3 and 7 h, so the mean is 11/3 = 3.67 h. In the given order (4, 1, 2) they finish at 4, 5 and 7 h: 5.33 h. The makespan is 7 h either way.
Worked examples
FCFS against SPT · Five jobs, ready now (illustrative): times J1-J5 = 6, 2, 8, 3, 5 h; due dates 10, 6, 22, 8, 15 h
- FCFS J1 J2 J3 J4 J5: completions 6, 8, 16, 19, 24; mean flow = 73/5 = 14.6 h
- SPT J2 J4 J5 J1 J3: completions 2, 5, 10, 16, 24; mean flow = 57/5 = 11.4 h
- Lateness under SPT: J2 −4, J4 −3, J5 −5, J1 6, J3 2; mean lateness = −0.8 h (FCFS 2.4 h)
- Brute force over all 120 orders: the lowest mean flow time is 11.4 h, the SPT value
Answer: SPT cuts mean flow time from 14.6 h to 11.4 h
EDD and the number of late jobs · The same five jobs
- EDD J2 J4 J1 J5 J3: completions 2, 5, 11, 16, 24
- Lateness: J2 −4, J4 −3, J1 1, J5 1, J3 2; maximum lateness 2 h (SPT gives 6 h), 3 jobs late
- Moore-Hodgson, EDD order: J1 would finish at 11 h, after its due date 10 h: drop the longest job so far, J1 (6 h)
- Kept on time: J2 J4 J5 J3; late: J1. Brute force confirms 1 is the minimum
Answer: EDD: maximum lateness 2 h; Moore-Hodgson: only 1 late job
Weighted jobs: WSPT · The same five jobs with weights 1, 2, 3, 1, 2 (J3 is for an important customer)
- Ratios pj/wj: J1 6, J2 1, J3 2.67, J4 3, J5 2.5
- WSPT order J2 J5 J3 J4 J1: completions 2, 7, 15, 18, 24
- Σwj·Cj = 2 × 2 + 2 × 7 + 3 × 15 + 1 × 18 + 1 × 24 = 105
- SPT gives Σwj·Cj = 117, FCFS 137; the brute-force minimum is 105
Answer: WSPT: Σwj·Cj = 105
Johnson's rule: n jobs through 2 machines and through 3 machines
Which syllabus covers thisAU OMA352 Unit IIVTU BME755C Module 5SPPU 402045D Unit 2MU ILO7015 Module 1KTU PEMET528 Module 3
What is the n-jobs, 2-machines sequencing problem?
Every job goes to machine M1 first and then to M2, for example turning and then grinding. You choose one order and both machines follow it, so no job overtakes another. The aim is the shortest total elapsed time (the makespan), from the first job starting on M1 to the last job leaving M2. The usual assumptions: one job at a time on a machine, no job split or stopped half-way, times known and fixed, and transfer time between machines ignored. Six jobs already allow 720 orders, so you want a rule, not a search.
How does Johnson's rule work?
Find the smallest time left in the table. If it is on M1, put that job in the earliest free position; if it is on M2, in the latest free position. Cross the job out and repeat. A short M1 time first gets M2 busy early; a short M2 time last means M2 has little left after M1 stops. In the interactive (six illustrative jobs) the rule gives J2 J3 J5 J4 J1 J6, 43 h in total, and checking all 720 orders finds nothing shorter. Selmer Johnson published the rule in 1954. It turns up in GATE ME papers, and GATE PI papers ask sequencing questions too.
How do you read the total elapsed time and the idle times?
Draw the Gantt chart: on M1 the jobs run back to back; on M2 a job starts when both M2 is free and the job has left M1. The end of the last bar on M2 is the total elapsed time. Idle time of a machine is the elapsed time minus its busy time, which counts waiting at the start and after its last job. In the interactive, M2 waits 2 h for the first job and 2 h in gaps: 4 h; M1 finishes 4 h before the end. Ties can be broken either way: the elapsed time does not change.
When can Johnson's rule handle three machines?
If the smallest M1 time is at least the largest M2 time, or the smallest M3 time is at least the largest M2 time, M2 never becomes the bottleneck. Then replace each job by two fictitious times G = M1 + M2 and H = M2 + M3 and apply the two-machine rule; the order is optimal. In the interactive's 3-machine case, min M1 = 5 ≥ max M2 = 5, giving J3 J1 J5 J4 J2 J6 in 55 h. In the 'rule fails' case neither condition holds: the converted rule gives 40 h but J4 J3 J2 J1 needs only 36 h.
Job J4 has 3 h on M1 and 1 h on M2, and 1 h is the smallest time in the whole table. Where does Johnson's rule put J4?
The smallest time sits on the second machine, so the job goes as late as possible: it keeps M2 busy at the very end for only 1 h after M1 has finished.
Worked examples
Five jobs on two machines · Turning (M1) and grinding (M2) times in hours, illustrative: J1 4, 8; J2 9, 5; J3 3, 6; J4 7, 2; J5 6, 10
- 2 h (M2 of J4) → back, position 5
- 3 h (M1 of J3) → front, position 1
- 4 h (M1 of J1) → front, position 2
- 5 h (M2 of J2) → back, position 4
- 6 h (M1 of J5) → front, position 3
- Sequence J3 J1 J5 J2 J4
- M1: J3 0-3, J1 3-7, J5 7-13, J2 13-22, J4 22-29
- M2: J3 3-9, J1 9-17, J5 17-27, J2 27-32, J4 32-34
- Idle M1 = 34 − 29 = 5 h; idle M2 = 34 − 31 = 3 h
- Check: all 120 orders, best 34 h
Answer: J3 J1 J5 J2 J4, total elapsed time 34 h
Five jobs on three machines · M1, M2, M3 times in hours, illustrative: J1 5, 3, 7; J2 8, 1, 4; J3 4, 4, 6; J4 9, 2, 5; J5 6, 3, 9
- Condition: min M1 = 4 ≥ max M2 = 4 (also min M3 = 4 ≥ 4), so the conversion is valid
- G = M1 + M2: 8, 9, 8, 11, 9; H = M2 + M3: 10, 5, 10, 7, 12
- 5 h (H of J2) → back, position 5
- 7 h (H of J4) → back, position 4
- 8 h (G of J1) → front, position 1
- 8 h (G of J3) → front, position 2
- 9 h (G of J5) → front, position 3
- J1 and J3 tie at G = 8: either may go first; the lower number is taken
- Gantt chart on the real machines: elapsed 39 h; idle M1 7 h, M2 26 h, M3 8 h
- Check: all 120 orders, best 39 h
Answer: J1 J3 J5 J4 J2, 39 h
A tie at the smallest time · Two machines, hours, illustrative: J1 2, 7; J2 5, 3; J3 2, 4; J4 6, 8
- Smallest time 2 h appears twice, both on M1 (J1 and J3): both go to the front, in either order
- Next smallest 3 h is J2 on M2: last; then J4 fills the gap
- Order J1 J3 J4 J2: elapsed 24 h; order J3 J1 J4 J2: elapsed 24 h
- M2 bars (J1 J3 J4 J2): 2-9, 9-13, 13-21, 21-24
- Idle M1 = 9 h, idle M2 = 2 h
Answer: Either tie-break gives 24 h, the best of all 24 orders
n jobs through m machines and 2 jobs through m machines (graphical method)
Which syllabus covers thisAU not in syllabusVTU BME755C Module 5SPPU 402045D Unit 2MU ILO7015 Module 1KTU PEMET528 Module 3
How does the graphical method sequence two jobs on m machines?
Each job has its own machine order. Mark job 1's operations along x and job 2's along y, in hours. Where both jobs would need the same machine at once, shade a block. Walk from (0, 0) to (T1, T2): diagonally at 45° while both work, horizontally while job 2 waits, vertically while job 1 waits, never through a block. The shortest walk is the best schedule. In the interactive's first case (illustrative), T1 = 20 h and T2 = 21 h, yet the best path takes 26 h.
How do you get the elapsed time and idle times from the path?
Every horizontal stretch is time job 2 spends idle; every vertical stretch is job 1's idle time. So the elapsed time is job 1's work plus its idle time, and equally job 2's work plus its idle time. For the first case: 20 + 6 = 21 + 5 = 26 h. When the path meets a block you can pass above or below it; try both and keep the shorter total. A job may wait only between operations, never half-way through one.
How is Johnson's rule stretched to n jobs on m machines?
With m machines in the same order for every job, check whether the smallest time on M1, or on the last machine, is at least the largest time on every middle machine. If so, form G = M1 + ... + M(m−1) and H = M2 + ... + Mm for each job and apply the two-machine rule to G and H. In the interactive's 5 jobs × 4 machines case 1 (illustrative), min M1 = 6 ≥ 5, and the order J2 J1 J5 J4 J3 takes 42 h, the best of all 120 orders.
Is the converted rule always optimal for m machines?
For three machines the condition guarantees the best order. For four or more it does not. In 1,500 random 4-machine cases that met the condition (checked against every order), the conversion missed the best order 15 times, by at most 3.3 %. The interactive's case 2 meets the condition and still takes 41 h against the best 40 h. For a handful of jobs, enumerate; for real shops, schedulers use heuristics or a solver and treat the conversion as a good first guess.
On the two-job chart, the path runs horizontally for 3 h. What is happening?
x is job 1's progress and y is job 2's. A horizontal stretch means x grows and y does not: job 1 keeps working while job 2 waits (often for a machine that job 1 is using).
Worked examples
Two jobs on four machines, graphical method · Job 1: A 5 h, B 3 h, C 2 h, D 4 h. Job 2: B 3 h, A 6 h, D 5 h, C 4 h (illustrative)
- T1 = 14 h on x, T2 = 18 h on y
- Blocks (x range × y range): A 0-5 × 3-9; B 5-8 × 0-3; C 8-10 × 14-18; D 10-14 × 9-14
- (0, 0) to (3, 3): 45°, both jobs work 3 h
- (3, 3) to (5, 3): horizontal, J2 waits 2 h
- (5, 3) to (10, 8): 45°, both jobs work 5 h
- (10, 8) to (10, 14): vertical, J1 waits 6 h
- (10, 14) to (14, 18): 45°, both jobs work 4 h
- Idle J1 = 6 h, idle J2 = 2 h; T = 14 + 6 = 18 + 2 = 20 h
- Check: all 16 choices of which job goes first on each machine, best 20 h
Answer: Minimum elapsed time 20 h
Four jobs on four machines by the conversion · M1, M2, M3, M4 hours, illustrative: J1 7, 2, 3, 3; J2 7, 3, 3, 8; J3 6, 1, 2, 2; J4 3, 2, 1, 8
- Condition: min M1 = 3 ≥ max of M2, M3 = 3: holds
- G = M1 + M2 + M3: 12, 13, 9, 6; H = M2 + M3 + M4: 8, 14, 5, 11
- 5 h (H of J3) → back, position 4
- 6 h (G of J4) → front, position 1
- 8 h (H of J1) → back, position 3
- 13 h (G of J2) → front, position 2
- Elapsed time of J4 J2 J1 J3 on the four machines: 29 h
- Check: all 24 orders, best 29 h
Answer: J4 J2 J1 J3, 29 h
When the condition fails · M1, M2, M3, M4 hours, illustrative: J1 3, 4, 5, 2; J2 6, 5, 2, 4; J3 2, 6, 3, 5; J4 5, 2, 6, 3
- min M1 = 2 and min M4 = 2, both below max of M2, M3 = 6: the conversion is not justified
- Converted rule anyway: G 12, 13, 11, 13; H 11, 11, 14, 11; order J3 J4 J2 J1, 29 h
- Enumerate all 24 orders: best 28 h (4 orders), e.g. J3 J1 J2 J4
Answer: Best 28 h by enumeration; the converted rule gives 29 h
Decision analysis: certainty, risk, uncertainty criteria and decision trees
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 402045D Unit 1MU not in syllabusKTU not in syllabus
What are decisions under certainty, risk and uncertainty?
A payoff table lists the alternatives (rows) against the states of nature (columns) you cannot control, such as next year's demand. Under certainty you know the state, so you pick the best entry in that column. Under risk you know the probability of each state and weigh the payoffs. Under uncertainty you have no probabilities, so you choose a criterion that matches your attitude: cautious, hopeful or in between. The interactive uses an illustrative Pune plant choosing among a new line, an extra shift, subcontracting or doing nothing (₹ lakh a year).
Which criteria are used under uncertainty, and do they agree?
Maximin takes the best worst case: Do nothing (₹20 lakh). Maximax takes the best best case: New line (₹120 lakh). Minimax regret (Savage) builds regret = column best − payoff and minimises the largest regret: Extra shift (50). Hurwicz mixes the row's best and worst with an optimism α: at α = 0.5, New line (40). Laplace treats states as equally likely: New line (43.33). As α rises from 0 to 1 the Hurwicz pick moves from Do nothing to Subcontract (α ≈ 1/7), Extra shift (1/3) and New line (9/19). They disagree because they encode different attitudes.
What are EMV, EOL and the expected value of perfect information?
With probabilities 0.3, 0.5 and 0.2 for high, medium and low demand, the expected monetary value of each row is Σ p × payoff: New line 53, Extra shift 44.5, Subcontract 33, Do nothing 20. If a perfect forecast told you the state first, you would always pick the column best: 65 on average. The difference, EVPI = 65 − 53 = 12, is the most any forecast is worth. It equals the smallest expected opportunity loss (EOL), the probability-weighted regret.
How is a decision tree rolled back?
Draw decisions as squares and chance events as circles, left to right in time. Then work from the right: at a circle take the expected value, at a square keep the best branch. In the interactive tree, a ₹5 lakh survey says 'favourable' with probability 0.8 when demand will be high and 0.2 when low. With a 0.5 prior, Bayes' rule gives P(high) = 0.8 after a favourable report and 0.2 after an unfavourable one. Building only on good news is worth 54 against 40 without the survey: the survey is worth 14, so paying 5 is sensible.
The best EMV is ₹53 lakh and the expected value with perfect information is ₹65 lakh. A consultant offers a perfect demand forecast for ₹15 lakh. Should the plant pay?
EVPI = 65 − 53 = ₹12 lakh is the most that even a perfect forecast adds on average. Paying ₹15 lakh for it loses ₹3 lakh on average.
Worked examples
Choosing a machine under uncertainty · Tool-room profit in ₹ lakh a year, illustrative. Demand high, medium, low: 5-axis VMC 90, 35, −25; 3-axis VMC 60, 40, 5; rebuild old mill 30, 25, 15. Hurwicz α = 0.6
- Row minima −25, 5, 15: maximin picks the rebuild (15)
- Row maxima 90, 60, 30: maximax picks the 5-axis VMC (90)
- Column bests 90, 40, 15; regret rows: 5-axis 0, 5, 40; 3-axis 30, 0, 10; rebuild 60, 15, 0
- Largest regrets 40, 30, 60: minimax regret picks the 3-axis VMC (30)
- Hurwicz 0.6 × max + 0.4 × min: 44, 38, 24: the 5-axis VMC
- Laplace averages 33.33, 35, 23.33: the 3-axis VMC
Answer: Maximin: rebuild; maximax and Hurwicz: 5-axis; minimax regret and Laplace: 3-axis
The same choice under risk · Same table; P(high) = 0.25, P(medium) = 0.45, P(low) = 0.30
- EMV 5-axis = 0.25 × 90 + 0.45 × 35 + 0.30 × (−25) = 30.75
- EMV 3-axis = 0.25 × 60 + 0.45 × 40 + 0.30 × 5 = 34.5
- EMV rebuild = 0.25 × 30 + 0.45 × 25 + 0.30 × 15 = 23.25
- EV with perfect information = 0.25 × 90 + 0.45 × 40 + 0.30 × 15 = 45
- EVPI = 45 − 34.5 = 10.5
- EOL: 5-axis 14.25, 3-axis 10.5, rebuild 21.75; the smallest equals the EVPI
Answer: Buy the 3-axis VMC (EMV ₹34.5 lakh); EVPI ₹10.5 lakh
A decision tree with a test market · Launch a new gear: ₹80 lakh if the market is good, −₹30 lakh if bad, 0 if not launched; P(good) = 0.4. A ₹4 lakh test reads positive with probability 0.9 if good and 0.3 if bad (illustrative)
- No test: launch = 0.4 × 80 + 0.6 × (−30) = 14, better than 0, so EV = 14
- P(positive) = 0.4 × 0.9 + 0.6 × 0.3 = 0.54; P(good | positive) = 0.36/0.54 = 2/3
- After positive: launch = 2/3 × 80 + 1/3 × (−30) = 43.33: launch
- After negative: P(good) = 0.04/0.46 = 0.087; launch = −20.43: do not launch (0)
- Test branch: 0.54 × 43.33 + 0.46 × 0 = 23.4, minus 4 = 19.4
- EVSI = 23.4 − 14 = 9.4; EVPI = 0.4 × 80 − 14 = 18
Answer: Run the test (₹19.4 lakh against ₹14 lakh); launch only on a positive result
Game theory: two-person zero-sum games, saddle points and dominance
Which syllabus covers thisAU not in syllabusVTU BME755C Module 4SPPU 402045D Unit 1MU ILO7015 Module 5KTU PEMET528 Module 4
What is a two-person zero-sum game?
Two players choose at the same time, each knowing the full payoff matrix. Player A picks a row, player B a column, and the cell is A's gain, which is exactly B's loss (hence zero-sum). Picture two component suppliers choosing a pricing move, with the cell as A's change in market share. A pure strategy plays one row every time; a mixed strategy plays rows with set probabilities. John von Neumann's minimax theorem (1928) says every such game, once mixed strategies are allowed, has a value v that A can guarantee and B can hold A to.
How do you find a saddle point?
Write each row's minimum: the worst A can get from that row. A takes the largest of them, the maximin. Write each column's maximum: the worst B can suffer. B takes the smallest, the minimax. Always maximin ≤ v ≤ minimax. If they are equal, the cell where they meet is a saddle point: neither player gains by moving away, and that cell is the value. In the interactive (illustrative), row minima −1, 3, −2, −1 give maximin 3 and column maxima 5, 3, 7, 6 give minimax 3: saddle at A2, B2, value 3.
What is dominance and why does it help?
A row that is no better than another row in every column can be deleted: A never needs it. A column that is no smaller than another column in every row can be deleted: B never needs it. The same holds against the average of two rows or columns. Deleting dominated strategies never changes the value. In the interactive's dominance case (illustrative), four deletions reduce a 4 × 4 game to the 2 × 2 game 6, 1 / 2, 5, which has no saddle point and value 7/2.
What if there is no saddle point?
Then maximin is below minimax and the value lies between them. Any pure choice can be exploited, so each player must mix at random. For the 2 × 2 game 6, 1 / 2, 5, A plays row 1 with p = 3/8 and B plays column 1 with q = 1/2, and the value is 7/2, between the bounds 2 and 5. Chapter 17 covers the formula and the graphical method. A game with value 0 is called fair; one with a saddle point is strictly determined.
A's payoffs: row A1 = 4, 2 and row A2 = 5, 1 (columns B1, B2). Is there a saddle point?
Row minima are 2 and 1, so maximin = 2 (row A1). Column maxima are 5 and 2, so minimax = 2 (column B2). They are equal, so A1, B2 is a saddle point and the value is 2.
Worked examples
Finding a saddle point · A's gain (illustrative): A1 −2, 3, −1; A2 4, 5, 3; A3 6, −3, 2 (columns B1, B2, B3)
- Row minima: −2, 3, −3; maximin = 3 (A2)
- Column maxima: 6, 5, 3; minimax = 3 (B3)
- Maximin = minimax, so A2, B3 is a saddle point: 3 is the smallest in row A2 and the largest in column B3
- A always plays A2, B always plays B3; the game is not fair since v ≠ 0
Answer: Saddle point at A2, B3; value 3
Reducing by dominance · A's gain (illustrative): A1 7, 8, 2; A2 5, 4, 1; A3 3, 9, 6; A4 2, 7, 5 (columns B1, B2, B3)
- Row minima 2, 1, 3, 2, column maxima 7, 9, 6: maximin 3 is below minimax 6, so no saddle point
- A2 (5, 4, 1) ≤ A1 (7, 8, 2) everywhere: delete A2. A4 (2, 7, 5) ≤ A3 (3, 9, 6): delete A4
- With rows A1, A3: B2 (8, 9) ≥ B1 (7, 3) in both rows: B never plays B2, delete it
- Left: A1 7, 2; A3 3, 6 (columns B1, B3), still no saddle point
- p(A1) = (6 − 3)/(7 + 6 − 2 − 3) = 3/8; q(B1) = (6 − 2)/8 = 1/2
- v = (7 × 6 − 2 × 3)/8 = 9/2
Answer: Value 9/2: A plays A1 3/8, A3 5/8; B plays B1 1/2, B3 1/2
Dominance by an average · A's gain (illustrative): A1 1, 7, 5; A2 6, 2, 5 (columns B1, B2, B3)
- B3 (5, 5) is not ≥ B1 or B2 on its own
- Average of B1 and B2: (1 + 7)/2 = 4 in row A1 and (6 + 2)/2 = 4 in row A2; B3 has 5 ≥ 4 in both rows, so B3 is dominated
- Left: A1 1, 7; A2 6, 2: row minima 1, 2 and column maxima 6, 7, no saddle point
- p(A1) = (2 − 6)/(1 + 2 − 7 − 6) = 2/5; q(B1) = (2 − 7)/(−10) = 1/2
- v = (1 × 2 − 7 × 6)/(−10) = 4: below B3's sure loss of 5, which is why B drops B3
Answer: Value 4; A plays A1 with 2/5, B mixes B1 and B2 equally
Mixed strategies: 2 × 2 games and the graphical method for 2 × n and m × 2
Which syllabus covers thisAU not in syllabusVTU BME755C Module 4SPPU 402045D Unit 1MU ILO7015 Module 5KTU PEMET528 Module 4
Why mix strategies when a game has no saddle point?
When maximin is less than minimax, any pure strategy can be read and punished by the other player. The cure is to randomise: play each strategy with a fixed probability, so the opponent cannot predict you. In the illustrative game with rows (5, 1) and (2, 4), maximin is 2 and minimax is 4; mixing gives both players the value V = 3, which always lies between the two. Von Neumann's minimax theorem (1928) says every finite two-person zero-sum game has such a value.
How do you solve a 2 × 2 game without a saddle point?
Choose A's probability p for row 1 so that B gets the same result from either column; then B cannot exploit A. The same idea fixes B's q. For rows (5, 1) and (2, 4): D = 5 + 4 − 1 − 2 = 6, p = (4 − 2)/6 = 1/3, q = (4 − 1)/6 = 1/2, V = (20 − 2)/6 = 3. The oddments method gives the same answer without the formula: each row's weight is the absolute difference of the OTHER row, each column's weight the difference of the other column.
How does the graphical method solve 2 × n and m × 2 games?
For a 2 × n game, plot A's expected gain against p for each B column: a straight line from a2j (p = 0) to a1j (p = 1). B will pick the lowest line, so A maximises the lower envelope. The two lines crossing at its peak form the critical 2 × 2 sub-game. In the 2 × 4 preset the peak is at p = 3/5 with V = 12/5, from columns B1 and B4, and B plays B1 with q = 1/5. For an m × 2 game, draw A's rows against B's q and minimise the UPPER envelope.
Where do dominance and larger games fit in?
Remove dominated rows and columns first: a row that is never better for A than another row, or a column that is never better for B, can be deleted without changing the value. In the 2 × 4 preset, B3 (5, 1) is worse for B than B1 (4, 0) in both rows, so it never gets played. A 3 × 3 game that does not reduce is solved as a linear programme, and the dual of A's LP is B's LP. GATE PI asks the 2 × 2 and graphical cases most often.
In the game with rows (5, 1) and (2, 4), A plays row 1 with p = 1/3. B switches from a 50:50 mix to always playing column 2. What happens to A's expected gain?
A's optimal p makes B indifferent: column 1 gives 5 × 1/3 + 2 × 2/3 = 3 and column 2 gives 1 × 1/3 + 4 × 2/3 = 3. Whatever B does, A expects exactly the value 3.
Worked examples
A 2 × 2 game by the formula and by oddments · Two rival bearing distributors in Pune (illustrative). Payoff to A in lakh ₹ of monthly orders: row A1 (7, 1), row A2 (3, 5); columns B1, B2.
- Row minima 1, 3 → maximin 3. Column maxima 7, 5 → minimax 5. They differ: no saddle point.
- D = a11 + a22 − a12 − a21 = 7 + 5 − 1 − 3 = 8.
- p = (a22 − a21)/D = (5 − 3)/8 = 1/4; A plays A1 one time in four.
- q = (a22 − a12)/D = (5 − 1)/8 = 1/2; B plays B1 half the time.
- V = (a11a22 − a12a21)/D = (35 − 3)/8 = 4.
- Oddments: A1 gets |3 − 5| = 2, A2 gets |7 − 1| = 6 → p = 2/8 = 1/4. B1 gets |1 − 5| = 4, B2 gets |7 − 3| = 4 → q = 1/2.
- Check: against B1, A gets 7 × 1/4 + 3 × 3/4 = 4; against B2, 1 × 1/4 + 5 × 3/4 = 4.
Answer: A plays (1/4, 3/4), B plays (1/2, 1/2), value V = 4 lakh ₹ to A.
A 2 × 3 game by the graphical method · Payoff to A (illustrative): row A1 (−2, 6, 8), row A2 (4, 1, −1); columns B1, B2, B3. Solve.
- Maximin −1, minimax 4: no saddle point. Let p = probability of A1.
- Lines: B1: −2p + 4(1 − p) = 4 − 6p; B2: 6p + (1 − p) = 1 + 5p; B3: 8p − (1 − p) = −1 + 9p.
- B picks the lowest line, so A maximises the lower envelope.
- B1 meets B3 where 4 − 6p = −1 + 9p → p = 1/3, height 2. There B2 = 1 + 5/3 = 8/3, higher, so B2 is not used.
- (B1 meets B2 at p = 3/11, height 26/11, but B3 is lower there at 16/11, so that point is below the envelope.)
- Critical 2 × 2: rows (−2, 8) and (4, −1). D = −2 − 1 − 8 − 4 = −15; q(B1) = (−1 − 8)/(−15) = 3/5.
- Check: A1 against B's mix: −2 × 3/5 + 8 × 2/5 = 2; A2: 4 × 3/5 − 1 × 2/5 = 2.
Answer: A plays (1/3, 2/3); B plays (3/5, 0, 2/5); value V = 2.
A 4 × 2 game: dominance, then the upper envelope · Payoff to A (illustrative): A1 (2, 5), A2 (0, 6), A3 (4, 3), A4 (1, −2); columns B1, B2.
- Row minima 2, 0, 3, −2 → maximin 3; column maxima 4, 6 → minimax 4: no saddle point.
- A4 (1, −2) is worse than A3 (4, 3) in both columns: delete A4.
- Let q = probability of B1. Lines: A1: 5 − 3q; A2: 6 − 6q; A3: 3 + q.
- A picks the highest line, so B minimises the upper envelope.
- A1 meets A3 where 5 − 3q = 3 + q → q = 1/2, height 7/2. A2 there is 6 − 3 = 3, lower, so A2 is not used.
- Critical 2 × 2: rows (2, 5) and (4, 3). D = 2 + 3 − 5 − 4 = −4; p(A1) = (3 − 4)/(−4) = 1/4.
- Check: B1 against A's mix: 2 × 1/4 + 4 × 3/4 = 3.5; B2: 5 × 1/4 + 3 × 3/4 = 3.5.
Answer: A plays (1/4, 0, 3/4, 0); B plays (1/2, 1/2); value V = 7/2 = 3.5.
Queuing theory: Poisson arrivals, exponential service, Kendall's notation and M/M/1
Which syllabus covers thisAU OMA352 Unit IVVTU BME755C Module 4SPPU 402045D Unit 2MU ILO7015 Module 2KTU PEMET528 Module 4
What are the parts of a queue, and what does Kendall's notation say?
Every queue has an arrival process, a service process, a number of servers, a capacity, a calling population and a discipline (first come, first served is the default). Kendall (1953) wrote A/B/c: M means Markovian (Poisson arrivals or exponential service), D a constant time, Ek Erlang, G general. Indian textbooks extend it as (M/M/1):(∞/FCFS). A tool crib where mechanics arrive at random and one attendant serves them in turn is (M/M/1):(∞/FCFS).
Why Poisson arrivals and exponential service, and what are pure birth and pure death?
If arrivals are independent and occur at a steady rate λ, the count in time t is Poisson with mean λt: the pure-birth process. The gaps are then exponential with mean 1/λ and memoryless. At λ = 6 per hour the chance of no arrival in 15 minutes is e^−1.5 = 0.2231, and of exactly two is 0.251. A pure-death process runs down a stock N at rate μ with nothing added. Erlang (1909) showed telephone calls arrive this way.
What are the M/M/1 results, and where do they come from?
In steady state, the flow from n − 1 up to n equals the flow back down: λPn−1 = μPn, so Pn = ρⁿP0 with ρ = λ/μ. The probabilities must add to 1, so P0 = 1 − ρ. Summing gives the rest. With λ = 6/h and μ = 8/h (illustrative): ρ = 0.75, Ls = 3 mechanics at the crib, Lq = 2.25 waiting, Ws = 30 min, Wq = 22.5 min. The animation runs this queue and its running average creeps toward 3.
What is Little's law, and why do queues explode as ρ approaches 1?
Little's law, L = λW, links the average number in a system to the average time spent in it. It holds for any stable queue (Little published the proof in 1961), so Ls = λWs and Lq = λWq. Ls = ρ/(1 − ρ) is steep near 1: ρ = 0.5 gives 1, 0.75 gives 3, 0.9 gives 9 and 0.95 gives 19. At ρ ≥ 1 there is no steady state and the line grows without limit. Never plan a server at 100 % utilisation.
A tool crib runs at λ = 6/h and μ = 8/h, so Ls = 3. Arrivals rise by 20 % to 7.2/h. What happens to the average number of mechanics at the crib?
ρ goes from 0.75 to 0.9, and Ls = ρ/(1 − ρ) goes from 3 to 9. Queues react far more than in proportion when the server is already busy.
Worked examples
M/M/1 measures for an inspection station · Parts reach a CMM inspection station at λ = 10 per hour (Poisson); inspection is exponential at μ = 12 per hour (illustrative). Find ρ, P0, Ls, Lq, Ws, Wq and P(more than 3 parts at the station).
- ρ = λ/μ = 10/12 = 0.8333; P0 = 1 − ρ = 0.1667.
- Ls = ρ/(1 − ρ) = 5 parts; Lq = ρ²/(1 − ρ) = 4.1667 parts.
- Ws = 1/(μ − λ) = 1/2 h = 30 min.
- Wq = λ/(μ(μ − λ)) = 10/(12 × 2) = 0.4167 h = 25 min.
- Little's law check: λWs = 10 × 0.5 = 5 = Ls.
- P(n > 3) = ρ⁴ = 0.4823.
Answer: ρ = 0.833, P0 = 0.167, Ls = 5, Lq = 4.17, Ws = 30 min, Wq = 25 min, P(n > 3) = 0.482.
Poisson arrivals and a pure-death stock · Mechanics arrive at a crib at 6 per hour (Poisson). A shelf holds 10 carbide inserts used at 2 per hour, not refilled during the shift (illustrative).
- In 15 min the mean number of arrivals is m = 6 × 0.25 = 1.5.
- P(exactly 2) = 1.5² e^−1.5 / 2! = 0.251.
- P(no arrival) = e^−1.5 = 0.2231; this is also P(gap between arrivals > 15 min).
- P(3 or more) = 1 − P(0) − P(1) − P(2) = 0.1912.
- Inserts: after 2 h the mean number used is μt = 2 × 2 = 4.
- P(6 left) = P(exactly 4 used) = 4⁴ e^−4 / 4! = 0.1954.
Answer: P(2 arrivals in 15 min) = 0.251, P(gap > 15 min) = 0.223, P(6 inserts left after 2 h) = 0.195.
Choosing the service rate for a waiting-time target · Arrivals at a crib are 6 per hour. Management wants the mean wait in the queue Wq ≤ 10 min. What service rate μ (and mean service time) is needed?
- Wq = λ/(μ(μ − λ)) ≤ 10 min = 1/6 h.
- 6/(μ(μ − 6)) ≤ 1/6 → μ(μ − 6) ≥ 36 → μ² − 6μ − 36 ≥ 0.
- μ ≥ (6 + √(36 + 144))/2 = 3 + √45 = 9.708 per hour.
- Mean service time ≤ 60/9.708 = 6.18 min; utilisation ρ = 6/9.708 = 0.618.
- Check: Wq = 6/(9.708 × 3.708) = 0.1667 h = 10 min.
Answer: μ ≥ 9.71 per hour, i.e. a mean service time of at most 6.2 min.
Multi-server and finite queues: M/M/c, M/M/1/N and the cost of waiting
Which syllabus covers thisAU OMA352 Unit IVVTU not in syllabusSPPU 402045D Unit 2MU ILO7015 Module 2KTU not in syllabus
How does an M/M/c queue work?
c identical servers share one line. With r = λ/μ and ρ = r/c, the queue is stable only if ρ < 1. While fewer than c customers are present nobody waits; beyond that the line grows. The chance that an arrival must wait is Erlang's C formula (Erlang, 1917). At λ = 12/h, μ = 8/h and c = 2 (illustrative): P0 = 1/7 = 0.1429, P(wait) = 0.6429, Lq = 1.929, Wq = 9.64 min.
Why is one shared line better than separate lines?
Pooling stops one server idling while another has a queue. Two attendants at 8/h with a shared line and λ = 12/h give Wq = 9.6 min. Split the same mechanics into two separate M/M/1 lines of 6/h each and Wq = 22.5 min, more than twice as long, with the same people and the same utilisation. Banks, airport counters and tool cribs use one snake line for this reason.
What changes with limited room (M/M/1/N) or constant service (M/D/1)?
With room for N in the system, arrivals finding it full are turned away. Pn = P0ρⁿ for n = 0..N, so a steady state exists even when λ > μ. At λ = 10/h, μ = 8/h and N = 4 (illustrative), PN = 0.297 of arrivals are lost and λ eff = λ(1 − PN) = 7.03/h. With constant service time, the Pollaczek-Khinchine formula (1930, 1932) gives Lq = ρ²/(2(1 − ρ)), half of M/M/1's: at 6/h and 8/h, Lq falls from 2.25 to 1.125. Variability itself causes waiting.
How many servers should you hire?
Add the hourly cost of the servers and the hourly cost of customers' lost time: TC(c) = c·Cs + Ls·Cw, where Ls = λWs by Little's law. More servers raise the first term and cut the second. For mechanics at λ = 20/h, μ = 8/h per attendant, Cs = ₹ 300/h and Cw = ₹ 600/h (illustrative): c = 3 costs ₹ 4507/h, c = 4 ₹ 3020/h, c = 5 ₹ 3078/h. Four attendants is cheapest.
Two attendants each serve 8 mechanics per hour and 12 mechanics arrive per hour. Compared with two separate lines of 6/h each, the mean wait in one shared line is:
Shared M/M/2: Wq = 9.64 min. Separate M/M/1 at 6/h and 8/h: Wq = 22.5 min. Pooling removes the case of one attendant idle while the other has a line.
Worked examples
M/M/3 at a stores counter · Mechanics reach a stores counter at λ = 15 per hour; each of 3 clerks serves μ = 6 per hour (illustrative). Find P0, P(wait), Lq, Wq, Ls and Ws.
- r = λ/μ = 2.5; ρ = r/c = 2.5/3 = 0.8333 < 1, stable.
- Σ (n = 0..2) rⁿ/n! = 1 + 2.5 + 3.125 = 6.625.
- r³/(3!(1 − ρ)) = 15.625/(6 × 1/6) = 15.625.
- P0 = 1/(6.625 + 15.625) = 1/22.25 = 0.0449.
- P(wait) = 15.625 × P0 = 0.7022.
- Lq = P0 r³ ρ /(3!(1 − ρ)²) = 3.5112; Wq = Lq/λ = 0.2341 h = 14.04 min.
- Ls = Lq + r = 6.0112; Ws = Wq + 1/μ = 24.04 min.
Answer: P0 = 0.0449, P(wait) = 0.702, Lq = 3.51, Wq = 14 min, Ls = 6.01, Ws = 24 min.
M/M/1/N: a machining cell with a small pallet buffer · Pallets arrive at a CNC cell at λ = 5 per hour; the cell machines μ = 6 per hour. There is room for N = 4 pallets including the one being machined; extra pallets go to another cell (illustrative).
- ρ = 5/6 = 0.8333.
- P0 = (1 − ρ)/(1 − ρ⁵) = 0.2786.
- P4 = P0 ρ⁴ = 0.1344: 13.4 % of pallets are sent away.
- λ eff = λ(1 − P4) = 4.328 per hour.
- Ls = ρ/(1 − ρ) − 5ρ⁵/(1 − ρ⁵) = 1.6405; Lq = Ls − (1 − P0) = 0.9192.
- Ws = Ls/λ eff = 22.74 min; Wq = Lq/λ eff = 12.74 min (difference 10 min = 1/μ).
Answer: P0 = 0.279, P4 = 0.134, λ eff = 4.33/h, Ls = 1.64, Ws = 22.7 min.
How many tool-crib attendants? · λ = 20 mechanics per hour, μ = 8 per hour per attendant, attendant cost Cs = ₹ 300/h, a mechanic's lost time Cw = ₹ 600/h (illustrative). Find the number of attendants c with the least total cost.
- Stability needs cμ > λ: c ≥ 3.
- c = 3: Ls = 6.011; TC = 3 × 300 + 6.011 × 600 = ₹ 4506.7/h.
- c = 4: Ls = 3.033; TC = 1200 + 3.033 × 600 = ₹ 3019.9/h.
- c = 5: Ls = 2.63; TC = 1500 + 2.63 × 600 = ₹ 3078.2/h.
- c = 6 costs ₹ 3320.3/h: past the minimum.
Answer: Four attendants: ₹ 3020 per hour, against ₹ 4507 with three.
Simulation: the Monte Carlo method with random numbers
Which syllabus covers thisAU OMA352 Unit IVVTU not in syllabusSPPU 402045D Unit 6MU ILO7015 Module 3KTU not in syllabus
When do you simulate instead of using a formula?
When the distributions come from your own records rather than a neat Poisson or exponential, when the rules are messy (breakdowns, priorities, shifts) or when no formula exists. Monte Carlo simulation draws random numbers, turns them into events, runs the system many times and averages. Stanisław Ulam devised the modern method in the late 1940s at Los Alamos; Nicholas Metropolis named it after the Monte Carlo casino. The steps: define the measure, collect distributions, assign random-number ranges, simulate, repeat, decide.
How do two-digit random numbers turn into outcomes?
Write the probabilities, add them up to a cumulative column, and give each outcome a block of the 100 numbers 00-99 as wide as its probability. For a bakery's daily cake demand (illustrative) of 20, 21, 22, 23, 24 with probabilities 0.10, 0.20, 0.30, 0.25, 0.15, the ranges are 00-09, 10-29, 30-59, 60-84 and 85-99. A random number 47 falls in 30-59, so that day's demand is 22. Probabilities in thousandths need three-digit numbers.
How does a simulation decide the bakery's stock, and how accurate is it?
Each cake costs ₹ 35, sells at ₹ 60 and a leftover fetches ₹ 10 (illustrative). Enumerating the exact expected profit gives ₹ 500, 520, 530, 525 and 507.5 for 20 to 24 cakes, so bake 22. A simulation only estimates this: at 22 cakes the daily profit has a standard deviation of ₹ 33.2, so the average of n days is off by about 33.2/√n: ₹ 10.5 after 10 days, ₹ 3.3 after 100. Four times the days halves the error.
How do you simulate a queue by hand?
Use two random numbers per customer: one for the gap since the previous arrival, one for the service time. Then arrival = previous arrival + gap; start = the later of the arrival and the previous customer's end; wait = start − arrival; idle = start − previous end. For gaps averaging 3.15 min and service averaging 2.7 min (ρ = 0.857), the long-run mean wait is 2.09 min; a 10-row table can easily show 0.5 or 4. Simulate many rows, or many runs, before deciding.
Ten simulated days give an average profit of ₹ 520 at 22 cakes. About how many days must you simulate to cut the random error in half?
The error falls as 1/√n. Halving it needs √n to double, so n must be four times as large: 40 days.
Worked examples
Ten days of a bakery by hand · Daily cake demand 20, 21, 22, 23, 24 with probabilities 0.10, 0.20, 0.30, 0.25, 0.15. Bake k = 22 a day; cost ₹ 35, price ₹ 60, leftover ₹ 10 (illustrative). Random numbers: 47, 03, 88, 61, 25, 92, 14, 70, 39, 05.
- Cumulative: 0.10, 0.30, 0.60, 0.85, 1.00 → ranges 20: 00-09, 21: 10-29, 22: 30-59, 23: 60-84, 24: 85-99.
- Demands: 22, 20, 24, 23, 21, 24, 21, 23, 22, 20.
- Profit at 22: demand 22 or more → 60 × 22 − 35 × 22 = ₹ 550; demand 21 → 1260 − 770 + 10 = ₹ 500; demand 20 → 1200 − 770 + 20 = ₹ 450.
- Daily profits: 550, 450, 550, 550, 500, 550, 500, 550, 550, 450; total ₹ 5200.
- Average = 5200/10 = ₹ 520 per day; the exact expected value is ₹ 530.
Answer: Simulated ₹ 520 per day against the exact ₹ 530: ten days carry about ± ₹ 10 of noise.
Comparing stock levels with the same random numbers · Same ten days and demands as the previous example. Compare baking 21, 22 and 23 cakes, then check against exact enumeration.
- Use the same demands for every stock level (common random numbers), so differences come from the policy, not the luck of the draw.
- k = 21: ₹ 525 on days with demand ≥ 21, ₹ 475 on the two days of 20 → average ₹ 515.
- k = 22: average ₹ 520 (previous example).
- k = 23: ₹ 575, 525, 475, 425 for demand ≥ 23, 22, 21, 20 → average ₹ 515.
- Exact: E[profit] = ₹ 520, 530 and 525 for k = 21, 22, 23.
Answer: Both the short simulation and the exact values pick 22 cakes, but the simulated gaps (₹ 5) are smaller than the noise: a real study runs hundreds of days.
Six customers at a tool crib by hand · Gap between arrivals and service time take 1-5 min with probabilities 0.10, 0.20, 0.30, 0.25, 0.15 (gaps) and 0.15, 0.30, 0.30, 0.20, 0.05 (service). Arrival random numbers 64, 18, 92, 07, 45, 33; service random numbers 81, 52, 12, 97, 60, 38 (illustrative). The crib opens at time 0, empty.
- Gap ranges: 00-09, 10-29, 30-59, 60-84, 85-99 for 1-5 min. Service ranges: 00-14, 15-44, 45-74, 75-94, 95-99.
- Gaps: 4, 2, 5, 1, 3, 3 → arrivals at 4, 6, 11, 12, 15, 18.
- Service: 4, 3, 1, 5, 3, 2 min.
- Start = max(arrival, previous end): 4, 8, 11, 12, 17, 20; ends 8, 11, 12, 17, 20, 22.
- Waits: 0, 2, 0, 0, 2, 2 → mean 1 min.
- Attendant idle: only the 4 min before the first arrival (customer 3 arrives at 11, just as customer 2 ends) → 4 of 22 min.
Answer: Mean wait 1 min, attendant idle 4 min of 22; the long-run mean wait is 2.09 min, so six rows are only a start.
Dynamic programming: Bellman's principle, stage-coach routes and resource allocation
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU 402045D Unit 6MU ILO7015 Module 4KTU not in syllabus
What is dynamic programming, and what does Bellman's principle say?
Dynamic programming (DP), developed by Richard Bellman in the 1950s, solves a problem made of a chain of decisions by splitting it into stages. Each stage has states (where you could be) and decisions (what you can do from there). Bellman's principle of optimality: whatever the first decision was, the decisions that remain must be optimal for the state it leads to. So you solve the last stage first, store the best value of every state, and work backwards. Each earlier stage then needs only one step plus a stored value, not a fresh search of everything after it.
How does backward recursion find the cheapest route through a staged network?
Set f(10) = 0 at the destination. Stage 4: f(8) = 9, f(9) = 1 (the arc costs into 10). Stage 3: f(5) = min(3 + 9, 7 + 1) = 8, and likewise f(6) = 7, f(7) = 4. Stage 2 gives f(2) = 8, f(3) = 7, f(4) = 5, and stage 1 gives f(1) = min(3 + 8, 2 + 7, 3 + 5) = 8: the route 1-4-7-9-10 at ₹8k (illustrative costs). Always taking the cheapest next arc gives 1-3-5-8-10 at ₹15k, because its last arc costs 9. DP did 20 additions; listing all 18 routes takes 54.
How is a resource allocation problem set up as a DP?
The stages are the plants, the state is how many engineers are still free, and the decision is how many this plant gets. With 5 engineers and the illustrative profit table in the interactive, plant C alone gives f3(s) = rC(s). Plant B then gives f2(s) = max over x of rB(x) + f3(s − x): f2(5) = 34, f2(4) = 29. Last, f1(5) = max over x of rA(x) + f2(5 − x) = 35, reached by A 1, B 2, C 2. That is ₹35 thousand a week, the same as checking all 21 ways to split 5 people among 3 plants.
How does DP handle reliability with redundancy, and when does it pay off?
A pump (p = 0.8, ₹10k), PLC (0.9, ₹20k) and sensor (0.7, ₹10k) work in series. Putting m identical units in parallel makes a stage work with probability 1 − (1 − p)^m. With ₹70k (illustrative), DP over the money left picks 2 pumps, 1 PLC and 3 sensors: R = 84.1 %, against 50.4 % with one of each. The tables are small here (11 feasible plans). The payoff comes with size: brute force multiplies the choices of every stage together, while DP adds stages × states × decisions. With many state variables the state table itself explodes, which Bellman called the curse of dimensionality.
In the route network, the cheapest first arc from node 1 is 1 → 3 (₹2k). Is node 3 on the cheapest route?
Going through 3 costs 2 + f(3) = 2 + 7 = 9, while going through 4 costs 3 + f(4) = 3 + 5 = 8. A cheap first step can lead into an expensive tail. That is why DP stores the best tail value of every node before choosing.
Worked examples
Cheapest delivery route by backward recursion · A truck goes from the plant (1) through one warehouse (2, 3 or 4) and one hub (5 or 6) to the customer (7). Costs, ₹ thousand (illustrative): 1-2 4, 1-3 6, 1-4 3; 2-5 7, 2-6 5; 3-5 3, 3-6 6; 4-5 8, 4-6 10; 5-7 5, 6-7 4. Find the cheapest route.
- Stage 3 (hubs): f(5) = 5, f(6) = 4.
- Stage 2: f(2) = min(7 + 5, 5 + 4) = 9 (go to 6); f(3) = min(3 + 5, 6 + 4) = 8 (go to 5); f(4) = min(8 + 5, 10 + 4) = 13 (go to 5).
- Stage 1: f(1) = min(4 + 9, 6 + 8, 3 + 13) = min(13, 14, 16) = 13, reached through node 2.
- Read forwards: 1 → 2 (decision stored at 1), 2 → 6, 6 → 7.
- Check: greedy picks 1-4 (₹3k), then 4-5, then 5-7, total 16: ₹3k worse.
Answer: Route 1-2-6-7, cost ₹13 thousand.
Splitting a ₹4 lakh improvement budget over three lines · ₹4 lakh can go to three lines in ₹1 lakh blocks. Monthly saving (₹ thousand, illustrative) for 0-4 blocks: line 1: 0, 6, 11, 16, 18; line 2: 0, 9, 17, 23, 26; line 3: 0, 5, 9, 11, 13. Maximise the total saving.
- Stage 3 (line 3): f3(s) = r3(s) = 0, 5, 9, 11, 13 for s = 0-4.
- Stage 2: f2(s) = max over x of r2(x) + f3(s − x). For s = 4: 0 + 13, 9 + 11, 17 + 9, 23 + 5, 26 + 0 = 13, 20, 26, 28, 26, so f2(4) = 28 at x = 3.
- Other states: f2(0..3) = 0, 9, 17, 23; f2(3) = 23 also at x = 3.
- Stage 1: f1(4) = max(0 + 28, 6 + 23, 11 + 17, 16 + 9, 18 + 0) = max(28, 29, 28, 25, 18) = 29 at x1 = 1.
- Back-track: line 1 gets 1, leaving 3; line 2 gets 3; line 3 gets 0. Check: 6 + 23 + 0 = 29, the best of all 15 splits.
Answer: Blocks 1, 3, 0 to lines 1, 2, 3: saving ₹29 thousand a month.
Redundancy under a budget · Pump (p = 0.8, ₹10k per unit), PLC (0.9, ₹20k) and sensor (0.7, ₹10k) in series; each stage may hold 1-3 units in parallel; budget ₹70k. Work in units of ₹10k. Maximise system reliability.
- Stage 3 (sensor), budget s left: f3(1) = 0.7, f3(2) = 0.91, f3(3) = f3(4) = 0.973 (3 units at most).
- Stage 2 (PLC, 2 per unit): f2(3) = 0.9 × 0.7 = 0.63; f2(4) = 0.9 × 0.91 = 0.819; f2(5) = max(0.9 × 0.973, 0.99 × 0.7) = 0.8757; f2(6) = max(0.9 × 0.973, 0.99 × 0.91) = 0.9009.
- Stage 1 (pump, budget 7): 1 unit: 0.8 × f2(6) = 0.7207; 2 units: 0.96 × f2(5) = 0.8407; 3 units: 0.992 × f2(4) = 0.8124.
- Best: 2 pumps, leaving 5; f2(5) uses 1 PLC, leaving 3; 3 sensors.
- Check by listing all 11 plans within ₹70k: the same plan wins.
Answer: 2 pumps, 1 PLC, 3 sensors (₹70k): R = 0.8407, against 0.504 with one of each.
Inventory models: EOQ, the production (EPQ) model and planned shortages
Which syllabus covers thisAU OMA352 Unit IIIVTU not in syllabusSPPU not in syllabusMU ILO7015 Module 6KTU not in syllabus
Which costs does an order quantity balance?
Ordering cost S is paid per order (paperwork, freight, inspection, or a machine set-up when you make the part). Holding cost H is paid per unit kept for a year (interest on the money tied up, space, handling, damage), often written as a fraction i of the unit price. With annual demand D and order size Q, you place D/Q orders a year, and the average stock is Q/2. Big orders mean few orders but a lot of stock; small orders mean the reverse. The basic model assumes steady, known demand, the whole lot arriving at once, no shortages and fixed prices. Ford W. Harris published it in 1913.
What is the economic order quantity, and how sensitive is the cost to it?
Total annual cost TC(Q) = D·S/Q + H·Q/2 is lowest where the two parts are equal, at Q* = √(2DS/H). For the interactive's bracket blank (D = 12,000 a year, S = ₹1,500, H = ₹36, illustrative), Q* = 1000: 12 orders a year, one a month, and TC = ₹36,000 (₹18,000 ordering plus ₹18,000 holding). The curve is flat at the bottom: ordering 20 % more than Q* costs only 1.67 % more, and 20 % less costs 2.5 % more. So rounding Q to a pallet or a truckload barely matters.
How does the model change when the part is made in-house at a finite rate?
If the machine makes p units a year while the plant uses D, stock builds at p − D during the run and never reaches Q: the peak is Imax = Q(1 − D/p). The average stock is Imax/2, so Q* = √(2DS/(H(1 − D/p))) is larger than the EOQ. With p = 48,000 a year (4 × D, illustrative) and the same S and H, Q* = 1155, Imax = 866, and TC = ₹31,177. On a 300-day year, each run lasts 7.2 days in a cycle of 28.9 days. As p grows very large, the formula falls back to the EOQ.
Why would a plant plan shortages, and what does that do to Q?
Sometimes a customer accepts a short delay (a backorder), and the delay costs less than holding the stock. Then allowing up to B units short each cycle saves holding cost, at Cs ₹ per unit short per year. For any Q, the best B is Q·H/(H + Cs). The optimum is Q* = √(2DS/H)·√((H + Cs)/Cs). With Cs = ₹144 (4 × H, illustrative): Q* = 1118, B* = 224, the stock peaks at 894, and TC = ₹32,199 against ₹36,000 with no shortages. If Cs is very large, B* goes to 0 and you are back at the EOQ. Lost sales are a different model: they cost a sale, not a delay.
Annual demand for the bracket blank grows four-fold, S and H stay the same. What happens to Q*?
Q* = √(2DS/H), so four times D gives √4 = 2 times Q*: from 1000 to 2000. You order twice as often (24 times a year), and the total cost also only doubles.
Worked examples
EOQ, cycle time and reorder point for a casting · A plant uses D = 4,800 castings a year (300 working days). Ordering cost ₹2,400 per order, price ₹500, holding rate 24 % a year, supplier lead time 6 days. All values illustrative.
- H = 0.24 × 500 = ₹120 per unit per year.
- Q* = √(2 × 4,800 × 2,400 / 120) = √1,92,000 = 438.2 castings.
- Orders per year = 4,800 / 438.2 = 10.95; time between orders = 300 / 10.95 = 27.4 working days.
- TC* = √(2DSH) = ₹52,581 a year (half ordering, half holding).
- Daily use d = 4,800 / 300 = 16; reorder point = d × L = 16 × 6 = 96 castings.
- Rounding to Q = 440 costs ₹52,582, only 0.001 % more.
Answer: Order about 438 castings when stock falls to 96; about 11 orders a year, ₹52,581 a year.
Production run size for gear blanks (EPQ) · Demand 18,000 blanks a year; the forging line makes 60,000 a year when running (300 working days). Set-up ₹3,000, holding ₹15 per blank per year (illustrative).
- 1 − D/p = 1 − 18,000/60,000 = 0.7.
- Q* = √(2 × 18,000 × 3,000 / (15 × 0.7)) = 3207 blanks.
- Imax = Q*(1 − D/p) = 3207 × 0.7 = 2245.
- Run time = Q*/p = 3207 / 200 a day = 16 days; cycle = Q*/d = 3207 / 60 a day = 53.5 days.
- TC* = √(2DSH(1 − D/p)) = ₹33,675 a year. Bought in (EOQ formula), Q would be 2683.
Answer: Run 3207 blanks every 53 working days; the stock peaks at 2245.
Allowing backorders · D = 6,000 a year, S = ₹900, H = ₹30 per unit per year; the customer accepts a short wait, costed at Cs = ₹90 per unit short per year (illustrative).
- Plain EOQ = √(2 × 6,000 × 900 / 30) = 600, TC = ₹18,000.
- Q* = 600 × √((30 + 90)/90) = 600 × √(4/3) = 692.8.
- B* = Q*·H/(H + Cs) = 692.8 × 30/120 = 173.2 units short at the end of each cycle.
- Peak stock = Q* − B* = 519.6; a quarter of every cycle runs on backorders (B*/Q* = 0.25).
- TC* = √(2DSH)·√(Cs/(H + Cs)) = 18,000 × √0.75 = ₹15,588.
Answer: Order 693, allow up to 173 on backorder: ₹15,588 a year, ₹2,412 less than with no shortages.
Inventory policy: price breaks, safety stock, P and Q systems, ABC, VED and FNS
Which syllabus covers thisAU OMA352 Unit IIIVTU not in syllabusSPPU not in syllabusMU ILO7015 Module 6KTU not in syllabus
How do you choose Q when the supplier gives quantity discounts?
With an all-units discount, the lower price applies to every unit once Q passes a break. Purchase cost D·P now enters the total, and H = i·P changes with the price. Rule: find the EOQ at each price; if it falls below that band, raise Q to the break; then compare total costs. For the bracket blank (₹180, ₹174 from 1,500, ₹171 from 3,000; i = 20 %; illustrative): the EOQ at ₹180 is 1,000 (₹21,96,000 a year). At ₹174 the EOQ is 1017, raised to 1,500 (₹21,26,100). At ₹171, Q = 3,000 (₹21,09,300), the best, saving ₹86,700 a year.
Where does safety stock come from, and how is the reorder point set?
Demand during the lead time is uncertain. If daily demand has mean d and standard deviation σd, independent from day to day, lead-time demand has mean d·L and standard deviation σd·√L. Reorder at ROP = d·L + z·σd·√L, where z comes from the normal table for the cycle service level (the chance that a cycle has no stockout). For d = 40, σd = 8, L = 9 days (illustrative): σ = 24; at 95 %, z = 1.645, safety stock = 39.5 and ROP ≈ 399. With Q = 1,000 the expected shortage is only 0.5 units a cycle, so the fill rate is 99.95 %.
What is the difference between a Q system and a P system?
A Q system (continuous review, fixed order quantity) watches stock all the time and orders the same Q at the reorder point. A two-bin system is the shop-floor version: when the first bin empties, reorder. A P system (periodic review) checks every T days and orders up to a level S: S = d(T + L) + z·σd·√(T + L). It must cover T + L days of risk, not L. For the same item with T = 15 days, S ≈ 1024 and the safety stock is 64.5, against 39.5 in the Q system. P suits items bought together from one supplier or on a fixed truck schedule; Q suits expensive or critical items.
What is ABC analysis, and where do the cut-offs come from?
Rank items by annual consumption value (annual use × unit cost) and plot the cumulative share. A few items carry most of the money. In the interactive's 12 stores items (illustrative, ₹100 lakh a year), castings and steel bar are 2 items (17 % of items) with 69 % of the value. Bearings, inserts and welding wire are B (21 %), and the last 7 items are C (10 %). A items get tight control: EOQ, frequent review, firm forecasts. C items get simple rules and larger safety stock. The 70/90 % cut-offs are a convention: there are no fixed thresholds. MRP explosion is in the CAD/CAM and CIM book.
What are VED, FNS, XYZ, SDE and HML classifications?
Each sorts items by a different question, and they are combined with ABC. VED is criticality: vital (the line stops without it), essential, desirable. FNS is movement: fast, normal and slow moving (also written FSN: fast, slow, non-moving, which flags dead stock). XYZ, as used in these syllabi, is the value of stock held: X high, Z low. SDE is procurement difficulty: scarce, difficult, easy. HML is unit price: high, medium, low. A cheap but vital imported seal is C, V and S at once: low value, yet it deserves a generous safety stock.
Lead-time demand has σ = 24 units. Raising the cycle service level from 95 % to 99 % increases safety stock by about how much?
Safety stock is z·σ. z goes from 1.645 to 2.326, so safety stock goes from 39.5 to 55.8 units: 41 % more for 4 points of service. The last few points of service cost the most stock.
Worked examples
All-units discount on bearings · D = 2,400 bearings a year, S = ₹800 per order, holding 25 % of price a year. Price ₹400 below 300 units, ₹380 from 300 to 799, ₹370 from 800 (illustrative).
- ₹400: H = ₹100, EOQ = √(2 × 2,400 × 800 / 100) = 196 (inside its band). TC = 9,60,000 + 2,400 × 800/196 + 100 × 196/2 = ₹9,79,596.
- ₹380: H = ₹95, EOQ = 201, below 300, so Q = 300. TC = 9,12,000 + 6,400 + 14,250 = ₹9,32,650.
- ₹370: H = ₹92.5, EOQ = 203.7, below 800, so Q = 800. TC = 8,88,000 + 2,400 + 37,000 = ₹9,27,400.
- Lowest: Q = 800 at ₹370, ₹5,250 below the 300 option.
- Brute force over every Q from 1 to 20,000 lands on the same 800.
Answer: Order 800 at a time: ₹9,27,400 a year.
Safety stock and reorder point (Q system) · Daily demand for a coolant concentrate: mean 25 cans, σ 6 cans, independent days; lead time 4 days; cycle service level 97.5 % (illustrative).
- σ over the lead time = 6 × √4 = 12.
- z for 97.5 % = 1.96.
- Safety stock = 1.96 × 12 = 23.5 cans.
- ROP = 25 × 4 + 23.5 = 123.5, round up to 124.
- At 90 % (z = 1.282) the safety stock would be 15.4.
Answer: Reorder at 124 cans, of which about 24 are safety stock.
Order-up-to level (P system) · The same coolant reviewed every 10 days; lead time 4 days, 97.5 % service. At today's review, stock on hand plus on order is 210 cans.
- Protection interval T + L = 14 days.
- Mean demand in 14 days = 25 × 14 = 350; σ = 6 × √14 = 22.45.
- Safety stock = 1.96 × 22.45 = 44.
- S = 350 + 44 = 394.
- Order = S − position = 394 − 210 = 184, about 184 cans.
Answer: Order up to 394: order 184 cans today. The safety stock is 44, against 24 under continuous review.
Project networks: AOA and AON diagrams, Fulkerson's rule, CPM and floats
Which syllabus covers thisAU OMA352 Unit VVTU BME755C Module 3SPPU 402045D Unit 5MU not in syllabusKTU not in syllabus
How is a project drawn as a network, and why are dummies needed?
In an activity-on-arrow (AOA) diagram each activity is an arrow and each circle is an event, the moment all arrows into it are done. Rules: one start and one end event, no loops, no dangling arrows, and no two activities sharing both end events. A dummy is a dashed arrow of zero time that carries logic only. In the CNC-cell project (illustrative), installing the machine (E) needs delivery (B) and the foundation (C), but the chip conveyor (F) needs only C. So C ends at its own event, and a dummy links it to E's start. In activity-on-node (AON) diagrams activities are nodes, and no dummy is ever needed. CPM came from DuPont and Remington Rand in the late 1950s.
What is Fulkerson's rule for numbering events?
Number the start event 1. Delete every arrow leaving the numbered events. Any event now with no arrow coming in gets the next number. If several are freed together, number them in any order, usually top to bottom. Repeat until the end event is numbered. Every arrow then runs from a smaller number to a larger one (i < j), so a forward pass in number order never meets an event before all its inputs. In the CNC-cell network, the foundation's end becomes event 3 before delivery's end (event 4), because event 4 still has the dummy coming in until event 3 is numbered.
How do the forward and backward passes find the critical path?
Forward pass, in event order: TE of the start = 0, and TE(j) = the largest TE(i) + t over the arrows into j. Event 4 gets max(3 + 8, 8 + 0) = 11, and the end event gets T = 19 days. Backward pass: TL of the end = T, and TL(i) = the smallest TL(j) − t over the arrows out of i. Event 3 gets min(11 − 0, 16 − 2) = 11. Events with TE = TL are critical. Activities joining them with TE(i) + t = TE(j) form the critical path, A-B-E-G-H here: any day lost on it delays the commissioning.
What are total, free and independent float?
For an activity from i to j taking t days: total float TF = TL(j) − TE(i) − t, the delay it can take without moving the end date. Free float FF = TE(j) − TE(i) − t, the delay that leaves every follower's earliest start alone. Independent float IF = TE(j) − TL(i) − t (0 if negative), the delay possible even when the activity starts as late as possible and its followers as early as possible. Always IF ≤ FF ≤ TF. In the CNC cell, C has TF 3 but FF 0: any slip delays F. F has TF 6, FF 6, IF 3; D has 7 of each. GATE PI asks these often.
The foundation (C, 5 days) has a total float of 3 days and a free float of 0. It slips by 2 days. What happens?
2 days is within the 3 days of total float, so T stays 19 days. Free float is 0, so the next activity on the same chain, F, loses its earliest start. Floats are shared along a chain; using them early takes them away from later activities.
Worked examples
Arrow diagram with a dummy, Fulkerson numbers and floats · Relocating a press (days, illustrative): P disconnect 2; Q move 4 after P; R new foundation bolts 3 after P; S re-level 5 after Q; T wiring 2 after Q and R; U trial 3 after S and T.
- T needs Q and R but S needs only Q, so Q gets its own end event and a dummy runs from it to R's end.
- Fulkerson: start = 1; after deleting P, event 2; then Q's end = 3 (R's end still has the dummy in); then R's end = 4; then 5; end = 6.
- Forward: TE = 0, 2, 6, max(2 + 3, 6 + 0) = 6, max(6 + 5, 6 + 2) = 11, 11 + 3 = 14.
- Backward: TL6 = 14, TL5 = 11, TL4 = 11 − 2 = 9, TL3 = min(11 − 5, 9 − 0) = 6, TL2 = min(6 − 4, 9 − 3) = 2, TL1 = 0.
- R: TF = 9 − 2 − 3 = 4, FF = 6 − 2 − 3 = 1, IF = 6 − 2 − 3 = 1. T: TF = 11 − 6 − 2 = 3, FF = 3, IF = 11 − 9 − 2 = 0.
Answer: Critical path P-Q-S-U, 14 days; R has 4 days of total float, T has 3.
Forward and backward pass on the CNC-cell network · A 3 (1-2); B 8 (2-4); C 5 (2-3); D 4 (2-5); dummy (3-4); E 3 (4-5); F 2 (3-6); G 2 (5-6); H 3 (6-7). Events numbered by Fulkerson's rule.
- TE1 = 0, TE2 = 3, TE3 = 3 + 5 = 8, TE4 = max(3 + 8, 8 + 0) = 11.
- TE5 = max(11 + 3, 3 + 4) = 14, TE6 = max(14 + 2, 8 + 2) = 16, TE7 = 16 + 3 = 19.
- TL7 = 19, TL6 = 16, TL5 = 14, TL4 = 11, TL3 = min(11 − 0, 16 − 2) = 11.
- TL2 = min(11 − 8, 11 − 5, 14 − 4) = 3, TL1 = 0.
- Events with TE = TL: 1, 2, 4, 5, 6, 7; the tight arrows between them are A, B, E, G, H.
Answer: T = 19 days; critical path A-B-E-G-H.
What if the foundation takes 10 days? · Same network, but C (foundation) takes 10 days instead of 5.
- TE3 = 3 + 10 = 13; TE4 = max(3 + 8, 13 + 0) = 13: the dummy now decides.
- TE5 = max(13 + 3, 3 + 4) = 16, TE6 = max(16 + 2, 13 + 2) = 18, TE7 = 21.
- New critical path A-C-dummy-E-G-H, 21 days (2 days later).
- B now has TF = 2; D's TF grows to 9.
- Past 8 days of C the critical path switches; at exactly 8 both paths are critical.
Answer: T = 21 days, critical path A-C-E-G-H through the dummy; B has 2 days of float.
PERT: three time estimates and the probability of finishing on time
Which syllabus covers thisAU OMA352 Unit VVTU BME755C Module 3SPPU 402045D Unit 5MU not in syllabusKTU not in syllabus
Why does PERT ask for three time estimates?
When a job has never been done before, nobody knows its duration, only a range. PERT asks for an optimistic time a, a most likely time m and a pessimistic time b, and treats the duration as a skewed (beta) distribution with mean te = (a + 4m + b)/6 and standard deviation (b − a)/6. Buying die steel at 2, 5 or 14 days (illustrative) gives te = 6 days, not 5: the long delay tail pulls the mean up, and σ = 2 days. PERT was developed in 1958 for the US Navy's Polaris missile programme; CPM uses one fixed time per activity.
How do you get the project's expected time and its spread?
Find the critical path with the te values, exactly as in CPM. The project's expected time Te is the sum of te along it, and its variance is the sum of the activity variances on that path (activities are assumed independent). By the central limit theorem the project time is then taken as normal. In the die-making network above, the critical path B-C-E-F gives Te = 6 + 10 + 5 + 4 = 25 days and Σσ² = 4 + 4 + 1.78 + 0.44 = 10.22, so σ = 3.20 days. Variances add; standard deviations do not.
How do you find the chance of finishing by a date, or the date for a chance?
Convert the scheduled date Ts to z = (Ts − Te)/σ and read Φ(z) from the normal table. For Ts = 28 days: z = 3/3.20 = 0.94, so P = 82.6 %. A date equal to Te always gives 50 %. Turned round, the date for a target probability is Te + zσ: 90 % needs z = 1.28, so 29.1 days; 95 % needs z = 1.645, so 30.3 days. GATE PI papers ask both directions, and a negative z simply means a probability below one half.
Where does the PERT probability go wrong?
PERT looks only at the critical path. A near-critical path with a big spread can finish last just as often, and the project ends when the LAST path ends (merge-event bias), so the true probability is lower. In the near-critical case of the interactive, PERT still says 82.6 % for 28 days, but a Monte Carlo run of the whole network gives about 67 %; for 25 days, about 31 % instead of 50 %. The independence assumption and guessed a, m, b add more error. When paths are close, simulate the whole network.
A project has two paths that share no activities and meet only at the end event. Each has Te = 25 days and σ = 3 days. PERT says P(finish within 25 days) = 50 %. If the paths are independent, the true probability is about:
Both paths must finish within 25 days: 0.5 × 0.5 = 0.25, so about 25 %. PERT picks one path and reports 50 %; the merge of parallel paths always makes the true chance lower.
Worked examples
Expected time and variance · Three jobs on a fixture build (illustrative, days): X (a, m, b) = (3, 5, 13); Y = (4, 6, 8); Z = (2, 4, 12)
- X: te = (3 + 4×5 + 13)/6 = 36/6 = 6; σ = (13 − 3)/6 = 1.667; σ² = 2.778
- Y: te = (4 + 24 + 8)/6 = 6; σ = (8 − 4)/6 = 0.667; σ² = 0.444
- Z: te = (2 + 16 + 12)/6 = 5; σ = 10/6 = 1.667; σ² = 2.778
- X and Y have the same expected time, but X is far less predictable (variance about 6 times larger)
Answer: te = 6, 6, 5 days; σ² = 2.78, 0.44, 2.78
Probability of meeting a date · AOA network (illustrative, days): P 1-2 (2, 4, 6); Q 1-3 (3, 5, 13); R 2-3 (1, 2, 3); S 2-4 (5, 8, 17); T 3-4 (4, 5, 12); U 4-5 (2, 3, 4). Find P(T ≤ 18), P(T ≤ 14) and the date for 95 %
- te: P 4, Q 6, R 2, S 9, T 6, U 3
- Paths: P-S-U = 4 + 9 + 3 = 16; P-R-T-U = 4 + 2 + 6 + 3 = 15; Q-T-U = 6 + 6 + 3 = 15. Critical: P-S-U, Te = 16
- σ² = 0.444 + 4 + 0.111 = 4.556; σ = 2.134 days
- P(T ≤ 18): z = 2/2.134 = 0.94, Φ = 0.8256
- P(T ≤ 14): z = −0.94, Φ = 1 − 0.8256 = 0.1744
- 95 %: z = 1.645, date = 16 + 1.645 × 2.134 = 19.51 days
Answer: P(≤ 18 d) ≈ 82.6 %, P(≤ 14 d) ≈ 17.4 %, 95 % by 19.5 days
Merge-event bias in numbers · Two independent paths end at the same event (illustrative): path 1 Te = 40, σ = 3 days; path 2 Te = 38, σ = 4 days. Scheduled date 42 days
- PERT uses the critical path 1 only: z = (42 − 40)/3 = 0.667, P = 0.7475
- Path 2 alone: z = (42 − 38)/4 = 1.0, P = 0.8413
- The project needs both: P = 0.7475 × 0.8413 = 0.6289
Answer: About 63 %, not the 75 % PERT reports
Crashing and resource levelling: the time-cost trade-off
Which syllabus covers thisAU not in syllabusVTU BME755C Module 3SPPU 402045D Unit 5MU not in syllabusKTU not in syllabus
Why is there a best project duration?
Direct costs (labour, material, hired equipment on each activity) rise when you hurry: overtime, extra crews, air freight. Indirect costs (site overheads, supervision, a stopped line) are paid every day, so they fall as the project gets shorter. Total cost is their sum, a shallow U. Installing a CNC machine (illustrative): at the normal 18 days, direct cost ₹1,25,000 plus 18 × ₹9,000 indirect = ₹2,87,000; crashed to 15 days, ₹1,41,000 + ₹1,35,000 = ₹2,76,000, the least total.
What is an activity's cost slope?
Each activity has a normal time and cost and a crash time and cost: the shortest it can be done in, at a higher price. Assuming the cost rises in a straight line between them, the cost slope is the extra money per day saved. Activity D in the interactive goes from 6 days at ₹24,000 to 4 days at ₹30,000: slope = ₹6,000/2 = ₹3,000 per day. A cheap slope on a critical activity is where to start; crashing a non-critical activity buys nothing.
How do you crash a network step by step?
Cut the project one day at a time. Each step, cut the cheapest critical activity that still has a day to give. Once several paths are critical, they must all shrink together: choose the cheapest set that touches every critical path (an activity common to all of them may do it alone). In the interactive the extra cost per day climbs ₹3,000, ₹5,000, ₹8,000, ₹10,000, ₹11,000, ₹18,000. Stop when the next day costs more than the indirect cost it saves (₹9,000 here, so stop at 15 days) or a critical path is fully crashed (12 days).
What is resource levelling?
An early-start schedule bunches work at the start, so the crew needed jumps up and down. Levelling keeps the project duration and slides non-critical activities within their float to flatten the crew histogram, so fewer fitters are hired and none stand idle. In the fitters' job of the interactive, three moves cut the peak from 8 to 5 fitters in the same 11 days (Σ r², a flatness measure, falls from 248 to 200). When the crew is capped below the peak, the job becomes resource-constrained scheduling and the project can get longer.
The indirect cost is ₹9,000 per day. The cheapest way to cut one more day off the critical paths costs ₹10,000. Should you crash that day?
Crashing one more day adds ₹10,000 of direct cost and saves ₹9,000 of indirect cost, so the total goes up by ₹1,000. The least-cost duration is reached when the next day's crash cost exceeds the indirect cost per day.
Worked examples
Cost slopes · Normal and crash data (illustrative): G 8 d ₹40,000 → 5 d ₹55,000; H 6 d ₹30,000 → 4 d ₹42,000; J 10 d ₹60,000 → 7 d ₹69,000; K 4 d ₹18,000 → 3 d ₹26,000
- G: (55,000 − 40,000)/(8 − 5) = ₹5,000 per day
- H: (42,000 − 30,000)/(6 − 4) = ₹6,000 per day
- J: (69,000 − 60,000)/(10 − 7) = ₹3,000 per day
- K: (26,000 − 18,000)/(4 − 3) = ₹8,000 per day
Answer: J is the cheapest to crash (₹3,000/day, up to 3 days), K the dearest
Least-cost duration of two parallel paths · Path 1: L (5 d, crash 4 d, slope ₹4,000/day) then M (7 d, crash 5 d, slope ₹2,000/day); path 2: N (11 d, crash 9 d, slope ₹3,000/day). Normal direct cost ₹80,000; indirect ₹6,000/day (illustrative)
- Normal: L-M = 12 days (critical), N = 11. Total = 80,000 + 12 × 6,000 = ₹1,52,000
- Day 1: only L-M is critical; cheapest is M (₹2,000). 11 days, direct ₹82,000, total ₹1,48,000. Now both paths are 11
- Day 2: both paths must shrink: M + N = ₹5,000 < ₹6,000. 10 days, direct ₹87,000, total ₹1,47,000
- Day 3: M is at its limit, so L + N = ₹7,000 > ₹6,000: total would rise to ₹1,48,000
- Brute force over every crash plan gives the same minimum direct cost for 12, 11, 10 and 9 days
Answer: Crash to 10 days: least total cost ₹1,47,000
Levelling a crew histogram · A 6-day wiring job (illustrative): A 6 days, 2 electricians (critical); B and C, 2 days and 3 electricians each, free to go anywhere in the 6 days
- Early start: A, B and C all start on day 0. Crew per day: 8, 8, 2, 2, 2, 2. Σ r² = 64 + 64 + 4 × 4 = 144
- Slide C to start on day 2 (it has float): 5, 5, 5, 5, 2, 2. Σ r² = 4 × 25 + 2 × 4 = 108
- Crew-days are unchanged: 8 + 8 + 2 × 4 = 5 × 4 + 2 × 2 = 24; the duration stays 6 days
Answer: Peak falls from 8 to 5 electricians with no delay
Replacement: economic life of an asset and group replacement
Which syllabus covers thisAU OMA352 Unit VVTU not in syllabusSPPU 402045D Unit 5MU not in syllabusKTU not in syllabus
What are the two kinds of replacement problem?
Some items wear out slowly: a machine tool, a forklift, a compressor. Their running cost (power, repairs, scrap, downtime) rises every year and their resale value falls, so the question is how many years to keep one: its economic life. Other items work perfectly until they fail suddenly: lamps, sensors, solenoid valves. A failure costs more than a planned change (a stopped line, a call-out), so the question is whether to replace them all together at fixed intervals, and how often.
How do you find the economic life of a machine?
For each n, add the capital loss P − Sn to the running costs of years 1 to n and divide by n. The n with the smallest average is the economic life. For the CNC turning centre in the interactive (illustrative ₹ thousand: P = 400), the average falls from 160 to 128.75 at n = 4, then rises. Equivalent rule: replace when next year's cost, running 110 plus a resale drop of 25 = 135, exceeds the minimum average of 128.75.
What changes when money has a time value?
With interest rate r, ₹1 paid in year i is worth 1/(1 + r)^i today. Discount the price, every running cost and the resale to a present worth, then spread it into an equal yearly amount (equivalent annual cost, EAC) with the capital recovery factor. Pick the n with the lowest EAC. At r = 10 % the CNC machine's economic life moves from 4 to 5 years (EAC ₹1,55,848 a year): later running costs weigh less today, while the price is paid at once.
When is group replacement cheaper?
Track a batch with the renewal recursion: N_k = N0·p_k + N1·p_(k−1) + ... gives expected failures in month k. Group replacing every t months costs (failures replaced singly + N × group price)/t per month. For 1,000 lamps (illustrative: ₹120 singly, ₹40 in a group, mean life 3.88 months), individual replacement alone costs 1,000/3.88 × 120 = ₹30,928 a month; replacing all every 3 months costs ₹25,478. Replace at the end of month t when the cost per month would rise in month t + 1.
For the CNC machine in the interactive (economic life 4 years without interest), the interest rate rises from 0 to 10 %. The economic life:
Discounting makes the big running costs of later years weigh less in today's money while the price is paid now, so it pays to keep the machine longer: 5 years at 10 %.
Worked examples
Economic life without interest · A forklift (illustrative, ₹ thousand): price 900; running cost by year 100, 120, 150, 190, 250, 300; resale after n years 600, 450, 340, 260, 200, 160
- n = 1: (900 − 600 + 100)/1 = 400
- n = 2: (900 − 450 + 220)/2 = 335
- n = 3: (900 − 340 + 370)/3 = 310
- n = 4: (900 − 260 + 560)/4 = 300
- n = 5: (900 − 200 + 810)/5 = 302; n = 6: (900 − 160 + 1,110)/6 = 308.3
- Check: year-5 cost = 250 + (260 − 200) = 310 > 300, so keeping a 5th year raises the average
Answer: Economic life 4 years, average ₹3,00,000 a year
Economic life with interest · An air compressor (illustrative, ₹ thousand): price 60; running cost 8, 12, 18, 26 (paid at each year end); resale 40, 30, 22, 16; interest 10 %
- Without interest the averages are 28, 25, 25.33, 27: life 2 years
- Present worth PW(n) = 60 + Σ R_i/1.1^i − S_n/1.1^n: 30.91, 52.4, 74.18, 97.54
- Annuity factor Σ 1/1.1^i: 0.9091, 1.7355, 2.4869, 3.1699
- EAC = PW ÷ factor: 34, 30.19, 29.83, 30.77
Answer: At 10 % the economic life is 3 years (EAC ₹29,831 a year), one year longer than without interest
Group or individual replacement · 400 solenoid valves (illustrative) fail in month 1, 2, 3, 4 of life with probability 0.1, 0.2, 0.3, 0.4. Replacing one valve on failure costs ₹200; replacing all in a group costs ₹60 each
- N1 = 400 × 0.1 = 40
- N2 = 400 × 0.2 + 40 × 0.1 = 84
- N3 = 400 × 0.3 + 40 × 0.2 + 84 × 0.1 = 136.4
- Mean life = 0.1 + 0.4 + 0.9 + 1.6 = 3 months; individual only: 400/3 × 200 = ₹26,667 a month
- Group every t months: t = 1: (40 × 200 + 24,000)/1 = ₹32,000; t = 2: (124 × 200 + 24,000)/2 = ₹24,400; t = 3: (260.4 × 200 + 24,000)/3 = ₹25,360
Answer: Replace all valves every 2 months (₹24,400 a month), cheaper than individual replacement (₹26,667)
Non-traditional optimisation: genetic algorithm, simulated annealing and particle swarm
Which syllabus covers thisAU not in syllabusVTU not in syllabusSPPU not in syllabusMU MEDLO5011 Module 4KTU PEMET528 Module 3
Why use a metaheuristic instead of an exact method?
Some problems have too many answers to check. A CNC drill visiting 11 holes and returning has 1,814,400 different tours; 20 holes have about 6 × 10^16. Exact methods slow down sharply: the Held-Karp dynamic programme (Bellman, and Held and Karp, 1962) finds the best 11-hole tour, 508.9 mm in the interactive, but its work grows as n² 2ⁿ. Metaheuristics search cleverly, mix randomness with improvement, and give a good answer fast, but with no proof that it is the best.
How does simulated annealing escape a poor answer?
Make a small random change (swap two holes in the tour). Keep it if the tour gets shorter. If it gets longer by Δ, still keep it with probability e^(−Δ/T). The temperature T starts high, so many uphill moves pass and the search wanders, then cools slowly, so the search settles. Kirkpatrick, Gelatt and Vecchi named it in 1983, after slow cooling of metal. In the interactive (seed 5), starting at T0 = 60 mm reaches the optimum; T0 = 0 (accept only improvements) sticks 26 % longer. Over 30 seeds: 24 hits against 2.
How does a genetic algorithm search?
Keep a population of answers (40 tours). Fitter tours (shorter) are picked as parents more often (tournament selection). Crossover builds a child from two parents: order crossover copies a block of one parent and fills the rest in the other parent's order, so the child is still a valid tour. Mutation (swap two holes) adds variety; without it the population converges early. Holland's 1975 book made the method known. In the interactive (60 % mutation, 150 generations) it found the optimum in 14 of 30 seeds: good, not guaranteed.
How does a particle swarm move?
Each particle is a trial point with a velocity. Every step, velocity = inertia w × old velocity + a pull toward the particle's own best point + a pull toward the swarm's best point (random weights), then the particle moves. Kennedy and Eberhart introduced it in 1995. On the Rastrigin function, a bumpy surface with many local minima and the global minimum 0 at (0, 0), 24 particles with w = 0.7 found the global basin in 98 of 100 seeds. A small w converges fast but can stall; a large w explores longer.
During simulated annealing at T = 20 mm, a swap makes the tour 10 mm longer. The chance that the move is accepted is about:
P = e^(−Δ/T) = e^(−10/20) = e^(−0.5) = 0.61. At T = 5 mm the same move passes only 13.5 % of the time, which is why cooling makes the search settle.
Worked examples
Annealing acceptance · A move lengthens the tour by Δ = 10 mm. Find the acceptance probability at T = 50, 20, 5 and 1 mm, and decide with the random number 0.42 at T = 20 and at T = 5
- T = 50: e^(−0.2) = 0.819
- T = 20: e^(−0.5) = 0.607
- T = 5: e^(−2) = 0.135
- T = 1: e^(−10) = 0.0000454
- At T = 20: 0.42 < 0.607, accept. At T = 5: 0.42 > 0.135, reject
Answer: Hot: most uphill moves pass; cold: almost none
Order crossover and swap mutation · Parent 1: 1 2 3 4 5 6 7 8; parent 2: 3 7 5 1 6 8 2 4 (tours of 8 stations). Keep positions 3 to 5 of parent 1, then swap positions 2 and 7 of the child
- Copy positions 3-5 from parent 1: _ _ 3 4 5 _ _ _
- Read parent 2 from position 6, wrapping round: 8 2 4 3 7 5 1 6; drop 3, 4, 5: 8 2 7 1 6
- Fill positions 6, 7, 8, then 1, 2 in that order: 1 6 3 4 5 8 2 7
- Swap mutation of positions 2 and 7: 1 2 3 4 5 8 6 7
Answer: Child 1 6 3 4 5 8 2 7, mutated to 1 2 3 4 5 8 6 7: both valid tours
One particle-swarm step · Rastrigin function. A particle at x = (2.0, −1.5), f = 26.25, velocity (0.5, 0.4); its own best point (1.1, −0.9); the swarm's best (0.1, 0.1); w = 0.7, c1 = c2 = 1.5, random numbers r1 = 0.4, r2 = 0.6 (same for both coordinates, no speed limit)
- vx = 0.7 × 0.5 + 1.5 × 0.4 × (1.1 − 2.0) + 1.5 × 0.6 × (0.1 − 2.0) = 0.35 − 0.54 − 1.71 = −1.90
- vy = 0.7 × 0.4 + 1.5 × 0.4 × (−0.9 + 1.5) + 1.5 × 0.6 × (0.1 + 1.5) = 0.28 + 0.36 + 1.44 = 2.08
- New position = (2.0 − 1.90, −1.5 + 2.08) = (0.10, 0.58)
- f at the new point = 21.02: better than 26.25, but not better than the particle's own best (5.84), so both bests stay
Answer: x = (0.10, 0.58), v = (−1.90, 2.08), f = 21.02
Keep going
- CAD/CAM and CIM interactive book
- Manufacturing Processes interactive book
- Machining Science, Machine Tools and Metrology interactive book
- GATE PI operations research questions
- GATE PI industrial engineering questions
- GATE ME industrial engineering questions
- Project Planning and Scheduling course
- All Skill-Lync interactive books
Recommended reading
- Operations Research: An Introduction, H. A. Taha
- Introduction to Operations Research, F. S. Hillier and G. J. Lieberman
- Operations Research, R. Panneerselvam
- Operations Research: Theory and Applications, J. K. Sharma
- Operations Research, Kanti Swarup, P. K. Gupta and Man Mohan
- Operations Research: Principles and Applications, G. Srinivasan
- Operations Research: Applications and Algorithms, W. L. Winston
- Problems in Operations Research, P. K. Gupta and D. S. Hira
How this book was made
Chapters follow the official syllabi listed above. Every interactive's formulas and every worked-example number were checked by script. Explanations, animations and examples are original to Skill-Lync. Topics informed by MIT OpenCourseWare 15.053 (Optimization Methods in Management Science), CC BY-NC-SA. All explanations, animations and examples are original to Skill-Lync; MIT does not endorse this page.