Computational Complexity Lecture 5 in which we relate space and - - PowerPoint PPT Presentation

computational complexity
SMART_READER_LITE
LIVE PREVIEW

Computational Complexity Lecture 5 in which we relate space and - - PowerPoint PPT Presentation

Computational Complexity Lecture 5 in which we relate space and time, and see the essence of PSPACE (TQBF) 1 SPACE and TIME 2 SPACE and TIME NTIME(F) DTIME(F) 2 SPACE and TIME NTIME(F) DTIME(F) 2 SPACE and TIME NTIME(2 O(F) ) DTIME(2


slide-1
SLIDE 1

Computational Complexity

Lecture 5 in which we relate space and time, and see the essence of PSPACE (TQBF)

1

slide-2
SLIDE 2

SPACE and TIME

2

slide-3
SLIDE 3

SPACE and TIME

DTIME(F) NTIME(F)

2

slide-4
SLIDE 4

SPACE and TIME

DTIME(F) NTIME(F)

2

slide-5
SLIDE 5

SPACE and TIME

DTIME(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

2

slide-6
SLIDE 6

SPACE and TIME

DTIME(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

2

slide-7
SLIDE 7

SPACE and TIME

DTIME(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

2

slide-8
SLIDE 8

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

2

slide-9
SLIDE 9

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

2

slide-10
SLIDE 10

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

F=!(n) F=!(log n)

2

slide-11
SLIDE 11

SPACE and TIME

3

slide-12
SLIDE 12

SPACE and TIME

In time T(n), can use at most T(n) space

3

slide-13
SLIDE 13

SPACE and TIME

In time T(n), can use at most T(n) space DTIME(T) ⊆ DSPACE(T)

3

slide-14
SLIDE 14

SPACE and TIME

In time T(n), can use at most T(n) space DTIME(T) ⊆ DSPACE(T) In fact, NTIME(T) ⊆ DSPACE(O(T)) (try all certificates of length at most T, one after the other)

3

slide-15
SLIDE 15

SPACE and TIME

In time T(n), can use at most T(n) space DTIME(T) ⊆ DSPACE(T) In fact, NTIME(T) ⊆ DSPACE(O(T)) (try all certificates of length at most T, one after the other) With space S(n), only 2O(S(n)) configurations (for S(n) = !(log n)). So can take at most 2O(S(n)) time (else gets into an infinite loop)

3

slide-16
SLIDE 16

SPACE and TIME

In time T(n), can use at most T(n) space DTIME(T) ⊆ DSPACE(T) In fact, NTIME(T) ⊆ DSPACE(O(T)) (try all certificates of length at most T, one after the other) With space S(n), only 2O(S(n)) configurations (for S(n) = !(log n)). So can take at most 2O(S(n)) time (else gets into an infinite loop) DSPACE(S) ⊆ DTIME(2O(S))

3

slide-17
SLIDE 17

SPACE and TIME

In time T(n), can use at most T(n) space DTIME(T) ⊆ DSPACE(T) In fact, NTIME(T) ⊆ DSPACE(O(T)) (try all certificates of length at most T, one after the other) With space S(n), only 2O(S(n)) configurations (for S(n) = !(log n)). So can take at most 2O(S(n)) time (else gets into an infinite loop) DSPACE(S) ⊆ DTIME(2O(S)) In fact, NSPACE(S) ⊆ DTIME(2O(S))

3

slide-18
SLIDE 18

NSPACE(S) ⊆ DTIME(2O(S))

4

slide-19
SLIDE 19

NSPACE(S) ⊆ DTIME(2O(S))

h=2(O(S))

4

slide-20
SLIDE 20

NSPACE(S) ⊆ DTIME(2O(S))

Configuration graph as a DAG is of size 2O(S)

h=2(O(S))

4

slide-21
SLIDE 21

NSPACE(S) ⊆ DTIME(2O(S))

Configuration graph as a DAG is of size 2O(S) Write down all configurations and edges

h=2(O(S))

4

slide-22
SLIDE 22

NSPACE(S) ⊆ DTIME(2O(S))

Configuration graph as a DAG is of size 2O(S) Write down all configurations and edges Can do it less explicitly if space were a concern (but it’ s not, here)

h=2(O(S))

4

slide-23
SLIDE 23

NSPACE(S) ⊆ DTIME(2O(S))

Configuration graph as a DAG is of size 2O(S) Write down all configurations and edges Can do it less explicitly if space were a concern (but it’ s not, here) Run (in poly time) any reachability algorithm (say, breadth-first search) to see if there is a (directed) path from start config. to an accept config.

h=2(O(S))

4

slide-24
SLIDE 24

NSPACE(S) ⊆ DTIME(2O(S))

Configuration graph as a DAG is of size 2O(S) Write down all configurations and edges Can do it less explicitly if space were a concern (but it’ s not, here) Run (in poly time) any reachability algorithm (say, breadth-first search) to see if there is a (directed) path from start config. to an accept config. poly(2O(S)) = 2O(S)

h=2(O(S))

4

slide-25
SLIDE 25

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

F=!(n) F=!(log n)

5

slide-26
SLIDE 26

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

F=!(n) F=!(log n)

5

slide-27
SLIDE 27

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

F=!(n) F=!(log n)

5

slide-28
SLIDE 28

NSPACE and DSPACE: Savitch’ s Theorem

6

slide-29
SLIDE 29

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2)

6

slide-30
SLIDE 30

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2)

h=2(O(S))

6

slide-31
SLIDE 31

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2) Naive DFS (or BFS) has stack depth h=2(O(S))

h=2(O(S))

6

slide-32
SLIDE 32

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2) Naive DFS (or BFS) has stack depth h=2(O(S)) Look for C s.t. Start!C in h/2 steps and C!Accept in h/2 steps

h=2(O(S))

6

slide-33
SLIDE 33

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2) Naive DFS (or BFS) has stack depth h=2(O(S)) Look for C s.t. Start!C in h/2 steps and C!Accept in h/2 steps Recursively! Depth of recursion only log h; at each level remember one configuration

h=2(O(S))

6

slide-34
SLIDE 34

NSPACE and DSPACE: Savitch’ s Theorem

NSPACE(S) ⊆ DSPACE(S2) Naive DFS (or BFS) has stack depth h=2(O(S)) Look for C s.t. Start!C in h/2 steps and C!Accept in h/2 steps Recursively! Depth of recursion only log h; at each level remember one configuration Space needed = O(log h)*O(S) = O(S2)

h=2(O(S))

6

slide-35
SLIDE 35

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F))

F=!(n) F=!(log n)

7

slide-36
SLIDE 36

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F)) DSPACE(F2)

F=!(n) F=!(log n)

7

slide-37
SLIDE 37

SPACE and TIME

DTIME(F) DSPACE(F) NSPACE(F) DTIME(2O(F)) NTIME(F) NTIME(2O(F)) DSPACE(F2)

F=!(n) F=!(log n)

7

slide-38
SLIDE 38

Zoo, so far

8

slide-39
SLIDE 39

Zoo, so far

Major classes of interest (so far):

8

slide-40
SLIDE 40

Zoo, so far

Major classes of interest (so far): P, EXP; NP, NEXP; L, NL; PSPACE, NPSPACE

8

slide-41
SLIDE 41

Zoo, so far

P

PSPACE

EXP NP NEXP L NL

NPSPACE

Major classes of interest (so far): P, EXP; NP, NEXP; L, NL; PSPACE, NPSPACE

8

slide-42
SLIDE 42

Zoo, so far

P

PSPACE

EXP NP NEXP L NL

NPSPACE

Major classes of interest (so far): P, EXP; NP, NEXP; L, NL; PSPACE, NPSPACE PSPACE = NPSPACE (by Savitch)

8

slide-43
SLIDE 43

Zoo, so far

P

PSPACE

EXP NP NEXP L NL

NPSPACE

Major classes of interest (so far): P, EXP; NP, NEXP; L, NL; PSPACE, NPSPACE PSPACE = NPSPACE (by Savitch) Coming up: PSPACE-completeness

8

slide-44
SLIDE 44

PSPACE completeness

9

slide-45
SLIDE 45

PSPACE completeness

A language L is PSPACE-Complete if for all L ’ in PSPACE, L ’ !p L and L in PSPACE

9

slide-46
SLIDE 46

PSPACE completeness

A language L is PSPACE-Complete if for all L ’ in PSPACE, L ’ !p L and L in PSPACE Trivial PSPACE-complete problem: SPACETM = { (M,z,1n) | TM M accepts z within space n }

9

slide-47
SLIDE 47

PSPACE completeness

A language L is PSPACE-Complete if for all L ’ in PSPACE, L ’ !p L and L in PSPACE Trivial PSPACE-complete problem: SPACETM = { (M,z,1n) | TM M accepts z within space n } (An) essence of PSPACE: Understanding 2-player games

9

slide-48
SLIDE 48

PSPACE completeness

A language L is PSPACE-Complete if for all L ’ in PSPACE, L ’ !p L and L in PSPACE Trivial PSPACE-complete problem: SPACETM = { (M,z,1n) | TM M accepts z within space n } (An) essence of PSPACE: Understanding 2-player games Can the first/second player always win?

9

slide-49
SLIDE 49

QBF Game

10

slide-50
SLIDE 50

QBF Game

Two players: Alice and Adversary, each given n (mutually disjoint) sets of variables (sets numbered [1,n])

10

slide-51
SLIDE 51

QBF Game

Two players: Alice and Adversary, each given n (mutually disjoint) sets of variables (sets numbered [1,n]) Given a boolean formula over these variables

10

slide-52
SLIDE 52

QBF Game

Two players: Alice and Adversary, each given n (mutually disjoint) sets of variables (sets numbered [1,n]) Given a boolean formula over these variables In ith round players set the values of the variables in their ith sets. Say Alice moves first.

10

slide-53
SLIDE 53

QBF Game

Two players: Alice and Adversary, each given n (mutually disjoint) sets of variables (sets numbered [1,n]) Given a boolean formula over these variables In ith round players set the values of the variables in their ith sets. Say Alice moves first. When all variables set, formula evaluated. If true Alice wins, else adversary wins

10

slide-54
SLIDE 54

QBF Game

Two players: Alice and Adversary, each given n (mutually disjoint) sets of variables (sets numbered [1,n]) Given a boolean formula over these variables In ith round players set the values of the variables in their ith sets. Say Alice moves first. When all variables set, formula evaluated. If true Alice wins, else adversary wins Given a QBF game does Alice have a sure-to-win strategy

10

slide-55
SLIDE 55

QBF game: examples

11

slide-56
SLIDE 56

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3)

11

slide-57
SLIDE 57

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1

11

slide-58
SLIDE 58

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true?

11

slide-59
SLIDE 59

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1

11

slide-60
SLIDE 60

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true?

11

slide-61
SLIDE 61

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true? Say only x1, y1 (now, that’ s more like a game):

11

slide-62
SLIDE 62

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true? Say only x1, y1 (now, that’ s more like a game): Strategy for Alice? Is “∃x1 ∀y1 φ(x1,y1 )” true?

11

slide-63
SLIDE 63

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true? Say only x1, y1 (now, that’ s more like a game): Strategy for Alice? Is “∃x1 ∀y1 φ(x1,y1 )” true? In general, winning strategy for Alice exists iff

11

slide-64
SLIDE 64

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true? Say only x1, y1 (now, that’ s more like a game): Strategy for Alice? Is “∃x1 ∀y1 φ(x1,y1 )” true? In general, winning strategy for Alice exists iff ∃x1 ∀y1 ... ∃xn ∀yn φ(x1,y1,...,xn,yn ) is true

11

slide-65
SLIDE 65

QBF game: examples

Vars: x1, y1, x2, y2, x3, y3. Formula: φ(x1,y1,x2,y1,x3,y3) Say, no variables for Adversary. Only x1 Strategy for Alice? Is “∃x1 φ(x1 )” true? Say, no variables for Alice. Only y1 “Strategy” for Alice? Is “∀y1 φ(y1)” true? Say only x1, y1 (now, that’ s more like a game): Strategy for Alice? Is “∃x1 ∀y1 φ(x1,y1 )” true? In general, winning strategy for Alice exists iff ∃x1 ∀y1 ... ∃xn ∀yn φ(x1,y1,...,xn,yn ) is true Else adversary has a winning strategy

11

slide-66
SLIDE 66

TQBF , the language

12

slide-67
SLIDE 67

TQBF , the language

True Quantified Boolean Formula:

12

slide-68
SLIDE 68

TQBF , the language

True Quantified Boolean Formula: ψ := ∃x1 ∀y1 ... ∃xn ∀yn φ(x1,y1,...,xn,yn )

12

slide-69
SLIDE 69

TQBF , the language

True Quantified Boolean Formula: ψ := ∃x1 ∀y1 ... ∃xn ∀yn φ(x1,y1,...,xn,yn ) TQBF = {ψ | ψ is true}

12

slide-70
SLIDE 70

TQBF , the language

True Quantified Boolean Formula: ψ := ∃x1 ∀y1 ... ∃xn ∀yn φ(x1,y1,...,xn,yn ) TQBF = {ψ | ψ is true} e.g. ψ1: ∃x∀y (x=y), ψ2: ∀y∃x (x=y)

12

slide-71
SLIDE 71

TQBF is in PSPACE

13

slide-72
SLIDE 72

TQBF is in PSPACE

When is a QBF true?

13

slide-73
SLIDE 73

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c)

13

slide-74
SLIDE 74

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Game-Tree

13

slide-75
SLIDE 75

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

13

slide-76
SLIDE 76

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

Winning strategy for Alice if game gets here?

13

slide-77
SLIDE 77

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Ask if winning strategy from each node ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

Winning strategy for Alice if game gets here?

13

slide-78
SLIDE 78

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Ask if winning strategy from each node Yes from ∃ node if yes from either child. Yes from ∀ node if yes from both. ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

Winning strategy for Alice if game gets here?

13

slide-79
SLIDE 79

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Ask if winning strategy from each node Yes from ∃ node if yes from either child. Yes from ∀ node if yes from both. Naive evaluation takes exponential space (and time) ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

Winning strategy for Alice if game gets here?

13

slide-80
SLIDE 80

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Ask if winning strategy from each node Yes from ∃ node if yes from either child. Yes from ∀ node if yes from both. Naive evaluation takes exponential space (and time) Can reuse left child computation space for the right child ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Game-Tree

Winning strategy for Alice if game gets here?

13

slide-81
SLIDE 81

TQBF is in PSPACE

When is a QBF true? e.g. ∃a,b ∀c φ(a,b,c) Ask if winning strategy from each node Yes from ∃ node if yes from either child. Yes from ∀ node if yes from both. Naive evaluation takes exponential space (and time) Can reuse left child computation space for the right child ∃a ∃b ∀c ∃b

φ(0,0,0) φ(0,0,1)

Space needed = O(depth) + for evaluation = poly(|QBF|) Game-Tree

Winning strategy for Alice if game gets here?

13

slide-82
SLIDE 82

TQBF is PSPACE-hard

14

slide-83
SLIDE 83

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF

14

slide-84
SLIDE 84

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF Given x, output f(x) = ψ, s.t. ψ is true iff ML accepts x

14

slide-85
SLIDE 85

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF Given x, output f(x) = ψ, s.t. ψ is true iff ML accepts x x→ψ in poly time. In particular size of ψ is poly(n)

14

slide-86
SLIDE 86

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF Given x, output f(x) = ψ, s.t. ψ is true iff ML accepts x x→ψ in poly time. In particular size of ψ is poly(n) Note: As in Cook’ s theorem, can build an unquantified formula φ (even 3CNF) s.t. φ is true iff ML accepts x

14

slide-87
SLIDE 87

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF Given x, output f(x) = ψ, s.t. ψ is true iff ML accepts x x→ψ in poly time. In particular size of ψ is poly(n) Note: As in Cook’ s theorem, can build an unquantified formula φ (even 3CNF) s.t. φ is true iff ML accepts x But size is poly(time bound on ML) = exp(n)

14

slide-88
SLIDE 88

TQBF is PSPACE-hard

For L in PSPACE (i.e., TM ML decides L in space poly(n), or with configs of size S(n)=poly(n) ), show L !p TQBF Given x, output f(x) = ψ, s.t. ψ is true iff ML accepts x x→ψ in poly time. In particular size of ψ is poly(n) Note: As in Cook’ s theorem, can build an unquantified formula φ (even 3CNF) s.t. φ is true iff ML accepts x But size is poly(time bound on ML) = exp(n) Use power of quantification to write it succinctly

14

slide-89
SLIDE 89

TQBF is PSPACE-hard

15

slide-90
SLIDE 90

TQBF is PSPACE-hard

An exponential QBF:

15

slide-91
SLIDE 91

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept)

15

slide-92
SLIDE 92

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept) Here Ci are variables whose value assignments correspond to configurations. |Ci| = O(S(n)), |ψ0(C,C’)| = O(S(n)), T=2O(S(n))

15

slide-93
SLIDE 93

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept) Here Ci are variables whose value assignments correspond to configurations. |Ci| = O(S(n)), |ψ0(C,C’)| = O(S(n)), T=2O(S(n)) ψ0(C,C’) is an unquantified formula (only variables being C,C’), s.t. it is true iff C evolves into C’ in one step

15

slide-94
SLIDE 94

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept) Here Ci are variables whose value assignments correspond to configurations. |Ci| = O(S(n)), |ψ0(C,C’)| = O(S(n)), T=2O(S(n)) ψ0(C,C’) is an unquantified formula (only variables being C,C’), s.t. it is true iff C evolves into C’ in one step F be the (const. sized) formula to derive each bit of new config from a few bits in the previous config

15

slide-95
SLIDE 95

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept) Here Ci are variables whose value assignments correspond to configurations. |Ci| = O(S(n)), |ψ0(C,C’)| = O(S(n)), T=2O(S(n)) ψ0(C,C’) is an unquantified formula (only variables being C,C’), s.t. it is true iff C evolves into C’ in one step F be the (const. sized) formula to derive each bit of new config from a few bits in the previous config Then, ψ0(C,C’) is ∧j(C’(j) = F(C(j-c),...,C(j+c)))

15

slide-96
SLIDE 96

TQBF is PSPACE-hard

An exponential QBF: ∃ C1 C2 ... CT ψ0(Cstart,C1) ∧ ψ0(C1,C2) ∧ ... ψ0(CT,Caccept) Here Ci are variables whose value assignments correspond to configurations. |Ci| = O(S(n)), |ψ0(C,C’)| = O(S(n)), T=2O(S(n)) ψ0(C,C’) is an unquantified formula (only variables being C,C’), s.t. it is true iff C evolves into C’ in one step F be the (const. sized) formula to derive each bit of new config from a few bits in the previous config Then, ψ0(C,C’) is ∧j(C’(j) = F(C(j-c),...,C(j+c))) |ψ0(C,C’)| = O(|C|)

15

slide-97
SLIDE 97

TQBF is PSPACE-hard

16

slide-98
SLIDE 98

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept)

16

slide-99
SLIDE 99

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0

16

slide-100
SLIDE 100

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0 ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’)

16

slide-101
SLIDE 101

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0 ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’)

c.f. Savitch’ s theorem

16

slide-102
SLIDE 102

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0 ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Can be rewritten as a QBF in “Prenex Normal form”

c.f. Savitch’ s theorem

16

slide-103
SLIDE 103

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0 ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Can be rewritten as a QBF in “Prenex Normal form” Problem: |ψS(n)| still exponential in S(n)

c.f. Savitch’ s theorem

16

slide-104
SLIDE 104

TQBF is PSPACE-hard

Plan for a more succinct ψ: A partially quantified boolean formula ψi s.t. ψi(C,C’) (fully quantified) is true iff C’ reachable from C in the configuration graph G(ML,x) within 2i steps. Output ψ=ψS(n)(start,accept) Base case (i=0): an unquantified formula, ψ0 ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Can be rewritten as a QBF in “Prenex Normal form” Problem: |ψS(n)| still exponential in S(n) In fact, same as naive formula!

c.f. Savitch’ s theorem

16

slide-105
SLIDE 105

TQBF is PSPACE-hard

17

slide-106
SLIDE 106

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’)

17

slide-107
SLIDE 107

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n)

17

slide-108
SLIDE 108

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula

17

slide-109
SLIDE 109

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula ψi+1(C,C’) := ∃C’’ ∀(D,D’) ((D,D’)=(C,C’’) ∨ (D,D’)=(C’’,C’)) ⇒ ψi(D,D’)

17

slide-110
SLIDE 110

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula ψi+1(C,C’) := ∃C’’ ∀(D,D’) ((D,D’)=(C,C’’) ∨ (D,D’)=(C’’,C’)) ⇒ ψi(D,D’) = and ⇒ shorthands for slightly longer formulas

17

slide-111
SLIDE 111

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula ψi+1(C,C’) := ∃C’’ ∀(D,D’) ((D,D’)=(C,C’’) ∨ (D,D’)=(C’’,C’)) ⇒ ψi(D,D’) = and ⇒ shorthands for slightly longer formulas

c.f. Savitch’ s theorem

17

slide-112
SLIDE 112

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula ψi+1(C,C’) := ∃C’’ ∀(D,D’) ((D,D’)=(C,C’’) ∨ (D,D’)=(C’’,C’)) ⇒ ψi(D,D’) = and ⇒ shorthands for slightly longer formulas |ψS(n)| = O(S(n)) + |ψS(n)-1| = O(S(n)2) + |ψ0| = O(S(n)2)

c.f. Savitch’ s theorem

17

slide-113
SLIDE 113

TQBF is PSPACE-hard

ψi+1(C,C’) := ∃C’’ ψi(C,C’’) ∧ ψi(C’’,C’) Problem: |ψS(n)| exponential in S(n) More variables/ quantification to “reuse” formula ψi+1(C,C’) := ∃C’’ ∀(D,D’) ((D,D’)=(C,C’’) ∨ (D,D’)=(C’’,C’)) ⇒ ψi(D,D’) = and ⇒ shorthands for slightly longer formulas |ψS(n)| = O(S(n)) + |ψS(n)-1| = O(S(n)2) + |ψ0| = O(S(n)2) “Quantification is a powerful programming language”

c.f. Savitch’ s theorem

17

slide-114
SLIDE 114

TQBF

18

slide-115
SLIDE 115

TQBF

PSPACE-complete

18

slide-116
SLIDE 116

TQBF

PSPACE-complete Generalizes SAT and SATc (which have only one quantifier)

18

slide-117
SLIDE 117

TQBF

PSPACE-complete Generalizes SAT and SATc (which have only one quantifier) How about 2, 3, 4, ... quantifier alternations?

18

slide-118
SLIDE 118

TQBF

PSPACE-complete Generalizes SAT and SATc (which have only one quantifier) How about 2, 3, 4, ... quantifier alternations? Coming soon!

18

slide-119
SLIDE 119

Today

19

slide-120
SLIDE 120

Today

Zoo (more later)

19

slide-121
SLIDE 121

Today

Zoo (more later) TQBF

19

slide-122
SLIDE 122

Today

Zoo (more later) TQBF PSPACE complete

19

slide-123
SLIDE 123

Today

Zoo (more later) TQBF PSPACE complete Will see more of it soon

19

slide-124
SLIDE 124

Today

Zoo (more later) TQBF PSPACE complete Will see more of it soon Next Lecture: NL

19

slide-125
SLIDE 125

Today

Zoo (more later) TQBF PSPACE complete Will see more of it soon Next Lecture: NL NL-completeness

19

slide-126
SLIDE 126

Today

Zoo (more later) TQBF PSPACE complete Will see more of it soon Next Lecture: NL NL-completeness NL = co-NL

19