Presentation is loading. Please wait.

Presentation is loading. Please wait.

Proposition & Predicates

Similar presentations


Presentation on theme: "Proposition & Predicates"— Presentation transcript:

1 Proposition & Predicates
UNIT-1 Proposition & Predicates

2 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)

3 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)

4 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

5 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)

6 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.

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

8 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).

9 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)

10 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)

11 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 .

12 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)).

13 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.

14 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).

15 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?

16 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)

17 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.

18 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:

19 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:

20 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.”)


Download ppt "Proposition & Predicates"

Similar presentations


Ads by Google