|
|
|
Logics and Complexity Classes |
|
|
|
|
|
R. Fagin, Finite-Model Theory – a Personal
Perspective |
|
May skip Sec. 6 for now, since we will cover
this in class |
|
|
|
|
Let s ą ;. |
|
[Fagin’74] A class C µ STRUCT[s] is in 9 SO iff
it is in NP |
|
|
|
Now let s = ;.
A structure = a number |
|
[Fagin’74, Jones&Selman’74] A set of numbers
C µ N is in 9 SO iff it is in NE (nondeterministic exponential time) |
|
|
|
PROVE IT.
WHY THE JUMP IN COMPLEXITY ? |
|
|
|
|
Let A = (A, R1A, …, RmA)
be a structure. |
|
The active domain, adom(A) = the set of all
constants in s, and all constants occurring in R1A,
…, RmA. |
|
Let Aadom = (adom(A), RA1,
…, RAm) |
|
A formula f is domain independent if 8 A:
A ˛ f iff Aadom ˛ f |
|
Undecidable if f is domain independent |
|
|
|
|
Let k ¸ 0.
The k’th active domain of A
adomk(A) = adom(A)[{some
k constants in A -adom(A)}
adomk(A) = A if |A - adom(A)|
· k |
|
Aadomk = (adomk(A),
RA1, …, RAm) |
|
Say that f is weak domain independent if
9k.
8A. A ˛ f iff Aadomk
˛ f |
|
|
|
PROBLEM.
IS WEAK DOMAIN INDEPENDENCE DECIDIABLE ? CAN ONE COMPUTE K (OR AN
UPPER BOUND) ? |
|
|
|
|
f(R, x)
is monotone in R if for any two structures A, B s.t. RA µ RB,
A=B, and SA=SB for any other relation name S,
{a
| A ˛ f} µ {a | B ˛ f} |
|
|
|
Prove that it is undecidable if a formula f(R, x)
is monotone in R |
|
|
|
|
|
|
|
|
Fixpoints |
|
Fixpoint Logics |
|
Immerman and Vardi’s results:
FO+LFP+< = FO+IFP+< = PTIME
FO+PFP+< = PSPACE |
|
|
|
|
|
|
Recall Fagin’s result:
9 SO =
NP |
|
|
|
Are there other logics that capture complexity
classes ? |
|
|
|
Yes !
But those logics are not as elegant as 9 SO. (Or, it takes more arguing to present
them as elegant.) |
|
|
|
|
Fix U =
a finite set |
|
Definition Let F : P(U) ! P(U). A fixpoint for F is X µ U s.t. F(X) = X |
|
|
|
Definition The least fixpoint is some X s.t. for
every other fixpoint Y, X µ Y |
|
|
|
Notation:
lfp(F) |
|
|
|
|
Define:
X0 = ;
Xi+1
= F(Xi)
X1 = [i ¸
0 Xi |
|
|
|
Is X1 the least fixpoint of F ? |
|
|
|
|
F is monotone if X µ Y ) F(X) µ F(Y) |
|
|
|
Theorem [Tarski-Knaster] If F is monotone, then
lfp(F) exists and is given by any of the following two expressions:
lfp(F)
= Ĺ {Y | F(Y) µ Y}
lfp(F)
= X1 |
|
|
|
Note: one of the above fails when U =
infinite. Which one ? |
|
|
|
|
F is inflationary if Y µ F(Y) for all Y |
|
|
|
Fact. If
F is inflationary, then X1 is a fixpoint |
|
|
|
[is X1 the least fixpoint ?] |
|
Denote ifp(F) = X1 |
|
|
|
|
Let F be arbitrary. |
|
|
|
Define G(Y) = Y [ F(Y). |
|
G is inflationary [why ?], hence X1
is its inflationary fixpoint |
|
|
|
Define ifp(F) = X1 |
|
|
|
|
Let F be arbitrary, X0 = ;, Xi+1
= F(Xi) |
|
|
|
Define:
pfp(F) = Xn if Xn = Xn+1
pfp(F)
= ; if there is no such n |
|
|
|
|
The distinction is necessary only when F is not
monotone. Otherwise: |
|
|
|
Fact If F is monotone, then:
lfp(F)
= ifp(F) = pfp(F) |
|
|
|
|
s =
vocabulary, R Ď s |
|
|
|
Let f(R, x) be a formula over s [ {R}
here |x|
= arity(R) |
|
[that is, x are all the free variables in f] |
|
Define three new formulas: |
|
|
|
|
Hence, three new logics: |
|
|
|
FO + LFP
or LFP |
|
FO + IFP
or IFP |
|
FO + PFP
of PFP |
|
|
|
Need semantics (next) |
|
|
|
|
Given a structure A and formula f(R, x), define
the following operator Ff : P(A) ! P(A):
Ff(X)
= { a | A ˛ f(X/R, a) } |
|
|
|
The meaning of
[lfpR, x f(R, x)][t] is lfp(Ff) |
|
The meaning of [ifpR, x f(R, x)][t]
is ifp(Ff) |
|
The meaning of [pfpR, x f(R, x)][t]
is pfp(Ff) |
|
|
|
|
|
|
WAIT ! lfp
is defined only if Ff is monotone. |
|
|
|
Perhaps restrict lfp to monotone formulas f only
? |
|
|
|
|
Theorem
Checking if f is monontone is undecidable |
|
|
|
[proof: in class] |
|
|
|
Hence in lfp we require R to occur under an even
number of negations. |
|
|
|
|
s = {E} (graphs) |
|
What does this formula say ? |
|
|
|
|
|
Consider the following game with one pebble on a
graph G |
|
Player 1 places pebble on node a |
|
Player 2 moves the pebble to a successor |
|
Player 1 moves the pebble to a successor |
|
… |
|
Whoever cannot move, looses |
|
WRITE A FORMULA THAT CHECKS IF PLAYER 1 WINS ! |
|
|
|
|
|
|
LFP, IFP, PFP look very complicated and
procedural |
|
Nothing one can do; deeper analysis brings back
some of the elegance (future lectures) |
|
|
|
We made several arbitrary choices. |
|
Let’s analyze some of the choices |
|
|
|
|
Should we allow free variables in lfp, ifp, pfp
? |
|
Example |
|
Colored graph: E(x, c, y) |
|
Check if every pair of nodes is connected by a
path where all edges have the same color: |
|
|
|
|
We can express the same formula without free
variables in lfp |
|
[show in class] |
|
|
|
This holds in general |
|
|
|
|
Simultaneous fixpoints |
|
|
|
Is there a path of even length from a to b ? |
|
|
|
|
Nested Fixpoints |
|
|
|
Example: have <
express +, Ł (in
class) |
|
|
|
How can we remove the nested fixpoint ? |
|
|
|
|
Theorem [Gurevitch and Shelah] LFP = IFP |
|
|
|
Technically involved proof, see the book |
|
|
|
|
Theorem [Immeman86, Vardi82]
LFP + < = IFP + < = PTIME |
|
|
|
Theorem [Vardi82]
PFP + < = PSPACE |
|
|
|