1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)

Slides:



Advertisements
Similar presentations
Simply Logical – Chapter 2© Peter Flach, 2000 Clausal logic Propositional clausal logic Propositional clausal logic expressions that can be true or false.
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Introduction to Theorem Proving
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Logic Concepts Lecture Module 11.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
CPSC 322, Lecture 20Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook.
CPSC 322 Introduction to Artificial Intelligence September 20, 2004.
Formalizing Alpha: Soundness and Completeness Bram van Heuveln Dept. of Cognitive Science RPI.
Knoweldge Representation & Reasoning
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Chapter 3 Propositional Logic
Formal Aspects of Computer Science – Week 12 RECAP Lee McCluskey, room 2/07
03 -1 Lecture 03 First-Order Predicate Logic Topics –Syntax –Formal Semantics –Denotational Semantics –Formal Inference –Resolution.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Of 33 lecture 12: propositional logic – part I. of 33 propositions and connectives … two-valued logic – every sentence is either true or false some sentences.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
LDK R Logics for Data and Knowledge Representation PL of Classes.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation.
Propositional Logic Predicate Logic
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
1-1 An Introduction to Logical Programming Sept
Logic: Proof procedures, soundness and correctness CPSC 322 – Logic 2 Textbook §5.2 March 7, 2011.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
6/11/2016 Linear Resolution and Introduction to First Order Logic Michael Leuschel Softwaretechnik und Programmiersprachen Lecture 5.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Based Systems
Knowledge Representation and Reasoning
ARTIFICIAL INTELLIGENCE
Logics for Data and Knowledge Representation
Logic: Top-down proof procedure and Datalog
CS 416 Artificial Intelligence
Back to “Serious” Topics…
CSNB234 ARTIFICIAL INTELLIGENCE
Bottom Up: Soundness and Completeness
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Representations & Reasoning Systems (RRS) (2.2)
Bottom Up: Soundness and Completeness
Presentation transcript:

1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)

2 So Prolog looks cool, but... It’s an implementation of clausal logic, so: –what are the limits of expressiveness of clausal logic? –what are the limits of reasoning with clausal logic? (what can/cannot be (effectively) computed?) –How are these two limitations related? Can we enhance, e.g., reasoning/efficiency by limiting expressiveness? How do the more esoteric kinds of reasoning (e.g. induction) relate to the traditional reasoning we have seen illustrated so far? For all this we need some theory!

3 3 aspects of the theory Syntax - language we’re using: ‘alphabet’, ‘words’ and ‘sentences’ Semantics - meaning of words & sentences Proof theory - how to obtain new sentences (theorems) from assumed ones (axioms) by symbol manipulation (inference rules)

4 Main questions Is our inference rule sound? (truth of theorems assured by truth of axioms) Is it complete? (powerful enough to prove any possible theorem, given enough time) Our starting point will be propositional clausal logic & gradually build up to the (more complex) clausal logic of Prolog

5 Propositional clausal logic - syntax Propositions are denoted by atoms (single words starting with lowercase letter, possibly including an underscore) e.g. –boy –girl –child

6 Syntax (ctd.) ‘:-’ - ‘if’ ‘;’ - ‘or’ ‘,’ - ‘and’ Clause comprises a head, followed by the ‘:-’ symbol, followed by the body Head is a disjunction of atoms (with ‘;’ in between); Tail is a conjunction of atoms (with ‘,’ in between) e.g. has_football; impoverished :- boy, good_footballer

7 Syntax - programs A program is a set of clauses, each terminated by a period (‘.’). e.g. girl; boy:-child. child:-girl. child:-boy.

8 Semantics - Herbrand bases/interpretations Herbrand base of a program P is the set of atoms occurring in P. (In program on previous slide, it’s { girl, boy, child }) Herbrand interpretation is a mapping from the Herbrand base into the set of truth values {true, false}, e.g. { girl →true, boy →false, child →true} or (just listing atoms assigned to true) { girl, child }.

9 Semantics - truth values of clauses A Herbrand interpretation assigns truth values to every atom; therefore to the clause as a whole. –Body of a clause is true if every atom in it is true –Head of a clause is true if at least one atom in it is true Clause is assigned truth value true if body of clause is false or head of clause is true (or both) (NB this means that false:-false and true:-false are both assigned the value true. The idea is that if the body is false then it’s valid either for the head to be true or false, without it contradicting the ‘:-’)

10 Semantics - models If a clause is true in an interpretation then the interpretation is a model for that clause. An interpretation is a model for a program if it is a model for each clause it contains.

11 Semantics - models E.g. consider the program: girl; boy:-child. child:-girl. child:-boy. Models are  (empty model), { girl, child }, { boy, child } and { girl, boy, child }. So this means we have ruled out the possibility that, e.g., the person is a girl and a boy but not a child, or that the person is a girl but not a boy or a child.

12 Logical consequence Now consider the program: girl; boy:-child. child:-girl. child:-boy. boy. Models are { boy, child } and { girl, boy, child }. As these are all models of the clause: child. It follows that this new clause is a logical consequence of the program. In general, a clause C is a logical consequence of a program P if every model of the program is also a model of the clause. Signified P ╞ C.

13 Minimal model semantics The program doesn’t have enough information to distinguish between { boy, child } and { girl, boy, child }. Clearly here we don’t want to say someone’s both a girl and a boy. In general, the principle is that we don’t want to assume that anything is true which doesn’t have to be (e.g. train timetable: don’t have to list times trains aren’t going!)

14 Minimal model semantics Any model for which no subset of it is a model is a minimal model In the above example we have just one. Here, we have two minimal models: girl; boy:-child. child. (namely { boy, child } and { girl, child }). If program contains only definite clauses (with single literal in head), then it can be proved that we can guarantee a unique minimal model.

15 Proof theory Checking that P ╞ C by determining every model of P and checking it’s a model of C is going to take a long time! So we want inference rules that can derive C from P. These inference rules are syntactic, dealing with the symbols only, so we need to prove that C is derived from P if, and only if, P ╞ C.

16 Resolution Suppose we have two clauses: A; A 1,1 ;...; A 1,i :-B 1,1,..., B 1,j A 2,1 ;...; A 2,k :-B 2,1,..., B 2,m, A We select a literal to resolve on, which appears in the head of one clause and body of the other - in this case, w.l.o.g., A The resolvent is A 1,1 ;...; A 1,i ; A 2,1 ;...; A 2,k :- B 1,1,..., B 1,j, B 2,1,..., B 2,m except that if a literal occurs in the head of both clauses, it occurs only once in the resolvent; similarly if it occurs in the body

17 Resolution - example So resolving the following clauses on has_football: happy:-boy, has_football. has_football; impoverished:-boy, good_footballer. gives resolvent: happy; impoverished:-boy, good_footballer. Such a resolvent can be used as input for another resolution step. A proof (derivation) of clause C from P is a sequence of such steps resulting in C. Write: P ├ C.

18 Next time... We’ll ask whether what can be proved corresponds with what are the logical consequences of a program And we’ll discuss the idea of using resolution for refutation Then we’ll talk about more complicated kinds of clausal logics