Solution to the Practice Problems
Solution 1a. Say the Barracks are Barrack 1 and Barrack 2 and the latter is boosted. Let x1,x2 be the number of Archers trained from Barrack 1 and Barrack 2 respectively. Define x3,x4 for Giants and x5,x6 for Wizards similarly. We can formulate the linear program as follows.
| |
|---|
| Maximize | (100×22−400)(x1+x2)+(100×43−940)(x3+x4)+(100×170−3500)(x5+x6) |
| Subject to | 44(x1+x2)+940(x3+x4)+156(x5+x6)≥18800 Hit points constraint |
| (x1+x2)+5(x3+x4)+4(x5+x6)≤220 Housing space constraint |
| 0.4x1+2x3+8x5≤45 Training time constraint for Barrack 1 |
| 0.1x2+0.5x4+2x6≤45 Training time constraint for Barrack 2 |
| x1,…,x6≥0 |
Solution 1b. Insert a surplus variable p1 and an artificial variable a1 for the first constraint, and insert slack variables s2,s3,s4 for the last three constraints respectively.
| |
|---|
| Maximize | 1800x1+1800x2+3360x3+3360x4+13500x5+13500x6 |
| Subject to | 44x1+44x2+940x3+940x4+156x5+156x6−p1+a1=18800 |
| x1+x2+5x3+5x4+4x5+4x6+s2=220 |
| 0.4x1+2x3+8x5+s3=45 |
| 0.1x2+0.5x4+2x6+s4=45 |
| x1,…,x6,p1,a1,s2,s3,s4≥0 |
The artificial objective function is −a1=44x1+44x2+940x3+940x4+156x5+156x6−p1−18800. Therefore we get the initial tableau.
| x1 | x2 | x3 | x4 | x5 | x6 | p1 | a1 | s2 | s3 | s4 | |
|---|
| 44 | 44 | 940 | 940 | 156 | 156 | -1 | 1 | | | | 18800 |
| 1 | 1 | 5 | 5 | 4 | 4 | | | 1 | | | 220 |
| 0.4 | | 2 | | 8 | | | | | 1 | | 45 |
| 0.1 | | 0.5 | | 2 | | | | | 1 | 45 |
| -1800 | -1800 | -3360 | -3360 | -13500 | -13500 | | | | | | |
| -44 | -44 | -940 | -940 | -156 | -156 | 1 | | | | | -18800 |
We may choose any variable among x1,…,x6 as the entering variable as their coefficients in the artificial objective function are negative. We choose x3 here. Now the replacement quantities are 18800/940=20,220/5=44,45/2=22.5. So the first entry in column 3 is the pivot. Couple of row operations yield:
| x1 | x2 | x3 | x4 | x5 | x6 | p1 | a1 | s2 | s3 | s4 | |
|---|
| 11/235 | 11/235 | 1 | 1 | 39/235 | 39/235 | -1/940 | 1/940 | | | | 20 |
| 36/47 | 36/47 | | | 149/47 | 149/47 | 1/188 | 1/188 | 1 | | | 120 |
| 72/235 | -22/235 | | -2 | 1802/235 | -78/235 | 1/470 | -1/470 | | 1 | | 5 |
| 0.1 | | 0.5 | | 2 | | | | | 1 | 45 |
| -77208/47 | -77208/47 | | | -608292/47 | -608292/47 | -168/47 | -168/47 | | | | 67200 |
| | | | | | | 1 | | | | |
Solution 1c. The dual linear program is as follows.
| |
|---|
| Minimize | 19200y1+220y2+45y3+45y4 |
| Subject to | 44y1+y2+0.4y3≥1800 |
| 44y1+y2+0.1y4≥1800 |
| 940y1+5y2+2y3≥3360 |
| 940y1+5y2+0.5y4≥3360 |
| 156y1+4y2+8y3≥13500 |
| 156y1+4y2+2y4≥13500 |
| y1≤0,y2,y3,y4≥0 |
Solution 2. Denote the cities by 1, 2, 3, 4. Let xij denote whether the skiers travel from city i to city j. In addition, let b1,b2 be the binary variables indicating whether they will take the non-stop/one-stop flight and the two-stop flight from Pittsburgh to Jackson respectively. Similarly define b3,b4 for the flights from Salt Lake City to Aspen.
| |
|---|
| Maximize | Mx11+183x12+(443b1+335b2)+328x14+183x21+Mx22+279x23+(323b3+317b4)+333x31+279x32+Mx33+409x34+423x41+356x42+403x43+Mx44 |
| Subject to | xi1+xi2+xi3+xi4=1 for all i=1,2,3,4. |
| x1j+x2j+x3j+x4j=1 for all j=1,2,3,4. |
| ∑i∈D,j∈/Dxij≥1 for all proper subsets D. |
| b1+b2≤x13 |
| b3+b4≤x24 |