CS330 Introduction to Algorithms December 3, 2012

advertisement
CS330 Introduction to Algorithms
December 3, 2012
Linear programming 2 feasible solutions, duality
1. A farmer has 10 acres to plant in wheat and rye. He has to plant at least 7 acres.
However, he has only $1200 to spend and each acre of wheat costs $200 to plant and
each acre of rye costs $100 to plant. Moreover, the farmer has to get the planting
done in 12 hours and it takes an hour to plant an acre of wheat and 2 hours to plant
an acre of rye. If the prot is $500 per acre of wheat and $300 per acre of rye how
many acres of each should be planted to maximize prots?
2. How many variables are there in the previous problem? What do they correspond
to? Let us assume that you write a linear program for nding the length of the
shortest path between nodes s and t in a weighted graph G. How many vaiables
does this linear program contain? What do these variables correspond to?
3. Let x and y be two variables. Come up with a linear program (thus an objective
function and a set of inequalities containing x and y ) that (a.) does not have a
feasible solution (b.) is unbounded. Write the dual of your two examples. What
can you say about the solutions to the dual problems? Write the dual of the dual
problem. What is the relation to the primal?
Download