FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

Description:

2. If k n/2, construct H by adding a complete graph with ... configurations and a number t 0, we construct a formula c,d,t ... can easily construct c,d,t: ... – PowerPoint PPT presentation

Number of Views:185
Avg rating:3.0/5.0
Slides: 30
Provided by: luisv2
Category:

less

Transcript and Presenter's Notes

Title: FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY


1
15-453
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
2
2. Let HALF-CLIQUE G G has a clique of size
n/2. Show that CLIQUE ?P HALF-CLIQUE
We transform (G,k) into a graph H such that
(G,k) ? CLIQUE ? H ? HALF-CLIQUE
1. If k n/2, let H G
2. If k lt n/2, construct H by adding a complete
graph with n-2k nodes and connecting them to all
nodes in G
3. If k gt n/2, construct H by adding 2k-n
isolated nodes
3
3a. Show that if P NP then every language A ?
P is NP-complete, except A ? and A S
Assume A is in P and is not the empty language
nor S. We show A is NP-complete
1. A ? NP
2. A is NP-hard
Assume B ? NP. We show B ?P A
Let x ? A and y ? A
On input w, output x if w ? B and y otherwise
4
3b. Show that if P NP, a polynomial time
algorithm exists that actually produces a
satisfying assignment for ? if it is satisfiable.
If P NP then we can test whether any formula ?
is satisfiable in polynomial time
How do we actually find a satisfying assignment
in polynomial time?
Assume the variables of ? are x1,x2,,xn
For i 1 to n
Substitute xi0 and xi1 in ? and test whether
the resulting formula is satisfiable. If xi0
results in a satisfiable formula, fix xi0.
Otherwise fix xi1
5
PSPACE-COMPLETENESS
THURSDAY NOVEMBER 10
6
(No Transcript)
7
Definition Language B is PSPACE-complete if
1. B ? PSPACE
2. Every A in PSPACE is poly-time reducible to
B (i.e. B is PSPACE-hard)
8
Definition A fully quantified Boolean formula
(or a sentence) is a Boolean formula in which
every variable is quantified
x ? ?y
?x?y

?x x ? ?x
?x x
?x?y (x ? y) ? (?x ? ?y)
9
TQBF ? ? is a true fully quantified Boolean
formula
Theorem TQBF is PSPACE-complete
10
Claim Every language A in PSPACE is polynomial
time reducible to TQBF
We build a poly-time reduction from A to TQBF
The reduction turns a string w into a fully
quantified Boolean formula ? that simulates the
PSPACE machine for A on w
Let M be a deterministic TM that decides A in
space nk
How do we know M exists?
11
A tableau for M on w is an table whose rows are
the configurations of the computation of M on
input w
12
We now design ? so that a satisfying assignment
to the variables corresponds to M accepting w
Given two collections of variables denoted c and
d representing two configurations and a number t
gt 0, we construct a formula ?c,d,t
If we assign c and d to actual configurations,
?c,d,t will be true if and only if M can go from
c to d in t steps
13
If t 1, we can easily construct ?c,d,t
?c,d,t c equals d or d follows from c
in a single step of M
c equals d can be expressed by writing a
Boolean formula saying that each of the variables
representing c is equal to the corresponding one
in d
d follows from c in a single step of M can be
expressed using 2 x 3 windows as in the
Cook-Levin theorem
14
If t gt 1, we construct ?c,d,t recursively
?c,d,t ?m ?c,m,t/2 ? ?m,d,t/2
?x1 ?x2 ?xl
O(t) O(2df(n))
How long is this formula?
Since O(t) is too long, we modify the formula to
be
?c,d,t ?m?a,b (a,b)(c,m) ? (a,b)(m,d)
? ?a,b,t/2
15
TQBF ? ? is a true fully quantified Boolean
formula
Theorem TQBF is PSPACE-complete
16
PSPACE is frequently called the class of games
because many popular games are PSPACE-Complete
17
THE FORMULA GAME
is played between two players, E and A
Given a fully quantified Boolean formula
?y?x (x ? y) ? (?x ? ?y)
E chooses values for variables quantified by ?
A chooses values for variables quantified by ?
Start at the leftmost quantifier
E wins if the resulting formula is true
A wins otherwise
18
?x?y (x ? y) ? (?x ? ?y)
FG ? Player E has a winning strategy in ?
Theorem FG is PSPACE-Complete
Proof
FG TQBF
19
GEOGRAPHY
Two players take turns naming cities from
anywhere in the world
Each city chosen must begin with the same letter
that the previous city ended with
Cities cannot be repeated
Austin ? Nashua ? Albany ? York
Whoever cannot name any more cities looses
20
GENERALIZED GEOGRAPHY
21
GG (G,b) Player I has a winning strategy
for the generalized geography game played on
graph G starting at node b
Theorem GG is PSPACE-Complete
22
GG ? PSPACE
M(G,b)
1. Remove node b and all arrows touching it to
get to a new graph G1
2. For each of the nodes b1,b2,,bk that b
originally pointed at, recursively call M(G1,bi)
3. If any of these reject, Player I has a winning
strategy, so accept. Otherwise, reject
23
GG IS PSPACE-HARD
We show that FG ?P GG
We convert a formula ? into (G,b) such that
Player E has winning strategy in ? if and only if
Player I has winning strategy in (G,b)
For simplicity we assume ? is of the form
? ?x1?x2?x3?xk ?
where ? is in cnf
24
(x1 ? x1 ? x2) ? (?x1 ? ?x2 ? ?x2) ?
TRUE
FALSE
x1
x2
xk
25
?x1 (x1 ? x1 ? x1)
TRUE
FALSE
x1
26
(x1 ? x1 ? x2) ? (?x1 ? ?x2 ? ?x2) ?
TRUE
FALSE
x1
x2
xk
27
GG (G,b) Player I has a winning strategy
for the generalized geography game played on
graph G starting at node b
Theorem GG is PSPACE-Complete
28
Question Is Chess PSPACE complete?
No, because determining whether Player I has a
winning strategy takes constant time and space
n x n GO, chess and checkers can be shown to be
PSPACE-hard
29
WWW.FLAC.WS
Read Chapter 8.3 of the book for next time
Write a Comment
User Comments (0)
About PowerShow.com