Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CHAPTER 1 SETS, FUNCTIONS, ELEMENTARY LOGIC & BOOLEAN ALGEBRAS BY: MISS FARAH ADIBAH ADNAN IMK CHAPTER OUTLINE: PART III 1.3 ELEMENTARY LOGIC 1.3.1 INTRODUCTION 1.3.2 PROPOSITION 1.3.3 COMPOUND STATEMENTS 1.3.4 LOGICAL CONNECTIVES 1.3.5 CONDITIONAL STATEMENT 1.3.6 PROPOSITIONAL EQUIVALENCES 1.3 ELEMENTARY LOGIC 1.3.1 INTRODUCTION Logic – used to distinguish between valid and invalid mathematical arguments. Application in computer science – design computer circuits, construction of computer program, verification of the correctness of programs. Basic building blocks - Prepositions 1.3.2 PROPOSITION Proposition – is a declarative sentence either true or false, but not both. Eg: 1) Washington, D.C., is the capital of the United States of America. 2) 1+1=2 3) What time is it? 4) Read this carefully. 5) x+1=2 Letters are used to denote prepositions – p, q, r, s. 1.3.3 COMPOUND STATEMENTS Many mathematical statements are constructed by combining one or more propositions. Eg: John is smart or he studies every night. Fundamental property of a compound proposition: The truth value is determined by the truth value of its subpropositions, together with the way they are connected to form compound proposition. 1.3.4 LOGICAL CONNECTIVES 1) Not (negation) : ~ / Let p be a proposition. The negation of p is denoted by p, and read as “not p”. -Eg: Find the negation of the preposition “Today is Friday”. The Truth Table for the Negation of a Preposition p p T F F T 1.3.4 LOGICAL CONNECTIVES 2) And (conjunction) : Let p and q be prepositions. The preposition of “p and q” - denoted p q , is TRUE when BOTH p and q are true and otherwise is FALSE. The Truth Table for the Conjunction of Two Prepositions pq p q T T T T F F F T F F F F 1.3.4 LOGICAL CONNECTIVES 3) Or (disjunction) : Let p and q be prepositions. The preposition of “p or q” - denoted p q , is FALSE when BOTH p and q are FALSE and TRUE otherwise. The Truth Table for the Disjunction of Two Prepositions p q pq T T T T F T F T T F F F EXAMPLE 1.1 Consider the following statements, and determine whether it is true or false. 1) Ice floats in water and 2 + 2 = 4 2) China is in Europe and 2 + 2 = 4 3) 5 – 3 = 1 or 2 x 2 = 4 EXAMPLE 1.2 Let p and q be the following propositions: p = It is below freezing q = It is snowing Translate the following into logical notation, using p and q and logical connectives. (a) (b) (c) (d) It is below freezing and snowing It is below freezing but not snowing It is not below freezing and it is not snowing It is either snowing or below freezing (or both) 1.3.5 CONDITIONAL STATEMENTS 1) Conditional Statement/ Implication Let p and q be a preposition. The implication p q is the preposition that is FALSE when p is true, q is false. Otherwise is TRUE. p = hypothesis/antecedent/premise q = conclusion/consequence Express: “ if p, then q”, “q when p”, “p implies q” The Truth Table for the Implication (p q) p q pq T T T T F F F T T F F T 1.3.5 CONDITIONAL STATEMENTS 2) Equivalence/ Biconditional Let p and q be a preposition. The biconditional p q is the preposition that is TRUE when p and q have the same truth values, and FALSE otherwise. Express: “ p if and only if q” The Truth Table for the Biconditional (p q ) p q pq T T T T F F F T F F F T CONVERSE, CONTRAPOSITIVE CONVERSE : the implication of q p is called converse of p q CONTRAPOSITIVE : the contrapositive of p q is the implication q p Example: refer textbook 1.3.6 PROPOSITIONAL EQUIVALENCES Tautology A compound proposition that is always TRUE, no matter what the truth values of the propositions that occur in it. Contains only “T” in the last column of their truth table. Contradiction A compound proposition that is always FALSE. Contains only “F” in the last column of their truth table. 1.3.6 PROPOSITIONAL EQUIVALENCES Example: p p p p p p T F T F F T T F 1.3.6 PROPOSITIONAL EQUIVALENCES Contingency A proposition that is neither a tautology nor a contradiction Example: refer text book 1.3.6 PROPOSITIONAL EQUIVALENCES Logically Equivalent Two propositions p and q are said to be logically equivalent, or simply equivalent or equal, denoted by pq if they have identical truth tables. Example: Find the truth tables of (p q) and p q p q p^q -(p^q) p q -p -q -p v -q T T T F T T F F F T F F T T F F T T F T F T F T T F T F F F T F F T T T