1.5 Practice Problems
Problem 1.5.1. In Example 1.2.2, find the cheapest assignment in which both numbers of inspectors are whole, by checking the possible numbers of Grade 1 inspectors, and compare it with the LP value Rs. 430 and with rounding \(6.25\) up to \(7\).
Show solution
Solution. For each \(x_1 = 0, \ldots , 7\) take the least \(x_2\) with \(320x_1 + 240x_2 \geq 2000\). The costs are: \(x_1 = 7, x_2 = 0\): \(481.6\); \(6, 1\): \(480.8\); \(5, 2\): \(480.0\); \(4, 3\): \(479.2\); \(3, 5\): \(546.4\); \(2, 6\): \(545.6\); \(1, 7\): \(544.8\); \(0, 9\): \(612\). The best is \(4\) Grade 1 and \(3\) Grade 2 inspectors at Rs. 479.2, which inspect exactly \(2000\) pieces. Rounding the LP solution up gives Rs. 481.6; the integer optimum mixes the grades, which the LP never does. The gap between Rs. 430 and Rs. 479.2 is the cost of indivisibility.
Problem 1.5.2. Complete Example 1.2.4: write the model, solve it graphically or by any method, and state how much wheat and barley are used.
Show solution
Solution. Maximise \(0.383x_1 + 0.367x_2\) subject to \(2x_1 + x_2 \leq 3000\), \(x_1 + 2x_2 \leq 3600\), \(x \geq 0\). The two constraints meet where \(x_1 = 800\), \(x_2 = 1400\), with profit \(0.383 \times 800 + 0.367 \times 1400 = 820\). The other vertices give \(0.383 \times 1500 = 575\) at \((1500, 0)\) and \(0.367 \times 1800 = 660\) at \((0, 1800)\), so the optimum is \(800\) kg of Fertilex and \(1400\) kg of Multiplex, using all \(1000\) kg of wheat and all \(1200\) kg of barley.
Problem 1.5.3. A firm makes two products over three months. Product 1 sells for Rs. 14 and costs Rs. 10 to make; product 2 sells for Rs. 11 and costs Rs. 8. Each unit of product 1 needs \(0.5\), \(0.3\) and \(0.2\) hours in departments \(A\), \(B\), \(C\), and each unit of product 2 needs \(0.3\), \(0.4\) and \(0.1\) hours, with \(500\), \(400\) and \(200\) hours available. The firm has Rs. 3 lakh of its own funds and may borrow up to Rs. 2 lakh at \(20\%\) a year for the three months. Formulate a model to maximise profit after interest, with \(x_3\) the amount borrowed, assuming production costs must be paid from funds available.
Show solution
Solution. Interest for three months is \(0.20 \times \frac 3{12} = 0.05\) per rupee. Maximise \(Z = 4x_1 + 3x_2 - 0.05x_3\) subject to \(0.5x_1 + 0.3x_2 \leq 500\), \(0.3x_1 + 0.4x_2 \leq 400\), \(0.2x_1 + 0.1x_2 \leq 200\) (capacity); \(10x_1 + 8x_2 \leq 300\,000 + x_3\) (funds); \(0 \leq x_3 \leq 200\,000\). Here the capacity constraints bind long before the funds do (at most \(1000\) units of product 1 cost only Rs. 10 000), so \(x_3 = 0\) at the optimum: borrowing is worth while only when money, not capacity, is scarce. The optimum is \(x_1 = 727.3\), \(x_2 = 454.5\), where departments \(A\) and \(C\) are fully used, with profit Rs. 4272.7.
Problem 1.5.4. Write the problem “minimise \(|x_1 - 2| + |x_2 + 1|\) subject to \(x_1 + x_2 \geq 3\), \(x_1, x_2\) free” as a linear programme in standard form.
Show solution
Solution. Introduce \(e_1, e_2 \geq 0\): minimise \(e_1 + e_2\) subject to \(-e_1 \leq x_1 - 2 \leq e_1\), \(-e_2 \leq x_2 + 1 \leq e_2\), \(x_1 + x_2 \geq 3\). For standard form, write \(x_j = x_j^+ - x_j^-\) and add a slack or surplus variable to each of the five inequalities, giving \(5\) equations in \(4 + 2 + 5 = 11\) non-negative variables. The optimal value is \(2\), attained for example at \(x = (2, 1)\).
Problem 1.5.5. A hospital needs at least \(17\), \(13\), \(15\), \(19\), \(14\), \(16\) and \(11\) nurses on the seven days of the week, Monday to Sunday. Each nurse works five consecutive days and then has two days off. Formulate the problem of minimising the number of nurses employed.
Show solution
Solution. Let \(x_j\) be the number of nurses whose five-day spell starts on day \(j\) (\(j = 1\) for Monday). A nurse works on day \(i\) if the spell started on day \(i\) or one of the four days before, cyclically. Minimise \(\sum _{j = 1}^7x_j\) subject to, for Monday, \(x_1 + x_4 + x_5 + x_6 + x_7 \geq 17\), for Tuesday \(x_1 + x_2 + x_5 + x_6 + x_7 \geq 13\), and so on cyclically, with \(x_j \geq 0\) and integer. Summing the seven constraints, each \(x_j\) appears five times, so \(5\sum x_j \geq 105\) and at least \(21\) nurses are needed.
Problem 1.5.6. Explain which of the four assumptions of linear programming fails in each case, and how the model might be repaired: (a) a machine must be set up at a fixed cost before any units are made; (b) the price of a product falls as more is sold; (c) the yield of a crop depends on next season’s rainfall.
Show solution
Solution. (a) Proportionality: the cost is \(F + cx\) for \(x > 0\) and \(0\) for \(x = 0\). Repair with a binary variable \(y\), cost \(Fy + cx\) and \(x \leq My\) (see the section on integer programming). (b) Proportionality: revenue \(p(x)x\) is non-linear; if it is concave it can be approximated piecewise linearly for maximisation, otherwise use non-linear programming. (c) Certainty: the coefficient is random; use expected values with sensitivity analysis, or a stochastic model with scenarios.
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.