- 65 Views
- Uploaded on
- Presentation posted in: General

PSPACE-Completeness

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Giorgi Japaridze

Theory of Computability

Section 8.3

8.3.a

Giorgi JaparidzeTheory of Computability

Definition 8.8 A languageBisPSPACE-completeiff it satisfies two

conditions:

1. B is in PSPACE, and

2. every A in PSPACE is polynomial time reducible to B.

If B merely satisfies condition 2, we say that it is PSPACE-hard.

Why do we still appeal to polynomial time reducibility and not, say,

polynomial space reducibility, philosophically speaking?

A reduction must be easy relative to the class (of difficult problems)

that we are defining. Only then it is the case that if we find an easy

way to solve a (PSPACE-, NP- or whatever-) complete problem,

easy solutions to other (reducible to it) problems would also be found.

If the reduction itself is hard, it does not at all offer an easy way to

solve problems.

8.3.b

Giorgi JaparidzeTheory of Computability

Universal quantifier: xP(x) means “for any x{0,1}, P(x) is true”

Existential quantifier: xP(x) means “for some x{0,1}, P(x) is true”

We consider fully quantified Boolean formulas (in the prenex form).

These are Boolean formulas prefixed with either x or xfor each

variable x.

Examples (true or false?):

x(xx)

xy (xy)

x(xx)

xy ((xy)(xy))

x(xx)

xy ((xy)(xy))

xy(xy)

zxy ((xyz)(xyz))

TQBF = {<> | is a true fully quantified Boolean formula}

(True Quantified Boolean Formulas)

8.3.c

Giorgi JaparidzeTheory of Computability

Theorem 8.9 TQBF is PSPACE-complete.

Proof idea. To show that TQBFPSPACE, we give an algorithm that assigns values to

the variables and recursively evaluates the truth of the formula for those values.

To show that ApTQBFfor every APSPACE, we begin with a polynomial-space

machine M for A. Then we give a polynomial time reduction that maps a string w to a

formula that encodes a simulation of M on input w. is true iff M accepts w (and

hence iff wA).

A first, naive, attempt to do so could be trying to precisely imitate the proof of the

Cook-Levin theorem. We can indeed construct a that simulates M on input w by

expressing the requirements for an accepting tableau. As in the proof of the Cook-Levin

theorem, such a tableau has polynomial width O(nk), the space used by M. But the

problem is that the height of the tableau would be exponential!

Instead, we use a technique related to the proof of Savitch’s theorem to construct the

formula. The formula divides the tableau into halves and employs the universal

quantifier to represent each half with the same part of the formula. The result is a much

shorter formula. End of proof idea

8.3.d

Giorgi JaparidzeTheory of Computability

The following algorithm obviously decides TQBF:

T = “On input <>, a fully quantified Boolean formula:

1. If contains no quantifiers, then it is an expression with only

constants, so evaluate and accept if true, otherwise, reject.

2. If is x, recursively call T on , first with 0 substituted for x

and then 1 substituted for x. If either result is accept, then accept;

otherwise, reject.

3. If is x, recursively call T on , first with 0 substituted for x

and then 1 substituted for x. If both results are accept, then accept;

otherwise, reject.”

Analysis: Let m be the number of variables that appear in . The depth of recursion

does not exceed m. And at each level of recursion, we need only store the value of one

variable. So, the total space used is O(m), and hence linear in the size of .

To complete the proof of Theorem 8.9, we also need to show that TQBF is PSPACE-

hard. A a detailed technical proof of this part is technically somewhat trickier than (but

otherwise similar to) the proof of the Cook-Levin theorem, and we omit it.

8.3.e

Giorgi JaparidzeTheory of Computability

Each fully quantified Boolean formula (in prenex form) can be seen as

a game between two players A and E.

If =x(x), it is E’s move, who should select x=0 or x=1, after

which the game continues as (0) or (1), respectively.

If =x(x), it is A’s move, who should select x=0 or x=1, after

which the game continues as (0) or (1), respectively.

The play continues until all quantifiers are stripped off, after which

E is considered the winner iff the final, variable-free formula, is true.

xyz[(xy)(yz)(yz)]

E moves, selects x=1

yz[(1y)(yz)(yz)]

A moves, selects y=0

z[(10)(0z)(0z)]

E moves, selects z=1

(10)(01)(01)

A wins

Who has a winning strategy (a strategy that guarantees a win no matter

how the adversary acts) in this example?

--- Player A has a winning strategy: No matter what E does, select y=0.

8.3.f

Giorgi JaparidzeTheory of Computability

Who has a winning strategy in

xyz[(xy)(yz)(yz)] ?

E: Select x=1, and select z to be the negation of whatever A selects for y.

FORMULA-GAME = {<> | Player E has a winning strategy in}

Theorem 8.11 FORMULA-GAME is PSPACE-complete.

Proof . This is so for a simple reason: we simply have

FORMULA-GAME = TQBF.

To see this, observe that is true iff player E has a winning strategy in

it. A detailed proof of this fact (if it was necessary) can proceed by

induction on the length of the quantifier-prefix of .

8.3.g

Giorgi JaparidzeTheory of Computability

Players, called I and II, take turns naming cities from anywhere in the world (player

I starts). Each city chosen must begin with the same letter that ended the previous city’s

name. Repetitions are not permitted. The player who is unable to continue loses.

We can model this game with a directed graph whose nodes are the cities of the

world. There is an edge from one city to another if the first can lead to the second

according to the game rules. One node is designated as the start node/city. The condition

that cities cannot be repeated means that the path that is being spelled must be simple.

Peoria

Austin

Nashua

Albany

Orsay

...

Tokyo

Amherst

Tuscon

Oakland

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

7

2

1

5

9

8

3

6

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

Player I: Choose 3.

7

2

1

5

9

8

3

6

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

Player I: Choose 3. II will have to choose 5.

7

2

1

5

9

8

3

6

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

Player I: Choose 3. II will have to choose 5.

Now I selects 6, and II is stuck.

7

2

1

5

9

8

3

6

4

Who has a winning strategy here?

7

Indeed, if I starts by choosing 3 as

before, II chooses 6 and wins.

Player II.

2

1

5

9

8

3

6

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

Player I: Choose 3. II will have to choose 5.

Now I selects 6, and II is stuck.

7

2

1

5

9

8

3

6

4

Who has a winning strategy here?

7

Indeed, if I starts by choosing 3 as

before, II chooses 6 and wins.

Player II.

2

1

5

9

Now assume I starts with 2.

8

3

6

8.3.h

Giorgi JaparidzeTheory of Computability

In Generalized Geography, we take an arbitrary digraph with a designated start node

instead of the graph associated with the actual cities.

Who has a winning strategy here?

4

Player I: Choose 3. II will have to choose 5.

Now I selects 6, and II is stuck.

7

2

1

5

9

8

3

6

4

Who has a winning strategy here?

7

Indeed, if I starts by choosing 3 as

before, II chooses 6 and wins.

Player II.

2

1

5

9

Now assume I starts with 2. Then II responds

with 4.

8

3

If I responds with 5, II responds with

6 and wins.

Otherwise, if I takes 7, II wins

with 9.

6

8.3.i

Giorgi JaparidzeTheory of Computability

GG = {<G,b> | Player I has a winning strategy for the Generalized

Geography game played on graph G starting at node b}

Theorem 8.14 GG is PSPACE-complete.

Proof idea. A recursive algorithm similar to the one used for TQBF in

Theorem 8.9 determines which player has a winning strategy. This

algorithm runs in polynomial space and so GGPSPACE.

To prove that GG is PSPACE-hard, we give a polynomial time

reduction from FORMULA-GAME to GG. This reduction converts a

formula game to a generalized geography graph G so that play on G

mimics play in . In effect, the players in the generalized geography

game are really playing an encoded form of the formula game.

On the following slides we give a more detailed argument.

8.3.j

Giorgi JaparidzeTheory of Computability

The following algorithm obviously decides GG:

M = “On input <G,b>, where G is a digraph and b is a node of G:

1. If b has outdegree 0, reject, because Player I loses immediately.

2. Remove node b and all connected arrows to get a new graph H.

3. For each of the nodes b1,...,bk that b originally pointed at,

recursively call M on <H,bi>.

4. If all of these accept, Player II has a winning strategy in the

original game, so reject. Otherwise, Player II doesn’t have a

winning strategy, so Player I must; therefore, accept.

Analysis: Let m be the number of nodes in G.

The only space required by this algorithm is for storing the recursion

stack. Each level of the recursion adds a single node to the stack, and at

most m levels occur. Hence the algorithm runs in linear space.

8.3.k

Giorgi JaparidzeTheory of Computability

Consider any formula-game . We may assume that both its first and

last quantifiers are , and that the quantifiers strictly alternate. If not, we

can easily bring to this form by adding dummy variables and quantifiers.

Furthermore, we can assume that the quantifier-free part of is a

3cnf-formula, otherwise it can be converted to such. All these

conversions yield an equivalent formula and take a polynomial amount

of time.

Thus,

= x1x2x3x4... xk[c1c2...cm],

where each ciis a disjunction of three literals.

Now we describe a way how to convert (in polynomial time) into

<G,b> such that

FORMULA-GAME iff <G,b>GG,

i.e., E has a winning strategy in iff Player I has a winning strategy in

<G,b>.

8.3.l

Giorgi JaparidzeTheory of Computability

1

0

The left part of G will look like this: for each

variable we create a diamond. The blue arrows

indicate Player I’s choices (turns), and the red

arrows indicate Player II’s choices in the game.

b

x1

x2

The left-hand choices will correspond to choosing

1 in the formula game, and the right-hand choices

correspond to choosing 0.

x3

Then we extend this graph by adding to it the

right part as shown on the next slide for a

particular example of .

...

xk

x1x2x3...xk[(x1x2x3)(x2x3...)...(...)]

x1x2x3x4... xk[c1c2...cm]

8.3.m

Giorgi JaparidzeTheory of Computability

1

0

Suppose E has a winning

strategy in . Then, let Player I

follow the “same” strategy in

the left part of the graph.

Whatever ci is chosen by

Player II, it is a true clause

and thus has a true literal. Let

then Player I choose such a

true literal. Then Player II is

stuck, as the path has already

passed through the

corresponding left or right

node of the corresponding

diamond. So, Player I has a

winning strategy in G.

x1

b

x1

x2

c1

x3

x2

x2

x3

c2

c

x3

...

...

cm

xk

x1x2x3...xk[(x1x2x3)(x2x3...)...(...)]

x1x2x3x4... xk[c1c2...cm]

8.3.n

Giorgi JaparidzeTheory of Computability

Suppose now A has a winning

strategy in . Then, let it

follow the “same” strategy in

the left part of the graph.

Then there is a false clause ci,

and let Player II choose that

clause. Now, whatever literal

of ci is chosen by Player I, it

is a false literal and hence the

path has not passed through it.

So, Player II is not stuck, and

goes to the corresponding left

or right node of the

corresponding diamond. Now

Player I is stuck. Thus, II has

a winning strategy in G.

1

0

x1

b

x1

x2

c1

x3

x2

x2

x3

c2

c

x3

...

...

cm

xk

x1x2x3...xk[(x1x2x3)(x2x3...)...(...)]

x1x2x3x4... xk[c1c2...cm]