Werner Nutt. Yehoshua Sagiv, Sara Shurin. The Hebrew University
|
|
- Elaine Powers
- 5 years ago
- Views:
Transcription
1 Deciding Equivalences among Aggregate Queries Werner Nutt German Research Center for AI (DFKI) Saarbrucken, Germany Yehoshua Sagiv, Sara Shurin The Hebrew University Jerusalem, Israel Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 1
2 Acknowledgement This work originated within the ESPRIT Long Term Research Project "Foundations of Data Warehouse Quality" (DWQ) Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 2
3 Motivation In recent year, increased interest in optimization of aggregate queries data warehousing decision support Aggregate queries are costly they touch many data items ; need for specialized optimization techniques Idea: Use previous results to answer new queries exploit redundancy! create redundancy! To do so, we have to be able to answer the question: \What can be computed from what?" (= the view usability problem) Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 3
4 Decision Support Queries Product Region Sales This Month Growth in Sales vs. Last Month Sales as % of Category Change in Sales as % of Category vs. Last Month Framis Central % 31% 3% Framis Eastern 179-3% 28% -1% Framis Western 55 5% 12% 1% Total Framis 344 6% 33% 1% Widget Central 66 2% 18% 2% Widget Eastern 102 4% 12% 5% Widget Western 39-9% 9% -1% Total Widget 207 1% 13% 4% Grand Total 551 4% 20% 2% Example of a business report. Exceptionally high values are marked with an asterisk (). Exceptionally low values are shown as bold. (The example is taken from R. Kimball, The Data Warehouse Toolkit, Addison Wesley) An SQL-query for the rst column: Select From Where p.product-name as Product, m.region name as Region, sum(f.sales) as Sales This Month sales fact f, product p, market m, time t f.product key = p.product key, f.market key = m.market key, f.time key = t.time key, p.product name in ('Framis', 'Widget'), t.month = 'May', t.year = 1996 Groupby p.product name, m.region name Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 4
5 Aggregate Queries: Abstract Notation SQL notation: Select p.a, s.b, max(r.c), sum(s.d), count(*) From p, r, s Where p.z = r.z, p.a = s.a, r.w = 'Joe', s.b < 10 Groupby p.a, s.b Abstract notation: q(a; B; max(c); sum(d); count) s(a; B; D) &p(a; Z) &r(z; C; W) & W = 0 Joe 0 & B 10 In general: q(x 1 ;:::;xm; 1 (y 1 );:::;n(yn)) R & C Short: q(x; (y)) R & C, with R C conjunction of relational atoms conjunction of comparisons Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 5
6 The View Usability Problem Given views and a query v i (x i ; i (y i )) R i & C i is there a query q(x; (y)) R & C; such that ~q(x; (y)) ~ R & ~ C; R consists of instantiations of the v i q and ~q are equivalent (i.e., q and ~q produce the same results over all databases) ; We need a syntactic characterization of equivalence! Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 6
7 Dimensions of the Problem q(x; (y) ) R & C Which aggregate functions? { min, max { count { sum { count distinct {... Queries { without comparisons { with comparisons over the: rationals, integers Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 7
8 Previous Work Equivalence of conjunctive queries Chandra/Merlin 1977, Klug 1988 View usability for conjunctive queries Levy et al Containment and equivalence of conjunctive queries under bag-semantics Chaudhuri/Vardi 1993 Equivalence preserving transformations of aggregate queries Levy/Mumick 1994, Gupta et al View usability for aggregate queries (sucient criteria) Srivastava et al View usability for data cubes Harinarayan et al. 1996, Gupta et al ; (Almost) no complete characterizations for aggregate queries! Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 8
9 Decouple Aggregations Observation: In q(prod; max(sales); sum(prot)) R & C, the aggregates max(sales), sum(prot), are functionally dependent on Prod. Denition: q(x; j (y j )) R & C is the j-th kernel of q(x; 1 (y 1 );:::;n(yn)) R & C. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 9
10 Divide and Conquer Theorem: q(x; 1 (y 1 );:::;n(yn)) q 0 (x; 1 (y 1 );:::;n(yn)) are equivalent if and only if their kernels q j (x; j (y j )) q 0 j(x; j (y j )) are pairwise equivalent for all j 2 1::n. ; it suces to solve the equivalence problem for queries with a single aggregate term q(x; (y)) R & C (simple aggregate queries). Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 10
11 Aggregate Queries and Conjunctive Queries The core of q(x; (y)) is the conjunctive query R & C q(x; y) R & C: Examples: The core of is q(x; sum(y)) R & C q(x; y) R & C: The core of is q(x; count) R & C q(x) R & C: Strategy: Reduce equivalence of simple aggregate queries to properties of their cores. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 11
12 Reminder on Conjunctive Queries Conjunctive queries have the form q(x) relational atom with variables R conjunction of relational atoms & C conjunction of comparisons q D := the result of q over database D q and q 0 are equivalent (written q q 0 ) i q D = q 0D for all db's D q is contained in q 0 (written q q 0 ) i q D q 0D for all db's D ; How can we check containment? Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 12
13 Query Homomorphisms An homomorphism from q 0 (x) R 0 & C 0 to q(x) R & C is a substitution such that x =x R 0 R C j= C 0. Theorem (Chandra/Merlin 77): For relational conjunctive queries: q q 0, there is an homomorphism from q 0 to q Finding an homomorphism is NP-complete! Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 13
14 Containment and Comparisons Classical example: q 0 p(u; v) &uv q p(y; z) &p(z; y) We have q q 0, but no homomorphism from q 0 to q. Idea: replace q with its linear expansion (q L ) L! q fy<zg p(y; z) &p(z; y) &y<z q fy=zg p(y; z) &p(z; y) &y = z q fy>zg p(y; z) &p(z; y) &y>z (case analysis) Theorem (Klug 88): q q 0, for every q L in (q L ) L, there is an homomorphism from q 0 to q L Containment with comparisons is P 2 -complete. (van der Meyden) Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 14
15 Relational Max-Queries q(x; max(y)) R q 0 (x; max(y)) R 0? Theorem: For relational max-queries: q q 0, the cores q and q 0 are equivalent Relational queries deliver the same max only if they deliver the same values! Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 15
16 Max-Queries with Comparisons The theorem fails if there are comparisons. q(max(y)) p(y) & p(z) &z<y q 0 (max(y)) p(y) & p(z 1 )&p(z 2 )&z 1 <z 2 Observations: q returns all elements of p, but the least q 0 returns all elements q and q 0 return answers if p has at least two elements ) the max-queries are equivalent. Which property of cores entails equivalence of max-queries? Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 16
17 Dominance Denition: q is dominated by q 0 i for every db, if q returns ( d; d), then q 0 returns some ( d; d0 ) such that d d 0. Proposition: For arbitrary max-queries: q q 0, the cores q and q 0 dominate each other ; How can we check dominance? Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 17
18 Dominance Mappings A dominance mapping from q 0 (x; y) R 0 & C 0 to q(x; y) R & C is like a homomorphism, except that C j= y (y) instead of y = (y). Theorem: q is dominated by q 0, for every q L in the lin. expansion of q, there is a dominance mapping from q 0 to q L Corollary: Equivalence of max-queries is P 2 -complete. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 18
19 Relational Count-Queries q(x; count) R q 0 (x; count) R 0? q(x) and q 0 (x) return the same results with the same multiplicities over every db, i.e., q(x) and q 0 (x) are bag-set-equivalent Theorem (Chaudhuri/Vardi 93): If q, q 0 are relational queries, then q and q 0 are bag-set-equivalent, q and q0 are isomorphic I.e., q and q 0 are the same, up to renaming of variables. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 19
20 Count-Queries with Comparisons The theorem fails if there are comparisons. q(count) p(x) &p(y) &p(z) & x<y& x<z q 0 (count) p(x) &p(y) &p(z) & x<z& y<z Observations: q and q 0 are not isomorphic q and q 0 are equivalent How can we check bag-set-equivalence? Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 20
21 Isomorphic Linear Expansions Let (q L ) L, (q 0 M ) M be linear expansions of q, q 0. Denition: (q L ) L and (q 0 M ) M are isomorphic i there is a bijection :(q L ) L! (q 0 M ) M such that q L and q 0 (L) are isomorphic, for all L. t q t L1 qm 0 1 X > t XXXXXXXXXXXXXXXX X Xz XXXXXXXXXXXXXXXX t Xz Z ZZ Z ZZ t Z ZZ * Z. ZZ. Z ZZ Z Z t Z~ q L2 t q 0 M 2 q L3 t q 0 M 3 q L4 t q 0 M 4 q Lk t q 0 M k Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 21
22 Equivalence of General Count-Queries Theorem: If q, q 0 are arbitrary conjunctive queries, then q and q 0 are bag-set-equivalent, q and q 0 have isomorphic linear expansions Corollary: The following can be decided with PSPACE: Bag-set-equivalence of conjunctive queries Equivalence of count-queries Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 22
23 Sum-Queries When are q(x; sum(y)) q 0 (x; sum(y))? Bag-set-equivalence of the cores is a sucient condition. But is it necessary? Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 23
24 Sum-Queries: Diculty 1 The cores of q and q 0 are not bag-set-equivalent: q(sum(y)) q 0 (sum(y)) p(1) & p(2) & p(3) & p(y) &1 y 3 p(1) & p(2) & p(3) & p(y) &1 y 2& p(z) &1 z 2 Over the integers, q and q 0 are equivalent, since 1+2+3= : Over the rationals, they are not. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 24
25 Sum-Queries: Diculty 2 q(sum(y)) q 0 (sum(y)) p(y) &0<y& p(z) &0<z& p(w) &0 w p(y) &0 y & p(z) &0<z& p(w) &0 w q and q 0 return non-zero numbers with the same multiplicity...but q 0 may return 0, while q does not ) q and q 0 are equivalent, but the cores are not Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 25
26 Equivalence of Sum-Queries Diculties arise with comparisons and constants. Theorem: If q(x; sum(y)), q 0 (x; sum(y)) are sum-queries without comparisons or without constants, then q and q 0 are equivalent, the cores q and q0 are bag-set-equivalent In the general case, the characterization is complex. Theorem: For sum-queries with comparisons over the integers, or over the rationals, equivalence can be decided with PSPACE. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 26
27 Linear Queries A query is linear if there are no multiple occurrences of the same predicate. Known: Containment of linear conjunctive queries under set-semantics is PTIMEdecidable. We have generalized this result: Theorem: For linear queries, the following problems are in PTIME: bag-set-equivalence of conjunctive queries equivalence of max-queries equivalence of count-queries equivalence of sum-queries Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 27
28 Conclusion Complete characterizations for the equivalence of aggregate queries with min, max, count, and sum. Characterization for special cases of queries with count distinct Polynomiality in the case of linear queries Foundation for solving the view usability problem for aggregate queries. Deciding Equivalences among Aggregate Queries PODS June 1998 { Slide 28
Logic and Databases. Phokion G. Kolaitis. UC Santa Cruz & IBM Research Almaden. Lecture 4 Part 1
Logic and Databases Phokion G. Kolaitis UC Santa Cruz & IBM Research Almaden Lecture 4 Part 1 1 Thematic Roadmap Logic and Database Query Languages Relational Algebra and Relational Calculus Conjunctive
More informationThe Query Containment Problem: Set Semantics vs. Bag Semantics. Phokion G. Kolaitis University of California Santa Cruz & IBM Research - Almaden
The Query Containment Problem: Set Semantics vs. Bag Semantics Phokion G. Kolaitis University of California Santa Cruz & IBM Research - Almaden PROBLEMS Problems worthy of attack prove their worth by hitting
More informationÖzgür L. Özçep Data Exchange 2
INSTITUT FÜR INFORMATIONSSYSTEME Özgür L. Özçep Data Exchange 2 Lecture 6: Universal Solutions, Core, Certain Answers 23 November, 2016 Foundations of Ontologies and Databases for Information Systems CS5130
More informationQuery answering using views
Query answering using views General setting: database relations R 1,...,R n. Several views V 1,...,V k are defined as results of queries over the R i s. We have a query Q over R 1,...,R n. Question: Can
More informationGAV-sound with conjunctive queries
GAV-sound with conjunctive queries Source and global schema as before: source R 1 (A, B),R 2 (B,C) Global schema: T 1 (A, C), T 2 (B,C) GAV mappings become sound: T 1 {x, y, z R 1 (x,y) R 2 (y,z)} T 2
More informationFoundations of Databases
Foundations of Databases (Slides adapted from Thomas Eiter, Leonid Libkin and Werner Nutt) Foundations of Databases 1 Quer optimization: finding a good wa to evaluate a quer Queries are declarative, and
More informationarxiv: v1 [cs.db] 1 Sep 2015
Decidability of Equivalence of Aggregate Count-Distinct Queries Babak Bagheri Harari Val Tannen Computer & Information Science Department University of Pennsylvania arxiv:1509.00100v1 [cs.db] 1 Sep 2015
More informationPreliminaries. 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 informationCMPS 277 Principles of Database Systems. Lecture #9
CMPS 277 Principles of Database Systems http://www.soe.classes.edu/cmps277/winter10 Lecture #9 1 Summary The Query Evaluation Problem for Relational Calculus is PSPACEcomplete. The Query Equivalence Problem
More informationA DARK GREY P O N T, with a Switch Tail, and a small Star on the Forehead. Any
Y Y Y X X «/ YY Y Y ««Y x ) & \ & & } # Y \#$& / Y Y X» \\ / X X X x & Y Y X «q «z \x» = q Y # % \ & [ & Z \ & { + % ) / / «q zy» / & / / / & x x X / % % ) Y x X Y $ Z % Y Y x x } / % «] «] # z» & Y X»
More informationLogic Part I: Classical Logic and Its Semantics
Logic Part I: Classical Logic and Its Semantics Max Schäfer Formosan Summer School on Logic, Language, and Computation 2007 July 2, 2007 1 / 51 Principles of Classical Logic classical logic seeks to model
More informationPart II Logic and Set Theory
Part II Logic and Set Theory Theorems Based on lectures by I. B. Leader Notes taken by Dexter Chua Lent 2015 These notes are not endorsed by the lecturers, and I have modified them (often significantly)
More informationFrom 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 informationThe Containment Problem for Real Conjunctive Queries with Inequalities
The Containment Problem for Real Conjunctive Queries with Inequalities T.S. Jayram IBM Almaden jayram@almaden.ibm.com Phokion G. Kolaitis IBM Almaden kolaitis@almaden.ibm.com Erik Vee IBM Almaden vee@almaden.ibm.com
More informationProvenance Semirings. Todd Green Grigoris Karvounarakis Val Tannen. presented by Clemens Ley
Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place of origin Provenance Semirings Todd Green Grigoris Karvounarakis Val Tannen presented by Clemens Ley place
More informationSome algorithmic improvements for the containment problem of conjunctive queries with negation
Some algorithmic improvements for the containment problem of conjunctive queries with negation Michel Leclère and Marie-Laure Mugnier LIRMM, Université de Montpellier, 6, rue Ada, F-3439 Montpellier cedex
More informationDeductive Verification
Deductive Verification Mooly Sagiv Slides from Zvonimir Rakamaric First-Order Logic A formal notation for mathematics, with expressions involving Propositional symbols Predicates Functions and constant
More informationIntroduction to Arithmetic Geometry Fall 2013 Lecture #24 12/03/2013
18.78 Introduction to Arithmetic Geometry Fall 013 Lecture #4 1/03/013 4.1 Isogenies of elliptic curves Definition 4.1. Let E 1 /k and E /k be elliptic curves with distinguished rational points O 1 and
More informationCourse information. Winter ATFD
Course information More information next week This is a challenging course that will put you at the forefront of current data management research Lots of work done by you: extra reading: at least 4 research
More informationApproximate Rewriting of Queries Using Views
Approximate Rewriting of Queries Using Views Foto Afrati 1, Manik Chandrachud 2, Rada Chirkova 2, and Prasenjit Mitra 3 1 School of Electrical and Computer Engineering National Technical University of
More informationSatisfiability Modulo Theories (SMT)
CS510 Software Engineering Satisfiability Modulo Theories (SMT) Slides modified from those by Aarti Gupta Textbook: The Calculus of Computation by A. Bradley and Z. Manna 1 Satisfiability Modulo Theory
More informationA Proof-Theoretic Approach to Irrelevance: Richard E. Fikes. KSL, Stanford University. et al., 1994b].
A Proof-Theoretic Approach to Irrelevance: Foundations and Applications Alon Y. Levy AT&T Bell Laboratories Murray Hill, NJ, 7974 levy@research.att.com Richard E. Fikes KSL, Stanford University Palo Alto,
More informationINTRODUCTION TO LOGIC
INTRODUCTION TO LOGIC 6 Natural Deduction Volker Halbach There s nothing you can t prove if your outlook is only sufficiently limited. Dorothy L. Sayers http://www.philosophy.ox.ac.uk/lectures/ undergraduate_questionnaire
More informationFirst-Order Predicate Logic. Basics
First-Order Predicate Logic Basics 1 Syntax of predicate logic: terms A variable is a symbol of the form x i where i = 1, 2, 3.... A function symbol is of the form fi k where i = 1, 2, 3... und k = 0,
More informationCOMP9414: Artificial Intelligence First-Order Logic
COMP9414, Wednesday 13 April, 2005 First-Order Logic 2 COMP9414: Artificial Intelligence First-Order Logic Overview Syntax of First-Order Logic Semantics of First-Order Logic Conjunctive Normal Form Wayne
More informationPredicate Logic. Andreas Klappenecker
Predicate Logic Andreas Klappenecker Predicates A function P from a set D to the set Prop of propositions is called a predicate. The set D is called the domain of P. Example Let D=Z be the set of integers.
More informationMotivation. 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 informationThe semantics of ALN knowledge bases is the standard model-based semantics of rst-order logic. An interpretation I contains a non-empty domain O I. It
Backward Reasoning in Aboxes for Query Answering Marie-Christine Rousset L.R.I. Computer Science Laboratory C.N.R.S & University of Paris-Sud Building 490, 91405, Orsay Cedex, France mcr@lri.fr Abstract
More informationLocally Consistent Transformations and Query Answering in Data Exchange
Locally Consistent Transformations and Query Answering in Data Exchange Marcelo Arenas University of Toronto marenas@cs.toronto.edu Pablo Barceló University of Toronto pablo@cs.toronto.edu Ronald Fagin
More informationCHMC: Finite Fields 9/23/17
CHMC: Finite Fields 9/23/17 1 Introduction This worksheet is an introduction to the fascinating subject of finite fields. Finite fields have many important applications in coding theory and cryptography,
More informationA Unit Resolution Approach to Knowledge Compilation. 2. Preliminaries
A Unit Resolution Approach to Knowledge Compilation Arindama Singh and Manoj K Raut Department of Mathematics Indian Institute of Technology Chennai-600036, India Abstract : Knowledge compilation deals
More informationDatalog : A Family of Languages for Ontology Querying
Datalog : A Family of Languages for Ontology Querying Georg Gottlob Department of Computer Science University of Oxford joint work with Andrea Calì,Thomas Lukasiewicz, Marco Manna, Andreas Pieris et al.
More informationRelational Algebra on Bags. Why Bags? Operations on Bags. Example: Bag Selection. σ A+B < 5 (R) = A B
Relational Algebra on Bags Why Bags? 13 14 A bag (or multiset ) is like a set, but an element may appear more than once. Example: {1,2,1,3} is a bag. Example: {1,2,3} is also a bag that happens to be a
More informationReview. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions
Review Propositions, propositional operators, truth tables Logical Equivalences. Tautologies & contradictions Some common logical equivalences Predicates & quantifiers Some logical equivalences involving
More informationOverview 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 informationDiscrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques
Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques Colin Stirling Informatics Some slides based on ones by Myrto Arapinis Colin Stirling (Informatics) Discrete Mathematics
More informationP A L A C E P IE R, S T. L E O N A R D S. R a n n o w, q u a r r y. W WALTER CR O TC H, Esq., Local Chairman. E. CO O PER EVANS, Esq.,.
? ( # [ ( 8? [ > 3 Q [ ««> » 9 Q { «33 Q> 8 \ \ 3 3 3> Q»«9 Q ««« 3 8 3 8 X \ [ 3 ( ( Z ( Z 3( 9 9 > < < > >? 8 98 ««3 ( 98 < # # Q 3 98? 98 > > 3 8 9 9 ««««> 3 «>
More informationLecture 7.3: Ring homomorphisms
Lecture 7.3: Ring homomorphisms Matthew Macauley Department of Mathematical Sciences Clemson University http://www.math.clemson.edu/~macaule/ Math 4120, Modern Algebra M. Macauley (Clemson) Lecture 7.3:
More informationGuaranteeing No Interaction Between Functional Dependencies and Tree-Like Inclusion Dependencies
Guaranteeing No Interaction Between Functional Dependencies and Tree-Like Inclusion Dependencies Mark Levene Department of Computer Science University College London Gower Street London WC1E 6BT, U.K.
More informationFoundations of Databases
Foundations of Databases Free Universit of Bozen Bolzano, 2009 Werner Nutt (Most slides adapted from Thomas Eiter and Leonid Libkin) Foundations of Databases 1 Quer optimization: finding a good wa to evaluate
More informationFunctional Database Query Languages as. Typed Lambda Calculi of Fixed Order. Gerd G. Hillebrand and Paris C. Kanellakis
Functional Database Query Languages as Typed Lambda Calculi of Fixed Order Gerd G. Hillebrand and Paris C. Kanellakis Department of Computer Science Brown University Providence, Rhode Island 02912 CS-94-26
More informationHandbook of Logic and Proof Techniques for Computer Science
Steven G. Krantz Handbook of Logic and Proof Techniques for Computer Science With 16 Figures BIRKHAUSER SPRINGER BOSTON * NEW YORK Preface xvii 1 Notation and First-Order Logic 1 1.1 The Use of Connectives
More informationOn the Boolean Algebra of Shape Analysis Constraints
On the Boolean Algebra of Shape Analysis Constraints Viktor Kuncak and Martin Rinard Computer Science and Artificial Intelligence Laboratory Massachusetts Institute of Technology Cambridge, MA 02139, USA
More information7 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 informationOn the Succinctness of Query Rewriting for Datalog
On the Succinctness of Query Rewriting for Datalog Shqiponja Ahmetaj 1 Andreas Pieris 2 1 Institute of Logic and Computation, TU Wien, Austria 2 School of Informatics, University of Edinburgh, UK Foundational
More informationFirst-Order Stable Model Semantics and First-Order Loop Formulas
Journal of Artificial Intelligence Research 42 (2011) 125-180 Submitted 03/11; published 10/11 First-Order Stable Model Semantics and First-Order Loop Formulas Joohyung Lee Yunsong Meng School of Computing,
More informationBoolean Algebra and Propositional Logic
Boolean Algebra and Propositional Logic Takahiro Kato June 23, 2015 This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a more direct connection
More information1 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 informationBoolean Algebra and Propositional Logic
Boolean Algebra and Propositional Logic Takahiro Kato September 10, 2015 ABSTRACT. This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a
More informationComplete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in
Oracle Turing Machines Nondeterministic OTM defined in the same way (transition relation, rather than function) oracle is like a subroutine, or function in your favorite PL but each call counts as single
More informationUniversity of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter
University of Aberdeen, Computing Science CS2013 Predicate Logic 4 Kees van Deemter 01/11/16 Kees van Deemter 1 First-Order Predicate Logic (FOPL) Lecture 4 Making numerical statements: >0, 1,>2,1,2
More informationProof techniques (section 2.1)
CHAPTER 1 Proof techniques (section 2.1) What we have seen so far: 1.1. Theorems and Informal proofs Argument: P 1 P n Q Syntax: how it's written Semantic: meaning in a given interpretation Valid argument:
More informationExercises 1 - Solutions
Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note
More informationPropositional Logic Not Enough
Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks
More informationEvery polynomial equation of degree 1 or greater has at least one root in the set of complex numbers.
Sec 3.1 Polynomial Functions Fundamental Theorem of Algebra An important and famous German mathematician, Carl Friedrich Gauss, is credited with first proving the FUNDAMENTAL THEOREM OF ALGEBRA which states:
More informationExample. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s
Summary Summary Last Lecture Computational Logic Π 1 Γ, x : σ M : τ Γ λxm : σ τ Γ (λxm)n : τ Π 2 Γ N : τ = Π 1 [x\π 2 ] Γ M[x := N] Georg Moser Institute of Computer Science @ UIBK Winter 2012 the proof
More informationBayes Nets: Independence
Bayes Nets: Independence [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Bayes Nets A Bayes
More informationQ N id β. 2. Let I and J be ideals in a commutative ring A. Give a simple description of
Additional Problems 1. Let A be a commutative ring and let 0 M α N β P 0 be a short exact sequence of A-modules. Let Q be an A-module. i) Show that the naturally induced sequence is exact, but that 0 Hom(P,
More informationThe following can also be obtained from this WWW address: the papers [8, 9], more examples, comments on the implementation and a short description of
An algorithm for computing the Weierstrass normal form Mark van Hoeij Department of mathematics University of Nijmegen 6525 ED Nijmegen The Netherlands e-mail: hoeij@sci.kun.nl April 9, 1995 Abstract This
More informationPredicate Logic - Semantic Tableau
CS402, Spring 2016 Informal Construction of a Valid Formula Example 1 A valid formula: x(p(x) q(x)) ( xp(x) xq(x)) ( x(p(x) q(x)) ( xp(x) xq(x))) x(p(x) q(x)), ( xp(x) xq(x)) x(p(x) q(x)), xp(x), xq(x)
More informationCOMP 409: Logic Homework 5
COMP 409: Logic Homework 5 Note: The pages below refer to the text from the book by Enderton. 1. Exercises 1-6 on p. 78. 1. Translate into this language the English sentences listed below. If the English
More informationCOMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University
COMP 182 Algorithmic Thinking Proofs Luay Nakhleh Computer Science Rice University 1 Reading Material Chapter 1, Section 3, 6, 7, 8 Propositional Equivalences The compound propositions p and q are called
More informationMath 121 Homework 5: Notes on Selected Problems
Math 121 Homework 5: Notes on Selected Problems 12.1.2. Let M be a module over the integral domain R. (a) Assume that M has rank n and that x 1,..., x n is any maximal set of linearly independent elements
More informationDatabase 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 informationFirst-Order Logic (FOL)
First-Order Logic (FOL) Also called Predicate Logic or Predicate Calculus 2. First-Order Logic (FOL) FOL Syntax variables x, y, z, constants a, b, c, functions f, g, h, terms variables, constants or n-ary
More informationDeclarative and Computational Properties. 2 Logic Programs with Aggregates
Declarative and Computational Properties of Logic Programs with Aggregates Francesco Calimeri and Wolfgang Faber and Nicola Leone and Simona Perri Department of Mathematics, University of Calabria, I-87030
More informationEnumeration Complexity of Conjunctive Queries with Functional Dependencies
Enumeration Complexity of Conjunctive Queries with Functional Dependencies Nofar Carmeli Technion, Haifa, Israel snofca@cs.technion.ac.il Markus Kröll TU Wien, Vienna, Austria kroell@dbai.tuwien.ac.at
More informationEquivalence of SQL Queries In Presence of Embedded Dependencies
Equivalence of SQL Queries In Presence of Embedded Dependencies Rada Chirkova Department of Computer Science NC State University, Raleigh, NC 27695, USA chirkova@csc.ncsu.edu Michael R. Genesereth Department
More information1. Partial Fraction Expansion All the polynomials in this note are assumed to be complex polynomials.
Partial Fraction Expansion All the polynomials in this note are assumed to be complex polynomials A rational function / is a quotient of two polynomials P, Q with 0 By Fundamental Theorem of algebra, =
More informationMAIN THEOREM OF GALOIS THEORY
MAIN THEOREM OF GALOIS THEORY Theorem 1. [Main Theorem] Let L/K be a finite Galois extension. and (1) The group G = Gal(L/K) is a group of order [L : K]. (2) The maps defined by and f : {subgroups of G}!
More informationTwo Posts to Fill On School Board
Y Y 9 86 4 4 qz 86 x : ( ) z 7 854 Y x 4 z z x x 4 87 88 Y 5 x q x 8 Y 8 x x : 6 ; : 5 x ; 4 ( z ; ( ) ) x ; z 94 ; x 3 3 3 5 94 ; ; ; ; 3 x : 5 89 q ; ; x ; x ; ; x : ; ; ; ; ; ; 87 47% : () : / : 83
More informationACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes)
ACLT: Algebra, Categories, Logic in Topology - Grothendieck's generalized topological spaces (toposes) Steve Vickers CS Theory Group Birmingham 2. Theories and models Categorical approach to many-sorted
More informationCSCE 222 Discrete Structures for Computing. Predicate Logic. Dr. Hyunyoung Lee. !!!!! Based on slides by Andreas Klappenecker
CSCE 222 Discrete Structures for Computing Predicate Logic Dr. Hyunyoung Lee Based on slides by Andreas Klappenecker 1 Predicates A function P from a set D to the set Prop of propositions is called a predicate.
More informationPredicate Logic - Deductive Systems
CS402, Spring 2018 G for Predicate Logic Let s remind ourselves of semantic tableaux. Consider xp(x) xq(x) x(p(x) q(x)). ( xp(x) xq(x) x(p(x) q(x))) xp(x) xq(x), x(p(x) q(x)) xp(x), x(p(x) q(x)) xq(x),
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method
Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL
More informationDatabase Theory VU , SS Ehrenfeucht-Fraïssé Games. Reinhard Pichler
Database Theory Database Theory VU 181.140, SS 2018 7. Ehrenfeucht-Fraïssé Games Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Pichler 15
More informationOn some properties of elementary derivations in dimension six
Journal of Pure and Applied Algebra 56 (200) 69 79 www.elsevier.com/locate/jpaa On some properties of elementary derivations in dimension six Joseph Khoury Department of Mathematics, University of Ottawa,
More informationAbstract model theory for extensions of modal logic
Abstract model theory for extensions of modal logic Balder ten Cate Stanford, May 13, 2008 Largely based on joint work with Johan van Benthem and Jouko Väänänen Balder ten Cate Abstract model theory for
More informationFundamentos lógicos de bases de datos (Logical foundations of databases)
20/7/2015 ECI 2015 Buenos Aires Fundamentos lógicos de bases de datos (Logical foundations of databases) Diego Figueira Gabriele Puppis CNRS LaBRI About the speakers Gabriele Puppis PhD from Udine (Italy)
More information1 CHAPTER 1 INTRODUCTION 1.1 Background One branch of the study of descriptive complexity aims at characterizing complexity classes according to the l
viii CONTENTS ABSTRACT IN ENGLISH ABSTRACT IN TAMIL LIST OF TABLES LIST OF FIGURES iii v ix x 1 INTRODUCTION 1 1.1 Background : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.2 Preliminaries
More informationReasoning with Constraint Diagrams
Reasoning with Constraint Diagrams Gem Stapleton The Visual Modelling Group University of righton, righton, UK www.cmis.brighton.ac.uk/research/vmg g.e.stapletonbrighton.ac.uk Technical Report VMG.04.01
More informationFlexible satisfaction
Flexible satisfaction LCC 2016, Aix-Marseille Université Marcel Jackson A problem and overview A problem in semigroup theory The semigroup B 1 2 ( ) ( ) 1 0 1 0, 0 1 0 0, ( ) 0 1, 0 0 ( ) 0 0, 1 0 ( )
More informationMathematical Logics. 12. Soundness and Completeness of tableaux reasoning in first order logic. Luciano Serafini
12. Soundness and Completeness of tableaux reasoning in first order logic Fondazione Bruno Kessler, Trento, Italy November 14, 2013 Example of tableaux Example Consider the following formulas: (a) xyz(p(x,
More informationTopics in Probabilistic and Statistical Databases. Lecture 9: Histograms and Sampling. Dan Suciu University of Washington
Topics in Probabilistic and Statistical Databases Lecture 9: Histograms and Sampling Dan Suciu University of Washington 1 References Fast Algorithms For Hierarchical Range Histogram Construction, Guha,
More informationLogic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Logic and Reasoning Foundations of Computing Science Pallab Dasgupta Professor, Dept. of Computer Sc & Engg 2 Knowledge and Reasoning Representation, Reasoning and Logic Propositional Logic First-Order
More informationINTRODUCTION TO LOGIC
Introduction INTRODUCTION TO LOGIC 6 Natural Deduction Volker Halbach Definition Let Γ be a set of sentences of L 2 and ϕ a sentence of L 2. Then Γ ϕ if and only if there is no L 2 -structure in which
More informationPolynomial Rings. i=0. i=0. n+m. i=0. k=0
Polynomial Rings 1. Definitions and Basic Properties For convenience, the ring will always be a commutative ring with identity. Basic Properties The polynomial ring R[x] in the indeterminate x with coefficients
More informationImplementation and Optimization Issues of the ROLAP Algebra
General Research Report Implementation and Optimization Issues of the ROLAP Algebra F. Ramsak, M.S. (UIUC) Dr. V. Markl Prof. R. Bayer, Ph.D. Contents Motivation ROLAP Algebra Recap Optimization Issues
More informationAnswering Pattern Queries Using Views
1 Answering Pattern Queries Using iews Wenfei Fan 1,2 Xin Wang 3, Yinghui Wu 4 1 University of Edinburgh 2 RCBD and SKLSDE Lab, Beihang University 3 Southwest Jiaotong University 4 Washington State University
More informationWHAT REASONABLE FIRST-ORDER QUERIES ARE PERMITTED BY TRAKHTENBROT'S THEOREM? Arnon Avron and Joram Hirschfeld. Raymond and Beverly Sackler
WHAT REASONABLE FIRST-ORDER QUERIES ARE PERMITTED BY TRAKHTENBROT'S THEOREM? Arnon Avron and Joram Hirschfeld Raymond and Beverly Sackler Faculty of Exact Sciences School of Mathematical Sciences Tel Aviv
More information2009 GCE A Level H1 Mathematics Solution
2009 GCE A Level H1 Mathematics Solution 1) x + 2y = 3 x = 3 2y Substitute x = 3 2y into x 2 + xy = 2: (3 2y) 2 + (3 2y)y = 2 9 12y + 4y 2 + 3y 2y 2 = 2 2y 2 9y + 7 = 0 (2y 7)(y 1) = 0 y = 7 2, 1 x = 4,
More informationÖzgür L. Özçep Data Exchange 1
INSTITUT FÜR INFORMATIONSSYSTEME Özgür L. Özçep Data Exchange 1 Lecture 5: Motivation, Relational DE, Chase 16 November, 2016 Foundations of Ontologies and Databases for Information Systems CS5130 (Winter
More informationLecture 22: Counting
CS 710: Complexity Theory 4/8/2010 Lecture 22: Counting Instructor: Dieter van Melkebeek Scribe: Phil Rydzewski & Chi Man Liu Last time we introduced extractors and discussed two methods to construct them.
More informationPath Logics for Querying Graphs: Combining Expressiveness and Efficiency
Path Logics for Querying Graphs: Combining Expressiveness and Efficiency Diego Figueira CNRS, LaBRI Bordeaux, France diego.figueira@labri.fr Leonid Libkin School of Informatics University of Edinburgh
More informationInverse Tree-OLAP: Definition, Complexity and First Solution
Inverse Tree-OLAP: Definition, Complexity and First Solution Domenico Saccà 1, Edoardo Serra 2, and Alfredo Cuzzocrea 3 1 University of Calabria, Italy sacca@unical.it 2 Boise State University, USA edoardoserra@boisestate.edu
More informationFormal Semantics of SQL (and Cypher) Paolo Guagliardo
Formal Semantics of SQL (and Cypher) Paolo Guagliardo SQL Standard query language for relational databases $30B/year business Implemented in all major RDBMSs (free and commercial) First standardized in
More informationMaximal non-commuting subsets of groups
Maximal non-commuting subsets of groups Umut Işık March 29, 2005 Abstract Given a finite group G, we consider the problem of finding the maximal size nc(g) of subsets of G that have the property that no
More informationPart VI. Extension Fields
VI.29 Introduction to Extension Fields 1 Part VI. Extension Fields Section VI.29. Introduction to Extension Fields Note. In this section, we attain our basic goal and show that for any polynomial over
More informationReducibility in polynomialtime computable analysis. Akitoshi Kawamura (U Tokyo) Wadern, Germany, September 24, 2015
Reducibility in polynomialtime computable analysis Akitoshi Kawamura (U Tokyo) Wadern, Germany, September 24, 2015 Computable Analysis Applying computability / complexity theory to problems involving real
More informationLet us think of the situation as having a 50 sided fair die; any one number is equally likely to appear.
Probability_Homework Answers. Let the sample space consist of the integers through. {, 2, 3,, }. Consider the following events from that Sample Space. Event A: {a number is a multiple of 5 5, 0, 5,, }
More information