Finite Model Theory Lecture 8

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
Argumentation Based on the material due to P. M. Dung, R.A. Kowalski et al.
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
Programming Language Semantics Denotational Semantics Chapter 5 Based on a lecture by Martin Abadi.
1 Finite Model Theory Lecture 10 Second Order Logic.
1 Finite Model Theory Lecture 13 FO k, L k 1, ,L  1, , and Pebble Games.
Data Flow Analysis Compiler Design Nov. 3, 2005.
¹ -Calculus Based on: “Model Checking”, E. Clarke and O. Grumberg (ch. 6, 7) “Symbolic Model Checking: 10^20 States and Beyond”, Burch, Clark, et al “Introduction.
Data Flow Analysis Compiler Design Nov. 8, 2005.
CS151 Complexity Theory Lecture 13 May 11, CS151 Lecture 132 Outline Natural complete problems for PH and PSPACE proof systems interactive proofs.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
Abstract State Machines and Computationally Complete Query Languages Andreas Blass,U Michigan Yuri Gurevich,Microsoft Research & U Michigan Jan Van den.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS 267: Automated Verification Lecture 3: Fixpoints and Temporal Properties Instructor: Tevfik Bultan.
1 Finite Model Theory Lecture 3 Ehrenfeucht-Fraisse Games.
Lecture 7: Foundations of Query Languages Tuesday, January 23, 2001.
1 Finite Model Theory Lecture 1: Overview and Background.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Program Analysis and Verification Spring 2015 Program Analysis and Verification Lecture 13: Abstract Interpretation V Roman Manevich Ben-Gurion University.
1 Finite Model Theory Lecture 14 Proof of the Pebble Games Theorem.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
One-parameter mechanisms, with an application to the SPT problem.
1 Finite Model Theory Lecture 16 L  1  Summary and 0/1 Laws.
CS Lecture 26 Monochrome Despite Himself. Pigeonhole Principle: If we put n+1 pigeons into n holes, some hole must receive at least 2 pigeons.
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
1 Finite Model Theory Lecture 5 Turing Machines and Finite Models.
Extensions of Datalog Wednesday, February 13, 2001.
Lecture 9: Query Complexity Tuesday, January 30, 2001.
1 Finite Model Theory Lecture 9 Logics and Complexity Classes (cont’d)
Complexity 27-1 Complexity Andrei Bulatov Interactive Proofs (continued)
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
The Theory of NP-Completeness
The NP class. NP-completeness
P & NP.
Fixpoints and Reachability
From Classical Proof Theory to P vs. NP
Monochrome Despite Himself
Richard Anderson Lecture 26 NP-Completeness
Advanced Algorithms Analysis and Design
To any sequence we can assign a sequence with terms defined as
NP-Completeness Yin Tat Lee
ICS 353: Design and Analysis of Algorithms
Steven Lindell Scott Weinstein
Alternating tree Automata and Parity games
Richard Anderson Lecture 28 NP-Completeness
Finite Model Theory Lecture 15
Finite Model Theory Lecture 11
Finite Model Theory Lecture 19
Finite Model Theory Lecture 2
Chapter 11 Limitations of Algorithm Power
Finite Model Theory Lecture 6
Lecture 10: Query Complexity
Data Flow Analysis Compiler Design
NP-Completeness Yin Tat Lee
CSE 544: Lecture 8 Theory.
CSE 6408 Advanced Algorithms.
Finite Model Theory Lecture 4
Chapter 5 Limits and Continuity.
Discrete Mathematics for Computer Science
Part 7. Phantoms: Legal States That Cannot Be Constructed
Instructor: Aaron Roth
Instructor: Aaron Roth
Instructor: Aaron Roth
CSE544 Wednesday, March 29, 2006.
Presentation transcript:

Finite Model Theory Lecture 8 Logics and Complexity Classes

Reading Assignment R. Fagin, Finite-Model Theory – a Personal Perspective May skip Sec. 6 for now, since we will cover this in class

Problem 1 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 ?

Problem 2 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

Problem 2 (con’t) 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) ?

Problem 3 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

Outline Fixpoints Fixpoint Logics Immerman and Vardi’s results: FO+LFP+< = FO+IFP+< = PTIME FO+PFP+< = PSPACE

Motivation 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.)

Least Fixpoint 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)

Fixpoints Define: X0 = ; Xi+1 = F(Xi) X1 = [i ¸ 0 Xi Is X1 the least fixpoint of F ?

Least Fixpoint 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 ?

Inflationary Fixpoint 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

Inflationary Fixpoint Let F be arbitrary. Define G(Y) = Y [ F(Y). G is inflationary [why ?], hence X1 is its inflationary fixpoint Define ifp(F) = X1

Partial Fixpoint 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

Fixpoints The distinction is necessary only when F is not monotone. Otherwise: Fact If F is monotone, then: lfp(F) = ifp(F) = pfp(F)

Fixed Point Logics 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: [lfpR, x f(R, x)][t] [ifpR, x f(R, x)][t] [pfpR, x f(R, x)][t]

Fixed Point Logics Hence, three new logics: FO + LFP or LFP FO + IFP or IFP FO + PFP of PFP Need semantics (next)

Fixed Point Logics 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)

LFP WAIT ! lfp is defined only if Ff is monotone. Perhaps restrict lfp to monotone formulas f only ?

LFP 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.

Example 1 s = {E} (graphs) What does this formula say ? 8 u.8 v.[lfpR, x, y f(R, x, y)](u,v) where f(R, x, y) = (E(x,y) Ç 9 z.(E(x,z) Æ R(z,y))

Examples What does this say ? 8 u.[lfpS,x f(S, x)](u), where: f(S, x) = 8 y.(E(y,x) ! S(y))

Example 3 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 !

Example 3 (cont’d) [lfpS,xf(S,x)](a) where: f(S,x) = 8 y(E(x,y) ! 9 z.(E(y,z) Æ S(z))

Fixed Point Logics 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

Discussion 1 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: 8 x.8 y.9 c.[lfpR,x,yf(R, x,y,c)](x,y) Where f(R,x,y,c) = E(x,c,y) Ç 9 z.(R(x,z) Æ E(z,c,y))

Discussion 1 (cont’d) We can express the same formula without free variables in lfp [show in class] This holds in general

Discussion 2 Simultaneous fixpoints Is there a path of even length from a to b ? [lfpR,xf(R, S, x),y(R, S, x)](b) Where f(R,S,x) = 9 z.(S(x,z) Æ E(z,x)) y(R,S,x) = E(a,x) Ç 9 z.(R(x,z) Æ E(z,x)) EXPRESS THE SAME THING WITH ONLY ONE LFP !

Discussion 3 Nested Fixpoints Example: have < express +, £ (in class) How can we remove the nested fixpoint ?

LFP = IFP Theorem [Gurevitch and Shelah] LFP = IFP Technically involved proof, see the book

Main Results Theorem [Immeman86, Vardi82] LFP + < = IFP + < = PTIME Theorem [Vardi82] PFP + < = PSPACE