Limits of Computation: Homework 8 solutions - …cs.brown.edu/courses/gs019/asgn/hw8.sol.pdf ·...

3

Click here to load reader

Transcript of Limits of Computation: Homework 8 solutions - …cs.brown.edu/courses/gs019/asgn/hw8.sol.pdf ·...

Page 1: Limits of Computation: Homework 8 solutions - …cs.brown.edu/courses/gs019/asgn/hw8.sol.pdf · Limits of Computation: Homework 8 solutions Kevin Matulef April 4, 2001 Problem 10.12

Limits of Computation: Homework 8 solutions

Kevin Matulef

April 4, 2001

Problem 10.12

Show that if P=NP, then P=PH.

• First, if P=NP, then since P is closed under complement, clearly P=CoNP.Written succinctly, P= Σ1P= Π1P.

• We show by induction that if P= ΣiP= ΠiP, then P= Σi+1P= Πi+1P

– Consider a Σi+1P machine M, which consists of a run of existentialbranchings followed by a run of universal branchings, then existentialbranchings, etc.

– Consider the subtrees of the computation path whose roots are thefirst universal step along the path. For each such subtree, M is per-forming a Πi computation. By hypothesis, ΠiP=P. Thus, we canreplace each of these computation subtrees by a deterministic (nonbranching) polynomial time computation to form a new machine S.

– If we let a(n) be the maximum number of steps taken by the alter-nating machine before the universal branches start, and p(n) be themaximum number of steps taken by any of the determistic P machineswhich we’ve substituted for the Πi computations, then the runningtime of S is bounded by a(n) + p(a(n)). Note that the p(a(n)) termis a composition of functions, because the P subprocedures are com-puting with inputs that may be longer than n (but must be smallerthan or equal to a(n), since only a(n) steps have been executed atthe time the subprocedures are used).

– Since a and p are both polynomials, so is their composition. There-fore, S is in NP. By hypothesis P=NP, so S is in P as well.

– A similar argument can be used to reduce a Πi+1P machine to aCoNP machine (given the hypothesis that P= ΣiP), thus putting itin P as well, completing the collapse of the hierarchy.

1

Page 2: Limits of Computation: Homework 8 solutions - …cs.brown.edu/courses/gs019/asgn/hw8.sol.pdf · Limits of Computation: Homework 8 solutions Kevin Matulef April 4, 2001 Problem 10.12

Problem 10.14

Show that NPSAT = Σ2P

1. First, we show that Σ2P ⊆NPSAT .

• Suppose a language L is decided by a Σ2 alternating Turing machineM. Then that Turing machine performs some number of existentialbranchings, followed by some number of universal branchings.

• Consider the subtrees of the computation path whose roots are thefirst universal step along the path. For each such subtree, M is (bydefinition) performing a Π1 computation. Thus, it is deciding a lan-guage in Co-NP (Note: it may possibly be a different language foreach subtree, but it does not matter).

• Now consider a nondeterministic machine S that behaves just as Mdoes, but replaces each of the computation subtrees discussed abovewith a deterministic computation by a machine in PSAT (this is fea-sible because Co-NP ⊆PSAT ). Note that this machine only containsone run of existential branches, each extended with a deterministiccomputation that uses a SAT oracle and runs in polynomial time.

• If we let a(n) be the maximum number of steps taken by the al-ternating machine before the universal branches start, and p(n) bethe maximum number of steps taken by any of the PSAT machineswhich we’ve substituted for the universal branchings, then the run-ning time of S is bounded by a(n) + p(a(n)). Note that the p(a(n))term is a compososition of functions, because the PSAT subproce-dures are computing with inputs that may be longer than n (butmust be smaller than or equal to a(n), since only a(n) steps havebeen executed at the time the subprocedures are used).

• Since a and p are both polynomials, so is their composition. There-fore, S is in NPSAT .

2. Next, we show that NPSAT ⊆ Σ2P.

• Suppose a language L is decided by an NP machine M with a SAToracle.

• Consider the following modication of M. At each step of M’s compu-tation that depends on the result of an oracle query, replace the stepwith a nondeterministic “split” that guesses the answer to the query.Each branch of the “split” also writes down the queried formula andanswer obtained. Thus, at every “leaf” node of the computation tree(whenever the computation terminates), the tape contains a recordof all queries and answers which lead to that leaf. Finally, in order topreserve the proper accepting behavior of M, we replace each accept-ing “leaf” of M with a computation that checks that all the oraclequeries were accurately answered.

2

Page 3: Limits of Computation: Homework 8 solutions - …cs.brown.edu/courses/gs019/asgn/hw8.sol.pdf · Limits of Computation: Homework 8 solutions Kevin Matulef April 4, 2001 Problem 10.12

• This last computation can be done purely with a run of existen-tial branches followed by a run of universal branches. First, all thepositively answered queries are checked by running an NP machinethat decides SAT. Second, all of the negatively answered queries arechecked by running a Co-NP machine that decides UNSAT.

• Finally, we check that the machine we have produced is indeed inΣ2P. Clearly, the steps have been ordered so that all of the existen-tial branches preceed all of the universal branches. We just need tocheck that the maximum branch length is polynomial with respect tothe input. There are at most a polynoimal number of oracle queries,and replacing each of them with a branch that writes the formulaand query result only lengthens the branch by a polynomial amount.Thus the total branch lengthening caused by this replacement is onlya polynomial times a polynomial. Since the “checking” step at theend is performed by a polynomial number of applications of NP andCo-NP machines (each run on a formula that is at most polynomiallylarger than the original input), the total time taken for this “check-ing” step is polynomial as well. Therefore, the machine is in Σ2P.

3