CSE 555: Homework 5

CSE 555: Homework 5

CSE 555: Homework 5 Spring 2015 April 27, 2015 (1) P = coP : Let L 2 P . So there is a deterministic Turing machine M that decides L in polynomial 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¯ 2 P , i.e. L 2 coP . Similarly, for L0 2 coP , we can show that L0 2 P . P SP ACE = NP SP ACE : By Savitch’s theorem. P SP ACE = coP SP ACE : Let L 2 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 2 coP SP ACE , using the same technique L0 2 P SP ACE. coP SP ACE = coNP SP ACE : Let L 2 coP SP ACE. So L¯ 2 P SP ACE ⊆ NP SP ACE. Therefore, L 2 coNP SP ACE. When L0 2 coNP SP ACE, L 2 coSP ACE, by Savitch’s theorem. Based on what we know, it is possible that • P , NP , coNP , and P SP ACE are all distinct so 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 complexity class. We think that there are four. (2) Let us first define the following recursive algorithm, 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 subset P ⊆ V , (a) Make a copy of A called A0. (b) For x 2 P , i. update A0[x] = A0[x] + 1. ii. if A0[x] > k, then accept. (c) Set 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. R =“On input hT; P; Ai, where T is a list of tiles, P is a variable taking values from a binary alphabet fh; bg, 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(nl) space. So R decides PILF in O(n2l) space. We reduce FORMULA-GAME to PILF. The reduction is same as the one for reducing SAT to FLIP in homework 4. If the instance 9x18x2 ::: 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 fOne; T wog, 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 computational complexity, but does not show that the problem is hard. In particular, just because this “looks like” some PSPACE-complete 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 = fV1;V2;:::;Vrg of the vertices in V , let "(P ) = jfe 2 E : e = fx; yg; x 2 Vi; y 2 Vj; i 6= jgj. (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 2 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.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    4 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us