Solutions to Exercises
|
|
- Ethel Chapman
- 5 years ago
- Views:
Transcription
1 TDDC36 (LOGIC): EXAM Solutions to Exercises EXERCISE 1 1. Prove the following propositional formula: [ ( P Q) (P Q) R ] [ Q R ] (a) (2 points) using tableaux (b) (2 points) using Gentzen system (as provided in the book or during lectures - up to your choice). 2. Prove the following formula of predicate logic, where a is a constant: x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] (a) (3 points) using tableaux (b) (3 points) using resolution. SOLUTION TO 1(A) We first negate the formula: { [ ( P Q) (P Q) R ] [ Q R ] } ( P Q) (P Q) R [ Q R ] ( P Q) (P Q) R (Q R). Next, we construct a tableau for the negated formula: ( P Q) (P Q) R (Q R) ( P Q), (P Q) R (Q R) ( P Q), (P Q), R (Q R) ( P Q), (P Q), R, (Q R) (β-rule) ( P Q), (P Q), R, Q ( P Q), (P Q), R, R (β-rule) P, (P Q), R, Q P, P, R, Q (β-rule) P, Q, R, Q Q, (P Q), R, Q 1
2 2(9) SOLUTION TO 1(B) A possible proof: ( r) ( l) ( l) ( r) ( l) ( l) ( l) [ ( P Q) (P Q) R ] [ Q R ] ( P Q) (P Q) R Q R ( P Q), (P Q) R Q R ( P Q), (P Q), R Q R ( P Q), (P Q), R Q P, (P Q), R Q Q, (P Q), R Q P, Q, R Q axiom axiom P, P, R Q P, R P, Q axiom ( P Q), (P Q), R R axiom SOLUTION TO 2(A) We first negate the formula: { x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] } x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ]. Next, we construct a tableau for the negated formula: x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] x [ P (x, x, x) ], x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] x [ P (x, x, x) ], x y z [ P (x, y, z) P (z, x, a) ], z [ P (a, z, a) ] (γ-rule) P (a, a, a), x y z [ P (x, y, z) P (z, x, a) ], z [ P (a, z, a) ] (γ-rule) P (a, a, a), x y z [ P (x, y, z) P (z, x, a) ], P (a, a, a)
3 3(9) SOLUTION TO 2(B) We first negate the formula and obtain (see the solution for 2(a)): x [ P (x, x, x) ] x y z [ P (x, y, z) P (z, x, a) ] z [ P (a, z, a) ] so we have clauses: (1) P (x, x, x) (2) P (x, y, z) P (z, x, a) (3) P (a, z, a) A possible proof by resolution: (5) P (x, x, a) (res) applied to (1), (2) with unification x = y = z (6) FALSE (res) applied to (3), (5) with unification x = z = a.
4 4(9) EXERCISE 2 1. (4 points) Translate the following sentences into a set of propositional formulas: chose one of three roads: short, medium or long the short road is always crowded the medium road is not comfortable, but fast the long road is comfortable the chosen road should be comfortable. 2. (2 points) Assuming that fast roads are not crowded and crowded roads are not comfortable, hypothesize what roads can be chosen explain your reasoning informally. 3. (4 points) Prove your claim formally using a proof system of your choice (tableaux, Gentzen system or resolution. Please do not use truth table method, as this will give no points). SOLUTION TO 2.1 A possible translation: short medium long short crowded medium ( comfortable fast) long comf ortable comf ortable. (1) SOLUTION TO 2.2 The chosen road should be comfortable. Therefore it cannot be medium since medium roads are not comfortable. The chosen road cannot be short since short roads are crowded and crowded roads are not comfortable. Therefore the only road that can be chosen if the long one.
5 5(9) SOLUTION TO 2.3 To prove our hypothesis, we also need the translation of assumptions provided in point 2 of Exercise: fast crowded crowded comf ortable (2) We use resolution. We first transform (1) and (2) into a set of clauses: (1) short medium long (2) short crowded (3) medium comf ortable (4) medium fast (5) long comf ortable (6) comf ortable (7) fast crowded (8) crowded comf ortable. Now we negate formula and obtain: [(1) (2) (3) (4) (5) (6) (7) (8)] long [(1) (2) (3) (4) (5) (6) (7) (8)] long. Therefore, we consider clauses (1) (8) together with (9) long. A possible proof by resolution: (10) short medium (res) applied to (1), (9) (11) crowded medium (res) applied to (2), (10) (12) medium (res) applied to (3), (6) (13) crowded (res) applied to (11), (12) (14) comfortable (res) applied to (8), (13) (15) FALSE (res) applied to (6), (14).
6 6(9) EXERCISE 3 Consider a relation R and properties: (a) x y z[(r(x, y) R(x, z)) R(y, z)] (b) x y [ R(x, y) u[r(u, x) R(u, y)] ] (c) x y[r(x, y) R(y, x)]. 1. (4 points) Check informally whether the conjunction of (a) and (b) implies (c). 2. (6 points) Verify your informal reasoning using resolution. SOLUTION TO 3(1) To check whether (c) holds assume that for arbitrarily chosen elements s and t we have that R(s, t) holds. To prove (c), we have to show that given assumptions (a) and (b), R(t, s) holds, too. 1. First, using (b), we observe that R(s, t) implies that there exists u such that R(u, s) and R(u, t) hold. 2. Second, using (a) we know that for all x, y and z, we have that R(x, y) and R(x, z) imply R(y, z). Now, for y = t, z = s and x = u we have that R(u, t) and R(u, s) imply R(t, s). 3. From the first point we have that R(u, s) and R(u, t) hold. From the second point we have that these imply R(t, s). Therefore we conclude that R(t, s). That way we have shown that indeed the conjunction of (a) and (b) implies (c).
7 7(9) SOLUTION TO 3(2) To apply resolution we negate the implication ((a) (b)) (c): { x y z[(r(x, y) R(x, z)) R(y, z)] x y [ R(x, y) u[r(u, x) R(u, y)] ] x y[r(x, y) R(y, x)]} x y z[(r(x, y) R(x, z)) R(y, z)] x y [ R(x, y) u[r(u, x) R(u, y)] ] x y[r(x, y) R(y, x)] x y z[(r(x, y) R(x, z)) R(y, z)] x y [ R(x, y) u[r(u, x) R(u, y)] ] x y[r(x, y) R(y, x)]. We deal with the following conjuncts: x y z[(r(x, y) R(x, z)) R(y, z)] (3) x y [ R(x, y) u[r(u, x) R(u, y)] ] (4) x y[r(x, y) R(y, x)]. (5) We first Skolemize (4) and (5): x y [ R(x, y) ( R(f(x, y), x) R(f(x, y), y) )] (6) R(s, t) R(t, s), (7) where s, t are constants. Formulas (3), (6) and (7) are transformed into the following clauses: (1) R(x, y) R(x, z) R(y, z) (2) R(x, y) R(f(x, y), x) (3) R(x, y) R(f(x, y), y) (4) R(s, t) (5) R(t, s). A possible proof by resolution: (6) R(f(s, t), s) (res) applied to (2), (4) with x = s, y = t (7) R(f(s, t), t) (res) applied to (3), (4) with x = s, y = t (8) R(f(s, t), z) R(t, z) (res) applied to (1), (7) with x = f(s, t), y = t (9) R(t, s) (res) applied to (6), (8) with z = s (10) FALSE (res) applied to (5), (9) which completes the proof.
8 8(9) EXERCISE 4 1. (2 points) Design a Datalog database for storing information about scientific papers, containing, among others, title, authors and information about direct references between papers (i.e., for each paper, information about papers listed in its bibliography section). By p q we denote that paper q is among references listed in paper p. We define that paper q is indirectly referenced by paper p (and denote this by p q) if there is k 1 and papers p 1, p 2,..., p k such that p p 1 p 2... p k 1 p k q. 2. (1 point) Provide an exemplary integrity constraint concerning. 3. (1 point) Provide an exemplary integrity constraint concerning. 4. Formulate in logic queries selecting: (a) (2 points) all pairs P 1, P 2 of papers both (co-)authored by John Smith such that P 1 P 2 (b) (4 points) all pairs P 1, P 2 of papers both (co-)authored by John Smith such that P 1 P 2. SOLUTION TO 4.1 The database contain relations: paper(id, title), where id is a (unique) identifier for a paper, title String is its title author(id, name), where id is a paper identifier and name String is a name of its (co-)author refers to(id1, id2), where id1, id2 are paper identifiers. Example: paper(11, Logic in Databases ) paper entitled Logic in Databases has id = 11 paper(22, F ixpoint Logics ) paper entitled F ixpoint Logics has id = 22 author(11, John Smith ) John Smith is a (co-)author of paper 11 author(11, Mary Jones ) Mary Jones is a (co-)author of paper 11 refers to(11, 22) paper 11 refers to paper 22.
9 9(9) SOLUTION TO 4.2 The relation of road intersection is irreflexive: x[ ref ers to(x, x)]. SOLUTION TO 4.3 Relation is transitive: x y z[ ( x y y z ) x z]. SOLUTION TO 4.4(A) Select all pairs P 1, P 2 of papers both (co-)authored by John Smith such that P 1 P 2 (recall that is an anonymous don t care variable): answer(id1, Id2) : paper(id1, ), author(id1, John Smith ), paper(id2, ), author(id2, John Smith ), ref ers to(id1, Id2). Now answer(x, Y ) provides all required pairs of papers. SOLUTION TO 4.4(B) Select all pairs P 1, P 2 of papers both (co-)authored by John Smith such that P 1 P 2. We need to define the relation P 1 P 2 (we give it the name indirectly ref): indirectly ref(id1, Id2) : refers to(id1, Id), refers to(id, Id 2). indirectly ref(id1, Id2) : ref ers to(id1, Id), indirectly ref(id, Id2). Now we can formulate the required query: answer(id1, Id2) : paper(id1, ), author(id1, John Smith ), paper(id2, ), author(id2, John Smith ), indirectly ref(id1, Id2).
Lecture 1: Conjunctive Queries
CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote
More informationCSC 501 Semantics of Programming Languages
CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this
More informationAutomata Theory for Reasoning about Actions
Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show
More informationReductions and Satisfiability
Reductions and Satisfiability 1 Polynomial-Time Reductions reformulating problems reformulating a problem in polynomial time independent set and vertex cover reducing vertex cover to set cover 2 The Satisfiability
More informationBinary Decision Diagrams
Logic and roof Hilary 2016 James Worrell Binary Decision Diagrams A propositional formula is determined up to logical equivalence by its truth table. If the formula has n variables then its truth table
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 37 Resolution Rules If some literals can be unified, the same algorithm should be able
More informationLecture 14: Lower Bounds for Tree Resolution
IAS/PCMI Summer Session 2000 Clay Mathematics Undergraduate Program Advanced Course on Computational Complexity Lecture 14: Lower Bounds for Tree Resolution David Mix Barrington and Alexis Maciel August
More informationShannon Switching Game
EECS 495: Combinatorial Optimization Lecture 1 Shannon s Switching Game Shannon Switching Game In the Shannon switching game, two players, Join and Cut, alternate choosing edges on a graph G. Join s objective
More informationRecap Datalog Datalog Syntax Datalog Semantics. Logic: Datalog. CPSC 322 Logic 6. Textbook Logic: Datalog CPSC 322 Logic 6, Slide 1
Logic: Datalog CPSC 322 Logic 6 Textbook 12.2 Logic: Datalog CPSC 322 Logic 6, Slide 1 Lecture Overview 1 Recap 2 Datalog 3 Datalog Syntax 4 Datalog Semantics Logic: Datalog CPSC 322 Logic 6, Slide 2 Top-down
More informationPropositional Logic Formal Syntax and Semantics. Computability and Logic
Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship
More informationUniversity of Illinois at Chicago Department of Computer Science. Final Examination. CS 151 Mathematical Foundations of Computer Science Fall 2012
University of Illinois at Chicago Department of Computer Science Final Examination CS 151 Mathematical Foundations of Computer Science Fall 2012 Thursday, October 18, 2012 Name: Email: Print your name
More informationChapter 2 & 3: Representations & Reasoning Systems (2.2)
Chapter 2 & 3: A Representation & Reasoning System & Using Definite Knowledge Representations & Reasoning Systems (RRS) (2.2) Simplifying Assumptions of the Initial RRS (2.3) Datalog (2.4) Semantics (2.5)
More informationKnowledge Representation and Reasoning Logics for Artificial Intelligence
Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State
More informationLogic and its Applications
Logic and its Applications Edmund Burke and Eric Foxley PRENTICE HALL London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Contents Preface xiii Propositional logic 1 1.1 Informal introduction
More informationKnowledge Representation and Reasoning Logics for Artificial Intelligence
Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State
More informationCS 540: Introduction to Artificial Intelligence
CS 540: Introduction to Artificial Intelligence Final Exam: 12:25-2:25pm, December 17, 2014 Room 132 Noland CLOSED BOOK (two sheets of notes and a calculator allowed) Write your answers on these pages
More information2SAT Andreas Klappenecker
2SAT Andreas Klappenecker The Problem Can we make the following boolean formula true? ( x y) ( y z) (z y)! Terminology A boolean variable is a variable that can be assigned the values true (T) or false
More informationAutomated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution Theorem Proving 13.3 PROLOG and Automated Reasoning 13.4
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding
More informationNotes for Recitation 8
6.04/8.06J Mathematics for Computer Science October 5, 00 Tom Leighton and Marten van Dijk Notes for Recitation 8 Build-up error Recall a graph is connected iff there is a path between every pair of its
More informationSTABILITY AND PARADOX IN ALGORITHMIC LOGIC
STABILITY AND PARADOX IN ALGORITHMIC LOGIC WAYNE AITKEN, JEFFREY A. BARRETT Abstract. Algorithmic logic is the logic of basic statements concerning algorithms and the algorithmic rules of deduction between
More informationDeduction Rule System vs Production Rule System. Prof. Bob Berwick. Rules Rule
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.034 Artificial Intelligence, Fall 2003 Recitation 2, September 11/12 Rules Rule Prof. Bob Berwick Agenda
More informationOperational Semantics
15-819K: Logic Programming Lecture 4 Operational Semantics Frank Pfenning September 7, 2006 In this lecture we begin in the quest to formally capture the operational semantics in order to prove properties
More information== is a decent equivalence
Table of standard equiences 30/57 372 TABLES FOR PART I Propositional Logic Lecture 2 (Chapter 7) September 9, 2016 Equiences for connectives Commutativity: Associativity: P Q == Q P, (P Q) R == P (Q R),
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning
More informationData Integration: Logic Query Languages
Data Integration: Logic Query Languages Jan Chomicki University at Buffalo Datalog Datalog A logic language Datalog programs consist of logical facts and rules Datalog is a subset of Prolog (no data structures)
More informationTowards a Logical Reconstruction of Relational Database Theory
Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2
More informationCOMP Intro to Logic for Computer Scientists. Lecture 2
COMP 1002 Intro to Logic for Computer Scientists Lecture 2 B 5 2 J Language of logic: building blocks Proposition: A sentence that can be true or false. A: It is raining in St. John s right now. B: 2+2=7
More informationPractice Final. Read all the problems first before start working on any of them, so you can manage your time wisely
PRINT your name here: Practice Final Print your name immediately on the cover page, as well as each page of the exam, in the space provided. Each time you are caught working on a page without your name
More informationName: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001
Name: CSCI E-220: Artificial Intelligence Midterm Exam, Fall Term 2001 This is a 75-minute, open-book exam. Take a minute to look over the exam, and begin by answering the questions you feel most comfortable
More informationPropositional Logic. Andreas Klappenecker
Propositional Logic Andreas Klappenecker Propositions A proposition is a declarative sentence that is either true or false (but not both). Examples: College Station is the capital of the USA. There are
More information[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics
400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {
More informationMathematics for Computer Scientists 2 (G52MC2)
Mathematics for Computer Scientists 2 (G52MC2) L03 : More Coq, Classical Logic School of Computer Science University of Nottingham October 8, 2009 The cut rule Sometimes we want to prove a goal Q via an
More informationThe Resolution Algorithm
The Resolution Algorithm Introduction In this lecture we introduce the Resolution algorithm for solving instances of the NP-complete CNF- SAT decision problem. Although the algorithm does not run in polynomial
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationCSE Discrete Structures
CSE 2315 - Discrete Structures Lecture 5: Predicate Logic- Fall 2010 1 Motivation The use of predicates, variables, and quantifiers allows to represent a large number of arguments and expressions in formal
More informationExercises on Semantics of Programming Languages
Technische Universität Wien SS 2014 Fakultät für Informatik Repetition sheet Assist. Prof. Florian Zuleger Tuesday, 8 April 2014 Assist. Prof. Georg Weissenbacher Univ. Prof. Agata Ciabattoni Moritz Sinn,
More informationCS 512, Spring 2017: Take-Home End-of-Term Examination
CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing
More informationPropositional Logic. Part I
Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.
More informationLogical Verification Course Notes. Femke van Raamsdonk Vrije Universiteit Amsterdam
Logical Verification Course Notes Femke van Raamsdonk femke@csvunl Vrije Universiteit Amsterdam autumn 2008 Contents 1 1st-order propositional logic 3 11 Formulas 3 12 Natural deduction for intuitionistic
More informationHW1. Due: September 13, 2018
CSCI 1010 Theory of Computation HW1 Due: September 13, 2018 Attach a fully filled-in cover sheet to the front of your printed homework. Your name should not appear anywhere; the cover sheet and each individual
More informationPropositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson
Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions
More informationProgram Verification & Testing; Review of Propositional Logic
8/24: p.1, solved; 9/20: p.5 Program Verification & Testing; Review of Propositional Logic CS 536: Science of Programming, Fall 2018 A. Why Course guidelines are important. Active learning is the style
More informationChapter 16. Logic Programming Languages
Chapter 16 Logic Programming Languages Chapter 16 Topics Introduction A Brief Introduction to Predicate Calculus Predicate Calculus and Proving Theorems An Overview of Logic Programming The Origins of
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More informationDeclarative programming. Logic programming is a declarative style of programming.
Declarative programming Logic programming is a declarative style of programming. Declarative programming Logic programming is a declarative style of programming. The programmer says what they want to compute,
More informationThe Truth about Types. Bartosz Milewski
The Truth about Types Bartosz Milewski Truth Truth Logic Types Categories Truth intro Unit type Terminal object true I () : () Proofs Logic Types Categories Proof of proposition A Type A is inhabited Morphism
More informationDATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems
DATABASE THEORY Lecture 11: Introduction to Datalog Markus Krötzsch Knowledge-Based Systems TU Dresden, 12th June 2018 Announcement All lectures and the exercise on 19 June 2018 will be in room APB 1004
More informationProofs are Programs. Prof. Clarkson Fall Today s music: Proof by Paul Simon
Proofs are Programs Prof. Clarkson Fall 2017 Today s music: Proof by Paul Simon Review Previously in 3110: Functional programming in Coq Logic in Coq Today: A fundamental idea that goes by many names...
More informationCopyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and
Chapter 6 The Relational Algebra and Relational Calculus Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Outline Unary Relational Operations: SELECT and PROJECT Relational
More informationLecture 4: January 12, 2015
32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected
More informationConstructive Coherent Translation of Propositional Logic
Constructive Coherent Translation of Propositional Logic JRFisher@cpp.edu (started: 2009, latest: January 18, 2016) Abstract Propositional theories are translated to coherent logic rules using what are
More informationProofs are Programs. Prof. Clarkson Fall Today s music: Two Sides to Every Story by Dyan Cannon and Willie Nelson
Proofs are Programs Prof. Clarkson Fall 2016 Today s music: Two Sides to Every Story by Dyan Cannon and Willie Nelson Review Currently in 3110: Advanced topics Futures Monads Today: An idea that goes by
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule
More informationNotes for Chapter 12 Logic Programming. The AI War Basic Concepts of Logic Programming Prolog Review questions
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions The AI War How machines should learn: inductive or deductive? Deductive: Expert => rules =>
More informationLogic Programming and Resolution Lecture notes for INF3170/4171
Logic Programming and Resolution Lecture notes for INF3170/4171 Leif Harald Karlsen Autumn 2015 1 Introduction This note will explain the connection between logic and computer programming using Horn Clauses
More informationConstraint Solving. Systems and Internet Infrastructure Security
Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Constraint Solving Systems
More informationFrom Types to Sets in Isabelle/HOL
From Types to Sets in Isabelle/HOL Extented Abstract Ondřej Kunčar 1 and Andrei Popescu 1,2 1 Fakultät für Informatik, Technische Universität München, Germany 2 Institute of Mathematics Simion Stoilow
More informationCS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems
CS 380/480 Foundations of Artificial Intelligence Winter 2007 Assignment 2 Solutions to Selected Problems 1. Search trees for the state-space graph given below: We only show the search trees corresponding
More informationLOGIC AND DISCRETE MATHEMATICS
LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University
More informationPropositional Calculus: Boolean Functions and Expressions. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson
Propositional Calculus: Boolean Functions and Expressions CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More informationTyped Lambda Calculus
Department of Linguistics Ohio State University Sept. 8, 2016 The Two Sides of A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a system of notation for functions
More informationResolution (14A) Young W. Lim 6/14/14
Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free
More informationDiagonalization. The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets?
Diagonalization Cardinalities The cardinality of a finite set is easy to grasp: {1,3,4} = 3. But what about infinite sets? We say that a set S has at least as great cardinality as set T, written S T, if
More informationOther Relational Languages
C H A P T E R 5 Other Relational Languages Exercises 5.1 Answer: The participated relation relates car(s) and accidents. Assume the date attribute is of the form YYYY-MM-DD. a. Find the total number of
More informationTyped Lambda Calculus for Syntacticians
Department of Linguistics Ohio State University January 12, 2012 The Two Sides of Typed Lambda Calculus A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a
More informationNP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.
CS 787: Advanced Algorithms NP-Hardness Instructor: Dieter van Melkebeek We review the concept of polynomial-time reductions, define various classes of problems including NP-complete, and show that 3-SAT
More informationKnowledge & Reasoning
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of representing large bodies of knowledge 1 Logical
More informationIntroduction to dependent types in Coq
October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.
More informationLecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques
Lecture 17 of 41 Clausal (Conjunctive Normal) Form and Resolution Techniques Wednesday, 29 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 9,
More informationHarvard School of Engineering and Applied Sciences CS 152: Programming Languages
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 19 Tuesday, April 3, 2018 1 Introduction to axiomatic semantics The idea in axiomatic semantics is to give specifications
More informationRange Restriction for General Formulas
Range Restriction for General Formulas 1 Range Restriction for General Formulas Stefan Brass Martin-Luther-Universität Halle-Wittenberg Germany Range Restriction for General Formulas 2 Motivation Deductive
More informationFundamentals of Prolog
Fundamentals of Prolog Prof. Geraint A. Wiggins Centre for Cognition, Computation and Culture Goldsmiths College, University of London Contents Summary of Lecture 1 What makes a good Prolog program? What
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationFormal Predicate Calculus. Michael Meyling
Formal Predicate Calculus Michael Meyling May 24, 2013 2 The source for this document can be found here: http://www.qedeq.org/0_04_07/doc/math/qedeq_formal_logic_v1.xml Copyright by the authors. All rights
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,
More informationDefinition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,
CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for
More information1. Logic as a subject matter is the study of logics, understood as models of acceptable inference patterns
Lecture 9: Propositional Logic I Philosophy 130 23 & 28 October 2014 O Rourke I. Administrative A. Problem sets due Thursday, 30 October B. Midterm course evaluations C. Questions? II. Logic and Form A.
More informationSection 2.2: Introduction to the Logic of Quantified Statements
Section 2.2: Introduction to the Logic of Quantified Statements In this section, we shall continue to examine some of the fundamentals of predicate calculus. Specifically, we shall look at the negations
More informationChapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation
Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was
More informationData integration lecture 2
PhD course on View-based query processing Data integration lecture 2 Riccardo Rosati Dipartimento di Informatica e Sistemistica Università di Roma La Sapienza {rosati}@dis.uniroma1.it Corso di Dottorato
More informationTHE RELATIONAL MODEL. University of Waterloo
THE RELATIONAL MODEL 1-1 List of Slides 1 2 The Relational Model 3 Relations and Databases 4 Example 5 Another Example 6 What does it mean? 7 Example Database 8 What can we do with it? 9 Variables and
More informationLogic and Proof course Solutions to exercises from chapter 6
Logic and roof course Solutions to exercises from chapter 6 Fairouz Kamareddine 6.1 (a) We prove it as follows: Assume == Q and Q == R and R == S then by Transitivity of == R and R == S. Again, by Transitivity
More informationKnowledge Representation. CS 486/686: Introduction to Artificial Intelligence
Knowledge Representation CS 486/686: Introduction to Artificial Intelligence 1 Outline Knowledge-based agents Logics in general Propositional Logic& Reasoning First Order Logic 2 Introduction So far we
More informationQuiz 1: Solutions J/18.400J: Automata, Computability and Complexity. Nati Srebro, Susan Hohenberger
6.45J/8.4J: utomata, Computability and Complexity Quiz : Solutions Prof. Nancy Lynch Nati Srebro, Susan Hohenberger Please write your name in the upper corner of each page. (2 Points) Q- Problem : True
More informationChapter 3. Set Theory. 3.1 What is a Set?
Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any
More informationThe three faces of homotopy type theory. Type theory and category theory. Minicourse plan. Typing judgments. Michael Shulman.
The three faces of homotopy type theory Type theory and category theory Michael Shulman 1 A programming language. 2 A foundation for mathematics based on homotopy theory. 3 A calculus for (, 1)-category
More informationSets. Sets. Subset, universe. Specifying sets, membership. Examples: Specifying a set using a predicate. Examples
Sets 2/36 We will not give a precise definition of what is a set, but we will say precisely what you can do with it. Sets Lectures 7 and 8 (hapter 16) (Think of a set as a collection of things of which
More informationInference rule for Induction
Inference rule for Induction Let P( ) be a predicate with domain the positive integers BASE CASE INDUCTIVE STEP INDUCTIVE Step: Usually a direct proof Assume P(x) for arbitrary x (Inductive Hypothesis),
More informationRelational Dual Tableaux Foundations and Applications
Relational Dual Tableaux Foundations and Applications University of Warsaw, Poland 28th Italian Conference on Computational Logic September 25-27, 2013 Catania, Italy Dual Tableaux Based on Rasiowa-Sikorski
More informationCardinality Lectures
Cardinality Lectures Enrique Treviño March 8, 014 1 Definition of cardinality The cardinality of a set is a measure of the size of a set. When a set A is finite, its cardinality is the number of elements
More informationSearch Algorithms in Type Theory
Search Algorithms in Type Theory James L. Caldwell Ian P. Gent Judith Underwood Revised submission to Theoretical Computer Science: Special Issue on Proof Search in Type-theoretic Languages May 1998 Abstract
More informationPropositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus
More informationLecture 5 - Axiomatic semantics
Program Verification March 2014 Lecture 5 - Axiomatic semantics Lecturer: Noam Rinetzky Scribes by: Nir Hemed 1.1 Axiomatic semantics The development of the theory is contributed to Robert Floyd, C.A.R
More informationLecture 5. Logic I. Statement Logic
Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.
More information6. Inference and resolution
Computer Science and Software Engineering University of Wisconsin - Platteville 6. Inference and resolution CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 8 Part of the slides are
More informationCS 416, Artificial Intelligence Midterm Examination Fall 2004
CS 416, Artificial Intelligence Midterm Examination Fall 2004 Name: This is a closed book, closed note exam. All questions and subquestions are equally weighted. Introductory Material 1) True or False:
More information3.7 Denotational Semantics
3.7 Denotational Semantics Denotational semantics, also known as fixed-point semantics, associates to each programming language construct a well-defined and rigorously understood mathematical object. These
More informationHomework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture
Homework 1 Due Date: Wednesday 11/26/07 - at the beginning of the lecture Problems marked with a [*] are a littlebit harder and count as extra credit. Note 1. For any of the given problems make sure that
More information