bu cs 332 ofusing idea of savitch’s theorem, replace Æ, êwith a quantified formula of...

25
BU CS 332 – Theory of Computation Lecture 23: Savitch’s Theorem PSPACECompleteness Unconditional Hardness Course Evaluations Reading: Sipser Ch 8.18.3, 9.1 Mark Bun April 27, 2020

Upload: others

Post on 17-Mar-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

BU CS 332 – Theory of Computation

Lecture 23:• Savitch’s Theorem• PSPACE‐Completeness• Unconditional Hardness• Course Evaluations

Reading:Sipser Ch 8.1‐8.3, 9.1

Mark BunApril 27, 2020

Page 2: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Space analysisSpace complexity of a TM (algorithm) = maximum number of tape cell it uses on a worst‐case input

Formally: Let  . A TM  runs in space  if on every input  ∗,  halts on  using at most  cells

For nondeterministic machines:   Let  . An NTMruns in space  if on every input  ∗,  halts on 

using at most  cells on every computational branch

4/27/2020 CS332 ‐ Theory of Computation 2

Page 3: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Space complexity classes

Let 

A language  if there exists a basic single‐tape (deterministic) TM  that 1) Decides  , and2) Runs in space 

A language  if there exists a single‐tape nondeterministic TM  that 1) Decides  , and2) Runs in space 

4/27/2020 CS332 ‐ Theory of Computation 3

Page 4: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Savitch’s Theorem

4/27/2020 CS332 ‐ Theory of Computation 4

Page 5: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Savitch’s Theorem: Deterministic vs. Nondeterministic SpaceTheorem: Let be a function with  . Then 

Proof idea:• Let  be an NTM deciding in space 

• We construct a TM  deciding  in space

• Actually solve a more general problem:• Given configurations  of  and natural number  ,            decide whether  can go from  to  in  steps                  on some nondeterministic path.• Design procedure CANYIELD

4/27/2020 CS332 ‐ Theory of Computation 5

Page 6: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Savitch’s TheoremTheorem: Let be a function with  . Then 

Proof idea:• Let  be an NTM deciding in space 

= “On input  :1. Output the result of CANYIELD ”

where CANYIELD decides whether  can go from configuration  to  in  steps on some nondeterministic path

4/27/2020 CS332 ‐ Theory of Computation 6

Page 7: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Savitch’s TheoremCANYIELD decides whether  can go from configuration 

to  in  steps on some nondeterministic path:

CANYIELD = 1. If  accept if  or  yields  in one transition. 

Else, reject.2. If  then for each config of  with  cells: 3. Run CANYIELD( ).4. Run CANYIELD( ).5. If both runs accept, accept6. Reject.

4/27/2020 CS332 ‐ Theory of Computation 7

Page 8: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Complexity class 

Definition:  is the class of languages decidable in polynomial space on a basic single‐tape (deterministic) TM

Definition:  is the class of languages decidable in polynomial space on a single‐tape (nondeterministic) TM

4/27/2020 CS332 ‐ Theory of Computation 8

Page 9: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Relationships between complexity classes

4/27/2020 CS332 ‐ Theory of Computation 9

since

(Monday)Which containmentsin (1) are proper?Unknown!

PSPACE=NPSPACE

EXP

PNP

Page 10: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

PSPACE‐Completeness

4/27/2020 CS332 ‐ Theory of Computation 10

Page 11: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

What happens in a world where  ?

Even more believable than  , but still(!) very far from proving it

Question: What would  allow us to conclude about problems we care about?

PSPACE‐completeness: Find the “hardest” problems in PSPACEFind  such that  iff

4/27/2020 CS332 ‐ Theory of Computation 11

Page 12: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Reminder: NP‐completenessDefinition: A language  is NP‐complete if

1)  and2) Every language  is poly‐time reducible to 

, i.e.,  (“ is NP‐hard”)

4/27/2020 CS332 ‐ Theory of Computation 12

Page 13: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

PSPACE‐completenessDefinition: A language  is PSPACE‐complete if

1)  and2) Every language  is poly‐time reducible to 

, i.e.,  (“ is PSPACE‐hard”)

4/27/2020 CS332 ‐ Theory of Computation 13

Page 14: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

A PSPACE‐complete problem: TQBF“Is a fully quantified logical formula  ?”• Boolean variable: Variable that can take on the value 

/ (encoded as 0/1)• Boolean operations: • Boolean formula: Expression made of Boolean variables and operations. Ex:• Fully quantified Boolean formula: Boolean formula with all variables quantified ( ) Ex:• Every fully quantified Boolean formula is either true or false

4/27/2020 CS332 ‐ Theory of Computation 14

Page 15: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Theorem: TQBF is PSPACE‐completeNeed to prove two things…  

1)

2) Every problem in  is poly‐time reducible to ( is PSPACE‐hard)

4/27/2020 CS332 ‐ Theory of Computation 15

Page 16: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

1) TQBF is in PSPACE

4/27/2020 CS332 ‐ Theory of Computation 16

• If  is the input length,  uses space 

𝑇 “On input  , where is a fully quantified Boolean formula:

1. If  has no quantifiers, it has only constants (and no variables). Evaluate  .If true, accept; else, reject.

2. If is of the form  , recursively call on  with  and then on  with  .

If either call accepts, accept; else, reject.3. If  is of the form  , recursively call 

on  with  and then on  with  .If both calls accept, accept; else, reject.’’

Page 17: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

2) TQBF is PSPACE‐hardTheorem: Every language  is poly‐time reducible toProof idea:Let  be decided by a poly‐space deterministic TM  . Using proof of Cook‐Levin Theorem,

accepts input  formula  , is true

Using idea of Savitch’s Theorem, replace  , with a quantified formula of poly‐size that can be computed in poly‐time

4/27/2020 CS332 ‐ Theory of Computation 17

Page 18: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Unconditional Hardness

4/27/2020 CS332 ‐ Theory of Computation 18

Page 19: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Hardness results so far• If , then 

• If , then 

Question: Are there decidable languages that we can show are not in  ?

4/27/2020 CS332 ‐ Theory of Computation 19

Page 20: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Diagonalization redux

4/27/2020 CS332 ‐ Theory of Computation 20

TM 𝑀

𝑀

𝑀

𝑀

𝑀

Page 21: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Diagonalization redux

4/27/2020 CS332 ‐ Theory of Computation 21

TM 𝑀 𝑀 𝑀 ? 𝑀 𝑀 ? 𝑀 𝑀 ? 𝑀 𝑀 ?

𝑀 Y N Y Y𝑀 N N Y Y𝑀 Y Y Y N𝑀 N N Y N

,| |

𝐷 𝐷 ?

𝐷

Page 22: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

An explicit undecidable language• Theorem: ,

| |

is in  , but not in Proof:• In  : Simulate  on input  for  | | steps and flip its decision• Not in  : Suppose for contradiction that  decides in time 

4/27/2020 CS332 ‐ Theory of Computation 22

Page 23: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Time and space hierarchy theorems• For any* function  a language exists that is decidable in  time, but not in  time. 

• For any* function  a language exists that is decidable in  space, but not in  space. 

*time constructible and space constructible, respectively

4/27/2020 CS332 ‐ Theory of Computation 23

Page 24: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

4/27/2020 CS332 ‐ Theory of Computation 24

recognizable

PSPACE=NPSPACE

EXPSPACE

EXPTIME

decidable

PCFLregular

NP coNP

Page 25: BU CS 332 ofUsing idea of Savitch’s Theorem, replace Æ, êwith a quantified formula of poly‐size that can be computed in poly‐time 4/27/2020 CS332 ‐Theory of Computation 17

Course evaluations

https://bu.campuslabs.com/courseeval

4/27/2020 CS332 ‐ Theory of Computation 25