Terminologies • Proposition - is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. • Propositional variables (or statement variables) - variables that represent propositions, just as letters are used to denote numerical variables • The truth value of a proposition is true, denoted by T, if it is a true proposition, and the truth value of a proposition is false, denoted by F, if it is a false proposition Terminologies • Logic- is the basis of all mathematical reasoning, and of all automated reasoning. • Proof- helps us understand what makes up a correct mathematical argument • Theorem – a statement which has been proved true by a special kind of logical argument called a rigorous proof Examples 1. Washington, D.C., is the capital of the United States of America. 2. Toronto is the capital of Canada. 3. 1 + 1 = 2. 4. 2 + 2 = 3. 5. What time is it? 6. Read this carefully. 7. x + 1 = 2. 8. x + y = z. Propositional Logic Definition 1: NEGATION
Example. Find the negation of the proposition
1. “Today is Monday.” 2. “Nico’s smartphone has at least 32GB of memory.” Propositional Logic Definition 2: CONJUNCTION
Example. Find the conjunction of the proposition
p: “Rebecca’s PC has more than 16 GB free hard disk space” q: “The processor in Rebecca’s PC runs faster than 1 GHz.” Propositional Logic Definition 3: DISJUNCTION
Example. Find the disjunction of the proposition
p: “Rebecca’s PC has more than 16 GB free hard disk space” q: “The processor in Rebecca’s PC runs faster than 1 GHz.” Propositional Logic Definition 4: EXCLUSIVE OR
Example. “Students who have taken calculus or computer science, but
not both, can enroll in this class.” Propositional Logic Definition 5: CONDITIONAL STATEMENT
Example. Find the conditional statement of the propositions
p: “Maria learns discrete mathematics.” q: “Maria will find a good job.” Propositional Logic Definition 6: CONVERSE, CONTRAPOSITIVE & INVERSE • The converse of p → q is the proposition q → p.
• The contrapositive of p → q is the proposition ¬q →¬p.
• The inverse of p → q is the proposition ¬p →¬q.
Example. Give the contrapositive, the converse, and the inverse of the conditional statement “The home team wins whenever it is raining”. Propositional Logic Definition 7: BICONDITIONAL
Example. Determine the biconditional statement.
p: “You can take the flight,” q: “You buy a ticket.” Examples: 1. Let p and q be the propositions p : It is below freezing. q : It is snowing. Write these propositions using p and q and logical connectives (including negations). a) It is below freezing and snowing. b) It is below freezing but not snowing. c) It is not below freezing and it is not snowing. d) It is either snowing or below freezing (or both). e) If it is below freezing, it is also snowing. f ) Either it is below freezing or it is snowing, but it is not snowing if it is below freezing. g) That it is below freezing is necessary and sufficient for it to be snowing. Precedence of Logical Operators TRUTH TABLES OF COMPOUND PROPOSITIONS Construct the truth table of the compound propositions: a. (p V ¬ q) → (p ∧ q) b. ¬(p ∧ q) V (q → r) APPLICATIONS OF PROPOSITIONAL LOGIC Logic is used to: -design computer circuits -construct computer programs -verify the correctness of program -build expert systems Logic Circuit
Basic Logic Gates
Sample Combinatorial Logic Circuit
Logic Circuit Example: Construct a combinatorial circuit and truth table from the given function. F = ((A + B)’ (A’B)) + B’