Solutions to CS 600 Test 2



November 8, 1999



1. Find an initial basic feasible solution for the following problem by formulating and solving by the simplex method the auxiliary problem. Then solve the original problem by the simplex method.

Max Z = -x1 - x2
Subject to:
$-2x_{1} - x_{2} \leq -4$
$-x_{1} - x_{2} \leq -3$
$5x_{1} + 4x_{2} \leq 20$
$x_{1}, x_{2} \geq 0$

Solution
Since the usual initial basic solution is infeasible, the auxiliary problem must be formulated and solved to find an initial basic feasile solution.

Auxiliary problem:
Min x0
Subject to:
$-2x_{1} - x_{2} - x_{0} \leq -4$
$-x_{1} - x_{2} - x_{0} \leq -3$
$5x_{1} + 4x_{2} - x_{0} \leq 20$
$x_{0}, x_{1}, x_{2} \geq 0$

To solve the auxiliary problem, slack variables are introoduced:
Min x0
Subject to:
-2x1 - x2 - x0 + x3 = -4
-x1 - x2 - x0 + x4 = -3
5x1 + 4x2 - x0 + x5 = 20
$x_{0}, x_{1}, x_{2}, x_{3}, x_{4}, x_{5} \geq 0$

For the initail feasible solution for this auxiliary problem, select x0 = 4. Thus x1, x2, x3 are selected as the initial set of non-basic variables. Thus the initial dictionary is
x0 = 4 - 2x1 - x2 + x3
x4 = 1 - x1 + x3
x5 = 24 - 7x1 - 5x2 + x3
z = 4 - 2x1 -x2 + x3

Selecting x1 as he pivot, the second dictionary is
x0 = 2 - x2 - x3 + 2x4
x1 = 1 + x3 - x4
x5 = 17 - 5x2 - 6x3 + 7x4
z = 2 - x2 -x3 + 2x4

Selecting x2 as he pivot, the second dictionary is
x2 = 2 - x0 - x3 + 2x4
x1 = 1 + x3 - x4
x5 = 7 + 5x0 - x3 - 3x4
z = x0
Since z can not be reduced any further, we have reached an optimum. That is x0 = x3 = x4 = 0, x1 = 1, x2 = 2, x5 = 7 is an optimum point. Since Min z =0, the original problem has a feasible solution, and x3 = x4 = 0, x1 = 1, x2 = 2, x5 = 7 is an initail basic feasible solution.

Thus the initial dictionary for the original problem is
x2 = 2 - x3 + 2x4
x1 = 1 + x3 - x4
x5 = 7 - x3 - 3x4
z = -3 - x4.

This is also optimum. Thus the optimum point is x1 = 3, x2 = 0 and the optimum value of the objective function is -3.

2. Formulate the following problem as a LP problem:

A meat packing plant produces 450 hams, 380 pork bellies and 320 picnic hams every day; each of these products can be sold either fresh or smoked. The total number of hams, bellies, and picnics that can be smoked during a normal working day is 450; in addition, up to 230 products can be smoked on overtime at a higher cost. Due to the availability of resources, picnics are to be produced 10% (of the total number of products) more than bellies, and 15% more than hams. The net profits are as follows:

  Fresh Smoked on Smoked
    regular time on overtime
Hams $16 $28 $22
Bellies $8 $24 $14
Picnics $8 $26 $18


Solution: Let xHF, xHR, xHO, xBF, xBR, xBO, xPF, xPR, xPO denote the number of products, where H, B and P stand for Ham, Bellies and Picnics, respectively and F, R, and O stand for Fresh, Smoked on Regular Time and Smoked on Overtime Time, respectively.
Then the LP formulation is:
Max 16xHF + 28xHR + 22xHO + 8xBF + 24xBR + 14xBO + 8xPF + 26xPR + 18xPO
Subject to
$x_{HF} + x_{HR} + x_{HO} \leq 450 $
$x_{BF} + x_{BR} + x_{BO} \leq 380$
$x_{PF} + x_{PR} + x_{PO} \leq 320$
$x_{HR} + x_{BR} + x_{PR} \leq 450 $
$x_{HO} + x_{BO} + x_{PO} \leq 230 $
xPF + xPR + xPO = xBF + xBR + xBO + 0.1x
xPF + xPR + xPO = xHF + xHR + xHO + 0.15x
x = xHF + xHR + xHO + xBF + xBR + xBO + xPF + xPR + xPO.
All the variables are non-negative.

3. At North Central University courses are scheduled as follows: First, time slots and instructors are assigned to the courses. Then rooms are assigned. For simplicity assume that any room can be assigned to any course as long as it is available (ignoring size and type of rooms).

Prove that the problem of finding a room to each of the courses without conflicts is in general NP-Complete.

You do NOT have to prove that it is in NP.
Also you may use the fact that the following problems are NP-Complete:
3 Dimensional Matching, Partition, Graph Coloring and Bin Packing.

Solution: The graph coloring problem is going to be reduced to this problem.
Let <G=(V,E), k> be an instance of the graph coloring problem, where V is the set of vertices and E the set of edges, and k is an integer.

Then the corresponding instance of the scheduling problem can be constructed as follows:
For each vertex in V, produce a course. If there is an edge of E between two vertices of V, then the courses corresponding to the vertices have a time conflict and can not be scheduled into the same room and conversely. The scheduling problem asks whether or not a room can be assigned to each course using k or less rooms. This construction gives an instance of the schedulin problem corresponding to the given instance of the graph coloring problem.
This construction takes time polynomial in the size of the graph colorin problem.

Next it must be shown that the answer to the given instance of the graph coloring problem is 'yes' if and only if the answer to the corresponding instance of the scheduling problem is 'yes'.
If the answer to the graph coloring is 'yes', then there is a coloring of the vertices of the graph using k or less colors, and no two adjacent vertices have the same color. Hence the courses corresponding to the vertices of the same color can be assigned to the same room since they have no time conflict. Conversely if a schedule is found, then the vertices corresponding to the courses assigned to the same room can be given the same color. Since the courses assigned to the same room do not have any time conflict, there is no edge between them in the corresponding graph. Thus the answer to the graph coloring is 'yes'.

Thus it has been shown that the graph coloring problem can be reduced to the room assignment(scheduling) problem in polynomial time.