Presentation is loading. Please wait.

Presentation is loading. Please wait.

Propositions and Logical Operations

Similar presentations


Presentation on theme: "Propositions and Logical Operations"— Presentation transcript:

1 Propositions and Logical Operations

2 Introduction Logic is concerned with the methods of reasoning. It provides rules and techniques by which we can determine whether any particular argument is valid or not. Logical reasoning has its applications in the field of mathematics to prove theorems, in the field of computer science for design of computing machines, to artificial intelligence to programming languages, etc.

3 Statement or Proposition
A statement (or proposition) is a declarative sentence that is either true or false, but not both. If the statement is true then we assign a value T to it and if it is a false then we assign a value F to it. These values T and F are called the truth values of the statement.

4 Statement or Proposition
Examples 1. Delhi is in India. = 8. 3. Do your homework. 4. x – 4 = 2 (Declarative sentence) 5. Jaipur is a state. 6. What are you doing?

5 Propositional Variables
Instead of writing the statements repeatedly, it is convenient to denote each of the statements by a unique variable, p, q r ,…, etc., and can be replaced by statements. Eg: (i) p : Delhi is the capital of India. (ii) q : It is raining.

6 Logical Connectives and Compound Statements
Statements or propositional variables can be combined by means of logical connectives or operators to form a single statement called compound statements (or compound propositions or molecular statement)

7 Logical Connectives and Compound Statements
Symbol Connective Name ˜ not negation ^ and conjunction V or disjunction Implies or if … then Implication or conditional If and only if Equivalence or biconditional

8 Logical Connectives and Compound Statements
Remark: The statement ( or proposition) which does not contain any connective is called a prime statement or an atomic statement

9 Negation If p denotes a statement, then the negation of p is the statement denoted by ~p and read as ‘ it is not the case that p’. So, it follows that if p is true then ~p is false, and if p is false then ~p is true. Eg: if p : Ramanujan was a great mathematician then ~p: It is not the case that Ramanujan was a great mathematician. Or ~p: Ramanujan was not a great mathematician.

10 Negation Truth table of ~p p ~p T F

11 Remark: (i) Negation changes one statement into another, while other connectives combine two statements to form a third. (ii) A truth table displays the relationships between the truth of propositions.

12 Conjunction If p and q are statements, then “ p and q” is a compound statement, denoted as p Λ q and referred as the conjunction of p and q. Truth table of p Λ q p q p Λ q T F

13 Conjunction Eg: Form the conjunction of p and q for each of the following: (i) p: it is snowing q: I am cold (ii) p: 6 < q: -3 > -4 (iii) p: It is raining q: 1> 4.

14 Disjunction If p and q are statements, then “p or q” is a compound statement, denoted as p V q and referred as the disjunction of p and q. Truth table of p V q p q p V q T F

15 Disjunction Eg: Form the disjunction of p and q for each of the following: (i) p: 4 is a positive integer q: √5 is a rational number (ii) p: > q: Jaipur is the capital of Gujarat.

16 Q: Make a truth table for each of the following
pV ~q (ii) (~pΛq)Vp (iii) (pVq)V~q (iv) (pVq)Λr (v) (~pVq)Λ~r (vi) ~(~p)

17 Conditional Statement(or implication)
If p and q are statements, then “if p then q” is a compound statement, denoted as p→q and referred as a conditional statement, or implication. Truth Table of p→q p q p→q T F

18 Antecedent and Consequent
In the conditional statement p→q, the statement p is called the antecedent or hypothesis and q is called the consequent or conclusion.

19 The statement p→q may be expressed as:
p implies q ; p is a sufficient condition for q; If p then q ; q is a necessary condition for p; q only if p ; q follows from p; q provided p; q whenever p. q, if p; q is a consequence of p.

20 Converse and Contrapositive
The converse of p→q is the implication q→p The contrapositive of p→q is the implication ~q→~ p And the inverse of p→q is the implication ~p→~ q.

21 Truth table of q→p p q P→q q→p T F

22 Truth table of ~q→~ p p q ~p ~q P→q ~q→~ p T F

23 Truth table of ~p→~ q p q ~p ~q P→q ~p→~ q T F

24 Biconditional Statement
If p and q are statements, then “p if and only if q” is a compound statement, denoted as p↔q and referred as a biconditional statement or an equivalence. p q p↔q T F

25 Q. Prove that the equivalence p↔q can also be defined as a conjunction of the implication p→q and q→p. Q Find the converse, contrapositive and inverse of the following implications “if today is Thursday, then I have a test today” “ if it is raining, then I get wet.”

26 Whenever we take negation
(i) All ↔ Some i.e. for every ↔ there exist (ii) Or ↔ and.

27 Questions Q. a)Write negation of
All men are animals ii) Some men are animals iii) All men take water and wine iv) No teacher is a millionaire v) Mala is not good b) Give converse and contrapositive of the implication “ if weather will be good then I will travel”

28 Questions Q. If p represents : this book is good” and q represents “ this book is costly”. Write the following statements in symbolic form. a) This book is good and costly. b) This book is not good but costly c) This book is cheap but good d) This book is neither good nor costly e) If this book is good then it is costly.

29 Questions Use the following propositions for this problem:
c = Rahul is a cricket player h = Rahul is a hard worker m = Rahul is a mathematician write each of the following statements in symbolic form . Rahul is cricket player, however he is not a mathematician.

30 Questions (b) Rahul is either a hard worker or a cricket player, but not both. (c) Rahul is a hard worker, but he is neither a cricket player nor a mathematician.

31 Questions Q. Find the truth values of the following propositions:
“if 3 is not an integer, then 1/3 is an integer” “if 3 is an integer, then 1/3 is an integer”

32 Questions Q. Let p: “it is raining ; q: I have time” and
r: “ I will go to movie” Translate the following sentences into the following propositional forms. If it is not raining and I have time then I will go to a movie It is raining and I will not go to a movie It is not raining d) I will go to a movie only if, it is not raining

33 Questions Q. Let p: “it is raining ; q: I have time” and
r: “ I will go to movie”. Write the following sentences in English corresponding to (~pΛq)↔r b) (q→r)Λ (r→q) c) ~(qVr) d) r→~pΛq

34 Q. Let P, Q, and R be the following statements
P: You get an A in the subject Q: You do every exercise in this book R: You get an A in this class. Write the following statement in terms of P, Q, R and logical connectives. Also write its converse and contrapositive in English as well as in symbolic form. Statement is “ You get an A in this class or in the subject if you do every exercise in this book”

35 Rewrite the following statement without using conditional.
(i) “ if u work hard, you will succeed.” (ii) “ If it is cold, he takes a blanket.” (iii) If productivity increases, then wages rise.

36 Tautologies and Contradictions
A compound statement that is always true for all possible truth values of its propositional variables, is called a tautology or valid. Obviously, its truth table contains only truth value T in the last column. A compound statement that is always false, is called a contradiction or absurdity. Obviously, its truth table contains only truth value F in the last column

37 Contingency A statement that is neither a tautology nor a contradiction is called a contingency. So , its truth table contains both T and F values in its last column. Eg: Show that the statement (p→q)↔(~q→~p) is a tautology. Q. Show that the statement (pΛ~p) is a contradiction Q. Show that the statement (p→q)Λ(pVq) is a contingency.

38 Logical Equivalence Two compound statements p and q are said to be logically equivalent if p↔q is a tautology and we write p≈q. Note: Another way to determine whether two statements are equivalent is to construct a column for each statement and compare these columns, if they are identical then we say that the two statements are equivalent. Q. Show that (pvq) and (qvp) are equivalent.

39 Q. Show that p→q ≈(~p)vq. Operations For Propositions (laws of logics). (i) Commutative properties (ii) Associative property (iii) Distributive properties (iv) Idempotent Property (v) Properties of Negation (vi) Identity Laws (vii) Domination Laws (ix) Absorption Law

40 Functionally Complete Set of connectives
The set containing minimum number of connectives which are sufficient to express any logical formula in symbolic form is called the functionally complete set of connectives.

41 Q. Show that ~(pV(~Λq)) ≈ (~p)Λ(~q).
Q. Show that (pΛq)→ (pVq) is a tautology. Q. Show that (P→(Q→R)) →((P →Q)→(P→R)) is a tautology. QGiven the truth values of P and Q as “T” and those of R and S as “F”, find the truth of the following: a) (PΛ(QΛR))V~((PVQ)Λ(RVS)) b) (~(PΛQ)V~R)V(((~PΛQ)V~R)ΛS)

42 Normal Forms If the number of variables ,involved in a given statement are more, then the construction of truth tables may not be practical, therefore, we consider other method known as reduction to normal form. Note: In this method, we use the word “product” in place of “conjunction” and “Sum” in place of disjunction”.

43 Some Basic terms Related to Normal Form
Elementary Product: A product of the variables and their negation is called an elementary product. Eg: Let p and q be any two atomic variables, then p, q, pΛq, ~ p Λ ~ q, p Λ ~q, ~p Λ q….. etc are elementary products. Elementary Sum: A Sum of the variables and their negation is called an elementary sum. Eg: p, q, pVq, pV ~ q, ~ p V ~ q, ~pVq….. etc are elementary sums.

44 Factor: A factor of the given elementary sum or product, is a part of it .
Eg: ~q, p, q, ~ p, pΛq, ~qΛp, ~qΛq….. etc are the factors of : ~q Λp Λq. Minterms: Let p and q be two propositional variables. All possible formulas which consist of product of p or its negation and product of q or its negation, but should not contain both the variable and its negation in any one of the formula are called minterms of p and q. Eg: For two variables p and q, there are 22 = 4 minterms, namely, pΛq, pΛ~q, ~pΛq, ~pΛ~q.

45 Remark: If there are n variables then number of minterms = 2n
Maxterm: Let p and q be two propositional variables. All possible formulas which consist of Sum of p or its negation and Sum of q or its negation, but should not contain both the variable and its negation in any one of the formula are called Maxterm of p and q. Eg: For two variables p and q, there are 22 = 4 minterms, namely, pVq, pV~q, ~pVq, ~pV~q.

46 Disjunctive Normal Form(DNF)
A statement which consists of a sum of elementary products of propositional variables and is equivalent to the given compound statement, is called a disjunctive normal form of the given statement. This form is not unique for the given statement.

47 Method to obtain disjunctive normal form
Step1. replace → and ↔ by Λ, V, and ~ in the statement. Step 2. Manipulate to get an equivalent form which is the sum of elementary product terms.

48 Conjunctive Normal Form(CNF)
A statement which consists of a product of elementary sums of propositional variables and is equivalent to the given compound statement, is called a Conjunctive normal form of the given statement. This form is not unique for the given statement.

49 Principal disjunctive normal form(PDNF)
For a given formula, an equivalent formula consisting of disjunctions of minterms only is known as its Principal disjunctive normal form(PDNF) or Sum of products canonical form.

50 Principal disjunctive normal form(PDNF)
Procedure I: For every truth table T in the truth table of the given statement, choose the minterm which also has the value T for the same combination of the truth values of p and q. The sum of these minterms will then be equivalent to the given statement.

51 Principal disjunctive normal form(PDNF)
Procedure 2. 1. Obtain DNF 2. Drop elementary products, which are contradictions such as (pΛ~p) 3. If pi and ~pi are missing in the elementary product α, replace α by (αΛpi)V(αΛ~pi) 4. Repeat step 3 until all elementary products are reduced to sum of minterms. Use idempotent laws to avoid repetitions of minterms.

52 Principal conjunctive normal form(PCNF)
For a given formula, an equivalent formula consisting of conjunctions of maxterms only is known as its Principal disjunctive normal form(PCNF) or product of sums canonical form.

53 Principal conjunctive normal form(PCNF)
Procedure: For every truth table F in the truth table of the given statement, choose the maxterm which also has the value F for the same combination of the truth values of p and q. The product of these maxterms will then be equivalent to the given statement.

54 To Obtain PCNF From PDNF and Vice-Versa
If the PDNF (or PCNF) of a given statement S, containing n variables, is known then the PDNF (or PCNF) of ~S will consist of the disjunction (conjunction) of remaining minterms (or maxterms) which are not present in the PDNF (or PCNF) of S. Since S≈b~(~S), so we can obtain the PCNF (or PDNF) of S by applying De Morgan’s Laws.

55 Predicates and Quantifiers
Consider the statement “x is a positive integer” The first part i.e., the variable x is called the subject of the statement, while the second part, i.e., “is a positive integer”- refers to a property that the subject of the statement can have, is called the predicate. This statement is denoted by P(x), where P denotes the predicate “is a positive integer” and x is the variable.

56 Examples Eg.1. Let P(x) : x > 3. What are the truth values of P(2) and P(4). Eg.2. Let Q(x , y) : x = y + 3. What are the truth values of the statements Q(1, 2) and Q(3, 0)?

57 Quantifiers Quantification is an another powerful technique to create a statement from a propositional function. There are two types of Quantifiers. Quantifiers Universal Quantification Existential Quantification

58 Universal Quantification : The universal quantification of a predicate P(x) is the statement “ P(x) is true for all values of x in the universe of discourse”. The universe of discourse is the domain. The notation ∀xP(x) denotes the universal quantification of P(x). The statement ∀xP(x) can also be stated as “for every xP(x)” or “for all xP(x)”.

59 Existential quantification : The existential quantification of a predicate P(x) is the statement “ there exists an element x in the universe of discourse for which P(x) is true”. The notation ∃xP(x) denotes the existential quantification of P(x). The statement ∃xP(x) can also be stated as “ there is an x such that P(x)”, “there is at least one x such that P(x)”, “for some x P(x)”, or “ there exists an x such that P(x)”.

60 Table of Quantifiers for one variable
Statement When True When false ∀xP(x) P(x) is true for every x. There is at least one x for which P(x) is false. ∃xP(x) There is at least one x for which P(x) is true. P(x) is false for every x.

61 Examples Eg.1. What is the truth value of ∀xP(x), where P(x) is the statement “x2<10” and the universe of discourse consists of the positive integers not exceeding 4? Eg.2. What is the truth value of ∃xP(x), in example 1.? Eg.3. Translate the statement ∀x(C(x)V∃y(C(x)ΛF(x,y))) into English, where C(x) is “x has a computer”, F(x,y) is “x and y are friends”. And the universe of discourse for both x and y is the set of all students in our college. Eg.4. Express the statement “Every student in this class has studied calculus” as a universal quantification.

62 (i) Every car is a four wheeler manufactured by MUL.
Examples Eg.5. Over the universe of four wheelers, let P(x): x is a four wheeler; Q(x) : x is a car ; R(x) : x is manufactured by Maruti Udyog Ltd.(MUL). Express the following statements using quantifiers. (i) Every car is a four wheeler manufactured by MUL. (ii) There are cars that are not manufactured by MUL. (iii) Every four wheeler is a car.

63 Eg.6. Over the universe of animals, let
P(x) : x is a whale ; Q(x) : x is a fish ; R(x) : x lives in water. Translate the following into English. ∃x(~R(x)) (ii) ∃x(Q(x)Λ~P(x)) (iii) ∀x(P(x)ΛR(x))→Q(x) Eg.7. Express the statements “Some student in this class has visited Mexico” and “Every student in this class has visited either Canada or Mexico” using quantifiers.

64 Eg.8: Write in Symbols: (i) There exists an x such that x<2. (ii) For every number x there is a number y such that y=x+1. (iii) Every rational number is a real number. (iv) No woman is beautiful as well as intelligent. (v) some women are beautiful.

65 Eg 9: Let the universe of discourse be D = {0, 1, 2,…, 9}
Eg 9: Let the universe of discourse be D = {0, 1, 2,…, 9}. Let Q(x, y) be the statement “x+y=x-y”. Determine the truth values of the following. (i) Q(1,1) (ii)Ǝy ∀x Q(x,y) (iii) ∀y Ǝx Q(x,y) (iv) Ǝx Q(x,2)

66 Argument: An argument is an assertion that a given set of statements p1, p2, …, pn, implies a certain statement c, called the conclusion. Such an argument is denoted by p1, p2, …, pn →c. This argument is said be valid if c is true whenever all the premises p1, p2, …, pn are true otherwise it is called fallacy or invalid.

67 Questions Q1. Can we conclude S from the following premises? (i) P→Q (ii) P→R (iii) ~(QΛR) (iv) SVP Q2.Is the following argument valid? “If you invest in the stock market, then you will get rich. If you get rich, then you will be happy. Therefore, if you invest in the stock market, then you will be happy”

68 Q3. Show that the following argument is valid.
“ It is not sunny this afternoon and it is colder than yesterday. We will go swimming only if it is sunny. If we do not go swimming, then we will take canoe trip. If we take a canoe trip, then we will be home by sunset. Therefore, we will be home by sunset” Q4. Derive S from the following premises using a valid argument. (i) P→Q (ii) Q→~R (iii) PVS (iv) R

69 Q5. Show that R→S can be derived from the premises
(i) P→(Q→S) (ii) ~RVP (iii) Q Q6. Is the following argument Valid? Justify. “ If I try hard and I have talent then I will become a musician. If I become a musician then I will be happy. Therefore I will not be happy then either I did not try hard or I do not have talent”

70 Q7. Show that the premises “ Everyone in this discrete mathematics class has taken a course in computer science” and “Manju is a student in this class” imply the conclusion “Manju has taken a course in computer science” Q8. Determine the validity of the argument “All men are fallible”, “All kings are men”, Therefore, All kings are fallible. Q9. Check the validity of the following argument. “Lions are dangerous animals”, “There are Lions” Therefore, there are dangerous animals.

71 Mathematical Induction
Steps : (1) Show that P(1) is true. (2) Assume P(k) is true, where k<n (3) Prove that P(k+1) is true. (4) Hence P(x) is true for every n.


Download ppt "Propositions and Logical Operations"

Similar presentations


Ads by Google