Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science

Similar documents
Two hours. Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Part 1: Propositional Logic

First-Order Logic. Resolution

Resolution for Predicate Logic

Resolution for Predicate Logic

Rewrite-Based Equational Theorem Proving With Selection and Simplification. Leo Bachmair Harald Ganzinger

Propositional Logic: Models and Proofs

A Resolution Decision Procedure for the Guarded Fragment with Transitive Guards

07 Equational Logic and Algebraic Reasoning

Advanced Topics in LP and FP

The non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω

Hierarchic Superposition: Completeness without Compactness

CTL-RP: A Computational Tree Logic Resolution Prover

Superposition for Fixed Domains. Matthias Horbach and Christoph Weidenbach

Automated Reasoning in First-Order Logic

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

Resolution for mixed Post logic

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

First-Order Theorem Proving and Vampire

A Tableau Calculus for Minimal Modal Model Generation

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Computational Logic Automated Deduction Fundamentals

3.17 Semantic Tableaux for First-Order Logic

CogSysI Lecture 8: Automated Theorem Proving

Chapter 2: Basic Notions of Predicate Logic

3 Propositional Logic


Propositional Logic Language

Convert to clause form:

Definite Logic Programs: Derivation and Proof Trees. CSE 505 Computing with Logic Stony Brook University

4 Predicate / First Order Logic

Automated Reasoning (in First Order Logic) Andrei Voronkov. University of Manchester

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Automated Reasoning in First-Order Logic

Some Rewriting Systems as a Background of Proving Methods

Reasoning in Description Logics with a Concrete Domain in the Framework of Resolution

Resolution: Motivation

α-formulas β-formulas

Outline. Logic. Definition. Theorem (Gödel s Completeness Theorem) Summary of Previous Week. Undecidability. Unification

Integrating Linear Arithmetic into Superposition Calculus

CSC384: Intro to Artificial Intelligence Knowledge Representation II. Required Readings: 9.1, 9.2, and 9.5 Announcements:

Part 1: Propositional Logic

README - Syntax. Skolemization. Skolemization - Example 1. Skolemization - Example 1. Skolemization - Example 1. Skolemization - Example 2

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

8 General first order representation

The Model Evolution Calculus with Equality

Mathematical Foundations of Logic and Functional Programming

AAA615: Formal Methods. Lecture 2 First-Order Logic

Reasoning in Description Logics using Resolution and Deductive Databases

Propositional and Predicate Logic - V

COMP9414: Artificial Intelligence First-Order Logic

INF3170 / INF4171 Notes on Resolution

RYERSON UNIVERSITY DEPARTMENT OF MATHEMATICS

Bachelor/Master Exam Version V3B

COMP2411 Lecture 10: Propositional Logic Programming. Note: This material is not covered in the book. Resolution Applied to Horn Clauses

CS 730/730W/830: Intro AI

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Automated Reasoning. Schedule. Peter Baumgartner NICTA, Canberra and RSISE, ANU

6. Logical Inference

Technische Universität München Summer term 2011 Theoretische Informatik Prof. Dr. Dr. h.c J. Esparza / M. Luttenberger / R.

Inference Methods In Propositional Logic

Equational Logic. Chapter 4

Propositional Reasoning

ILP = Logic, CS, ML Stop counting, start reasoning

Prolog. Resolution (for beginners?) Resolution (cont.) Resolution (cont.) Unification. Resolution (still cont.) Resolution & Unification

Combining Instance Generation and Resolution

Completeness of Hyper-Resolution via the Semantics of Disjunctive Logic Programs

Pretending to be an SMT Solver with Vampire (and How We Do Instantiation)

Rewriting for Satisfiability Modulo Theories

Topics in Model-Based Reasoning

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Exercises 1 - Solutions

Model Evolution with Equality Revised and Implemented

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Lecture 2: First-Order Logic - Syntax, Semantics, Resolution

Developing Modal Tableaux and Resolution Methods via First-Order Resolution

Notation for Logical Operators:

Hyper-Resolution AUTOMATED REASONING SLIDES 8: HYPER-RESOLUTION Hyper-resolution Refinement The Otter Theorem Prover Generalised Hyper-resolution.

Inference Methods In Propositional Logic

Division of Informatics, University of Edinburgh

2.5.2 Basic CNF/DNF Transformation

MAI0203 Lecture 7: Inference and Predicate Calculus

A Resolution Calculus for First-order Schemata

First-Order Logic (FOL)

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

SLD-Resolution And Logic Programming (PROLOG)

MODELLING AND VERIFICATION ANALYSIS OF A TWO SPECIES ECOSYSTEM VIA A FIRST ORDER LOGIC APPROACH

A Unified Approach to Theory Reasoning

Predicate Logic: Sematics Part 1

Model Evolution with Equality Modulo Built-in Theories

COMP4418: Knowledge Representation and Reasoning First-Order Logic

Propositional Resolution

Version January Please send comments and corrections to

Strong AI vs. Weak AI Automated Reasoning

Herbrand Theorem, Equality, and Compactness

Web Science & Technologies University of Koblenz Landau, Germany. Models in First Order Logics

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

Transcription:

Closed Book Examination COMP60121 Appendix: definition sheet (3 pages) Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE M.Sc. in Advanced Computer Science Automated Reasoning Tuesday 27 th January 2009 Time: 09:45 11:45 Please answer THREE out of FOUR Questions provided [PTO]

Page 2 of 4 COMP60121 1. a) Consider the signature consisting of a constant a, unary function symbols f and unary predicate symbol p. To avoid writing too many parentheses we will write applications of f without them, for example, f f x means f (f (x)). For each of the following formulas, find a Herbrand interpretation in which this formula is false. i) ( x)(p(x) p(f x)) ( x)p(x) (3 marks) ii) p(a) ( x)(p(x) (p(f x) p(f f x))) p(f f f f a)). (5 marks) b) Consider the clause p(x, f (y)) p( f(y), x) p(f(z), g(z)) in which all literals are selected. Write down all possible factors of this clause (i.e., clauses obtained by applying the factoring rule to this clause). (5 marks) c) Transform the formula ( y)( x)(p(x, y) ( x)p(x, y)) into negation normal form. (4 marks) d) Consider an inference process with deletion: S 0 S 1 S 2 Write the definitions of persistent clause and limit for this process. (3 marks) 2. a) Write Prolog programs defining i) The list concatenation. The concatenation of two lists a 1,..., a m and b 1,..., b n gives the list a 1,..., a m, b 1,..., b n. (2 marks) ii) The list reversal. The reversal of a 1,..., a m gives a m,..., a 1. (4 marks) b) Transform the formula (p (q r)) ( q s) into a set of clauses using the CNF transformation. (4 marks) c) Consider the formula ( x)(p(x) ( x)p(x)). Is this formula valid or not? If it is valid, explain why. If it is not, show a structure in which this formula is false. (6 marks) d) Apply the unification algorithm to i) The pair of terms h(z, f(x), x) and h(f(y), y, f(z)). (2 marks) ii) The pair of terms h(g(y, y)) and h(g(f(x), z)). (2 marks) If any of these pairs is unifiable, give a most general unifier.

Page 3 of 4 COMP60121 3. Orderings, model construction, application a) Let N be the set of these clauses. 1. P3 P3 P 2. P2 P5 3. P3 P5 4. P2 P4 5. P4 6. P P 1 2 2 i) Let the ordering on atoms be defined by P1 P2 P3 P4 P5. Sort the clauses in N with respect to C. (2 marks) ii) Compute the candidate model I N for N as described in Part II of the lectures. Is it a model of N? (5 marks) iii) Explain the role the candidate model I N plays in proving refutational completeness of resolution. (3 marks) b) By definition, any clause which contains at most one positive literal is called a Horn clause. i) For each of the following clauses say whether they are Horn clauses or are not? Give a short reason for each of your answers. (5 marks) A. P(x) P(g(a)) Q( b, x) B. P(x) Q( b,x) R( b) C. Q( b,x) R( b) D. Q( b,x) E. Px ( ) ii) iii) Show that the resolvent of any two Horn clauses is a Horn clause. (3 marks) Resolution without factoring is generally (refutationally) incomplete. Show that factoring on sets of Horn clauses is not needed, i.e. resolution alone suffices for completeness on sets of Horn clauses. (2 marks) [PTO]

Page 4 of 4 COMP60121 4. Redundancy, ordering & selection, ordered resolution a) Briefly explain the purpose of the notion of redundancy. Give two examples of instances of redundancy to illustrate your answer. (6 marks) b) Briefly explain the purpose of the ordering and the selection function in Res s. Give two advantages of orderings and a selection function. (4 marks) c) Let be a total and well-founded ordering on ground atoms such that, if the atom A contains more symbols than B, then A B. Let N be the following set of clauses: px ( ) p( f( x)) py ( ) pf ( ( f( y ))) Use Res s to derive from N, where S is the empty selection function. Justify each step in your derivation. (10 marks) END OF EXAMINATION Appendix: definition sheet (3 pages)

COMP60121: Part II, Definition Sheet for Examination 2008/2009 Orderings. Let (X, ) be an ordering. The multi-set extension ordering mul on (finite) multi-sets over X is defined by S 1 mul S 2 iff S 1 S 2 and x X, if S 2 (x) > S 1 (x) then y X : y x and S 1 (y) > S 2 (y) Suppose is a total and well-founded ordering on ground atoms. L denotes the ordering on ground literals and is defined by: [ ]A L [ ]B, if A B A L A C denotes the ordering on ground clauses and is defined by the multi-set extension of L, i.e. C = ( L ) mul. Maximal literals. Let be a total and well-founded ordering on ground atoms. A ground literal L is called [strictly] maximal wrt. a ground clause C iff for all L in C: L L [L L ]. A non-ground literal L is [strictly] maximal wrt. a (ground or non-ground) clause C iff there exists a ground substitution σ such that for all L in C: Lσ L σ [Lσ L σ]. Herbrand models. The Herbrand universe (over Σ), denoted T Σ, is the set of all ground terms over Σ. A Herbrand interpretation (over Σ), denoted I, is a set of ground atoms over Σ. Truth in I of ground formulae is defined inductively by: I = I = I = A iff A I, for any ground atom A I = F iff I = F I = F G iff I = F and I = G I = F G iff I = F or I = G Truth in I of any quantifier-free formula F with free variables x 1,...,x n is defined by: I = F(x 1,...,x n ) iff I = F(t 1,...,t n ), for every t i T Σ Truth in I of any set N of clauses is defined by: I = N iff I = C, for each C N October 2008 1 University of Manchester

COMP60121: Part II, Definition Sheet for Examination 2008/2009 Construction of candidate models. Let N, be given. For all ground clauses C over the given signature, the sets I C and C are inductively defined with respect to the clause ordering by: I C := C D D {A}, if C N, C = C A, A C C := and I C = C, otherwise We say that C produces A, if C = {A}. The candidate model for N (wrt. ) is given as I N := C N We also simply write I N, or I, for IN, if is either irrelevant or known from the context. C. Ordered resolution with selection calculus Res S. Let be an atom ordering and S a selection function. (Ordered resolution with selection rule) provided σ = mgu(a, B) and C A B D (C D)σ (i) Aσ strictly maximal wrt. Cσ; (ii) nothing is selected in C by S; (iii) either B is selected, or else nothing is selected in B D and Bσ is maximal wrt. Dσ. (Ordered factoring rule) provided σ = mgu(a, B) and C A B (C A)σ (i) Aσ is maximal wrt. Cσ and (ii) nothing is selected in C. October 2008 2 University of Manchester

COMP60121: Part II, Definition Sheet for Examination 2008/2009 Hyperresolution calculus HRes. (Ordered hyperresolution rule) C 1 A 1... C n A n B 1... B n D (C 1... C n D)σ provided σ is the mgu s.t. A 1 σ = B 1 σ,..., A n σ = B n σ, and (i) A i σ strictly maximal in C i σ, 1 i n; (ii) nothing is selected in C i (i.e. C i is positive); (iii) the indicated B i are exactly the ones selected by S, and D is positive. (Ordered factoring rule) provided σ = mgu(a, B) and C A B (C A)σ (i) Aσ is maximal wrt. Cσ and (ii) nothing is selected in C. Redundancy. Let N be a set of ground clauses and C a ground clause. C is called redundant wrt. N, if there exist C 1,..., C n N, n 0, such that (i) all C i C, and (ii) C 1,..., C n = C. A general clause C is called redundant wrt. N, if all ground instances Cσ of C are redundant wrt. G Σ (N). N is called saturated up to redundancy (wrt. Res S ) iff every conclusion of an Res S-inference with non-redundant clauses in N is in N or is redundant (i.e. Res S (N \ Red(N)) N Red(N), where Red(N) denotes the set of clauses redundant wrt. N). October 2008 3 University of Manchester