Optimization Theory (DS2) HW#4
Simplex in the Morning, Simplex in the Evening!
Abstract
Last homework on the simplex algorithm. This homework counts for two homework sets!
Problems and page numbers from the paperback edition of A Gentle Introduction to Optimization, by B. Guenin et al.
-
1.
I am in Williamson, West Virginia, for an extended stay, and you are coming from Japan to visit me. “Rice! I need rice!” I tell you. I offer to pay you $3 above cost for each kilogram of Thai rice, $2/kg above cost for Chiba-ken mochigome, and $1/kg for plain old Nagano-ken koshihikari. You visit the grocery store, where they have 15kg of Thaimai on the shelf, 5kg of mochigome, and 12kg of koshihikari. You can buy any combination, including fractional kilograms. However, the weight of your suitcase cannot exceed 22kg.
-
(a)
Write this as a linear program (inequalities okay).
-
(b)
Solve this in R.
-
(a)
-
2.
Take our favorite LP:
(1) subject to
(2) (3) and show that you can solve it in R using the simplex() function.
-
3.
Let’s finish off the problem by hand (last time you’ll have to do such grungy stuff by hand for the simplex algorithm, I promise). You will need to refer to both the lecture notes and the pseudocode for the simplex algorithm.
The problem has already been carried through the first full iteration for you, and through the process of creating the next canonical form, in detail, ending in Eqs. 26-29. So here we will pick up the work at line 2 of the pseudocode, finding a basic solution.
-
(a)
Find a new basic solution, . (This involves picking an element to optimize for, using our temporary variable , and applying the ratio test to maximize and therefore .) Report both and the corresponding objective function value, .
-
(b)
Check to see if is optimal. (If so, you are done!)
-
(c)
Pick a new element to add to the basis.
-
(d)
Test for unboundedness.
-
(e)
Conduct a new ratio test to pick the element you are going to remove from the basis. (Careful with the indices and here, it’s a little bit tricky.)
-
(f)
Write down the new basis .
At this point, you have completed the loop, up through step 9 in the lecture notes or the end of the pseudocode.
-
(g)
The next step (back at the top of the pseudocode) is to create a new version of the problem in canonical form for the new basis we just picked.
At this point, you’ve been all the way around once. I suppose that’s far enough… otsukaresama deshita on the simplex algorithm! (And let’s all be grateful for computers that do the work for us!)
-
(a)