Proposition & Predicates

Slides:



Advertisements
Similar presentations
February 26, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers Example: Add a = (1110) 2 and b = (1011) 2. a 0 + b.
Advertisements

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.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
CS128 – Discrete Mathematics for Computer Science
From Chapter 4 Formal Specification using Z David Lightfoot
Knoweldge Representation & Reasoning
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
A Brief Summary for Exam 1 Subject Topics Propositional Logic (sections 1.1, 1.2) –Propositions Statement, Truth value, Proposition, Propositional symbol,
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Fallacies The proposition [(p  q)  q]  p is not a tautology, because it is false when p is false and q is true. This type of incorrect reasoning is.
Propositional Calculus – Methods of Proof Predicate Calculus Math Foundations of Computer Science.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
Extra slides for Chapter 3: Propositional Calculus & Normal Forms Based on Prof. Lila Kari’s slides For CS2209A, 2009 By Dr. Charles Ling;
Chapter 1: The Foundations: Logic and Proofs
CSNB143 – Discrete Structure Topic 4 – Logic. Learning Outcomes Students should be able to define statement. Students should be able to identify connectives.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
1 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Chapter 1 Logic and proofs
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
2. The Logic of Compound Statements Summary
Chapter 8 : Fuzzy Logic.
Advanced Algorithms Analysis and Design
Applied Discrete Mathematics Week 5: Mathematical Reasoning
CSE15 Discrete Mathematics 01/23/17
DISCRETE MATHEMATICS CHAPTER I.
CSNB 143 Discrete Mathematical Structures
Lecture 1 – Formal Logic.
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
Applied Discrete Mathematics Week 5: Mathematical Reasoning
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
The Propositional Calculus
Logic Hubert Chan [O1 Abstract Concepts] [O2 Proof Techniques]
Discussion #10 Logical Equivalences
CMSC Discrete Structures
The Foundations: Logic and Proofs
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Discrete Mathematics CS 2610
Information Technology Department
CHAPTER 1: LOGICS AND PROOF
CS201: Data Structures and Discrete Mathematics I
Mathematical Reasoning
Logic Use mathematical deduction to derive new knowledge.
Propositional Equivalences
CMSC Discrete Structures
Resolution And yet Another Example:
A Brief Summary for Exam 1
Applied Discrete Mathematics Week 1: Logic
Back to “Serious” Topics…
Computer Security: Art and Science, 2nd Edition
Lecture 2: Propositional Equivalences
Discrete Mathematics Logic.
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
CSNB234 ARTIFICIAL INTELLIGENCE
Predicates and Quantifiers
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
RESOLUTION.
Mathematical Reasoning
Logical and Rule-Based Reasoning Part I
CS201: Data Structures and Discrete Mathematics I
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

Proposition & Predicates UNIT-1 Proposition & Predicates

Propositional Logic Some of the logically equivalent propositions are listed below. They are also called identities. The symbol  shows the logical equivalence. 1. p  (p  p) ( idempotence of ) 2. p  (p  p) ( idempotence of ) 3. (p  q)  (q  p) ( commutativity of ) 4. (p  q)  (q  p) ( commutativity of ) 5. (p  q)  r  p  (q  r) (associativity of ) 6. (p  q)  r  p  (q  r) (associativity of ) 7. (p  q)  (p  q) (DeMorgan's Law) 8. (p  q)  (p  q) (DeMorgan's Law)

Propositional Logic 9. p  (q  r)  (p  q)  (p  r) (Distributive) 11. (p  True)  True 12. (p  False)  p 13. (p  True)  p 14. (p  False)  False 15. (p  p)  True 16. (p  p)  False 17. p  (p) 18. (p → q)  (p  q) 19. (p ↔ q)  [(p → q)  (q → p)] 20. (p → q)  (q → p)

Propositional Logic Answer: The statement given is equivalent to the negation of “Raju is not tall or Raju is strong”. So it is the negation of (¬p  q). That is ¬(¬p  q). Q3) Prove that (p  p)  (p → (q  q)) is equivalent to p  q Answer: (p  p)  (p → (q  q))  p  (p → q)  p  (¬p  q)  (p  ¬p) ( p  q)  F ( p  q)  (p  q) Q4) p → (q → r)  (p  q) → r

Propositional Logic Answer: Let us explore the L.H.S first p → (q → r)  p  (q  r)  (p  q)  r  (p  q)  r  (p  q) → r Q5) Prove that (p  q)  (p  r)  p  (q  r)

Propositional Logic Dual of a Proposition Let X be a proposition involving  and  as connectives, and X* be a proposition obtained from X by replacing  with ,  with , T with F and F with T. Then X* is called the dual of X. Eg: The dual of [(p  q)  r] is [(p  q)  r] If two propositions X and Y are equivalent, then their duals X* and Y* are also equivalent. Tautology & Contradiction A proposition whose truth value is always true is called a tautology and one whose truth value is always false is called a contradiction. The negation of a tautology is a contradiction and that of a contradiction is a tautology.

Propositional Logic Q1) Which of the following is true about the proposition p  (¬p  q) ? a)Tautology b)Contradiction c)Logically equivalent to p  q d)None of these Answer: The proposition can be written as (p  ¬p)  (p  q)  F  (p  q)  (p  q).So the answer is (c) Q2) What is the dual value of (p  q)  T ? Answer: The dual value of any expression is created by replacing ‘ with ’,‘ with ’, ‘T with F’ and ‘F with T’. Thus the dual value of the given expression is (p  q)  F.

Propositional Function (Predicates) Quantifiers Quantifiers are symbols used with propositional functions. There are two types of quantifiers as shown in the table below. Name Symbol Meaning Universal Quantifier  “ for all” Existential Quantifier  “ there exists at least one” Eg: If N is a set of all positive numbers, then the following statements are true. x  N, (x + 3 > 2).  x  N, (x + 2 < 7).

Propositional Function (Predicates) Negation of Quantified Statements Consider the statement “All cities are clean”. Its negation can be written in two ways. 1.It is not the case that all cities are clean. 2.There exists at least one city which is not clean. Symbolically we can write, (x  M)(x is clean)  (x  M)(x is not clean) or (x  M) p(x)  (x  M) p(x) Where M is the set of all cities. According to Demorgan, 1) (x  A) p(x)  (x  A) p(x) 2) (x  A) p(x)  (x  A) p(x)

Propositional Function (Predicates) Propositional Functions with more than one variable A propositional function with more than one variable can be written as p(x1,x2,…xn) over a product set A1A2…An. Eg: Let A={1,2,3,4} and p(x,y) denotes x + y = 5. So we can write a true statement as xy p(x,y). But if we change the order of the quantifiers the statement becomes false. i.e. if we write yx p(x,y) the meaning of the statement becomes “There exists a y such that for all x we have x+y=5”.(We know that no such y exists.) Negating Quantified Statements When we negate statement with more than one variable, each  will be replaced by a  and each  will be changed to . Eg: (xyz p(x,y,z))  xyz p(x,y,z)

Propositional Function (Predicates) Q1) What is the predicate calculus statement equivalent to the following? “Every teacher is liked by some student” a)x [ teacher(x) → y[student(y) → likes(y,x)]] b)x [ teacher(x) → y[student(y)  likes(y,x)]] c)yx[ teacher(x) → [student(y)  likes(y,x)]] d)x [ teacher(x)  y[student(y) → likes(y,x)]] Answer: The statement given can also be written as “ For all x, if x is a teacher, then there exists a student y who loves x”, which can also be represented using the quantifiers as follows. x [ teacher(x) → y[student(y)  likes(y,x)]]. It is important to note that implication (→) is almost used in conjunction with the quantifier . Mostly the quantifier  is associated with .

Propositional Function (Predicates) Q2) P(x): x is a human being. F(x, y): x is father of y. M(x, y): x is mother of y. Write the predicate corresponding to “x is the father of the mother of y” Answer: If we try to interpret the predicate using three variables x, y, z we can write “z is a human being and x is the father of z and z is the mother of y”. This can be represented as ( z)(P(z)  F(x,z)  M(z,y)).

Propositional Function (Predicates) Normal Forms Some important points to remember here are, 1.An atomic proposition is a proposition containing no logical connectives. Eg: p, q, r etc. 2.A literal is either an atomic proposition or a negation of an atomic proposition. Eg:p, q, r etc. 3.A conjunctive clause is a proposition that contains only literals and the connective . Eg: (p  q  r). 4. A disjunctive clause is a proposition that contains only literals and the connective . Eg: (p  q  r) The problem of finding whether a given statement is a tautology or contradiction in a finite number of steps is called a decision problem. Constructing truth tables is not a practical way.

Propositional Function (Predicates) We can therefore consider alternate procedure known as reduction to normal forms. Two such normal forms are: 1.Disjunctive Normal form(DNF) 2.Conjunctive Normal form(CNF) 1.Disjunctive Normal form(DNF) A proposition in said to be in disjunctive normal form (DNF) if it is a disjunction of conjunctive clauses and literals. Eg: (p  q  r)  q  (q  r). A proposition in said to be in principal disjunctive normal form if it is a disjunction of conjunctive clauses only. Eg: (p  q  r)  (q  r).

Propositional Function (Predicates) 2.Conjunctive Normal form(CNF) A proposition in said to be in conjunctive normal form (CNF) if it is a conjunction of disjunctive clauses and literals. Eg: (p  q  r)  r  (q  r). A proposition in said to be in principal conjunctive normal form if it is a conjunction of disjunctive clauses only. Eg: (p  q  r)  (q  r). Q1) What is the disjunctive normal form of p  (p → q) ? Answer: (p  p)  (p  q) Q2) What is the principal disjunctive normal form of p  q?

Propositional Function (Predicates) Answer: A proposition in said to be in principal disjunctive normal form if it is a disjunction of conjunctive clauses only. We can write, p  q  (p  T)  (q  T) (p  (q  q))  (q  (p  p)) (p  q)  ( p  q)  (p  q)  ( p  q) (p  q)  ( p  q)  (p  q)

Mathematical Reasoning We need mathematical reasoning to determine whether a mathematical argument is correct or incorrect Mathematical reasoning is important for artificial intelligence systems to reach a conclusion from knowledge and facts. We can use a proof to demonstrate that a particular statement is true. A proof consists of a sequence of statements that form an argument. Rules of Inference: Inference is the act or process of deriving a conclusion based solely on what one already knows. It uses hypotheses, axioms, definitions etc. to reach a conclusion.

Mathematical Reasoning The general form of a rule of inference is: Where p1, p2,.., pnare known as the hypotheses and q is known as the conclusion and ‘∴’ means ‘therefore’. The rule states that if p1and p2 and … andpn are all true, then q is true as well. Some valid arguments:

Mathematical Reasoning We say that an argument is valid, if whenever all its hypotheses are true, its conclusion is also true. Q1) check whether the following argument is valid or not. “If it rains today, then we will not have a barbeque today. If we do not have a barbeque today, then we will have a barbeque tomorrow. Therefore, if it rains today, then we will have a barbeque tomorrow.” p: “It is raining today.” q: “We will not have a barbeque today.” r: “We will have a barbeque tomorrow.” So the argument is of the following form:

Mathematical Reasoning Q2) check whether the following argument is valid or not. Gary is either intelligent or a good actor. If Gary is intelligent, then he can count from 1 to 10. Gary can only count from 1 to 3. Therefore, Gary is a good actor. Answer: Yes i: “Gary is intelligent.” a: “Gary is a good actor.” c: “Gary can count from 1 to 10.” Step 1:  c Step 2: i  c Step 3:  i Step 4: a  i Step 5: a Conclusion: a (“Gary is a good actor.”)