CSE 555: Homework 5

Spring 2015 April 27, 2015

(1)

P = coP : Let ∈ P . So there is a deterministic M that decides L in time. By swapping the accept and reject states of M, we obtain a deterministic Turing machine M 0 that decides L¯ in polynomial time. So L¯ ∈ P , i.. L ∈ coP . Similarly, for L0 ∈ coP , we can show that L0 ∈ P . P SP ACE = NP SP ACE : By Savitch’s theorem. P SP ACE = coP SP ACE : Let L ∈ P SP ACE. So there is a deterministic Turing machine M that decides L using polynomial space. By swapping the accept and reject states of M, we obtain a deterministic Turing machine M 0 that decides L¯ in polynomial space. So P SP ACE ⊆ coP SP ACE. Similarly, for L0 ∈ coP SP ACE , using the same technique L0 ∈ P SP ACE. coP SP ACE = coNP SP ACE : Let L ∈ coP SP ACE. So L¯ ∈ P SP ACE ⊆ NP SP ACE. Therefore, L ∈ coNP SP ACE. When L0 ∈ coNP SP ACE, L ∈ coSP ACE, by Savitch’s theorem.

Based on what we know, it is possible that • P , NP , coNP , and P SP ACE are distinct there are four different complexity classes. • NP = coNP but P , NP , and P SP ACE are all distinct so there are three different complexity classes. • P = NP = coNP but P and P SP ACE are distinct so there are two different complexity classes. • P = P SP ACE so there is only one . We think that there are four.

(2)

Let us first define the following recursive , M =“On input hG, k, Ai, where G = (V,E) is a graph, k is an integer, and A is an array which is indexed by the vertices, and which keeps count of how many times a vertex has been chosen by the producer. 1. For each P ⊆ V ,

(a) Make a copy of A called A0. (b) For x ∈ P , i. update A0[x] = A0[x] + 1. ii. if A0[x] > k, then accept. (c) ALL = true. (d) For each independent set C ⊆ S,

1 i. If V − C = φ or M recursively running on hG0, k, A0i rejects, then set ALL = false and break; where G0 is the graph obtained from G by deleting all the vertices from C. (e) If ALL = true , then accept.

2. Reject.” Now we define the following algorithm to decide PAINT, M 0 =“On input hG, ki, where G is a graph, and k is an integer, 1. Run M on hG, k, Ai, A is an all zero array. 2. If M accepts then accept, else reject.” The recursive call stack of M has O(n) levels. At each level we need to store the remaining graph G, the integer k, and the count array A. So we again need O(n) storage at each level. Therefore, the algorithm runs in O(n2) space.

(3)

First we show that PILF is in P SP ACE. The following recursive algorithm decides PILF in polynomial space. =“On input hT,P,Ai, where T is a list of tiles, P is a variable taking values from a binary alphabet {h, b}, and A is an array of length 2l (the first l positions corresponds to the top l positions, and the remaining positions corresponds to the bottom l positions),

1. If T is an empty list, then accept, if A is an all-zero array, otherwise reject. 2. If P = h (i.e. the current player is Hole), then recursively call R on hT 0, b, Ai, where T 0 is obtained from T by removing the first tile, and A is updated with zeros in all the positions where the first tile had a zero; first, if the first tile is left as it is, and then if it is turned upside down. If either result is accept, then accept, otherwise reject.

3. If P = b (i.e. the current player is Block), then recursively call R on hT 0, h, Ai, where T 0 is obtained from T by removing the first tile, and A is updated with zeros in all the positions where the first tile had a zero; first, if the first tile is left as it is, and then if it is turned upside down. If both results are accept, then accept, otherwise reject.” Given an instance hT i, we run R on hT, h, Ai, where A is an all-one array of length 2l, and accept if R accepts, otherwise reject. Again the depth of the recursion is O(n), and each level uses O() space. So R decides PILF in O(n2l) space. We reduce FORMULA-GAME to PILF. The is same as the one for reducing SAT to FLIP in homework 4. If the instance ∃x1∀x2 ... Qxk[ψ] belongs to FORMULA-GAME, then the player E has a winning strategy, i.e. a way of choosing True/False values for its variables such that all the clauses in ψ are true. In that case player Hole can choose corresponding orientations for its tiles so that for each of the 2l positions, at least one tile has a 0 in that position. Similarly, if Hole has a winning strategy, then by construction, player E can choose True/False values in such a way that all the clauses in ψ are true. The reduction operates in deterministic polynomial time.

(4)

R =“On input hG, P i, where G is a graph, and P is a variable taking values from the binary alphabet {One, T wo},

2 1. If the G does not have any edges, then check if G has more than one vertex. If it does then reject, otherwise accept. 2. If P = One, (i.e. it is player One’s turn) then for each edge of G, build a new graph G0 by deleting that edge from G, and recursively run R on input hG0, T woi. If all the results are accept, then accept, otherwise reject. 3. If P = T wo, (i.e. it is player Two’s turn) then for each edge of G, build a new graph G00 by contracting the edge (i.e. by deleting the end points of the edge, adding a new vertex to the graph, and joining the new vertex to all the vertices that were adjacent to the deleted vertices), and recursively run R on input hG00, Onei. If any of the results is accept, then accept, otherwise reject.” Given an input hGi, we run R on hG, Onei, and accept when R accepts, otherwise reject. So we can decide REPAIR in O(n2) space. Membership in PSPACE gives an upper bound on the , but does not show that the problem is hard. In particular, just because this “looks like” some PSPACE- problems, we cannot conclude anything other than the fact that it can be solved in polynomial space, given what we have said above. One should be very cautious about drawing stronger conclusions than the results support. This is not part of the answer expected, but let’s explore this problem further. Let G = (V,E) be a graph. For a partition P = {V1,V2,...,Vr} of the vertices in V , let ε(P ) = |{e ∈ E : e = {x, y}, x ∈ Vi, y ∈ Vj, i 6= j}|. (This is the number of edges that go between classes of the partition.) Now if G has two edge-disjoint spanning trees, then for every partition P having r classes, ε(P ) ≥ 2r − 2. Equivalently, if there is a partition P with r classes for which ε(P ) < 2r − 2, G cannot have two edge-disjoint spanning trees. If G has two edge-disjoint spanning trees, player Two should win. To see this, suppose that Two knows two edge-disjoint spanning trees T1, T2.

One deletes an edge not in one of these trees. Two contracts an edge in T1. Then T2 becomes a con- nected spanning subgraph with exactly one cycle, so Two restores its second tree by leaving out one edge on the unique cycle. Again Two has two edge-disjoint spanning trees.

One deletes edge e from T1. Now T1 −e has exactly two components, and because T2 remains connected, 0 0 there must be an edge e ∈ T2 that connects the two components. Two contracts e after which T1 and T2 are again edge-disjoint spanning trees.

One deletes edge e from T2. This is symmetric to the case just given. Eventually, Two must contract edges to reduce to a single vertex. On the other hand, if there is a partition P with r classes for which ε(P ) < 2r − 2, One should win. To see this, One keeps such a partition. Then One deletes an edge between two classes of P . If Two contracts an edge not between classes of P , then P still has r classes and ε(P ) < 2r − 2. If Two contracts an edge between two classes, only two classes merge and there remain r −1 classes, but two edges between classes have been lost (one deleted, one contracted) so fewer than 2(r − 1) − 2 remain between classes. Eventually, One must delete edges to separate G. A theorem of Tutte (W. T. Tutte, On the problem of decomposing a graph into n connected factors, J. London Math. Soc. 36 (1961), 221–230) and Nash-Williams (C. St. J. A. Nash-Williams, Edge-disjoint spanning trees of finite graphs, J. London Math. Soc. 36 (1961), 445–450) – not proved here – says that either G contains two edge-disjoint spanning trees, or there is a partition P with r classes for which ε(P ) < 2r − 2. Hence Repair is in NP (the certificate is the two spanning trees), and Repair is in coNP (the certificate is the partition). This is enough to make us suspect that Repair is not likely to be PSPACE-complete, because it is in NP ∩ coNP . In fact, Repair is in P ; a method exists that produces, in polynomial time, either the disjoint trees or the partition. But we do not explore this here.

3 (5)

We will show that the poly time reduction of 3CNF SAT to CLIQUE that we saw in the class can be done in log space. Let φ be a Boolean formula in 3CNF, with n variables and k clauses. We will produce a graph G with 3k vertices corresponding to the 3k literals in φ. We will name the vertices by the triple (i, j, c), where 1 ≤ i ≤ k, 1 ≤ j ≤ n, and c ∈ {0, 1}. The triple (i, j, 0) appears in the graph if the ith clause contains the variable xj. Similarly, the triple (i, j, 1) appears in the graph if the ith clause contains the variable xj. So we can scan φ and determine the names of the vertices in log k + log n + 1 space. There is no edge between (i, j, c) and (m, n, d) under two circumstances – if i = m or if i 6= m but j = n and c 6= d. Otherwise there is an edge. Again all the comparisons required for determining whether there is an edge between two vertices can be done in 2(log k + log n + 1) space. So the reduction can be done in log space.

4