You are on page 1of 7

Homework 1

1. ABC Bike is a small seller of both regular and mountain bikes. The company makes a profit of \$30.00
for each regular bike it sells and \$45.00 for each mountain bike sold. Each regular bike requires 1 hour to
assemble and 1 hour to tune, while each mountain bike requires 1 hour to assemble and 2 hours to tune.
Due to its labor constraint, this company can only supply 40 hours of assembling, and 60 hours of tuning
per week. Based on past demand, ABC Bike needs to sell at least 10 regular bikes and 8 mountain bikes
each week. How many regular and mountain bikes should the company sell to maximize profits?

(a) What is the linear programming model for this problem? You need to define the decision variables
clearly.
X1 = number of regular mountain bikes sold,
X2 = number of mountain bikes sold,

Max 30X1 +45X2 profit line (PL)

s.t. 1X1 + 1X2 ≤ 40 assembling constraint (AC)
1X1 + 2X2 ≤ 60 tuning constraint (TC)
1X1 ≥ 10 lower bound on # of regular bikes (LR)
1X2 ≥ 8 lower bound on # of mountain bikes (LM)

(b) Find the optimal solution by LINDO.

Optimal solution is to sell 20 regular bikes and 20 mountain bikes. The LINDO code would be:
MAX 30 X1 + 45 X2
SUBJECT TO
X1 + X2 <= 40
X1 + 2X2 <= 60
X1 >= 10
X2 >= 8

And the LINDO output is:

LP OPTIMUM FOUND AT STEP 0

1) 1500.000

VARIABLE VALUE REDUCED COST

X1 20.000000 0.000000
X2 20.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES

2) 0.000000 15.000000
3) 0.000000 15.000000
4) 10.000000 0.000000
5) 12.000000 0.000000

NO. ITERATIONS= 0

RANGES IN WHICH THE BASIS IS UNCHANGED:

1
OBJ COEFFICIENT RANGES
VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 30.000000 15.000000 7.500000
X2 45.000000 15.000000 15.000000

RIGHTHAND SIDE RANGES

ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 40.000000 12.000000 5.000000
3 60.000000 10.000000 12.000000
4 10.000000 10.000000 INFINITY
5 8.000000 12.000000 INFINITY

(c) What are the values and interpretations of all slacks and surpluses associate with each constraint at
the optimal solution?
The slack for the AC constraint is 0. This means we used all of the assembling time.
The slack for the TC constraint is 0. This means we used all tuning time.
The surplus for the LR constraint is 10. This means we sold 10 more regular bikes than the minimum
requirement.
The surplus for the LM constraint is 12. This means we sold 12 more mountain bikes than the minimum
requirement.
(d) Which constraints are binding at the optimal solution?
The AC and TC constraints are binding. (slack/surplus = 0)

2. Solve the following linear program using the graphical method and answer all questions. You should submit
the picture file of your graphical solution and show your calculations or reasons to answer the questions
below. You may consider to verify your solutions and answers by LINDO (no need to submit your LINDO
verification).
Max 2x1 +3x2
s.t x1 + x2 ≤ 10
2x1 + x2 ≥ 6
x1 + 3x2 ≤ 24
3x1 + x2 ≤ 26
x1 , x 2 ≥ 0

Graphical Solution:

x2 ≥ 0
x1 + x2 ≤ 10

2x1 + x2 ≥ 6

x1 + 3x2 ≤ 24

Objective Function 2x1 + 3x2 = 27

0 x1 ≥ 0
3x1 + x2 ≤ 26

2
Based on the graphical solution, the optimal solution is (x1 , x2 ) = (3, 7) and the optimal objective value
can be obtained by plug the optimal solution to the objective function: 2 ∗ 3 + 3 ∗ 7 = 27.
LINDO Solution:

1) 27.00000

VARIABLE VALUE REDUCED COST

X1 3.000000 0.000000
X2 7.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES

2) 0.000000 1.500000
3) 7.000000 0.000000
4) 0.000000 0.500000
5) 10.000000 0.000000

NO. ITERATIONS= 1

OBJ COEFFICIENT RANGES

VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 2.000000 1.000000 1.000000
X2 3.000000 3.000000 1.000000

RIGHTHAND SIDE RANGES

ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 10.000000 2.500000 2.000000
3 6.000000 7.000000 INFINITY
4 24.000000 6.000000 10.000000
5 26.000000 INFINITY 10.000000

(a) Compute the ranges of c1 and c2 (one coefficient is fixed at a time) of the objective function coefficients
for x1 and x2 , for the current optimal solution to remain optimal.
Answer: Based on the LINDO solution, the ranges of c1 and c2 are (1, 3) and (2, 6), respectively. You
may also obtain these ranges graphically as follows:
x2

Range of slope: -1 to -1/3

0 x1

From the graph above, as long as the slope of our objective function stays in the range of [-1, -1/3], the
current solution will remain optimal. For simplicity, we can keep the intercept of objective function to

3
be zero. To calculate the range of c1 , first we can get the slope in terms of c1 :

c1 x1 + 3x2 = 0
3x2 = −c1 x1
−c1
x2 = − x1
3
Then, using the range of slope, we can get the range of c1 ,
−c1 1
−1 ≤ − ≤−
3 3
c1 1
1≥ ≥
3 3
3 ≥ c1 ≥ 1

Similarly, we can determine the range of c2 to be [2, 6]. Remember if you put x2 on the vertical axis,
you should keep x2 on the left hand side of the equation while calculating the slope.
(b) Suppose c1 is increased from 2 to 2.5 and c2 is increased from 3 to 3.5. Will the current optimal
solution change?
Answer: The solution will not change since the 100% rule holds: for x1 : (2.5 − 2)/1 = 50%; while for
x2 : (3.5 − 3)/3 = 16.7%; and 50% + 16.7% = 66.7% < 100%.
(c) Suppose c1 is increased from 2 to 2.5. What is the new optimal solution?
Answer: The optimal solution will remain unchanged because 2.5 is in the allowable range of c1 (1, 3).
(d) Suppose c2 is decreased from 3 to 1. What is the new optimal solution?
Answer: Since 1 is outside of the allowable range of c2 , the optimal solution will change. You may
obtain the new solution by re-running LINDO with the new data. Alternatively, you may obtain the
new solution graphically. The new optimal solution will change to a new corner point as following:

x2 ≥ 0
x1 + x2 ≤ 10

2x1 + x2 ≥ 6

x1 + 3x2 ≤ 24

New Solution (8,2)

0 x1 ≥ 0
3x1 + x2 ≤ 26

(e) Compute the dual prices and the associated ranges for constraints 1 and 2 and interpret them.
Answer: The dual price of a constraint is the increase in the objective function if we relax the right
hand side of that constraint by one unit. Using the LINDO output, the dual prices of the first two
constraints are 1.5 and 0, respectively. You may also obtain the dual prices graphically as follows.
For constraint one, if we relax it from x1 + x2 ≤ 10 (the black dashed line) to x1 + x2 ≤ 11 (the thick
black line), then our new solution will move from (3,7) to (4.5,6.5) and our objective function will
increase from 27 to 28.5, so the dual price of constraint one is 1.5.

4
x2 ≥ 0
x1 + x2 ≤ 11

Old Solution (3,7)

New Solution (4.5,6.5)
x1 + 3x2 ≤ 24

New Objective Function 2x1 + 3x2 = 28.5

0 x1 ≥ 0

The dual price for constraint 2 is 0, because the relaxation of this constraint will not change the optimal
solution.
x2 ≥ 0
x1 + x2 ≤ 10

2x1 + x2 ≥ 6
2x1 + x2 ≥ 5
x1 + 3x2 ≤ 24

Objective Function 2x1 + 3x2 = 27

0 x1 ≥ 0
3x1 + x2 ≤ 26

3. RMC Inc. is a firm that produces chemical-based products. Three raw materials are used to produce two
products. The material requirements per ton are shown below.

Product Material 1 Material 2 Material 3

Solvent base 2/5 1/5 2/5

For the current production period, RMC has available the following quantities of each raw material. Because
of spoilage, any materials not used for current production must be discarded.

Material Material 1 Material 2 Material 3

Available 14 5 32

If the contribution to profit is \$50 for each ton of fuel additive and \$40 for each ton of solvent base, how
many tons of each product should be produced in order to maximize the total contribution to profit? Solve
the RMC problem by LINDO and answer the following questions based on the solution output.
Decision variables:
X2 = solvent base produced.
LINDO input:

5
Max 50X1+40X2 ! profit
ST
0.2X1 + 0.4X2 <= 14 ! material 1 constraint
0.2X2 <= 5 ! material 2 constraint
0.8X1 + 0.4X2 <= 32 ! material 3 constraint
End

LINDO output:

1) 2300.000

VARIABLE VALUE REDUCED COST

X1 30.000000 0.000000
X2 20.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES

2) 0.000000 50.000000
3) 1.000000 0.000000
4) 0.000000 50.000000

NO. ITERATIONS= 2

OBJ COEFFICIENT RANGES

VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X1 50.000000 30.000000 30.000000
X2 40.000000 60.000000 15.000000

RIGHTHAND SIDE RANGES

ROW CURRENT ALLOWABLE ALLOWABLE
RHS INCREASE DECREASE
2 14.000000 1.500000 6.000000
3 5.000000 INFINITY 1.000000
4 32.000000 24.000000 6.000000

(a) How much material 2 has been used in the current production plan?
Answer: 5 − 1 = 4, because the slack of material 2 constraint is 1.
(b) How much are you willing to pay an additional unit of material 1, 2, and 3?
Answer: \$50 for material 1, \$0 for material 2, and \$50 for material 3, which are dual prices of these
materials.
(c) Are you willing to pay \$100 for additional 2 units of material 1?
Answer: No. Allowable increase of R.H.S in material 1 constraint is 1.5. After that, the dual price of
material 1 will decrease.
(d) Are you willing to sell 4 units of material 3 for \$60 each unit?
Answer: Yes. Because 4 is less than 6, the allowable decrease of R.H.S. in material 3; while \$60 is
larger than the dual price of material 3.
(e) Will you be interested in producing a new product, each of which sells for \$50 and requires 0.6 unit of
material 1, 0.4 unit of material 2 and 0.5 unit of material 3?
Answer: No. According to the dual price of each material, the break-even price for this new product
should be 0.6 × \$50 + 0.4 × \$0 + 0.5 × \$50 = \$55 > \$50.
(f) If the price of fuel additive increases to \$55 per unit, do you suggest change the current production
plan?
Answer: No. 55 is within the price range for fuel additive (20, 80).

6
(g) If the prices of fuel additive and solvent change to \$55 and \$45, respectively, do you suggest change
the current production plan?
Answer: No. Using the 100% rule, for fuel additive: (55 − 50)/30 = 16.67%; while for solvent base:
(45 − 40)/60 = 8.33%; and 16.67% + 8.33% = 25% < 100%.

4. An XYZ company produces products X, Y, and Z. The company sets up the following LP to decide the
production level of the three products.
MAX 4X + 4Y + 3Z
SUBJECT TO
2X + 6Y + 4Z <= 26 ! labor constraint
3X + 2Y + Z <= 14 ! material constraint
X <= 7
Y <= 3
Z <= 6

where objective coefficients 4, 4, and 3 are unit profits of X, Y, and Z. The first two constraints are labor
availability and material availability constraints, respectively, and the last three rows are market share
constraints. Due to a printer problem, some data in the LP output are missing. Supply the missing data
OBJECTIVE FUNCTION VALUE
1) (a)
VARIABLE VALUE REDUCED COST
X 3.000000 (b)
Y 0.000000 (c)
Z 5.000000 0.000000

ROW SLACK OR SURPLUS DUAL PRICES

2) (d) 0.500000
3) 0.000000 1.000000
4) (e) 0.000000
5) 3.000000 0.000000
6) 1.000000 (f)

OBJ COEFFICIENT RANGES

VARIABLE CURRENT ALLOWABLE ALLOWABLE
COEF INCREASE DECREASE
X 4.000000 5.000000 2.500000
Y 4.000000 1.000000 (g)
Z 3.000000 5.000000 0.714286

(a) 27. Objective Function Value = \$4 × 3 + \$4 × 0 + \$3 × 5 = \$27.

(b) 0. Since the value of variable X is 3, already a positive number, its reduced cost should be zero.
(c) 1.0. Reduced cost is the improvement of the coefficient needed so that the variable becomes positive in
the optimal solution. From the allowable increase of Y’s unit profit, we can tell that if the unit profit
of Y is increased by more than \$1.0, quantity of product Y produced will be no longer zero and we
will start to produce it.
(d) 0. Since the dual price of labor is \$0.50 (nonzero), we can tell that the labor is a binding constraint
and all labor resources are used in current production plan. The slack or surplus should be zero.
(e) 4. Since the market share constraint of X is X ≤ 7, and X = 3, there is 7 − 3 = 4 leftover. In other
words, the slack of market share of X is 4.
(f) 0. Because there is a slack of 1.0 for Z, the market share of Z is not a binding constraint, its dual price
should be zero.
(g) Infinity. Since product Y is unattractive (production = 0) at the unit profit of \$4, it will be even less
attractive as its price decreases. Therefore, the associated allowable decrease of Y’s prices would be
Infinity.