Doing the best with what you have

A fac­tory has only so many work­ers and so much mate­r­ial, and wants the biggest profit it can get. A diet has to sup­ply enough nutri­ents while cost­ing as lit­tle as pos­si­ble. When the goal and all the lim­its are lin­ear, some­thing remark­able hap­pens: the best choice always sits at a cor­ner of the region the lim­its allow. We will learn to set up such lin­ear pro­gram­ming prob­lems, solve them by check­ing the cor­ners, and prac­tise on the kinds of prob­lems you will meet in exams.

Set­ting up the prob­lem

Every lin­ear pro­gram­ming prob­lem has three parts:

  • deci­sion vari­ables x,y≥0x, y \ge 0;
  • a lin­ear objec­tive func­tion Z=ax+byZ = ax + by to max­imise or min­imise;
  • lin­ear con­straints (inequal­i­ties).

The points that sat­isfy every con­straint form the fea­si­ble region. Each of those points is a fea­si­ble solu­tion, and the best of them is the opti­mal solu­tion.

Cor­ner-point the­o­rem. If an opti­mal value exists at all, it occurs at a cor­ner (ver­tex) of the fea­si­ble region. And if the region is bounded, you are guar­an­teed both a max­i­mum and a min­i­mum.

The cor­ner-point method, step by step

  1. Graph the con­straints and shade the fea­si­ble region.
  2. Find its cor­ner points.
  3. Eval­u­ate ZZ at each cor­ner.
  4. For a bounded region, the largest value is the max­i­mum and the small­est the min­i­mum. An unbounded region needs one extra check: a can­di­date value MM is truly the max­i­mum only if the half-plane ax+by>Max + by > M does not meet the fea­si­ble region (and sim­i­larly for a min­i­mum with <<).

Exam­ple 1. Max­imise Z=4x+3yZ = 4x + 3y sub­ject to x+y≤8x + y \le 8, 2x+y≤122x + y \le 12, x,y≥0x, y \ge 0. The cor­ners are (0,0)(0, 0), (6,0)(6, 0), (4,4)(4, 4), (0,8)(0, 8), giv­ing Z=0,24,28,24Z = 0, 24, 28, 24. So the max­i­mum is 2828 at (4,4)(4, 4).

Shaded feasible region bounded by the axes and the lines x + y = 8 and 2x + y = 12, with corners (0, 0), (6, 0), (4, 4) and (0, 8); Z = 4x + 3y is greatest, 28, at (4, 4).
Exam­ple 1: the four cor­ners and their Z val­ues; the max­i­mum 28 is at (4, 4).

Exam­ple 2. Min­imise Z=5x+7yZ = 5x + 7y sub­ject to x+y≥4x + y \ge 4, x+3y≥6x + 3y \ge 6, x,y≥0x, y \ge 0. This time the region is unbounded, with cor­ners (0,4)(0, 4), (3,1)(3, 1), (6,0)(6, 0): Z=28,22,30Z = 28, 22, 30. The can­di­date is 2222, but we must check: the half-plane 5x+7y<225x + 7y < 22 does not meet the region, so the min­i­mum is 2222 at (3,1)(3, 1).

Unbounded shaded region above the lines x + y = 4 and x + 3y = 6, with corners (0, 4), (3, 1) and (6, 0); the dashed line 5x + 7y = 22 touches the region only at (3, 1).
Exam­ple 2: the line 5x + 7y = 22 touches the unbounded region only at (3, 1).

Exam­ple 3 (man­u­fac­tur­ing). A work­shop makes chairs (profit ₹300300) and tables (profit ₹500500). A chair needs 22 h of cut­ting and 11 h of fin­ish­ing; a table 33 h and 22 h. There are 2424 h of cut­ting and 1414 h of fin­ish­ing a day. Let­ting the two vari­ables count chairs and tables, we must max­imise Z=300x+500yZ = 300x + 500y sub­ject to 2x+3y≤242x + 3y \le 24, x+2y≤14x + 2y \le 14, x,y≥0x, y \ge 0. The cor­ners are (0,0)(0, 0), (12,0)(12, 0), (6,4)(6, 4), (0,7)(0, 7), with Z=0,3600,3800,3500Z = 0, 3600, 3800, 3500. So the work­shop should make 66 chairs and 44 tables for ₹38003800.

Feasible region for chairs x and tables y bounded by 2x + 3y = 24 and x + 2y = 14, with corners (0, 0), (12, 0), (6, 4) and (0, 7); the profit Z is largest, 3800, at (6, 4).
Exam­ple 3: mak­ing 6 chairs and 4 tables gives the largest profit.

Exam­ple 4 (diet). Food A has 22 units of iron and 11 of pro­tein per kg (₹4040/kg); food B has 11 and 33 (₹6060/kg). At least 88 units of iron and 99 of pro­tein are needed. We min­imise Z=40x+60yZ = 40x + 60y with 2x+y≥82x + y \ge 8, x+3y≥9x + 3y \ge 9. The cor­ners are (0,8)(0, 8), (3,2)(3, 2), (9,0)(9, 0): Z=480,240,360Z = 480, 240, 360. Check­ing the half-plane 40x+60y<24040x + 60y < 240 finds no fea­si­ble points, so the min­i­mum is ₹240240 with 33 kg of A and 22 kg of B.

Unbounded region above 2x + y = 8 and x + 3y = 9 with corners (0, 8), (3, 2) and (9, 0); the dashed cost line 40x + 60y = 240 touches it only at (3, 2).
Exam­ple 4: the cheap­est diet is 3 kg of A and 2 kg of B, cost­ing 240 rupees.

Try these your­self

  1. Max­imise Z=3x+2yZ = 3x + 2y sub­ject to x+2y≤10x + 2y \le 10, 3x+y≤153x + y \le 15, x,y≥0x, y \ge 0.
  2. Min­imise Z=2x+3yZ = 2x + 3y sub­ject to x+y≥5x + y \ge 5, x≤4x \le 4, y≤4y \le 4, x,y≥0x, y \ge 0.
  3. Max­imise Z=5x+4yZ = 5x + 4y sub­ject to x+y≤7x + y \le 7, x−y≤1x - y \le 1, y≤5y \le 5, x,y≥0x, y \ge 0.
  4. Show that Z=x+yZ = x + y has no max­i­mum sub­ject to x−y≤1x - y \le 1, x+y≥2x + y \ge 2, x,y≥0x, y \ge 0.
  5. A dealer has ₹50,00050{,}000 and room for 4040 items. Fans cost ₹1,0001{,}000 (profit ₹250250) and lamps ₹1,5001{,}500 (profit ₹300300). How many of each should she buy to max­imise profit?
  6. A farmer has 3030 hectares for wheat and gram. Wheat earns ₹20,00020{,}000 and gram ₹15,00015{,}000 per hectare; wheat needs 44 work­ers per hectare and gram 22, and 100100 work­ers are avail­able. Find the best allo­ca­tion.
  7. A mix­ture must con­tain at least 1010 units of vit­a­min A and 1212 of vit­a­min B. Food P has 22 and 33 units per packet (₹55), food Q has 22 and 22 (₹44). Find the cheap­est mix­ture.
  8. Why must the opti­mum of a lin­ear objec­tive over a bounded poly­gon occur at a cor­ner?

Answers to check against

Show answers
  1. Cor­ners (0,0),(5,0),(4,3),(0,5)(0, 0), (5, 0), (4, 3), (0, 5): Z=0,15,18,10Z = 0, 15, 18, 10: max 1818 at (4,3)(4, 3).
  2. Cor­ners (4,1),(4,4),(1,4)(4, 1), (4, 4), (1, 4): Z=11,20,14Z = 11, 20, 14: min 1111 at (4,1)(4, 1).
  3. Cor­ners (0,0),(1,0),(4,3),(2,5),(0,5)(0, 0), (1, 0), (4, 3), (2, 5), (0, 5): Z=0,5,32,30,20Z = 0, 5, 32, 30, 20: max 3232 at (4,3)(4, 3).
  4. The region is unbounded upward and ZZ grows with­out limit along (t,t)(t, t) for large tt.
  5. 1000x+1500y≤50,0001000x + 1500y \le 50{,}000, x+y≤40x + y \le 40: cor­ners (0,0)(0, 0), (40,0)(40, 0), (20,20)(20, 20), (0,1003)\displaystyle (0, \tfrac{100}{3}); prof­its 00, 10,00010{,}000, 11,00011{,}000, 10,00010{,}000: buy 2020 fans and 2020 lamps.
  6. x+y≤30x + y \le 30, 4x+2y≤1004x + 2y \le 100: cor­ners (0,30)(0, 30), (20,10)(20, 10), (25,0)(25, 0): Z=450,000Z = 450{,}000, 550,000550{,}000, 500,000500{,}000: 2020 ha wheat, 1010 ha gram.
  7. 2x+2y≥102x + 2y \ge 10, 3x+2y≥123x + 2y \ge 12: cor­ners (0,6)(0, 6), (2,3)(2, 3), (5,0)(5, 0): costs 2424, 2222, 2525: 22 pack­ets of P and 33 of Q, ₹2222.
  8. ZZ is con­stant along lines ax+by=kax + by = k. Slide such a line across the region, and the last point it touches is always a cor­ner.