Docsity

Artificial Intelligence chapter 2 b Propositional logic, Lecture notes of Artificial Intelligence

Partial preview of the text

Download Artificial Intelligence chapter 2 b Propositional logic and more Lecture notes Artificial Intelligence in PDF only on Docsity!

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

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.

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?

„Phone‟ has five letters.

Oh dear!

„Work‟ has five letters.

the reactor is on

 All elephants have 4 legs

I like AI class

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 )

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 Its Monday.

q Its raining.

p ^ q Its Monday and its raining.

Its Monday but its raining.

Its Monday. Its raining.

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 It‟s Monday.

q It‟s raining.

p q 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!

Natural Language Meaning

p Logic is easy.

p 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