Efficient query evaluation

Size: px
Start display at page:

Download "Efficient query evaluation"

Transcription

1 Efficient query evaluation Maria Luisa Sapino Set of values E.g. select * from EMPLOYEES where SALARY = 1500; Result of a query Sorted list E.g. select * from CAR-IMAGE where color = red ; 2 Queries as boolean combinations How do we combine sets and sorted lists? : example: database containing information about CDs query: return the names of all albums whose artist is the Queen, and whose cover is mostly black. (i) traditional database query, asking for the names of all albums whose artist is Queen --> set (ii) multimedia query asking for album covers which are black --> sorted list (Artist = Queen ) and (AlbumColor = black ) 3

2 Queries as boolean combinations What if we replace and with or? Is the answer a set, a list, or a combination of the two? How about if we combine two multimedia queries? (color = black ) and ( title contains kind ) the answer is a sorted list sorted according to which criterion? 4 Graded sets sets of pairs (x, g), where x is an object (such as a tuple) g is a real number in [0,1] graded sets as sorted lists, where the objects are sorted by their grades graded sets of generalization of both sets and sorted lists 5 Assumptions All data in all the subsystems deal with the attributes of a specific set of objects of some fixed types Atomic queries are of the form X = t, where X is the name of an attribute, and t is a target Queries are boolean combination of atomic queries For each atomic query, a grade is assigned to each object 6

3 Dealing with boolean combinations There are a number of aggregation functions that assign a grade to a fuzzy conjunction, as a function of the grades assigned to the conjuncts Standard rules of fuzzy logic (Zadeh, 1965) use min as the aggregation function: conjunction rule: µ A B (x) = min{ µ A (x), µ B (x)} disjunction rule : µ A B (x) = max{ µ A (x), µ B (x)} negation rule: µ not A (x) = 1- µ A (x) 7 Standard fuzzy rules: pros They are a conservative extension of the standard propositional semantics Theorem of Bellman and Giertz: The unique aggregation functions for evaluating AND and OR that preserve logical equivalence of queries involving only conjunction and disjunction and that are monotonic in their arguments are min and max. 8 Logical equivalence preservation If Q 1 and Q 2 are logically equivalent queries involving only conjunction and disjunction (not negation), then µ Q1 (x) = µ Q2 (x), for every x Examples: µ A A (x) = µ A (x) µ A (B C) (x) = µ (A B) (A C) (x) 9

4 Monotonicity µ A (x) <= µ A (x ) and µ B (x) <= µ B (x ) => µ A B (x) <= µ A B (x ) 10 Algorithms for query evaluation Different subsystems are involved in query answering, and information coming from them is pieced together by the middleware system (e.g., Garlic [Fagin]) (Artist = Queen ) (AlbumColor = black ) Assumption: there are not too many objects that satisfy the first conjunct Intuitive algorithm: Compute S = set of objects that do satisfy (Artist = Queen ) using random access, obtain grades (e.g. from QBIC) for the objects in S sort objects in S according to the returned grades 11 Algorithms for query evaluation (AlbumColor = black ) (Shape = circle ) assumption: one subsystem deals with colors, and another one deals with shapes. The grade of any object x under the query is the minimum of the grades of x under the subqueries A1= (AlbumColor = black ), and A2= (Shape = circle ) how to get TOP k elements? 12

5 TOP k naive algorithm Have the subsystem dealing with color to output explicitely the graded set containing all pairs (x, µ A1 (x) ), for each x Have the subsystem dealing with shape to output explicitely the graded set containing all pairs (x, µ A2 (x) ), for each x Compute µ A1 A2 (x) = min{(µ A1 (x), µ A2 (x) } for every x Return the top k objects, braking arbitrarily the ties. Note: The constant k plays a role only at the 4th step improving efficiency (Fagin) Assumption: Sorted access the subsystems can output the graded set consisting of all objects one by one, in sorted order based on grade, until the middleware system tells the subsystem to stop the middleware system can later tell the subsystem to resume outputting the graded set where it left off. (alternatively, the sorted objects can be output in sets of cardinality k, for any constant k, instead of one by one) Random access the middleware could ask the subsystem the grade, wrt a query, of any given object 14 Evaluating conjunctions of atomic queries Query: Q= F t (A 1, A 2,, A m ), where Q is monotonic t is the aggregation function each A i is an atomic query, evaluated by the subsystem i. Assumption: there are at least k objects (so that top k answers make sense) 15

6 Algorithm Sorted Access Phase: for each i, give the query A i under sorted access. Stop when there are at least k matches, that is, when there is a set L of at least k objects such that all the subsystems have output all the members of L Random Access Phase: for each object x that has been seen, do random access to each subsystem j to find µ Aj (x) Computation Phase: Compute the grade µ Q (x) =t(µ A1 (x), µ A2 (x),, µ Aj (x) ) for each object x that has been seen. Return the graded set Y containing the objects with the k highest grades 16?? X X X Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access X3 X1 X4 17 Sorted Access Phase (k=3)?? X X X X3 X1 X4 Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access 18

7 Sorted Access Phase (k=3)?? X X X X3 X1 X4 Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access 19 Sorted Access Phase (k=3)?? 0.90? X X X X3 X1 X4 Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access 20 Random Access Phase (k=3)?? X X X X3 X1 X4 Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access 21

8 Result (k=3) X X X X3 X1 X4 Assumptions: Q is monotonic Predicates provide sorted_access Predicates provide random_access 22 Advantage!! X X X X3 X1 X4 X1 and X4 have never been accessed! 23 Properties of the algorithm Correctness hold for monotone queries After finding the top k answers, in order to find the next k best answer we can continue where we left off. If the t function is min, the algorithm can be made more efficient. How??? 24

9 Use only one pred. for sorted access (k=3)?? X X X X3 X1 X4 25 Sorted+Random Access (k=3)?? X X X X3 X1 X4 Stop when the next value is smaller than the third candidate 26 Sorted+Random Access (k=3) X X X X3 X1 X4 X1, X3, and X4 have never been accessed! 27

10 Evaluating disjunctions of atomic queries Query: Q = A 1 A 2 A m Q : standard fuzzy disjunction Sorted Access Phase: for each i, give the query A i and collect the top k answers to this query Computation Phase: for each object x that has been returned by any of the m subsystems, compute h(x) = max{ µ Ai (x) }, for all i. Return the graded set Y containing the objects with the k highest grades h(x) 28 Weighting the Importance of Subqueries Q= (AlbumColor = black ) and (Shape = circle ) What if the user cares twice as much about colors as shape? Intuitively, we wish to assign twice as much weight to color as to shape in the user interface, sliders are one mechanism to convey information about the weights need to define the weighted version of aggregation functions 29 Weighting the Importance of Subqueries (ctd) The query Q is A 1 A 2 A m. g i is the score of conjunct A i f: function whose domain is the set of all tuples, of all sizes, over [0,1], and with range [0,1] f(g 1,,g m ) is the overall score. θ 1,, θ m >=0, θ i = 1 θ i is the weight of attribute i Θ= (θ 1,, θ m ) is a weighting 30

11 Weighting the Importance of Subqueries (ctd) For each weighting Θ= (θ 1,, θ m ), a function f Θ is derived, whose domain is the set of m- tuples f Θ (g 1,,g m ) is the overall score, when the weights are given by the weighting Θ ifθ 1 >= θ 2 >= >= θ m, then Θ= (θ 1,, θ m ) is said ordered. 31 Desiderata... f (1/m,, 1/m ) (g 1,,g m ) = f (g 1,,g m ) if all the weights are equal, the weighted function f Θ coincides with the corresponding unweighted one f (θ 1,., θm 1,0) (g 1,,g m ) = f (θ 1,., θm 1) (g 1,,g m ) if a particular argument has 0 weight, it can be dropped f (θ 1,., θm) (g 1,,g m ) is a continuous function of θ 1,, θ m 32 Weighting formula When θ 1 >= θ 2 >= >= θ m, f Θ (g 1, g m ) = (θ 1 -θ 2 ). f(g 1 ) + 2. (θ 2 -θ 3 ). f(g 1,g 2 )+ 3. (θ 3 -θ 4 ). f(g 1, g 2, g 3 )+ + m. θ m. f(g 1,...,g m ) Note: the weighting formula is well defined even when some θ i are equal. 33

12 Weighting formula (ctd) Monotonicity and strictness of the (unweighted) f is inherited by the weighted functions f Θ. In particular, the optimal algorithm to evaluate conjunctions of atomic queries preserves correctness and optimality also in the weighted case. 34 Adding filter conditions (Chauduri and Gravano) 35 Query model requirements Account for the grade of match between the value of an attribute of a multimedia object, and a given constant Grade (attr, value) (o) Real number in [0,1] attribute object 36

13 Query model requirements (2) Allow the user to specify thresholds on the grade of match of the acceptable objects (filter conditions) Atomic filter condition:» Grade (attr, value) (o)>=grade Compound conditions» conjunction/disjunction of conditions 37 Query model requirements(3): Enable the user to ask for only a few topmatching objects (ranking expressions) to compute a composite grade for an object from individual grades of match and the composition functions Min, Max 38 SQL-like syntax SQL-like syntax Select oid from Repository where Filter_condition Order[k] by Ranking_expression 39

14 example The repository contains information about criminals A record on every person on file consists of A textual description p (profile) A scanned fingerprint f A recording of a voice sample v. Query: Select oid from Repository where (Grade (v, V)>=0.5 and Grade(p, american citizen )>=0.9) or Grade(f,F) >= order[10] by max (grade(f,f), Grade(v,V)) Expressivity of the query model Do we really need both filter condition (F) and ranking condition (R)??? Can we embed the filter condition in a new ranking expression R F so that the top objects of R F are the top objects for R that satisfy F? 41 Expressivity of the query model Do we really need both filter condition (F) and ranking condition (R)??? Can we embed the filter condition in a new ranking expression R F so that the top objects of R F are the top objects for R that satisfy F? NO (counterexample!!!!!) 42

15 counterexample Let e1 = Grade(a1,v1) e2=grade(a2,v2) Filter condition F = e1 >= 0.2 Ranking expression R =e2 By contradiction, exists RF that satisfies both F and R RF equivalent to one of the following: e1, e2, min(e1,e2), max (e1, e2) 43 database (example) object e1 e2 Min(e1,e2) Max(e1,e2) o o o Storage-level access interface GradeSearch(attribute, value, min_grade) TopSearch (attribute, value, count) Probe(attribute, value, {oid}) Not all the repositories have to support all of these interfaces 45 at the physical level.

16 Filter conditions Assumption: the filter conditions are independent A filter condition f is independent if: Every atomic filter condition occurs at most once in f p(e 1 e n ) = Π (i=1..n) p(e i ), being any e i an atomic filter condition, and p(e i ) the probability that the filter condition e i is true. The repository requires the use of an index to evaluate every filter condition. 46 Possible evaluation strategies Use one GRADESEARCH for EACH atomic condition in the filter condition, and then merge the returned sets of object ids through a sequence of union/intersections Use GRADESEARCH only for SOME atomic condition, and for the rest of the conditions use PROBE The key optimization problem becomes to determine the set of filter conditions that are evaluated using Gradesearch. 47 Search minimal condition Goal: given a filter condition f, characterize the smallest sets of atomic conditions such that by searching the conditions in any of these sets we retrieve all the objects that satisfy f Example f =a 4 ((a 1 a 2 ) a 3 ) 48

17 Search minimal condition By searching on a condition using Grade Search we obtain a set of objects Some additional probes might be needed, to determine the set of objects that satisfy the rest of the condition as well residue of f for a Res(a,f) Boolean condition that the object retrieved using a must satisfy, in order to satisfy f. 49 residue examples f =a 4 ((a 1 a 2 ) a 3 ) Res( a 2, f) = a 1 a 4 Res(a 4,f) = (a 1 a 2 ) a 3 50 Search minimal conditions GOAL: to characterize the smallest sets of atomic conditions such that, by searching the conditions in any of these sets, we retrieve all the objects that satisfy f (plus some extra ones that are pruned out with probing) Example f =a 4 ((a 1 a 2 ) a 3 ) Search minimal condition sets: {a 4 } {a 1, a 3 } {a 2, a 3 } 51

18 Example (ctd) If we decide to search on {a 2, a 3 } Search on a 2, and probe the retrieved objects with Res( a 2, f) = a 1 a 4. Keep the objects that satisfy Res( a 2, f) Search on a 3, and probe the retrieved objects with Res( a 3, f) = a 4 Keep the object that satisfy Res( a 3, f) Return the objects kept. 52 Search minimal execution Execution like the one given in the previous example, based on any search minimal condition set. 53 Search minimal execution Execution like the one given in the previous example, based on any search minimal condition set. How do we pick a plan from the space of search minimal executions? 54

19 The cost model Statistics associated with each atomic condition a: Selectivity Factor Sel(a) Fraction of the objects in the repository that satisfy the condition a Search Cost SC(a) Cost of retrieving the ids of the objects that satisfy the condition a using Grade Search Probe Cost PC(a,p) Cost of checking the condition a for p objects, using the probe access method. 55 Cost of the Search minimal executions m: search minimal condition, for the filter condition f w: algorithm for probing conditions O a : number of objects that satisfy the condition a, that is, the product of the number of objects by the selectivity of a. R(a,f): residue of f for a (boolean condition that the objects retrieved using a should satisfy to satisfy the entire condition f) C w (f,m) = Σ a m (SC(a) + PC w (R(a,f), O a )) 56 Optimal search minimal condition for f Let f be a filter condition, and f a subexpression of f Inductive search-minimal condition for f wrt f: If f = a (atomic condition), then SM f (f ) ={a} If f = f 1 f n, then SM f (f ) = SM f ( f n, ), where C(f, SM f (f n, )) = min { C(f, SM f ( f 1, )),, C(f, SM f ( f n, )) } (break the ties arbitrarily) If f = f 1 f n, then SM f (f ) = SM f ( f 1, ) SM f ( f n, ) If f is independent, then SM f ( f ) is optimal 57

20 Theorem: The problem of determining an optimal search-minimal condition set for ARBITRARY filter conditions is NP-hard 58

Optimal Aggregation Algorithms for Middleware

Optimal Aggregation Algorithms for Middleware Optimal Aggregation Algorithms for Middleware Ronald Fagin Amnon Lotem Moni Naor Abstract: Assume that each object in a database has m grades, or scores, one for each of m attributes. For example, an object

More information

Optimal Aggregation Algorithms for Middleware

Optimal Aggregation Algorithms for Middleware Optimal Aggregation Algorithms for Middleware Ronald Fagin Amnon Lotem y Moni Naor z Abstract: Assume that each object in a database has m grades, or scores, one for each of m attributes. For example,

More information

Correlated subqueries. Query Optimization. Magic decorrelation. COUNT bug. Magic example (slide 2) Magic example (slide 1)

Correlated subqueries. Query Optimization. Magic decorrelation. COUNT bug. Magic example (slide 2) Magic example (slide 1) Correlated subqueries Query Optimization CPS Advanced Database Systems SELECT CID FROM Course Executing correlated subquery is expensive The subquery is evaluated once for every CPS course Decorrelate!

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

QSQL: Incorporating Logic-based Retrieval Conditions into SQL

QSQL: Incorporating Logic-based Retrieval Conditions into SQL QSQL: Incorporating Logic-based Retrieval Conditions into SQL Sebastian Lehrack and Ingo Schmitt Brandenburg University of Technology Cottbus Institute of Computer Science Chair of Database and Information

More information

On Tuning OWA Operators in a Flexible Querying Interface

On Tuning OWA Operators in a Flexible Querying Interface On Tuning OWA Operators in a Flexible Querying Interface Sławomir Zadrożny 1 and Janusz Kacprzyk 2 1 Warsaw School of Information Technology, ul. Newelska 6, 01-447 Warsaw, Poland 2 Systems Research Institute

More information

Fuzzy Answer Set semantics for Residuated Logic programs

Fuzzy Answer Set semantics for Residuated Logic programs semantics for Logic Nicolás Madrid & Universidad de Málaga September 23, 2009 Aims of this paper We are studying the introduction of two kinds of negations into residuated : Default negation: This negation

More information

Semantic Optimization Techniques for Preference Queries

Semantic Optimization Techniques for Preference Queries Semantic Optimization Techniques for Preference Queries Jan Chomicki Dept. of Computer Science and Engineering, University at Buffalo,Buffalo, NY 14260-2000, chomicki@cse.buffalo.edu Abstract Preference

More information

PHIL 422 Advanced Logic Inductive Proof

PHIL 422 Advanced Logic Inductive Proof PHIL 422 Advanced Logic Inductive Proof 1. Preamble: One of the most powerful tools in your meta-logical toolkit will be proof by induction. Just about every significant meta-logical result relies upon

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

George J. Klir Radim Belohlavek, Martin Trnecka. State University of New York (SUNY) Binghamton, New York 13902, USA

George J. Klir Radim Belohlavek, Martin Trnecka. State University of New York (SUNY) Binghamton, New York 13902, USA POSSIBILISTIC INFORMATION: A Tutorial Basic Level in Formal Concept Analysis: Interesting Concepts and Psychological Ramifications George J. Klir Radim Belohlavek, Martin Trnecka State University of New

More information

George J. Klir Radim Belohlavek, Martin Trnecka. State University of New York (SUNY) Binghamton, New York 13902, USA

George J. Klir Radim Belohlavek, Martin Trnecka. State University of New York (SUNY) Binghamton, New York 13902, USA POSSIBILISTIC INFORMATION: A Tutorial Basic Level in Formal Concept Analysis: Interesting Concepts and Psychological Ramifications George J. Klir Radim Belohlavek, Martin Trnecka State University of New

More information

Chap 2: Classical models for information retrieval

Chap 2: Classical models for information retrieval Chap 2: Classical models for information retrieval Jean-Pierre Chevallet & Philippe Mulhem LIG-MRIM Sept 2016 Jean-Pierre Chevallet & Philippe Mulhem Models of IR 1 / 81 Outline Basic IR Models 1 Basic

More information

Reductionist View: A Priori Algorithm and Vector-Space Text Retrieval. Sargur Srihari University at Buffalo The State University of New York

Reductionist View: A Priori Algorithm and Vector-Space Text Retrieval. Sargur Srihari University at Buffalo The State University of New York Reductionist View: A Priori Algorithm and Vector-Space Text Retrieval Sargur Srihari University at Buffalo The State University of New York 1 A Priori Algorithm for Association Rule Learning Association

More information

Flow Algorithms for Two Pipelined Filtering Problems

Flow Algorithms for Two Pipelined Filtering Problems Flow Algorithms for Two Pipelined Filtering Problems Anne Condon, University of British Columbia Amol Deshpande, University of Maryland Lisa Hellerstein, Polytechnic University, Brooklyn Ning Wu, Polytechnic

More information

Reasoning with Inconsistent and Uncertain Ontologies

Reasoning with Inconsistent and Uncertain Ontologies Reasoning with Inconsistent and Uncertain Ontologies Guilin Qi Southeast University China gqi@seu.edu.cn Reasoning Web 2012 September 05, 2012 Outline Probabilistic logic vs possibilistic logic Probabilistic

More information

Logic for Computer Science - Week 4 Natural Deduction

Logic for Computer Science - Week 4 Natural Deduction Logic for Computer Science - Week 4 Natural Deduction 1 Introduction In the previous lecture we have discussed some important notions about the semantics of propositional logic. 1. the truth value of a

More information

09 Modal Logic II. CS 3234: Logic and Formal Systems. October 14, Martin Henz and Aquinas Hobor

09 Modal Logic II. CS 3234: Logic and Formal Systems. October 14, Martin Henz and Aquinas Hobor Martin Henz and Aquinas Hobor October 14, 2010 Generated on Thursday 14 th October, 2010, 11:40 1 Review of Modal Logic 2 3 4 Motivation Syntax and Semantics Valid Formulas wrt Modalities Correspondence

More information

P Q1 Q2 Q3 Q4 Q5 Tot (60) (20) (20) (20) (60) (20) (200) You are allotted a maximum of 4 hours to complete this exam.

P Q1 Q2 Q3 Q4 Q5 Tot (60) (20) (20) (20) (60) (20) (200) You are allotted a maximum of 4 hours to complete this exam. Exam INFO-H-417 Database System Architecture 13 January 2014 Name: ULB Student ID: P Q1 Q2 Q3 Q4 Q5 Tot (60 (20 (20 (20 (60 (20 (200 Exam modalities You are allotted a maximum of 4 hours to complete this

More information

A FUZZY LINGUISTIC IRS MODEL BASED ON A 2-TUPLE FUZZY LINGUISTIC APPROACH

A FUZZY LINGUISTIC IRS MODEL BASED ON A 2-TUPLE FUZZY LINGUISTIC APPROACH International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems Vol. 15, No. (007) 5 50 c World Scientific Publishing Company A FUZZY LINGUISTIC IRS MODEL BASED ON A -TUPLE FUZZY LINGUISTIC

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC

More information

Propositional Logic and Semantics

Propositional Logic and Semantics Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no

More information

Profiling Sets for Preference Querying

Profiling Sets for Preference Querying Profiling Sets for Preference Querying Xi Zhang and Jan Chomicki Department of Computer Science and Engineering University at Buffalo, SUNY, U.S.A. {xizhang,chomicki}@cse.buffalo.edu Abstract. We propose

More information

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey.

How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague, such as: this paint is grey. Major results: (wrt propositional logic) How to reason correctly. How to reason efficiently. How to determine if a statement is true or false. Fuzzy logic deal with statements that are somewhat vague,

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Equational Logic. Chapter Syntax Terms and Term Algebras

Equational Logic. Chapter Syntax Terms and Term Algebras Chapter 2 Equational Logic 2.1 Syntax 2.1.1 Terms and Term Algebras The natural logic of algebra is equational logic, whose propositions are universally quantified identities between terms built up from

More information

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows. Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is

More information

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Leopoldo Bertossi 1, Solmaz Kolahi 2, and Laks V. S. Lakshmanan 2 1 Carleton University, Ottawa, Canada. bertossi@scs.carleton.ca

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model)

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Final exam Logic & Set Theory (2IT61) (correction model) TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica Final exam Logic & Set Theory (2IT61) (correction model) Thursday November 4, 2016, 9:00 12:00 hrs. (2) 1. Determine whether the abstract

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

Polynomial Space. The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem

Polynomial Space. The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem Polynomial Space The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem 1 Polynomial-Space-Bounded TM s A TM M is said to be polyspacebounded if there is a polynomial

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

Friendly Logics, Fall 2015, Lecture Notes 5

Friendly Logics, Fall 2015, Lecture Notes 5 Friendly Logics, Fall 2015, Lecture Notes 5 Val Tannen 1 FO definability In these lecture notes we restrict attention to relational vocabularies i.e., vocabularies consisting only of relation symbols (or

More information

Pei Wang( 王培 ) Temple University, Philadelphia, USA

Pei Wang( 王培 ) Temple University, Philadelphia, USA Pei Wang( 王培 ) Temple University, Philadelphia, USA Artificial General Intelligence (AGI): a small research community in AI that believes Intelligence is a general-purpose capability Intelligence should

More information

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations

Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations Existential Second-Order Logic and Modal Logic with Quantified Accessibility Relations preprint Lauri Hella University of Tampere Antti Kuusisto University of Bremen Abstract This article investigates

More information

Logical Agents. September 14, 2004

Logical Agents. September 14, 2004 Logical Agents September 14, 2004 The aim of AI is to develop intelligent agents that can reason about actions and their effects and about the environment, create plans to achieve a goal, execute the plans,

More information

Artificial Intelligence Chapter 7: Logical Agents

Artificial Intelligence Chapter 7: Logical Agents Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents

More information

CS632 Notes on Relational Query Languages I

CS632 Notes on Relational Query Languages I CS632 Notes on Relational Query Languages I A. Demers 6 Feb 2003 1 Introduction Here we define relations, and introduce our notational conventions, which are taken almost directly from [AD93]. We begin

More information

Overview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang

Overview of Topics. Finite Model Theory. Finite Model Theory. Connections to Database Theory. Qing Wang Overview of Topics Finite Model Theory Part 1: Introduction 1 What is finite model theory? 2 Connections to some areas in CS Qing Wang qing.wang@anu.edu.au Database theory Complexity theory 3 Basic definitions

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

Learning Goals of CS245 Logic and Computation

Learning Goals of CS245 Logic and Computation Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction

More information

Propositional Logic, Predicates, and Equivalence

Propositional Logic, Predicates, and Equivalence Chapter 1 Propositional Logic, Predicates, and Equivalence A statement or a proposition is a sentence that is true (T) or false (F) but not both. The symbol denotes not, denotes and, and denotes or. If

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Semantics and Pragmatics of NLP

Semantics and Pragmatics of NLP Semantics and Pragmatics of NLP Alex Ewan School of Informatics University of Edinburgh 28 January 2008 1 2 3 Taking Stock We have: Introduced syntax and semantics for FOL plus lambdas. Represented FOL

More information

CSE-4412(M) Midterm. There are five major questions, each worth 10 points, for a total of 50 points. Points for each sub-question are as indicated.

CSE-4412(M) Midterm. There are five major questions, each worth 10 points, for a total of 50 points. Points for each sub-question are as indicated. 22 February 2007 CSE-4412(M) Midterm p. 1 of 12 CSE-4412(M) Midterm Sur / Last Name: Given / First Name: Student ID: Instructor: Parke Godfrey Exam Duration: 75 minutes Term: Winter 2007 Answer the following

More information

2.2: Logical Equivalence: The Laws of Logic

2.2: Logical Equivalence: The Laws of Logic Example (2.7) For primitive statement p and q, construct a truth table for each of the following compound statements. a) p q b) p q Here we see that the corresponding truth tables for two statement p q

More information

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation

1 First-order logic. 1 Syntax of first-order logic. 2 Semantics of first-order logic. 3 First-order logic queries. 2 First-order query evaluation Knowledge Bases and Databases Part 1: First-Order Queries Diego Calvanese Faculty of Computer Science Master of Science in Computer Science A.Y. 2007/2008 Overview of Part 1: First-order queries 1 First-order

More information

With Question/Answer Animations. Chapter 2

With Question/Answer Animations. Chapter 2 With Question/Answer Animations Chapter 2 Chapter Summary Sets The Language of Sets Set Operations Set Identities Functions Types of Functions Operations on Functions Sequences and Summations Types of

More information

Chapter One. The Real Number System

Chapter One. The Real Number System Chapter One. The Real Number System We shall give a quick introduction to the real number system. It is imperative that we know how the set of real numbers behaves in the way that its completeness and

More information

Data Dependencies in the Presence of Difference

Data Dependencies in the Presence of Difference Data Dependencies in the Presence of Difference Tsinghua University sxsong@tsinghua.edu.cn Outline Introduction Application Foundation Discovery Conclusion and Future Work Data Dependencies in the Presence

More information

ALC Concept Learning with Refinement Operators

ALC Concept Learning with Refinement Operators ALC Concept Learning with Refinement Operators Jens Lehmann Pascal Hitzler June 17, 2007 Outline 1 Introduction to Description Logics and OWL 2 The Learning Problem 3 Refinement Operators and Their Properties

More information

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory Motivation CS389L: Automated Logical Reasoning Lecture 10: Overview of First-Order Theories Işıl Dillig Last few lectures: Full first-order logic In FOL, functions/predicates are uninterpreted (i.e., structure

More information

Notes. Corneliu Popeea. May 3, 2013

Notes. Corneliu Popeea. May 3, 2013 Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following

More information

Finite Model Theory: First-Order Logic on the Class of Finite Models

Finite Model Theory: First-Order Logic on the Class of Finite Models 1 Finite Model Theory: First-Order Logic on the Class of Finite Models Anuj Dawar University of Cambridge Modnet Tutorial, La Roche, 21 April 2008 2 Finite Model Theory In the 1980s, the term finite model

More information

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events

Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Pairing Transitive Closure and Reduction to Efficiently Reason about Partially Ordered Events Massimo Franceschet Angelo Montanari Dipartimento di Matematica e Informatica, Università di Udine Via delle

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

Natural Language Processing. Topics in Information Retrieval. Updated 5/10

Natural Language Processing. Topics in Information Retrieval. Updated 5/10 Natural Language Processing Topics in Information Retrieval Updated 5/10 Outline Introduction to IR Design features of IR systems Evaluation measures The vector space model Latent semantic indexing Background

More information

Logic and Proofs. (A brief summary)

Logic and Proofs. (A brief summary) Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations

More information

Decision Tree Learning

Decision Tree Learning Decision Tree Learning Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. Machine Learning, Chapter 3 2. Data Mining: Concepts, Models,

More information

The Structure of Inverses in Schema Mappings

The Structure of Inverses in Schema Mappings To appear: J. ACM The Structure of Inverses in Schema Mappings Ronald Fagin and Alan Nash IBM Almaden Research Center 650 Harry Road San Jose, CA 95120 Contact email: fagin@almaden.ibm.com Abstract A schema

More information

Artificial Intelligence Knowledge Representation I

Artificial Intelligence Knowledge Representation I Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to

More information

Data Mining and Machine Learning

Data Mining and Machine Learning Data Mining and Machine Learning Concept Learning and Version Spaces Introduction Concept Learning Generality Relations Refinement Operators Structured Hypothesis Spaces Simple algorithms Find-S Find-G

More information

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007)

Löwenheim-Skolem Theorems, Countable Approximations, and L ω. David W. Kueker (Lecture Notes, Fall 2007) Löwenheim-Skolem Theorems, Countable Approximations, and L ω 0. Introduction David W. Kueker (Lecture Notes, Fall 2007) In its simplest form the Löwenheim-Skolem Theorem for L ω1 ω states that if σ L ω1

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

From Constructibility and Absoluteness to Computability and Domain Independence

From Constructibility and Absoluteness to Computability and Domain Independence From Constructibility and Absoluteness to Computability and Domain Independence Arnon Avron School of Computer Science Tel Aviv University, Tel Aviv 69978, Israel aa@math.tau.ac.il Abstract. Gödel s main

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

Abstract Dialectical Frameworks

Abstract Dialectical Frameworks Abstract Dialectical Frameworks Gerhard Brewka Computer Science Institute University of Leipzig brewka@informatik.uni-leipzig.de joint work with Stefan Woltran G. Brewka (Leipzig) KR 2010 1 / 18 Outline

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

EECS 349:Machine Learning Bryan Pardo

EECS 349:Machine Learning Bryan Pardo EECS 349:Machine Learning Bryan Pardo Topic 2: Decision Trees (Includes content provided by: Russel & Norvig, D. Downie, P. Domingos) 1 General Learning Task There is a set of possible examples Each example

More information

Fuzzy Propositional Logic for the Knowledge Representation

Fuzzy Propositional Logic for the Knowledge Representation Fuzzy Propositional Logic for the Knowledge Representation Alexander Savinov Institute of Mathematics Academy of Sciences Academiei 5 277028 Kishinev Moldova (CIS) Phone: (373+2) 73-81-30 EMAIL: 23LSII@MATH.MOLDOVA.SU

More information

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement.

More information

Trichotomy Results on the Complexity of Reasoning with Disjunctive Logic Programs

Trichotomy Results on the Complexity of Reasoning with Disjunctive Logic Programs Trichotomy Results on the Complexity of Reasoning with Disjunctive Logic Programs Mirosław Truszczyński Department of Computer Science, University of Kentucky, Lexington, KY 40506, USA Abstract. We present

More information

Linear Temporal Logic (LTL)

Linear Temporal Logic (LTL) Chapter 9 Linear Temporal Logic (LTL) This chapter introduces the Linear Temporal Logic (LTL) to reason about state properties of Labelled Transition Systems defined in the previous chapter. We will first

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

More information

Homework 4 Solutions

Homework 4 Solutions CS 174: Combinatorics and Discrete Probability Fall 01 Homework 4 Solutions Problem 1. (Exercise 3.4 from MU 5 points) Recall the randomized algorithm discussed in class for finding the median of a set

More information

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and

7 RC Simulates RA. Lemma: For every RA expression E(A 1... A k ) there exists a DRC formula F with F V (F ) = {A 1,..., A k } and 7 RC Simulates RA. We now show that DRC (and hence TRC) is at least as expressive as RA. That is, given an RA expression E that mentions at most C, there is an equivalent DRC expression E that mentions

More information

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19 PROPOSITIONAL LOGIC VL Logik: WS 2018/19 (Version 2018.2) Martina Seidl (martina.seidl@jku.at), Armin Biere (biere@jku.at) Institut für Formale Modelle und Verifikation BOX Game: Rules 1. The game board

More information

THE problem of updating a database through a set

THE problem of updating a database through a set FULL VERSION WITH COMPLETE PROOFS 1 Lossless Selection Views under Conditional Domain Constraints Ingo Feinerer, Enrico Franconi and Paolo Guagliardo name suggests, prescribes how a database relation can

More information

CSCE 561 Information Retrieval System Models

CSCE 561 Information Retrieval System Models CSCE 561 Information Retrieval System Models Satya Katragadda 26 August 2015 Agenda Introduction to Information Retrieval Inverted Index IR System Models Boolean Retrieval Model 2 Introduction Information

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

More information

Fuzzy Systems. Introduction

Fuzzy Systems. Introduction Fuzzy Systems Introduction Prof. Dr. Rudolf Kruse Christian Moewes {kruse,cmoewes}@iws.cs.uni-magdeburg.de Otto-von-Guericke University of Magdeburg Faculty of Computer Science Department of Knowledge

More information

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018

More information

cis32-ai lecture # 18 mon-3-apr-2006

cis32-ai lecture # 18 mon-3-apr-2006 cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem

More information

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic

Preliminaries. Introduction to EF-games. Inexpressivity results for first-order logic. Normal forms for first-order logic Introduction to EF-games Inexpressivity results for first-order logic Normal forms for first-order logic Algorithms and complexity for specific classes of structures General complexity bounds Preliminaries

More information

Yet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs

Yet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs Yet Another Proof of the Strong Equivalence Between Propositional Theories and Logic Programs Joohyung Lee and Ravi Palla School of Computing and Informatics Arizona State University, Tempe, AZ, USA {joolee,

More information

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation Outline Formale Methoden der Informatik First-Order Logic for Forgetters Uwe Egly Vienna University of Technology Institute of Information Systems Knowledge-Based Systems Group Motivation Syntax of PL1

More information

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems

More information

Crowdsourcing Pareto-Optimal Object Finding by Pairwise Comparisons

Crowdsourcing Pareto-Optimal Object Finding by Pairwise Comparisons 2015 The University of Texas at Arlington. All Rights Reserved. Crowdsourcing Pareto-Optimal Object Finding by Pairwise Comparisons Abolfazl Asudeh, Gensheng Zhang, Naeemul Hassan, Chengkai Li, Gergely

More information

Grounding Formulas with Complex Terms

Grounding Formulas with Complex Terms Grounding Formulas with Complex Terms Amir Aavani, Xiongnan (Newman) Wu, Eugenia Ternovska, David Mitchell Simon Fraser University {aaa78,xwa33,ter,mitchel}@sfu.ca Abstract. Given a finite domain, grounding

More information

Knowledge-based systems

Knowledge-based systems CS 750 Foundations of I Lecture 6 Knowledge-based systems Milos Hauskrecht milos@cs.pitt.edu 539 Sennott Square dministration announcements Midterm: Thursda October 6, 07 In-class Closed book What does

More information

Bounded Query Rewriting Using Views

Bounded Query Rewriting Using Views Bounded Query Rewriting Using Views Yang Cao 1,3 Wenfei Fan 1,3 Floris Geerts 2 Ping Lu 3 1 University of Edinburgh 2 University of Antwerp 3 Beihang University {wenfei@inf, Y.Cao-17@sms}.ed.ac.uk, floris.geerts@uantwerpen.be,

More information

Prime Implicate Normal Form for ALC Concepts

Prime Implicate Normal Form for ALC Concepts Prime Implicate Normal Form for ALC Concepts Meghyn Bienvenu IRIT-UPS, 118 route de Narbonne, 31062 Toulouse Cedex, France IRIT Research Report IRIT/RR 2008-6 FR April 2008 Abstract In this paper, we present

More information

Methods of Partial Logic for Knowledge Representation and Deductive Reasoning in Incompletely Specified Domains

Methods of Partial Logic for Knowledge Representation and Deductive Reasoning in Incompletely Specified Domains Methods of Partial Logic for Knowledge Representation and Deductive Reasoning in Incompletely Specified Domains Anatoly Prihozhy and Liudmila Prihozhaya Information Technologies and Robotics Department,

More information

Tecniche di Verifica. Introduction to Propositional Logic

Tecniche di Verifica. Introduction to Propositional Logic Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called

More information

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler Database Theory Database Theory VU 181.140, SS 2018 5. Complexity of Query Evaluation Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 17 April, 2018 Pichler

More information

MAT2345 Discrete Math

MAT2345 Discrete Math Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview

More information

Expressing Security Properties Using Selective Interleaving Functions

Expressing Security Properties Using Selective Interleaving Functions Expressing Security Properties Using Selective Interleaving Functions Joseph Halpern and Sabina Petride August 8, 2008 Abstract McLean s notion of Selective Interleaving Functions (SIFs) is perhaps the

More information

Definition: Alternating time and space Game Semantics: State of machine determines who

Definition: Alternating time and space Game Semantics: State of machine determines who CMPSCI 601: Recall From Last Time Lecture 3 Definition: Alternating time and space Game Semantics: State of machine determines who controls, White wants it to accept, Black wants it to reject. White wins

More information