Skip to main content

Solution to the Practice Problems

Solution 1a. Say the Barracks are Barrack 1 and Barrack 2 and the latter is boosted. Let x1,x2x_1, x_2 be the number of Archers trained from Barrack 1 and Barrack 2 respectively. Define x3,x4x_3, x_4 for Giants and x5,x6x_5, x_6 for Wizards similarly. We can formulate the linear program as follows.

Maximize(100×22400)(x1+x2)+(100×43940)(x3+x4)+(100×1703500)(x5+x6)\begin{gathered}(100\times 22 - 400)(x_1+x_2) \\ +(100\times 43 - 940)(x_3+x_4) \\ +(100\times 170 - 3500)(x_5+x_6)\end{gathered}
Subject to44(x1+x2)+940(x3+x4)+156(x5+x6)1880044(x_1+x_2)+940(x_3+x_4)+156(x_5+x_6)\ge 18800 Hit points constraint
(x1+x2)+5(x3+x4)+4(x5+x6)220(x_1+x_2)+5(x_3+x_4)+4(x_5+x_6)\le 220 Housing space constraint
0.4x1+2x3+8x5450.4x_1+2x_3+8x_5 \le 45 Training time constraint for Barrack 1
0.1x2+0.5x4+2x6450.1x_2+0.5x_4+2x_6 \le 45 Training time constraint for Barrack 2
x1,,x60x_1, \dots, x_6 \ge 0

Solution 1b. Insert a surplus variable p1p_1 and an artificial variable a1a_1 for the first constraint, and insert slack variables s2,s3,s4s_2, s_3, s_4 for the last three constraints respectively.

Maximize1800x1+1800x2+3360x3+3360x4+13500x5+13500x61800x_1+1800x_2+3360x_3+3360x_4+13500x_5+13500x_6
Subject to44x1+44x2+940x3+940x4+156x5+156x6p1+a1=1880044x_1+44x_2+940x_3+940x_4+156x_5+156x_6 - p_1 + a_1 = 18800
x1+x2+5x3+5x4+4x5+4x6+s2=220x_1+x_2+5x_3+5x_4+4x_5+4x_6 + s_2=220
0.4x1+2x3+8x5+s3=450.4x_1+2x_3+8x_5+s_3=45
0.1x2+0.5x4+2x6+s4=450.1x_2+0.5x_4+2x_6+s_4=45
x1,,x6,p1,a1,s2,s3,s40x_1, \dots, x_6, p_1, a_1, s_2, s_3, s_4 \ge 0

The artificial objective function is a1=44x1+44x2+940x3+940x4+156x5+156x6p118800-a_1 = 44x_1+44x_2+940x_3+940x_4+156x_5+156x_6 - p_1 - 18800. Therefore we get the initial tableau.

x1x_1x2x_2x3x_3x4x_4x5x_5x6x_6p1p_1a1a_1s2s_2s3s_3s4s_4
4444940940156156-1118800
1155441220
0.428145
0.10.52145
-1800-1800-3360-3360-13500-13500
-44-44-940-940-156-1561-18800

We may choose any variable among x1,,x6x_1, \dots, x_6 as the entering variable as their coefficients in the artificial objective function are negative. We choose x3x_3 here. Now the replacement quantities are 18800/940=20,220/5=44,45/2=22.518800/940 = 20, 220/5 = 44, 45/2 = 22.5. So the first entry in column 3 is the pivot. Couple of row operations yield:

x1x_1x2x_2x3x_3x4x_4x5x_5x6x_6p1p_1a1a_1s2s_2s3s_3s4s_4
11/23511/2351139/23539/235-1/9401/94020
36/4736/47149/47149/471/1881/1881120
72/235-22/235-21802/235-78/2351/470-1/47015
0.10.52145
-77208/47-77208/47-608292/47-608292/47-168/47-168/4767200
1

Solution 1c. The dual linear program is as follows.

Minimize19200y1+220y2+45y3+45y419200y_1+220y_2+45y_3+45y_4
Subject to44y1+y2+0.4y3180044y_1+y_2+0.4y_3 \ge 1800
44y1+y2+0.1y4180044y_1 + y_2 + 0.1y_4 \ge 1800
940y1+5y2+2y33360940y_1+5y_2+2y_3 \ge 3360
940y1+5y2+0.5y43360940y_1 + 5y_2+0.5y_4 \ge 3360
156y1+4y2+8y313500156y_1 + 4y_2+ 8y_3 \ge 13500
156y1+4y2+2y413500156y_1 + 4y_2+2y_4 \ge 13500
y10,y2,y3,y40y_1 \le 0, y_2, y_3, y_4 \ge 0

Solution 2. Denote the cities by 1, 2, 3, 4. Let xijx_{ij} denote whether the skiers travel from city ii to city jj. In addition, let b1,b2b_1, b_2 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,b4b_3, b_4 for the flights from Salt Lake City to Aspen.

MaximizeMx11+183x12+(443b1+335b2)+328x14+183x21+Mx22+279x23+(323b3+317b4)+333x31+279x32+Mx33+409x34+423x41+356x42+403x43+Mx44\begin{gathered}Mx_{11}+183x_{12}+(443b_1+335b_2)+328x_{14} \\ +183x_{21}+Mx_{22}+279x_{23}+(323b_3+317b_4) \\ +333x_{31}+279x_{32}+Mx_{33}+409x_{34}+\\ 423x_{41}+356x_{42}+403x_{43}+Mx_{44}\end{gathered}
Subject toxi1+xi2+xi3+xi4=1x_{i1}+x_{i2}+x_{i3}+x_{i4} = 1 for all i=1,2,3,4i = 1, 2, 3, 4.
x1j+x2j+x3j+x4j=1x_{1j}+x_{2j}+x_{3j}+x_{4j} = 1 for all j=1,2,3,4j = 1, 2, 3, 4.
iD,jDxij1\sum_{i \in D, j\notin D}x_{ij} \ge 1 for all proper subsets DD.
b1+b2x13b_1 + b_2 \le x_{13}
b3+b4x24b_3 + b_4 \le x_{24}