Practice Problems
Extra problems per topic, each with a twist the past papers did not use β solved one step per line. Work the question yourself first, then compare.
Every solution is broken into numbered steps, and every step shows one line of working at a time. Nothing is compressed onto a single line, because that is where mistakes hide. Where a problem has a deliberate twist β a ratio constraint, a tie in the ratio test, an out-of-range RHS β it is flagged so you can spot the pattern next time.
A Β· LPP Formulation Unit 1
A1 β Two products with an extra market limit
A furniture firm makes desks and bookshelves. A desk needs 6 hours machining and 4 hours polishing; a bookshelf needs 3 hours machining and 5 hours polishing. Weekly capacity is 180 machining hours and 200 polishing hours. Profit is βΉ500 per desk and βΉ350 per bookshelf. The firm can sell at most 25 desks a week. Formulate the LPP.
- Step 1 β Build the resource table
Resource Desk (Xβ) Bookshelf (Xβ) Available Machining (hrs) 6 3 180 Polishing (hrs) 4 5 200 Profit (βΉ/unit) 500 350 maximise - Step 2 β Decision variables Let Xβ = number of desks produced per week Let Xβ = number of bookshelves produced per week
- Step 3 β Objective function Max Z = 500Xβ + 350Xβ β total weekly profit in βΉ
- Step 4 β Constraints, one per row of the table 6Xβ + 3Xβ β€ 180 β machining hours 4Xβ + 5Xβ β€ 200 β polishing hours Xβ β€ 25 β market limit on desks
- Step 5 β Non-negativity Xβ, Xβ β₯ 0
A2 β A minimisation (feed mix) problem
A poultry farmer mixes two feeds. Feed A costs βΉ12/kg and supplies 40 units of protein and 20 units of fat per kg. Feed B costs βΉ8/kg and supplies 25 units of protein and 30 units of fat per kg. The daily mix must supply at least 2000 units of protein and at least 1200 units of fat. Formulate to minimise cost.
- Step 1 β Spot the direction from the wording
"Costs" + "minimise" βΉ Min objective. "At least" βΉ β₯ constraints. This is the mirror image of A1.
- Step 2 β Decision variables Let Xβ = kg of Feed A used per day Let Xβ = kg of Feed B used per day
- Step 3 β Objective function Min Z = 12Xβ + 8Xβ β total daily feed cost in βΉ
- Step 4 β Constraints 40Xβ + 25Xβ β₯ 2000 β protein requirement 20Xβ + 30Xβ β₯ 1200 β fat requirement
- Step 5 β Non-negativity Xβ, Xβ β₯ 0
A3 β A ratio constraint (portfolio)
An investor has βΉ10 lakh. Bonds return 8% and equity returns 14%. At most 60% of the amount invested may go into equity, and at least βΉ2 lakh must go into bonds. Formulate to maximise return.
- Step 1 β Decision variables Let Xβ = βΉ lakh invested in bonds Let Xβ = βΉ lakh invested in equity
- Step 2 β Objective function Max Z = 0.08Xβ + 0.14Xβ β annual return in βΉ lakh
- Step 3 β Fund and minimum constraints Xβ + Xβ β€ 10 β total funds available Xβ β₯ 2 β minimum in bonds
- Step 4 β Turn the percentage into a linear constraint
"At most 60% of the amount invested" means equity β€ 0.6 Γ (total invested):
Xβ β€ 0.6 (Xβ + Xβ) Xβ β€ 0.6Xβ + 0.6Xβ Xβ β 0.6Xβ β€ 0.6Xβ 0.4Xβ β 0.6Xβ β€ 0 β0.6Xβ + 0.4Xβ β€ 0 β the equity-share constraint - Step 5 β Non-negativity Xβ, Xβ β₯ 0
If the question had said "at most 60% of the βΉ10 lakh", the constraint would simply be Xβ β€ 6. It says "of the amount invested", which may be less than 10 β so the fraction is of (Xβ + Xβ) and must be rearranged. Read whether the percentage is of a fixed total or of a variable total. If ambiguous, state which reading you took.
A4 β Three variables with a proportionality link
A workshop makes items A, B and C. Time per unit on Machine I is 2, 3 and 1 hours; on Machine II it is 4, 1 and 2 hours. Machine I has 100 hours available, Machine II has 120. Profit is βΉ30, βΉ20 and βΉ25 per unit. Production of C must be at least twice that of A. Formulate.
- Step 1 β Decision variables Let Xβ = units of A, Xβ = units of B, Xβ = units of C
- Step 2 β Objective function Max Z = 30Xβ + 20Xβ + 25Xβ
- Step 3 β Machine constraints 2Xβ + 3Xβ + 1Xβ β€ 100 β Machine I hours 4Xβ + 1Xβ + 2Xβ β€ 120 β Machine II hours
- Step 4 β Rearrange the linking condition
Every constraint must have all variables on the left and a constant on the right:
Xβ β₯ 2Xβ β2Xβ + Xβ β₯ 0 β production-mix constraint - Step 5 β Non-negativity Xβ, Xβ, Xβ β₯ 0
A5 β Two plants meeting one demand
A company produces a chemical at two plants. Plant 1 costs βΉ15,000 per thousand litres and can make at most 12 thousand litres; Plant 2 costs βΉ18,000 per thousand litres and can make at most 9 thousand litres. Total production must be at least 16 thousand litres. Formulate to minimise cost.
- Step 1 β Decision variables (note the unit!) Let Xβ = thousand litres produced at Plant 1 Let Xβ = thousand litres produced at Plant 2
- Step 2 β Objective function Min Z = 15000Xβ + 18000Xβ β total production cost in βΉ
- Step 3 β Capacity constraints (β€, one per plant) Xβ β€ 12 β Plant 1 capacity Xβ β€ 9 β Plant 2 capacity
- Step 4 β Demand constraint (β₯, because it is a requirement) Xβ + Xβ β₯ 16 β minimum total production
- Step 5 β Non-negativity Xβ, Xβ β₯ 0
B Β· Graphical Method Unit 1 Β· numerical
B1 β Standard maximisation
- Step 1 β Convert to equations and find two points on each line
Line Set Xβ = 0 Set Xβ = 0 6Xβ + 4Xβ = 24 Xβ = 6 β (0, 6) Xβ = 4 β (4, 0) Xβ + 2Xβ = 6 Xβ = 3 β (0, 3) Xβ = 6 β (6, 0) - Step 2 β Find the intersection by solving the pair simultaneously 6Xβ + 4Xβ = 24 β¦(i) Xβ + 2Xβ = 6 β¦(ii) Multiply (ii) by 2: 2Xβ + 4Xβ = 12 β¦(iii) (i) β (iii): 4Xβ = 12 Xβ = 3 Substitute in (ii): 3 + 2Xβ = 6 β Xβ = 1.5 Intersection point B = (3, 1.5)
- Step 3 β List the corner points of the feasible region
O (0, 0) A (0, 3) B (3, 1.5) C (4, 0)
A is (0,3) not (0,6), because (0,6) violates Xβ + 2Xβ β€ 6. Always test a candidate corner in every constraint before accepting it.
- Step 4 β Evaluate Z at every corner point
Corner (Xβ, Xβ) Z = 5Xβ + 4Xβ O (0, 0) 0 A (0, 3) 5(0) + 4(3) = 12 B (3, 1.5) 5(3) + 4(1.5) = 21 C (4, 0) 5(4) + 4(0) = 20 - Step 5 β State the answer in full Xβ = 3, Xβ = 1.5, Max Z = 21
B2 β Minimisation with an unbounded feasible region
- Step 1 β Intercepts
Line Set Xβ = 0 Set Xβ = 0 2Xβ + 5Xβ = 20 (0, 4) (10, 0) 3Xβ + Xβ = 15 (0, 15) (5, 0) - Step 2 β Intersection From 3Xβ + Xβ = 15 β Xβ = 15 β 3Xβ Substitute: 2Xβ + 5(15 β 3Xβ) = 20 2Xβ + 75 β 15Xβ = 20 β13Xβ = β55 Xβ = 55/13 β 4.23 Xβ = 15 β 3(55/13) = (195 β 165)/13 = 30/13 β 2.31 Intersection = (55/13, 30/13) β (4.23, 2.31)
- Step 3 β Identify the corner points
Both constraints are β₯, so the feasible region lies away from the origin and is unbounded above. Its corner points are where the boundary turns:
(0, 15) (55/13, 30/13) (10, 0) - Step 4 β Evaluate Z
Corner Z = 6Xβ + 10Xβ Value (0, 15) 6(0) + 10(15) 150 (55/13, 30/13) (330 + 300)/13 = 630/13 β 48.46 (10, 0) 6(10) + 10(0) 60 - Step 5 β Answer Xβ β 4.23, Xβ β 2.31, Min Z β 48.46
The feasible region here goes on for ever upward and to the right β but because we are minimising, the optimum sits at a finite corner. An unbounded region only produces an unbounded solution when the objective improves in the direction the region is open. Say this explicitly if a question asks whether the answer is valid.
B3 β Multiple optimal solutions
- Step 1 β Notice the slopes before you plot
Objective: 4Xβ + 6Xβ β ratio 4 : 6 = 2 : 3
Constraint: 2Xβ + 3Xβ β ratio 2 : 3
Same ratio βΉ the objective line is PARALLEL to constraint 1
That is the signature of multiple optimal solutions. Spotting it here saves you from being surprised at step 4.
- Step 2 β Corner points Xβ = 3 meets 2Xβ + 3Xβ = 12: 2Xβ + 9 = 12 β Xβ = 1.5 β (1.5, 3) Xβ = 4 meets 2Xβ + 3Xβ = 12: 8 + 3Xβ = 12 β Xβ = 4/3 β (4, 4/3) Corners: O(0,0), (0,3), (1.5,3), (4, 4/3), (4,0)
- Step 3 β Evaluate Z
Corner Z = 4Xβ + 6Xβ (0, 3) 0 + 18 = 18 (1.5, 3) 6 + 18 = 24 (4, 4/3) 16 + 8 = 24 (4, 0) 16 + 0 = 16 - Step 4 β State the answer as a set, not a point
Two corner points both give Z = 24
Every point on the segment joining (1.5, 3) and (4, 4/3) is optimal, with Max Z = 24
Management implication: the firm can pick whichever of those production plans it prefers on other grounds β the profit is identical.
B4 β Three constraints, from the lecture deck
Weekly production cannot exceed 25 units of P1 or 35 units of P2. The company employs 60 worker-weeks; P1 needs 2 weeks of labour, P2 needs 1. Profit βΉ60 on P1, βΉ40 on P2. (Graphical deck p. 2)
- Step 1 β Formulate Let Xβ = units of P1, Xβ = units of P2 Max Z = 60Xβ + 40Xβ Xβ β€ 25 β P1 production limit Xβ β€ 35 β P2 production limit 2Xβ + Xβ β€ 60 β labour, worker-weeks
- Step 2 β Corner points (solve each intersecting pair) Xβ = 35 meets 2Xβ + Xβ = 60: 2Xβ = 25 β Xβ = 12.5 β E (12.5, 35) Xβ = 25 meets 2Xβ + Xβ = 60: Xβ = 60 β 50 = 10 β G (25, 10) Corners: O(0,0), A(0,35), E(12.5,35), G(25,10), C(25,0)
- Step 3 β Evaluate Z
Corner Z = 60Xβ + 40Xβ Value A (0, 35) 0 + 1400 βΉ1,400 E (12.5, 35) 750 + 1400 βΉ2,150 G (25, 10) 1500 + 400 βΉ1,900 C (25, 0) 1500 + 0 βΉ1,500 - Step 4 β Answer
Xβ = 12.5, Xβ = 35, Max Z = βΉ2,150
A fractional answer (12.5 units) is acceptable in an LP. If the question insisted on whole units, it would be an ILP instead β that is precisely the divisibility assumption at work.
C Β· Simplex Method Unit 1 Β· numerical
C1 β Full simplex, all iterations
The same LPP as B1 β so you can check the two methods against each other.
- Step 1 β Add slack variables to turn β€ into = 6Xβ + 4Xβ + Sβ = 24 Xβ + 2Xβ + Sβ = 6 Setting Xβ = Xβ = 0 gives the starting basis: Sβ = 24, Sβ = 6, Z = 0
- Step 2 β Iteration 1
Entering variable: Xβ (largest Cβ±Ό β Zβ±Ό = 5) Leaving variable: Sβ (smallest positive ratio = 4) Pivot element = 6
CB Basis bi Xβ Xβ Sβ Sβ Ratio Cj β 5 4 0 0 0 Sβ 24 6 4 1 0 24/6 = 4 β 0 Sβ 6 1 2 0 1 6/1 = 6 Zj 0 0 0 0 0 Cj β Zj 5 β 4 0 0 - Step 3 β Build the new rows New R1 = Old R1 Γ· 6 β b = 4, Xβ = 1, Xβ = 2/3, Sβ = 1/6, Sβ = 0 New R2 = Old R2 β (1 Γ New R1) β b = 6 β 4 = 2, Xβ = 0, Xβ = 2 β 2/3 = 4/3, Sβ = β1/6, Sβ = 1
- Step 4 β Iteration 2
Cβ±Ό β Zβ±Ό for Xβ = 4 β 10/3 = 2/3 > 0 βΉ not yet optimal Entering: Xβ ; Leaving: Sβ ; Pivot element = 4/3
CB Basis bi Xβ Xβ Sβ Sβ Ratio 5 Xβ 4 1 2/3 1/6 0 4 Γ· 2/3 = 6 0 Sβ 2 0 4/3 β1/6 1 2 Γ· 4/3 = 1.5 β Zj 20 5 10/3 5/6 0 Cj β Zj 0 2/3 β β5/6 0 - Step 5 β Build the new rows again New R2 = Old R2 Γ· (4/3) β b = 1.5, Xβ = 0, Xβ = 1, Sβ = β1/8, Sβ = 3/4 New R1 = Old R1 β (2/3 Γ New R2) β b = 4 β 1 = 3 β Sβ = 1/6 β (2/3)(β1/8) = 1/6 + 1/12 = 1/4 β Sβ = 0 β (2/3)(3/4) = β1/2
- Step 6 β Iteration 3 (optimal table)
All Cβ±Ό β Zβ±Ό β€ 0 βΉ STOP, the table is optimal Xβ = 3, Xβ = 1.5, Max Z = 21 β same as the graphical answer in B1
CB Basis bi Xβ Xβ Sβ Sβ 5 Xβ 3 1 0 1/4 β1/2 4 Xβ 1.5 0 1 β1/8 3/4 Zj 21 5 4 3/4 1/2 Cj β Zj 0 0 β3/4 β1/2
C2 β A simplex run that goes degenerate
The degeneracy example from the Special Cases deck p. 1, run all the way through.
- Step 1 β Standard form Xβ + 4Xβ + Sβ = 8 Xβ + 2Xβ + Sβ = 4
- Step 2 β Iteration 1: the ratio test ties
Both ratios equal 2 β a TIE. This is what causes degeneracy. Break the tie arbitrarily: let Sβ leave. Pivot element = 4.
CB Basis bi Xβ Xβ Sβ Sβ Ratio 0 Sβ 8 1 4 1 0 8/4 = 2 0 Sβ 4 1 2 0 1 4/2 = 2 Cj β Zj 3 9 β 0 0 - Step 3 β Iteration 2: a basic variable hits zero
New R1 = R1 Γ· 4 β b = 2, Xβ = 1/4, Xβ = 1, Sβ = 1/4, Sβ = 0
New R2 = R2 β 2(New R1) β b = 4 β 4 = 0, Xβ = 1/2, Xβ = 0, Sβ = β1/2, Sβ = 1
Sβ is BASIC with value 0 β this is a degenerate basic feasible solution.
CB Basis bi Xβ Xβ Sβ Sβ Ratio 9 Xβ 2 1/4 1 1/4 0 2 Γ· 1/4 = 8 0 Sβ 0 1/2 0 β1/2 1 0 Γ· 1/2 = 0 β Zj 18 9/4 9 9/4 0 Cj β Zj 3/4 β 0 β9/4 0 - Step 4 β Iteration 3: a degenerate pivot, Z does not improve
New R2 = R2 Γ· (1/2) β b = 0, Xβ = 1, Xβ = 0, Sβ = β1, Sβ = 2
New R1 = R1 β (1/4)(New R2) β b = 2 β 0 = 2, Sβ = 1/4 + 1/4 = 1/2, Sβ = β1/2
Z stayed at 18 across the pivot β the hallmark of degeneracy.
CB Basis bi Xβ Xβ Sβ Sβ 9 Xβ 2 0 1 1/2 β1/2 3 Xβ 0 1 0 β1 2 Zj 18 3 9 3/2 3/2 Cj β Zj 0 0 β3/2 β3/2 - Step 5 β Answer, with the diagnosis
All Cβ±Ό β Zβ±Ό β€ 0 βΉ optimal
Xβ = 0, Xβ = 2, Max Z = 18 β a DEGENERATE optimal solution (Xβ is basic at zero)
What to write: "The solution is degenerate because the basic variable Xβ has value zero. Degeneracy arose from the tie in the replacement ratios at iteration 1, and it caused a pivot that left Z unchanged at 18. Repeated degenerate pivots can cause cycling, which is prevented by anti-cycling rules such as Bland's Rule."
D Β· Special Case Identification Unit 1
Each of these gives you a tableau fragment and asks the Q7A question: which special case is this, what is your evidence, and what does it imply?
D1 β Multiple optimal solutions
| CB | Basis | bi | Xβ | Xβ | Sβ | Sβ |
|---|---|---|---|---|---|---|
| Cj β | 4 | 6 | 0 | 0 | ||
| 6 | Xβ | 3 | 2/3 | 1 | 1/3 | 0 |
| 0 | Sβ | 1 | 1/3 | 0 | β1/3 | 1 |
| Zj | 18 | 4 | 6 | 2 | 0 | |
| Cj β Zj | 0 | 0 | β2 | 0 |
- Step 1 β Check optimality first All Cβ±Ό β Zβ±Ό β€ 0 βΉ the table is optimal
- Step 2 β Look at which variables are basic Basic variables: Xβ and Sβ Non-basic variables: Xβ and Sβ
- Step 3 β Find the tell-tale zero Xβ is NON-BASIC and its Cβ±Ό β Zβ±Ό = 0 βΉ MULTIPLE OPTIMAL SOLUTIONS
- Step 4 β State the implication
Xβ can be brought into the basis without changing Z. There is therefore more than one optimal production plan, and every point on the line segment joining the two optimal corners is also optimal. Management can choose between them on non-cost grounds.
D2 β Unbounded solution
| CB | Basis | bi | Xβ | Xβ | Sβ | Sβ | Ratio |
|---|---|---|---|---|---|---|---|
| Cj β | 5 | 4 | 0 | 0 | |||
| 5 | Xβ | 7 | 1 | 0 | 1 | 0 | 7 Γ· 0 = β |
| 0 | Sβ | 1 | 0 | β1 | β1 | 1 | 1 Γ· (β1) = β1 |
| Cj β Zj | 0 | 4 β | β5 | 0 |
- Step 1 β Identify the entering variable Xβ has Cβ±Ό β Zβ±Ό = +4 > 0 βΉ Xβ should enter
- Step 2 β Do the ratio test Row Xβ : column entry = 0 β ratio = β Row Sβ : column entry = β1 β ratio = β1 (negative) NO positive replacement ratio exists βΉ there is no leaving variable
- Step 3 β Diagnose and explain
βΉ UNBOUNDED SOLUTION
Xβ can be increased indefinitely without any constraint becoming binding, so Z grows without limit. Since no real business earns infinite profit, an unbounded solution always indicates that the problem has been formulated incorrectly β usually a missing constraint.
D3 β Infeasible solution
| CB | Basis | bi | Xβ | Xβ | Sβ | Aβ |
|---|---|---|---|---|---|---|
| Cj β | 200 | β300 | 0 | βM | ||
| 200 | Xβ | 400 | 1 | 1 | 0 | 0 |
| βM | Aβ | 100 | 0 | 0.5 | β1 | 1 |
| Cj β Zj | 0 | β€ 0 | β€ 0 | 0 |
- Step 1 β Check the optimality condition All Cβ±Ό β Zβ±Ό β€ 0 βΉ the simplex algorithm has terminated
- Step 2 β Look for artificial variables still in the basis Aβ is an ARTIFICIAL variable Aβ is BASIC, and its value is 100 β 0
- Step 3 β Diagnose
βΉ INFEASIBLE SOLUTION
An artificial variable exists only to give the algorithm a starting basis; it has no physical meaning. If one remains in the basis at a non-zero value when optimality is reached, no point satisfies all the original constraints simultaneously β the constraints contradict one another.
- Step 4 β The distinction to state
If an artificial variable remained basic at value zero, the solution would be feasible but degenerate, not infeasible. The non-zero value is what makes this infeasibility.
D4 β Degeneracy at optimality
| CB | Basis | bi | Xβ | Xβ | Sβ | Sβ |
|---|---|---|---|---|---|---|
| Cj β | 3 | 9 | 0 | 0 | ||
| 9 | Xβ | 2 | 0 | 1 | 1/2 | β1/2 |
| 3 | Xβ | 0 | 1 | 0 | β1 | 2 |
| Cj β Zj | 0 | 0 | β3/2 | β3/2 |
- Step 1 β Rule out multiple optima first
Non-basic variables are Sβ and Sβ
Their Cβ±Ό β Zβ±Ό are β3/2 and β3/2 β both STRICTLY negative
βΉ not multiple optima
The zeros you see in the Cβ±Ό β Zβ±Ό row sit under Xβ and Xβ, which are basic β a zero there is expected and means nothing.
- Step 2 β Look in the Quantity column Xβ is BASIC with value b = 0 βΉ DEGENERATE optimal solution
- Step 3 β Implication
Degeneracy can cause cycling β the algorithm pivots to a new basis but returns to one already visited, with no improvement in Z, and may loop indefinitely. Anti-cycling rules such as Bland's Rule prevent it.
E Β· Duality Unit 1
E1 β All constraints already β€ (the easy case)
- Step 1 β Check canonical form Primal is Max, and all three constraints are already β€ βΉ nothing to convert
- Step 2 β Count the dual variables 3 primal constraints, no equalities βΉ 3 dual variables Yβ, Yβ, Yβ
- Step 3 β Dual objective: Max β Min, RHS becomes the coefficients Min W = 4Yβ + 12Yβ + 18Yβ
- Step 4 β One constraint per primal variable, reading DOWN its column Xβ column: 1, 0, 3 β Yβ + 3Yβ β₯ 3 Xβ column: 0, 2, 2 β 2Yβ + 2Yβ β₯ 5
- Step 5 β Write the complete dual Min W = 4Yβ + 12Yβ + 18Yβ s.t. Yβ + 3Yβ β₯ 3 2Yβ + 2Yβ β₯ 5 Yβ, Yβ, Yβ β₯ 0
E2 β A Min primal (direction reverses)
- Step 1 β Canonical form for a Min problem is all β₯ Both constraints are already β₯ βΉ nothing to convert
- Step 2 β Dual objective: Min β Max Max W = 8Yβ + 9Yβ
- Step 3 β Dual constraints are β€ (opposite of the Max case) Xβ column: 2, 1 β 2Yβ + Yβ β€ 10 Xβ column: 1, 3 β Yβ + 3Yβ β€ 6
- Step 4 β Complete dual Max W = 8Yβ + 9Yβ s.t. 2Yβ + Yβ β€ 10 Yβ + 3Yβ β€ 6 Yβ, Yβ β₯ 0
E3 β A β₯ constraint inside a Max problem
- Step 1 β Fix the direction by multiplying by β1 Xβ β Xβ β₯ 2 Multiply the WHOLE row by β1 (coefficients and RHS): βXβ + Xβ β€ β2
- Step 2 β The canonical primal
Constraint Xβ Xβ RHS Dual var C1 1 1 10 Yβ C2 (flipped) β1 1 β2 Yβ - Step 3 β Dual objective (note the negative RHS carries through) Min W = 10Yβ β 2Yβ
- Step 4 β Dual constraints (β₯, one per primal variable) Xβ column: 1, β1 β Yβ β Yβ β₯ 4 Xβ column: 1, 1 β Yβ + Yβ β₯ 2
- Step 5 β Complete dual Min W = 10Yβ β 2Yβ s.t. Yβ β Yβ β₯ 4 Yβ + Yβ β₯ 2 Yβ, Yβ β₯ 0
E4 β An equality constraint (splits into two dual variables)
- Step 1 β Split the equality into two inequalities Xβ + Xβ = 5 is the same as Xβ + Xβ β₯ 5 AND Xβ + Xβ β€ 5
- Step 2 β Make every constraint β₯ (canonical for a Min primal) Xβ + Xβ β₯ 5 β Yβ Xβ + Xβ β€ 5 β Γ(β1) β βXβ β Xβ β₯ β5 β Yβ Xβ β 2Xβ β₯ 1 β Yβ 2 printed constraints, but one is an equality βΉ 3 dual variables
- Step 3 β Dual objective (Min β Max) Max W = 5Yβ β 5Yβ + Yβ
- Step 4 β Dual constraints, β€, reading down each primal column Xβ column: 1, β1, 1 β Yβ β Yβ + Yβ β€ 2 Xβ column: 1, β1, β2 β Yβ β Yβ β 2Yβ β€ 3
- Step 5 β Complete dual Max W = 5Yβ β 5Yβ + Yβ s.t. Yβ β Yβ + Yβ β€ 2 Yβ β Yβ β 2Yβ β€ 3 Yβ, Yβ, Yβ β₯ 0
E5 β Three variables, an equality AND a wrong-direction constraint
This is the hardest shape the exam uses β the same structure as Final Q1A, with one extra variable.
- Step 1 β Canonical form: Max primal βΉ every constraint must be β€
4 dual variables (the equality counted twice)
Original Action Canonical Dual var Xβ + Xβ + Xβ β€ 12 already β€ Xβ + Xβ + Xβ β€ 12 Yβ 2Xβ β Xβ + Xβ β₯ 4 Γ (β1) β2Xβ + Xβ β Xβ β€ β4 Yβ Xβ + 2Xβ = 8 the β€ half Xβ + 2Xβ β€ 8 Yβ the β₯ half, Γ (β1) βXβ β 2Xβ β€ β8 Yβ - Step 2 β Dual objective Min W = 12Yβ β 4Yβ + 8Yβ β 8Yβ
- Step 3 β Read down each primal column
Variable Yβ Yβ Yβ Yβ Dual constraint Xβ 1 β2 1 β1 Yβ β 2Yβ + Yβ β Yβ β₯ 1 Xβ 1 1 2 β2 Yβ + Yβ + 2Yβ β 2Yβ β₯ 2 Xβ 1 β1 0 0 Yβ β Yβ β₯ 3 - Step 4 β Complete dual Min W = 12Yβ β 4Yβ + 8Yβ β 8Yβ s.t. Yβ β 2Yβ + Yβ β Yβ β₯ 1 Yβ + Yβ + 2Yβ β 2Yβ β₯ 2 Yβ β Yβ β₯ 3 Yβ, Yβ, Yβ, Yβ β₯ 0
F Β· Sensitivity Analysis Unit 1 Β· numerical
| Variable | Value | Reduced Cost | Orig. Coeff | Lower | Upper |
|---|---|---|---|---|---|
| Xβ | 20 | 0 | 40 | 25 | 60 |
| Xβ | 15 | 0 | 30 | 20 | 48 |
| Xβ | 0 | 7 | 25 | ββ | 32 |
| Constraint | Dual Value | Slack/Surplus | Orig. RHS | Lower | Upper |
|---|---|---|---|---|---|
| Labour | 12 | 0 | 300 | 240 | 380 |
| Material | 5 | 0 | 200 | 150 | 260 |
| Machine hrs | 0 | 25 | 150 | 125 | β |
F1 β Binding constraints and the current profit
- Step 1 β Apply the two-part binding test
Constraint Slack Dual Verdict Labour 0 12 Binding Material 0 5 Binding Machine hrs 25 0 Not binding - Step 2 β Compute the current objective value Z = 40(20) + 30(15) + 25(0) Z = 800 + 450 + 0 Z = βΉ1,250
F2 β A shadow price used inside its range
Labour hours are increased from 300 to 340. By how much does profit change, and is the answer valid?
- Step 1 β Check the change is inside the allowable range New RHS = 300 + 40 = 340 Allowable range for Labour = 240 to 380 340 lies inside the range βΉ the shadow price is valid
- Step 2 β Apply the shadow-price formula ΞZ = shadow price Γ ΞRHS ΞZ = 12 Γ 40 ΞZ = + βΉ480
- Step 3 β State the new profit New Z = 1250 + 480 = βΉ1,730
- Step 4 β The economic sentence
Each additional labour hour is worth βΉ12 of extra profit, so the firm should be willing to pay up to βΉ12 per hour of overtime β but only for the first 80 extra hours, after which the range is exhausted.
F3 β A shadow price used BEYOND its range the twist
Labour hours are increased from 300 to 400. What happens to profit?
- Step 1 β Check the range FIRST New RHS = 400 Allowable upper bound = 380 400 > 380 βΉ the change goes OUTSIDE the allowable range
- Step 2 β Split the change at the boundary Valid portion: 300 β 380 is +80 hours ΞZ over that portion = 12 Γ 80 = + βΉ960
- Step 3 β Say what you cannot say about the rest
Remaining portion: 380 β 400 is +20 hours
The shadow price of 12 does NOT apply here β the basis changes beyond 380
Profit will still rise, but by less than 12 per hour, and the problem must be re-solved to say how much. The correct answer is: "profit rises by at least βΉ960; beyond 380 hours the current basis is no longer optimal and the shadow price is no longer valid."
Multiplying the shadow price by the whole change without checking the range: 12 Γ 100 = βΉ1,200. That is wrong. Always check the range before you multiply. Examiners set this deliberately.
F4 β Reduced cost, and a coefficient change
- Step 1 β Interpret the reduced cost of Xβ
Xβ has value 0 βΉ it is NOT produced
Reduced cost = 7
Xβ's profit coefficient must rise by βΉ7 β from 25 to 32 β before it becomes worth producing
Check: the table's upper bound for Xβ is 32 = 25 + 7 β internally consistent
Equivalently: forcing one unit of Xβ into the solution would reduce total profit by βΉ7.
- Step 2 β Xβ's coefficient rises from 40 to 55 β does the solution change? Allowable range for Xβ = 25 to 60 55 lies inside the range βΉ The optimal QUANTITIES are unchanged: Xβ = 20, Xβ = 15, Xβ = 0
- Step 3 β But recompute Z, because the objective value DOES change New Z = 55(20) + 30(15) + 25(0) New Z = 1100 + 450 New Z = βΉ1,550 (up from βΉ1,250)
- Step 4 β Machine hours are increased by 30. Any effect?
Machine hours: dual value = 0, slack = 25
No change in profit β ΞZ = 0 Γ 30 = 0
There are already 25 unused machine hours. Adding more of a resource you are not fully consuming cannot help. The constraint is non-binding.
G Β· Integer Linear Programming Unit 2
G1 β Project selection with a prerequisite and a mutual exclusion
A firm is choosing among five R&D projects with a βΉ150 lakh budget and 60 engineer-months available.
| Project | Cost (βΉ lakh) | Engineer-months | Profit (βΉ lakh) |
|---|---|---|---|
| A | 40 | 12 | 55 |
| B | 55 | 20 | 72 |
| C | 30 | 10 | 38 |
| D | 60 | 25 | 85 |
| E | 25 | 8 | 30 |
Rules: B can only be done if A is done. C and D cannot both be selected. At least three projects must be chosen. Formulate an ILP to maximise profit.
- Step 1 β Decide the variable type
"Which projects should be chosen" βΉ a yes/no decision per project βΉ binary.
Let Xα΅’ = 1 if project i is selected, 0 otherwise, for i = A, B, C, D, E - Step 2 β Objective function Max Z = 55X_A + 72X_B + 38X_C + 85X_D + 30X_E
- Step 3 β Resource constraints, one per column 40X_A + 55X_B + 30X_C + 60X_D + 25X_E β€ 150 β budget 12X_A + 20X_B + 10X_C + 25X_D + 8X_E β€ 60 β engineer-months
- Step 4 β Translate each logical rule, one at a time "B only if A" β X_B β€ X_A β prerequisite "not both C and D" β X_C + X_D β€ 1 β mutual exclusion "at least 3 projects" β X_A + X_B + X_C + X_D + X_E β₯ 3
- Step 5 β The binary condition (a full mark on its own) X_A, X_B, X_C, X_D, X_E are binary (0, 1)
X_B β€ X_A works: if X_B = 1 the inequality forces X_A β₯ 1, so A must be selected. If X_B = 0 it reads 0 β€ X_A, which leaves A free. That is exactly the English rule.G2 β Mixed ILP with batch production
A plant makes cement (in whole truckloads of 20 tonnes) and loose sand (any quantity in tonnes). A truckload of cement gives βΉ8,000 profit; sand gives βΉ150 per tonne. Cement uses 4 machine-hours per tonne, sand 1 machine-hour per tonne; 900 machine-hours are available. Storage is 500 tonnes total. Formulate.
- Step 1 β Decide which variable is integer and which is continuous Cement is sold only in whole truckloads β integer Sand is sold by the tonne, any amount β continuous βΉ this is a MIXED integer programme
- Step 2 β Define the variables, handling the batch size Let Xβ = number of TRUCKLOADS of cement produced (integer) Then tonnes of cement = 20Xβ Let Xβ = tonnes of sand produced (continuous)
- Step 3 β Objective function Max Z = 8000Xβ + 150Xβ
- Step 4 β Constraints, converting truckloads to tonnes where needed Machine hours: 4(20Xβ) + 1(Xβ) β€ 900 80Xβ + Xβ β€ 900 Storage: 20Xβ + Xβ β€ 500
- Step 5 β Restrictions Xβ, Xβ β₯ 0 and Xβ is an integer
If you define Xβ as "tonnes of cement" you cannot express "whole truckloads" β 20 tonnes is not the same as "Xβ integer". Define the variable as the number of batches and multiply by the batch size wherever tonnes are needed. The class notes use exactly this device for "tables in multiples of 10" Note 2 p. 20.
G3 β Fixed-charge facility location
A company may open depots at two sites. Opening Site 1 costs βΉ90 lakh, Site 2 costs βΉ110 lakh. An open depot can serve up to 120 units. Two markets need 70 and 90 units. Shipping costs per unit:
| Depot | Market 1 | Market 2 |
|---|---|---|
| Site 1 | 5 | 8 |
| Site 2 | 7 | 4 |
Formulate to minimise total cost.
- Step 1 β You need TWO kinds of variable Let Xα΅’β±Ό = units shipped from depot i to market j (continuous, β₯ 0) Let Yα΅’ = 1 if depot i is opened, 0 otherwise (binary)
- Step 2 β Objective: fixed costs plus shipping costs Min Z = 90Yβ + 110Yβ β fixed opening costs + 5Xββ + 8Xββ + 7Xββ + 4Xββ β shipping costs
- Step 3 β Demand must be met exactly Xββ + Xββ = 70 β Market 1 demand Xββ + Xββ = 90 β Market 2 demand
- Step 4 β The linking constraint: you cannot ship from a closed depot
Xββ + Xββ β€ 120Yβ
Xββ + Xββ β€ 120Yβ
If Yβ = 0 the right-hand side is 0, forcing all shipments from depot 1 to zero. If Yβ = 1 the capacity is 120. That single inequality encodes "only if opened".
- Step 5 β Restrictions Xα΅’β±Ό β₯ 0 ; Yβ, Yβ are binary (0, 1)
G4 β Pure ILP: staffing with minimum coverage
A call centre runs three shifts. It needs at least 8 agents in the morning, 6 in the afternoon and 5 at night. An agent works exactly one shift. Total agents available: 22. Calls handled per agent per shift: 30 (morning), 25 (afternoon), 18 (night). The night shift must have at least half as many agents as the morning shift. Formulate to maximise calls handled.
- Step 1 β Variables (counts of people βΉ integer, not binary) Let Xβ, Xβ, Xβ = number of agents on morning / afternoon / night shift
- Step 2 β Objective function Max Z = 30Xβ + 25Xβ + 18Xβ β total calls handled
- Step 3 β Minimum coverage per shift Xβ β₯ 8 Xβ β₯ 6 Xβ β₯ 5
- Step 4 β Total workforce Xβ + Xβ + Xβ β€ 22
- Step 5 β Rearrange the ratio rule "night at least half of morning" β Xβ β₯ 0.5Xβ Move all variables to the left: β0.5Xβ + Xβ β₯ 0 (or equivalently βXβ + 2Xβ β₯ 0)
- Step 6 β Integrality Xβ, Xβ, Xβ β₯ 0 and are integers
G5 β Eitherβor: two mutually exclusive production modes
A factory can run a product on either Line A or Line B, but not both. Line A needs 3 hours per unit with 240 hours available; Line B needs 2 hours per unit with 180 hours available. Profit is βΉ40 per unit either way. Formulate an ILP to maximise profit.
- Step 1 β Variables Let X = number of units produced (integer, β₯ 0) Let Y = 1 if Line A is used, 0 if Line B is used (binary)
- Step 2 β Objective function Max Z = 40X
- Step 3 β Only ONE line's constraint should bind β use a big-M switch
Let M be a large number (say 10,000). Write both constraints, each relaxed when its line is not chosen:
3X β€ 240 + M(1 β Y) β binds only when Y = 1 (Line A chosen) 2X β€ 180 + MΒ·Y β binds only when Y = 0 (Line B chosen) - Step 4 β Check the switch works If Y = 1: 3X β€ 240 and 2X β€ 180 + 10000 (always true, relaxed) If Y = 0: 3X β€ 240 + 10000 (relaxed) and 2X β€ 180 βΉ exactly one constraint is active in each case
- Step 5 β Restrictions X β₯ 0 and integer ; Y is binary (0, 1)
+ M(1 β Y) to one and + MY to the other. The binary Y then switches which one is real.H Β· Transportation & Assignment Unit 3
H1 β Unbalanced assignment (more workers than jobs)
A supervisor must assign jobs to workers. Costs (βΉ hundred):
| J1 | J2 | J3 | |
|---|---|---|---|
| W1 | 13 | 8 | 16 |
| W2 | 9 | 15 | 12 |
| W3 | 12 | 9 | 11 |
| W4 | 6 | 14 | 10 |
(1) Is it balanced? If not, how do you balance it? (2) Number of constraints, excluding NNC? (3) Number of variables?
- Step 1 β Identify the problem type No supply column, no demand row β each worker takes one job βΉ ASSIGNMENT problem, m = 4 workers, n = 3 jobs
- Step 2 β Balance test For an assignment problem, balanced means rows = columns m = 4, n = 3, and 4 β 3 βΉ NOT balanced
- Step 3 β How to balance it
Columns are short by 1
Add ONE DUMMY JOB column with all costs = 0, making the matrix 4 Γ 4
The worker assigned to the dummy job is the one who stays idle β at zero cost, because no work is actually done.
- Step 4 β Counting, on the ORIGINAL matrix Number of constraints = m + n = 4 + 3 = 7 Number of variables = m Γ n = 4 Γ 3 = 12
H2 β Unbalanced transportation (supply exceeds demand)
| D1 | D2 | D3 | Supply | |
|---|---|---|---|---|
| S1 | 8 | 6 | 10 | 50 |
| S2 | 9 | 12 | 7 | 60 |
| S3 | 14 | 9 | 16 | 40 |
| Demand | 40 | 50 | 30 |
- Step 1 β Compute BOTH totals explicitly Total supply = 50 + 60 + 40 = 150 Total demand = 40 + 50 + 30 = 120
- Step 2 β Compare 150 β 120 β supply exceeds demand by 30 βΉ NOT balanced
- Step 3 β Balance it on the correct side
Add a DUMMY DESTINATION (column) with demand = 30 and all costs = 0
Supply is the surplus side, so the dummy must absorb it β a dummy destination. The 30 units "shipped" there are simply the units never dispatched.
- Step 4 β Counting Constraints = m + n = 3 + 3 = 6 Variables = m Γ n = 3 Γ 3 = 9
H3 β Full LPP conversion of a 2 Γ 3 transportation problem
| D1 | D2 | D3 | Supply | |
|---|---|---|---|---|
| S1 | 4 | 7 | 3 | 60 |
| S2 | 6 | 5 | 9 | 40 |
| Demand | 30 | 45 | 25 |
- Step 1 β Housekeeping lines (these carry marks) Total supply = 60 + 40 = 100 ; Total demand = 30 + 45 + 25 = 100 Balanced : YES Decision variable : Xα΅’β±Ό = units shipped from source i (1β2) to destination j (1β3) No. of variables = m Γ n = 2 Γ 3 = 6 No. of constraints = m + n = 2 + 3 = 5
- Step 2 β Objective function, read row by row Min Z = 4Xββ + 7Xββ + 3Xββ + 6Xββ + 5Xββ + 9Xββ
- Step 3 β Supply constraints (one per row, β€) Xββ + Xββ + Xββ β€ 60 Xββ + Xββ + Xββ β€ 40
- Step 4 β Demand constraints (one per column, =) Xββ + Xββ = 30 Xββ + Xββ = 45 Xββ + Xββ = 25
- Step 5 β Non-negativity, and the internal check Xα΅’β±Ό β₯ 0 2 supply + 3 demand = 5 constraints β matches m + n from Step 1
H4 β Transportation with a PROFIT objective
Two factories supply three showrooms. Production cost is βΉ20/unit at F1 and βΉ18/unit at F2. Selling prices are βΉ40, βΉ45 and βΉ38 at showrooms A, B, C. Transport costs per unit:
| A | B | C | Capacity | |
|---|---|---|---|---|
| F1 | 3 | 5 | 4 | 100 |
| F2 | 6 | 2 | 7 | 120 |
| Demand | 80 | 90 | 50 |
- Step 1 β Recognise the twist
Selling prices are given, so the cell value is a profit and the objective is Max, not Min.
Profit(iβj) = Selling price(j) β Production cost(i) β Transport cost(iβj) - Step 2 β Compute the profit matrix, cell by cell
Cell Working Profit F1 β A 40 β 20 β 3 17 F1 β B 45 β 20 β 5 20 F1 β C 38 β 20 β 4 14 F2 β A 40 β 18 β 6 16 F2 β B 45 β 18 β 2 25 F2 β C 38 β 18 β 7 13 - Step 3 β Balance test on the profit table Total capacity = 100 + 120 = 220 Total demand = 80 + 90 + 50 = 220 220 = 220 βΉ BALANCED, no dummy needed
- Step 4 β Write the LPP Let Xα΅’β±Ό = units shipped from factory i to showroom j Max Z = 17Xββ + 20Xβᡦ + 14Xβπ + 16Xββ + 25Xβᡦ + 13Xβπ Supply: Xββ + Xβᡦ + Xβπ = 100 Xββ + Xβᡦ + Xβπ = 120 Demand: Xββ + Xββ = 80 Xβᡦ + Xβᡦ = 90 Xβπ + Xβπ = 50 NNC: Xα΅’β±Ό β₯ 0
- Step 5 β Counting Variables = m Γ n = 2 Γ 3 = 6 Constraints = m + n = 2 + 3 = 5
H5 β Assignment with a forbidden pairing
Four machines must be assigned to four operators. Operator 3 is not trained on Machine B, so that pairing is not allowed. Times (minutes):
| A | B | C | D | |
|---|---|---|---|---|
| Op 1 | 12 | 9 | 14 | 11 |
| Op 2 | 15 | 13 | 10 | 12 |
| Op 3 | 8 | β | 13 | 9 |
| Op 4 | 10 | 11 | 12 | 14 |
- Step 1 β Handle the forbidden cell
A forbidden assignment is given a prohibitively large cost M so the optimiser will never choose it:
Set cost(Op 3, Machine B) = M where M is a very large numberThe alternative is to write the explicit constraint
Xβᡦ = 0. Either is acceptable β state which you used. - Step 2 β Balance test m = 4 operators, n = 4 machines, 4 = 4 βΉ BALANCED, no dummy needed
- Step 3 β Variables and objective Let Xα΅’β±Ό = 1 if operator i is assigned to machine j, 0 otherwise Min Z = 12Xββ + 9Xβᡦ + 14Xβπ + 11Xβπ + 15Xββ + 13Xβᡦ + 10Xβπ + 12Xβπ + 8Xββ + MΒ·Xβᡦ + 13Xβπ + 9Xβπ + 10Xββ + 11Xβᡦ + 12Xβπ + 14Xβπ
- Step 4 β Constraints: each row = 1, each column = 1 Row (one machine per operator): Ξ£β±Ό Xα΅’β±Ό = 1 for i = 1β¦4 Column (one operator per machine): Ξ£α΅’ Xα΅’β±Ό = 1 for j = Aβ¦D Xα΅’β±Ό = 0 or 1
- Step 5 β Counting Variables = 4 Γ 4 = 16 Constraints = 4 + 4 = 8