Artificial Intelligence (Part 2a) Knowledge Representation and Search: Propositional Logic

Similar documents
CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Handout #1: Mathematical Reasoning

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Logic in general. Inference rules and theorem proving

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

3. Mathematical Induction

def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Beyond Propositional Logic Lukasiewicz s System

Predicate Logic. For example, consider the following argument:

CS510 Software Engineering

DISCRETE MATH: LECTURE 3

CS 3719 (Theory of Computation and Algorithms) Lecture 4

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

2. The Language of First-order Logic

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

Algorithmic Software Verification

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Introduction. The Quine-McCluskey Method Handout 5 January 21, CSEE E6861y Prof. Steven Nowick

CHAPTER 7 GENERAL PROOF SYSTEMS

COMPUTER SCIENCE TRIPOS

FUNDAMENTALS OF ARTIFICIAL INTELLIGENCE KNOWLEDGE REPRESENTATION AND NETWORKED SCHEMES

Logic in Computer Science: Logic Gates

Lecture 16 : Relations and Functions DRAFT

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

University of Ostrava. Reasoning in Description Logic with Semantic Tableau Binary Trees

p: I am elected q: I will lower the taxes

Rigorous Software Development CSCI-GA

Artificial Intelligence

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

24. PARAPHRASING COMPLEX STATEMENTS

The Refutation of Relativism

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Math Content by Strand 1

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Mathematical Induction

A Few Basics of Probability

Formal Engineering for Industrial Software Development

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Compound Inequalities. AND/OR Problems

Invalidity in Predicate Logic

MAT Program Verication: Exercises

Degrees of Truth: the formal logic of classical and quantum probabilities as well as fuzzy sets.

Relational Databases

The Syntax of Predicate Logic

Binary Adders: Half Adders and Full Adders

Basic Logic Gates Richard E. Haskell

Base Conversion written by Cathy Saxton

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

First Affirmative Speaker Template 1

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

CMPSCI 250: Introduction to Computation. Lecture #19: Regular Expressions and Their Languages David Mix Barrington 11 April 2013

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Teaching Formal Methods for Computational Linguistics at Uppsala University

196 Chapter 7. Logical Agents

Logic is a systematic way of thinking that allows us to deduce new information

Version Spaces.

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Outline. Written Communication Conveying Scientific Information Effectively. Objective of (Scientific) Writing

NP-Completeness and Cook s Theorem

Math 223 Abstract Algebra Lecture Notes

Parsing Technology and its role in Legacy Modernization. A Metaware White Paper

Introduction to formal semantics -

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

A Propositional Dynamic Logic for CCS Programs

Lecture 1. Basic Concepts of Set Theory, Functions and Relations

15 Prime and Composite Numbers

Turing Machines, Busy Beavers, and Big Questions about Computing

Solutions to Math 51 First Exam January 29, 2015

Code Kingdoms Learning a Language

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

Quine on truth by convention

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

Note on growth and growth accounting

Lecture Notes on Linear Search

Introduction to Logic in Computer Science: Autumn 2006

Overview of the TACITUS Project

doing a literature review

EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * ABSTRACT

Resolution. Informatics 1 School of Informatics, University of Edinburgh

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

6.080/6.089 GITCS Feb 12, Lecture 3

BenInq. BenInq. How It Works. Why? Uses of Expert Systems in Insurance Underwriting Policy Matching Benefit Querying Claim Processing

DATA STRUCTURES USING C

EFFICIENT KNOWLEDGE BASE MANAGEMENT IN DCSP

1.2 Forms and Validity

P1. All of the students will understand validity P2. You are one of the students C. You will understand validity

DIVISIBILITY AND GREATEST COMMON DIVISORS

Boolean Design of Patterns

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Cartesian Products and Relations

Cohesive writing 1. Conjunction: linking words What is cohesive writing?

Transcription:

Artificial Intelligence (Part 2a) Knowledge Representation and Search: Propositional Logic

Course Contents Again..Selected topics for our course. Covering all of AI is impossible! Key topics include: Introduction to Artificial Intelligence (AI) Knowledge Representation and Search Introduction to AI Programming Problem Solving Using Search Exhaustive Search Algorithm Heuristic Search Techniques and Mechanisms of Search Algorithm Knowledge Representation Issues and Concepts Strong Method Problem Solving Reasoning in Uncertain Situations Soft Computing and Machine Learning

Overview KR and search In the last lecture we considered the importance of 2 focus of AI research??? Will look at logic as a method to formalize and reason about knowledge. Will consider the syntax and semantics of propositional logic. Will look at truth tables for compound propositions.

Ask google..what is propositional logic? propositional logic logic (or "propositional calculus") A system of symbolic logic using symbols to stand for whole propositions and logical connectives. Propositional logic only considers whether a proposition is true or false. In contrast to predicate logic, it does not consider the internal structure of propositions. (2002-05-21)

Logic in General (1) Logics are formal languages for representing information such that conclusions can be drawn When people talk about logic they often mean propositional or first-order predicate logic.

Logic in General (2) A logic usually has a well defined syntax, semantics and proof theory. The syntax of a logic defines the syntactically acceptable objects of the logic, or well-formed formulae. The semantics of a logic associate each formula with a meaning. The proof theory is concerned with manipulating formulae according to certain rules.

Propositional Logic The syntax of propositional logic is constructed from propositions and connectives. A proposition is a statement that is either true or false but not both

Propositions??? Najib is Prime Minister What is the time? 2 + 3 = 5 Phone has five letters. 2 + 3 = 6 Oh dear! Work has five letters. the reactor is on 2+3 All elephants have 4 legs I like AI class

How to determine Propositions?? It is possible to determine whether any given statement is a proposition by prefixing it with It is true that... and seeing whether the result makes grammatical sense. Propositions are often abbreviated using propositional variables eg p, q, r. Thus we must associate the propositional variable with its meaning i.e. Let p be Najib is Prime Minister.

Connectives Propositions may be combined with other propositions to form compound propositions. These in turn may be combined into further propositions. The connectives that may be used are and conjunction (& or.) or disjunction ( or +) not negation (~) if...then implication ( ) if and only if equivalence ( ) Some books use different notations. Some of these are given in parentheses.

Propositional Logic: Syntax The proposition symbols P1, P2 etc are sentences If S is a sentence, S is a sentence (negation) If S 1 and S 2 are sentences, S 1 S 2 is a sentence (conjunction) If S 1 and S 2 are sentences, S 1 S 2 is a sentence (disjunction) If S 1 and S 2 are sentences, S 1 S 2 is a sentence (implication) If S 1 and S 2 are sentences, S 1 S 2 is a sentence (equivalence)

Propositional Logic: Semantic Each model species true/false for each proposition symbol E.g. P Q R Why 8? true true false (With these symbols, 8 possible models, can be enumerated automatically.) Rules for evaluating truth with respect to a model m are determined by truth tables

And (also called conjunction) The conjunction p AND q, written p q, of two propositions is true when both p and q are true, false otherwise. We can summarise the operation of using a truth table. Rows in the table give all possible setting of the propositions to true (T) or false (F). p q

Natural Language Meaning (1) p q p ^ q Its Monday. Its raining. Its Monday and its raining. Its Monday but its raining. Its Monday. Its raining.

Natural Language Meaning (2) Caution: semantics? p I took a shower q I woke up p ^ q I took a shower and I woke up q ^ p I woke up and I took a shower. Logically the same! WE may see a difference. The word both is often useful eg. I both took a shower and I woke up.

Or Also called disjunction. The disjunction p OR q, written p q, of two propositions is true when p or q (or both) are true, false otherwise. Sometimes called inclusive or. p q

Natural Language Meaning p q p q It s Monday. It s raining. It s Monday or it is raining. The word either is often useful eg. either it s Monday or it is raining. It also includes the case of rain on a Monday!

Not Also known as negation The negation NOT p of a proposition (or p) is true when p is false and is false otherwise. p may be read that it is false that p. p Negation is a unary connective. It only takes one argument. Conjunction and disjunction were both binary connectives.

Natural Language Meaning p p Logic is easy. It is false that logic is easy. It is not the case that logic is easy. Logic is not easy.

If... then.. Also known as implication The implication p IMPLIES q, written p q, of two propositions is true when either p is false or q is true, and false otherwise. p q

Natural Language Meaning p q p q I study hard. I get rich. If I study hard then I get rich. Whenever I study hard, I get rich. That I study hard implies I get rich. I get rich, if I study hard.

More About Implication

Biconditional Also known as iff or the biconditional. The biconditional, written as p q, of two propositions is true when both p and q are true or when both p and q are false, and false otherwise.

Biconditional

WFF The set of sentences or well-formed propositional formulae (WFF) is defined as: Any propositional symbol is in WFF. The nullary connectives, true and false are in WFF. If A and B are in WFF then so is ~A, A v B, A ^ B, A B and A 1 B. If A is in WFF then so is (A).

Example The following are well formed formulae.

Recap: Truth Tables

Truth Tables for Compound Propositions Truth tables may be used to show interpretations of compound propositions. To draw up a truth table, construct a column for each proposition involved. You need 2 n rows for n propositions for all possible ways of setting the propositions to T and F. If we have 3 propositions, p; q; r, i.e. we need 2 3 = 8 rows. Next, construct a column for each connective, the most deeply nested first. Evaluate each column using values for propositions or previous columns.

Exercise p.. (my breakfast is) eggs. q.. (my breakfast is) cereal. r.. (my breakfast is) toast. The statement my breakfast is either eggs or cereal, and toast may be written in symbolic form as??? WHAT DOES THE TABLE TELL U?

... So The truth table gives results for all possible interpretations of p, q and r. The compound proposition is true if I eat cereal, eggs and toast; or I eat cereal and toast; or I eat eggs and toast. Interpretation - A line in the truth table.

Try this.. Complete the truth table for Show that the formula Find an interpretation which satisfies is satisfiable Show is valid.

Complete the previous slide by referring this site : http://turner.faculty.swau.edu/mathematics/materialslibrary/truth/

Next.. Predicate logic