
Computational Complexity; slides 8, HT 2021 PSPACE-completeness and Quantified Boolean Formulae Prof. Paul W. Goldberg (Dept. of Computer Science, University of Oxford) HT 2021 Paul Goldberg PSPACE-completeness and QBFs 1 / 15 Easy theorem: P1 ≤p P2. To reduce P1 to P2, p(jwj) (hM; wi; p) 7! hM; w i where denotes the blank symbol. That is, we can \pad" the original input to give ourselves more space. From polynomial space to linear space recall PSPACE... Generic PSPACE-complete problem P1 Input: hM; wi, a polynomial p Question: Does M accept w in space O(p(jwj))? Linear space version P2: Input: hM; wi Question: Does M accept w in space O(jwj)? Paul Goldberg PSPACE-completeness and QBFs 2 / 15 From polynomial space to linear space recall PSPACE... Generic PSPACE-complete problem P1 Input: hM; wi, a polynomial p Question: Does M accept w in space O(p(jwj))? Linear space version P2: Input: hM; wi Question: Does M accept w in space O(jwj)? Easy theorem: P1 ≤p P2. To reduce P1 to P2, p(jwj) (hM; wi; p) 7! hM; w i where denotes the blank symbol. That is, we can \pad" the original input to give ourselves more space. Paul Goldberg PSPACE-completeness and QBFs 2 / 15 Savitch's Theorem: PSPACE=NPSPACE Let M be an NPSPACE TM of interest; want to know whether M can accept w within 2p(n) steps. Proof idea: predicate reachable(C; C 0; i), satisfied by configurations C; C 0 and integer i, provided C 0 is reachable from C within2 i transitions (w.r.t M). Note: reachable(C; C 0; i) is satisfied provided there exists C 00 such that reachable(C; C 00; i − 1) and reachable(C 00; C 0; i − 1) 00 To check reachable(Cinit ; Caccept ; p(n)), try for all configs C : 00 00 reachable(Cinit ; C ; p(n) − 1) and reachable(C ; Caccept ; p(n) − 1) Which themselves are checked recursively. Depth of recursion is p(n), need to remember at most p(n) configs at any time. We may assume Caccept is unique. Paul Goldberg PSPACE-completeness and QBFs 3 / 15 Savitch's Theorem More generally: Theorem. (Savitch 1970) For all (space-constructible) S : N ! N such that S(n) ≥ log n, NSPACE(S(n)) ⊆ DSPACE(S(n)2). In particular: PSPACE = NPSPACE EXPSPACE = NEXPSPACE Paul Goldberg PSPACE-completeness and QBFs 4 / 15 A PSPACE-complete problem: QBF c.f. Cook's theorem. A more general kind of logic problem characterises PSPACE https://en.wikipedia.org/wiki/True_quantified_Boolean_formula A Quantified Boolean Formula is a formula of the form Q1X1 ::: QnXn'(X1;:::; Xn) where the Qi are quantifiers 9 or 8 ' is a CNF formula in the variables X1;:::; Xn and atoms0 and1 Example 9X18X29X38X48X5 (X1 _ 0 _:X5) ^ (:X2 _ 1 _:X5) ^ (X2 _ X3 _ X4) Paul Goldberg PSPACE-completeness and QBFs 5 / 15 Quantified Boolean Formulae Consider the following problem: QBF Input: A QBF formula '. Question: Is ' true? Observation: For any propositional formula ': ' is satisfiable if, and only if, 9X1 ::: 9Xn' is true. X1;:::; Xn: Variables occurring in ' Consequence: QBF is NP-hard. Similarly, QBF is also co-NP-hard. Paul Goldberg PSPACE-completeness and QBFs 6 / 15 Space complexity: Algorithm uses O(nm) tape cells. (At depth d of recursion tree, remember d simplified versions of '; can be improved to O(n + m) by remembering ' and d bits...) Theorem: QBF is in PSPACE Proof: Given ' := Q1X1 ::: QnXn , letting m := j j Eval-QBF(') if n = 0 Accept if evaluates to true. Reject otherwise. if ' := 9X 0 0 construct '1 := [X 7! 1] if Eval-QBF('1) evaluates to true, accept. 0 else construct '0 := [X 7! 0] (reuse space in Eval-QBF('1)) return Eval-QBF('0) if ' := 8X 0 0 construct '1 := [X 7! 1] if Eval-QBF('1) evaluates to false, reject. 0 else construct '0 := [X 7! 0] (reuse space in Eval-QBF('1)) return Eval-QBF('0) Paul Goldberg PSPACE-completeness and QBFs 7 / 15 Theorem: QBF is in PSPACE Proof: Given ' := Q1X1 ::: QnXn , letting m := j j Eval-QBF(') if n = 0 Accept if evaluates to true. Reject otherwise. if ' := 9X 0 0 construct '1 := [X 7! 1] if Eval-QBF('1) evaluates to true, accept. 0 else construct '0 := [X 7! 0] (reuse space in Eval-QBF('1)) return Eval-QBF('0) if ' := 8X 0 0 construct '1 := [X 7! 1] if Eval-QBF('1) evaluates to false, reject. 0 else construct '0 := [X 7! 0] (reuse space in Eval-QBF('1)) return Eval-QBF('0) Space complexity: Algorithm uses O(nm) tape cells. (At depth d of recursion tree, remember d simplified versions of '; can be improved to O(n + m) by remembering ' and d bits...) Paul Goldberg PSPACE-completeness and QBFs 7 / 15 Describe configuration( q; p; a1 ::: ap(n)) by a set V := fXq; Yi ; Za;i : q 2 Q; a 2 Γ; 0 ≤ i < p(n)g of variables and the truth assignment β defined as n1 s = q n1 s = p n1 a = ai β(Xs ) := β(Ys ) := β(Za;i ) := 0 s 6= q 0 s 6= p 0 a 6= ai Theorem: QBF is NPSPACE-hard Let L 2 NPSPACE. We show L ≤p QBF. Let M := (Q; Σ; Γ; q0; ∆; Fa; Fr ) be a TM deciding L such that M never uses more than p(n) cells. ∗ For each input w 2 Σ , jwj = n, we construct a formula 'M;w such that M accepts w if, and only if, 'M;w is true. Paul Goldberg PSPACE-completeness and QBFs 8 / 15 Theorem: QBF is NPSPACE-hard Let L 2 NPSPACE. We show L ≤p QBF. Let M := (Q; Σ; Γ; q0; ∆; Fa; Fr ) be a TM deciding L such that M never uses more than p(n) cells. ∗ For each input w 2 Σ , jwj = n, we construct a formula 'M;w such that M accepts w if, and only if, 'M;w is true. Describe configuration( q; p; a1 ::: ap(n)) by a set V := fXq; Yi ; Za;i : q 2 Q; a 2 Γ; 0 ≤ i < p(n)g of variables and the truth assignment β defined as n1 s = q n1 s = p n1 a = ai β(Xs ) := β(Ys ) := β(Za;i ) := 0 s 6= q 0 s 6= p 0 a 6= ai Paul Goldberg PSPACE-completeness and QBFs 8 / 15 NPSPACE-Hardness of QBF Consider the following formula Conf(V) with free variables V := Xq; Yi ; Za;i : q 2 Q; a 2 Γ; 0 ≤ i < p(n) _ ^ _ ^ Conf(V) := Xq ^ :Xq0 ^ Yp ^ :Yp0 ^ q2Q q06=q p≤p(n) p06=p ^ _ ^ Za;i ^ :Zb;i 1≤i≤p(n) a2Γ b6=a2Γ Definition. For any truth assignment β of V define config(V; β) as (q; p; w1 ::: wp(n)): β(Xq) = β(Yp) = β(Zwi ;i ) = 1; 8i ≤ p(n) Lemma If β satisfies Conf(V) then jconfig(V; β)j = 1. Paul Goldberg PSPACE-completeness and QBFs 9 / 15 NPSPACE-hardness of QBF Definition. For an assignment β of V we defined config(V; β) as (q; p; w1 ::: wp(n)): β(Xq) = β(Yp) = β(Zwi ;i ) = 1; 8i ≤ p(n) Lemma If β satisfies Conf(V) then jconfig(V; β)j = 1. Remark. β may be defined on other variables than those in V. config(V; β) is a potential configuration of M, but it might not be reachable from the start configuration of M on input w. Conversely: Every configuration( q; p; w1 ::: wp(n)) induces a satisfying assignment. Paul Goldberg PSPACE-completeness and QBFs 10 / 15 NPSPACE-Hardness of QBF Consider the following formula Next(V; V0) defined as Conf(V) ^ Conf(V0) ^ Nochange(V; V0) ^ Change(V; V0). ^ ^ 0 Nochange := Yp ) (Za;i $ Za;i ) 1≤p≤p(n) i6=p a2Γ ^ Change := (Yp ^ Xq ^ Za;p) ) 1≤p≤p(n) _ 0 0 0 (Xq0 ^ Zb;p ^ Y\p + m") (q;a;q0;b;m)2∆ Lemma For any assignment β defined on V; V0: 0 0 β satisfies Next(V; V ) () config(V; β) `M config(V ; β) Paul Goldberg PSPACE-completeness and QBFs 11 / 15 For i ! i + 1: h i Idea: Pathi+1(V1; V2) := 9V Conf(V) ^ Pathi (V1; V) ^ Pathi (V; V2) i Problem: jPathi j = O(2 ) (Reduction would use exp. time/space) New Idea: Pathi+1(V1; V2) := 9V Conf(V) ^ (Z1 = V1 ^ Z2 = V) 8Z18Z2 _ ! Pathi (Z1; Z2) (Z1 = V ^ Z2 = V2) Lemma For any assignment β defined on V1; V2: If β satisfies Pathi (V1; V2), then i config(V2; β) is reachable from config(V1; β) in ≤ 2 steps. NPSPACE-hardness of QBF Define Pathi (V1; V2): i M starting on config(V1; β) can reach config(V2; β) in ≤ 2 steps. For i = 0: Path0 := V1 = V2 _ Next(V1; V2) Paul Goldberg PSPACE-completeness and QBFs 12 / 15 i Problem: jPathi j = O(2 ) (Reduction would use exp. time/space) New Idea: Pathi+1(V1; V2) := 9V Conf(V) ^ (Z1 = V1 ^ Z2 = V) 8Z18Z2 _ ! Pathi (Z1; Z2) (Z1 = V ^ Z2 = V2) Lemma For any assignment β defined on V1; V2: If β satisfies Pathi (V1; V2), then i config(V2; β) is reachable from config(V1; β) in ≤ 2 steps. NPSPACE-hardness of QBF Define Pathi (V1; V2): i M starting on config(V1; β) can reach config(V2; β) in ≤ 2 steps. For i = 0: Path0 := V1 = V2 _ Next(V1; V2) For i ! i + 1: h i Idea: Pathi+1(V1; V2) := 9V Conf(V) ^ Pathi (V1; V) ^ Pathi (V; V2) Paul Goldberg PSPACE-completeness and QBFs 12 / 15 New Idea: Pathi+1(V1; V2) := 9V Conf(V) ^ (Z1 = V1 ^ Z2 = V) 8Z18Z2 _ ! Pathi (Z1; Z2) (Z1 = V ^ Z2 = V2) Lemma For any assignment β defined on V1; V2: If β satisfies Pathi (V1; V2), then i config(V2; β) is reachable from config(V1; β) in ≤ 2 steps.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages23 Page
-
File Size-