Finite Model Theory Lecture 7

Slides:



Advertisements
Similar presentations
Combining Abstract Interpreters Sumit Gulwani Microsoft Research Redmond, Group Ashish Tiwari SRI RADRAD.
Advertisements

P, NP, NP-Complete Problems
COMPLEXITY THEORY CSci 5403 LECTURE XVI: COUNTING PROBLEMS AND RANDOMIZED REDUCTIONS.
The Logic of Quantified Statements
2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Query Folding Xiaolei Qian Presented by Ram Kumar Vangala.
CPSC 504: Data Management Discussion on Chandra&Merlin 1977 Laks V.S. Lakshmanan Dept. of CS UBC.
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
More NP-completeness Sipser 7.5 (pages ). CS 311 Fall NP’s hardest problems Definition 7.34: A language B is NP-complete if 1.B ∈ NP 2.A≤
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
More NP-completeness Sipser 7.5 (pages ).
1 Finite Model Theory Lecture 10 Second Order Logic.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
1 Finite Model Theory Lecture 13 FO k, L k 1, ,L  1, , and Pebble Games.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
Query Answering Based on the Modal Correspondence Theory Evgeny Zolin University of Manchester Manchester, UK
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Lambda Calculus Prepared by Manuel E. Bermúdez, Ph.D. Associate Professor University of Florida Programming Language Principles Lecture 11.
1 Computing Full Disjunctions Yaron Kanza Yehoshua Sagiv The Selim and Rachel Benin School of Engineering and Computer Science The Hebrew University of.
1 Finite Model Theory Lecture 3 Ehrenfeucht-Fraisse Games.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
Lecture 7: Foundations of Query Languages Tuesday, January 23, 2001.
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.
“One ring to rule them all” Analogy (sort of) Lord of The Rings Computational Complexity “One problem to solve them all” “my preciousss…”
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
1 Finite Model Theory Lecture 16 L  1  Summary and 0/1 Laws.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
1 Finite Model Theory Lecture 5 Turing Machines and Finite Models.
COMPSCI 102 Introduction to Discrete Mathematics.
1 Variations of the maximum leaf spanning tree problem for bipartite graphs P.C. Li and M. Toulouse Information Processing Letters 97 (2006) /03/14.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
Lecture 9: Query Complexity Tuesday, January 30, 2001.
1 Finite Model Theory Lecture 9 Logics and Complexity Classes (cont’d)
1 CMPS 277 – Principles of Database Systems Lecture #8.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
The Theory of NP-Completeness
Computational Complexity Theory
Chapter 8: Concurrency Control on Relational Databases
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
Introduction to Automata Theory
CS21 Decidability and Tractability
ICS 353: Design and Analysis of Algorithms
NP-Completeness Proofs
Finite Model Theory Lecture 11
Finite Model Theory Lecture 2
Chapter 11 Limitations of Algorithm Power
Finite Model Theory Lecture 6
NP-Complete Problems.
Lecture 10: Query Complexity
Finite Model Theory Lecture 4
CS21 Decidability and Tractability
Discrete Mathematics for Computer Science
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
CSE544 Wednesday, March 29, 2006.
Lecture 23 NP-Hard Problems
Presentation transcript:

Finite Model Theory Lecture 7 Complexity of FO (cont’d)

Outline Complexity of conjunctive queries

Conjunctive Queries The FO fragment consisting of: R(x,y,…) -- atomic formulas x=y -- equality f1 Æ phi2 -- conjunction 9 x.f -- existential quantifiers Canonical form: 9 x1.9 x2… 9 xk.(G1 Æ … Æ Gm) or, simply: G1, …, Gm

Complexity of Conjunctive Queries Theorem The query complexity of CQ is NP-hard. The combined complexity of CQ is NP-complete. Proof NP membership. Let: f = 9 x1 … 9 xk G1 Æ … Æ Gm A = (A, R1A, …, RpA) Step 1: guess k values a1, …, ak 2 A Step 2: check if G1 Æ … Æ Gm is true after substituting x1 with a1, …, xk with ak

Proof (cont’d) Hardness: will design a structure A s.t. the set {f | A ² f} is NP-hard. By reduction from 3 colorability A = ({0,1,2}, N), where N = {(i,j) | i ¹ j} Let G = (V, E) be a graph, |V| = k Define: f = 9 x1 … 9 xk (Æ(xi, xj) 2 E N(xi, xj))

Tree Decomposition Note: a conjunctive query = a hypergraph A tree decomposition of a conjunctive query (or hypergraph) with variables (nodes) V is a tree T, and a set Bt µ V for each node t in T such that: For every x 2 V, the set {t | x 2 Bt} is connected Every hyperedge of the query (hypergraph) is contained in some Bt

Tree Decomposition Examples [in class]: f = R(x,y,z), R(z,u,v), S(v,w) f = R(x,y,z), R(z,u,v), R(v,w,x)

Tree Decomposition Definition A conjunctive query (or a hypergraph) is acyclic if there exists a tree decomposition such that 8 t, Bt is an hyperedge. I.e. there are no redundant variables on the tree nodes.

Tree Decomposition Theorem If f is an acyclic conjunctive query and A is a structure, then checking whether A ² f can be done in timme O(|f| |A|) Note: |A| denotes the size of the entire structure, i.e. is more of the form n + n3 + n2 + n5 if the arities of the relations in A are 3, 2, 5. Proof [in class]