Solutions to CS 600 Test 2



Spring 2002



1. For the following optimization problem answer the questions below:



Maximize $x_{1} + 3x_{2}$
Subject to:
$3x_{1} + 2x_{2} \leq 6$
$-x_{1} - x_{2} \leq -1$
$x_{1}, x_{2} \geq 0$



(a) Find a basic solution with the slack variables as the basic variables. [5]



Solution:
With slack variables $x_{3}$ and $x_{4}$ as the basic variables the initial dictionary would be
$x_{3} = 6 - 3x_{1} - 2x_{2}$
$x_{4} = -1 + x_{1} + x_{2}$
$ Z = x_{1} + 3x_{2}$.



Then the corresponding basic solution is $x_{1} = x_{2} = 0$, $x_{3} = 6$ and $x_{1} = -1$, which is not feasible.



(b) If the basic solution of (a) is not feasible, then find an initial basic feasible solution and the corresponding dictionary for the given optimization problem. If it is feasible, solve the given optimization problem by the simplex method. [20]



Solution:
The basic solution of (a) is not feasible. Thus we need to solve the following auxiliary problem to find an initial basic feasible solution:



Min $x_{0}$
subject to
$3x_{1} + 2x_{2} -x_{0} \leq 6$
$-x_{1} - x_{2} -x_{0} \leq -1$
$x_{i}'s \geq 0$



With slack variables $x_{3}$ and $x_{4}$, the constraints become
$3x_{1} + 2x_{2} -x_{0} +x_{3} = 6$
$-x_{1} - x_{2} -x_{0} +x_{4} = -1$

Since $x_{4}$ would be negative if it is selected as a basic variable, we select $x_{0}$ and $x_{4}$ as the basic variables. Thus the initial dictionary is



$x_{3} = 7 - 4x_{1} -3x_{2} +x_{4} $
$x_{0} = 1 -x_{1} - x_{2} +x_{4} $
$Z = 1 -x_{1} - x_{2} +x_{4} $



Next select $x_{1}$ as the pivot. Then since $x_{0}$ becomes $0$ first as $x_{1}$ is increased from $0$, $x_{0}$ is the new non-basic variable. Hence the dictionary is



$x_{3} = 3 + x_{2} - 3x_{4}+ 4x_{0} $
$x_{1} = 1 - x_{2} +x_{4} - x_{0}$
$Z = x_{0} $



Thus the minimum is reached and it is equal to $0$. Hence the original problem has a feasible solution and the initial dictionary is



$x_{3} = 3 + x_{2} - 3x_{4} $
$x_{1} = 1 - x_{2} +x_{4} $
$Z = 1 + 2 x_{2} + x_{4}$



2 (a) Formulate the separable convex programming problem to find an approximate solution to the optimization problem given below. Approximate the objective function by piecewise linear functions over the intervals $ 0 \leq x_{1} \leq 1$, $ 1 \leq x_{1} \leq 2$, $ 0 \leq x_{2} \leq 1$ and $ 1 \leq x_{2} \leq 2$. [16]
(b) Formulate the linear programming problem to solve the problem of (a).
Explain why this LP solves the problem of (a).
DO NOT solve the linear programming problem. [10]



Maximize $(8 x_{1} - 3x_{1}^{2}) + (4 x_{2} - x_{2}^{2}) $
Subject to:
$-2x_{1} + x_{2} \leq 1$
$2x_{1} + x_{2} \leq 5$
$0 \leq x_{1} \leq 2$ and $ 0 \leq x_{2} \leq 2$.



Solution:
(a) Maximize $(5 x_{11} - x_{12}) + (3 x_{21} + x_{22}) $
Subject to:
$-2(x_{11} + x_{12}) + (x_{21} + x_{22}) \leq 1$
$2(x_{11} + x_{12}) + (x_{21} + x_{22}) \leq 5$
$0 \leq x_{ij} \leq 1$ for all $x_{ij}$'s.
If $x_{12} \neq 0$, then $x_{11} =1$ and if $x_{22} \neq 0$, then $x_{21} =1$.



Solution:
(b) Same as (a) but without the last constraint: If $x_{12} \neq 0$, then $x_{11} =1$ and if $x_{22} \neq 0$, then $x_{21} =1$.



Suppose that the optimum of the LP problem does not satisfy the last condition of the solution to (a), that is "If $x_{12} \neq 0$, then $x_{11} =1$ and if $x_{22} \neq 0$, then $x_{21} =1$" is not satisfied. Hence $x_{12} \neq 0$, and $x_{11} < 1$ and/or $x_{22} \neq 0$ and $x_{21} < 1$. Then the values of the objective function can be increased without violating the constraints by shifting value from $x_{12}$ to $x_{11}$ (or from $x_{22}$ to $x_{21}$) while keeping the value of $x_{12} + x_{11}$ (or $x_{22} + x_{21}$) unbchanged. Thus the "optimum" of the LP is not optimum, which is a contradiction. Hence the optimum of the LP satisfies the condition "If $x_{12} \neq 0$, then $x_{11} =1$ and if $x_{22} \neq 0$, then $x_{21} =1$".
Thus we can solve the problem of (a) by solving the LP problem of (b).



3. Answer whether or not the following statements are true. You DO NOT need to give your reasons. [24]



(a) An NP-complete problem can be solved in $O(a^{n})$ time for some constant $a$ in the worst case, where $n$ is the problem size.
(b) The max flow problem can be polynomial transformed to the graph color problem.
(c) If a problem is in class $NP$, then it can be solved by back tracking a polynomial number of times in the worst case.
(d) The simplex method for linear programming is a polynomial time algorithm.
(e) In the simplex method, the value of the objective function always increases.
(f) The max flow problem can be solved by linear programming.



Solution:
(b) and (f) are true and the rest are false.

4. The NP-completeness of the CLIQUE problem can be proven by reducing the 3SAT problem to CLIQUE problem. In that transformation a graph for CLIQUE problem is constructed as follows:
(1) Create a vertex for each literal of the boolean function.
(2) Group the vertices corresponding to each clause into one group.
(3) Connect vertices if and only if they are in different groups and the corresponding literals are not complement of each other.



Let n, p and q be the number of variables, the number of literals and the number of clauses of an instance of 3SAT, respectively.



Answer the following questions:
(a) State the CLIQUE problem corresponding to the 3SAT problem. [5]
(b) Prove that the answer to an instance of the 3SAT problem is yes if and only if the answer to the corresponding instance of the CLIQUE problem is yes. [20]



Solution:
(a) Is there a cliques of size q in the graph constructed by the procedure given above for the given instance of the 3SAT problem ?



Solution:
(b) Suppose that the answer to the CLIQUE is "Yes". Then there is a clique of size q. This clique does not have more than one vertex from each group because there is no edge between the vertices of the same group in the graph. Since there are q vertices in the clique, exactly one vertex is selected from each group. Assign value "True" to the literals corresponding to those vertices. Then those literals are not complement to each other by (3) of the above procedure. Hence this assignment is consistent (no contradictions). Since the groups correspond to the clauses, each clause takes the value "True" by this assignment. Hence the given boolean function is satisfiable.



If, on the other hand, there is an assignment of value that satisfies the boolean function, then each clause has a literal with value "True". The vertices corresponding to those literals are directly connected to each other by edges in the graph because they are not complement to each other. Hence they form a clique of size q.



Hence the answer to the CLIQUE problem is "yes" if and only if the answer to the 3SAT problem is "yes".





S. Toida
2002-05-05