Equivalence and Implication

Total Page:16

File Type:pdf, Size:1020Kb

Equivalence and Implication Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Equivalence and Implication Alice E. Fischer CSCI 1166 Discrete Mathematics for Computing February 14, 2018 Alice E. Fischer Laws of Logic. 1/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1 Properties of Propositions Logical Equivalence Contradictions and Tautologies 2 Logical Equivalences 3 Practice with Boolean Operators and Algebra 4 Implication Necessary and Sufficient Conditions Inside out and Backwards 5 Summary Alice E. Fischer Laws of Logic. 2/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Properties of Propositions Logical Equivalence Contradictions and Tautologies Alice E. Fischer Laws of Logic. 3/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Logical Equivalence: ≡ Two propositions are logically equivalent (≡) if they have the same outcomes under all input conditions. We can determine whether two propositions are equivalent( ≡) by comparing the last column in the truth tables for the two statements. P Q P _ Q Q _ P T T T T T F T T F T T T F F F F For example, The column for P _ Q is the same as the column for Q _ P, so the two propositions are equivalent . Alice E. Fischer Laws of Logic. 4/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Example: The Supervisor's Critique Do you remember John and his elevator design from last time? John's supervisor looked at his logic and told him \It's too complex, O is just the opposite of M". Simplify! So John thought a bit and added a column with a simpler formula to his truth table. (O ^ ∼M) _ O M ∼O ∼M O ^ ∼M ∼O ^ M (∼O ^ M) O ⊕ M T T F F F F F F T F F T T F T T F T T F F T T T F F T T F F F F Indeed, the boss was right. They are equivalent! Alice E. Fischer Laws of Logic. 5/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Contradictions A contradiction is a proposition that is always false, no matter what the input truth values are. For example, this is a contradiction: An odd number, X, equals 2 * some even number, Y. And this is a contradiction: P ^ ∼P Let P be All dogs are black. All dogs are black and not (all dogs are black). A contradiction can be symbolized by c. Alice E. Fischer Laws of Logic. 6/34 Outline Properties of Propositions Logical Equivalences Logical Equivalence Practice with Boolean Operators and Algebra Contradictions and Tautologies Implication Summary Tautologies A tautology is a proposition that is always true, no matter what the input truth values are. For example: Let Q be the proposition Today is Tuesday. Then this is a tautology: Q _ ∼Q Today is Tuesday or today is not Tuesday. A tautology can be symbolized by t. Alice E. Fischer Laws of Logic. 7/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Logical Equivalences A set of rules for logical calculation can be proven from the definitions using truth tables. They will be presented in the following slides. These laws are analogs of the laws for algebra and for sets that you already know. They are essential in making logical proofs and several are also important in programming. The following slides define the laws for symbolic logic. The corresponding set-theory law(s) will be given at the bottom of each slide. Alice E. Fischer Laws of Logic. 8/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1. Commutative Laws Both and and or are commutative, that is, the left and right sides can be reversed without changing the meaning of the proposition. P ^ Q ≡ Q ^ P P _ Q ≡ Q _ P This is important in programming. Set theory: \ and [ are commutative. Given sets A and B, A \ B ≡ B \ A A [ B ≡ B [ A Alice E. Fischer Laws of Logic. 9/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 2. Associative Laws Both and and or are associative operators, that is, you may parenthesize the expression any way you wish without changing its meaning. (P ^ Q) ^ R ≡ P ^ (Q ^ R) (P _ Q) _ R ≡ P _ (Q _ R) This is important in programming. Set theory: \ and [ are associative. Given sets P, Q, and R, (P \ Q) \ R ≡ P \ (Q \ R) (P [ Q) [ R ≡ P [ (Q [ R) Alice E. Fischer Laws of Logic. 10/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 3. Distributive Laws Both and and or can be distributed over the other operator. P ^ (Q _ R) ≡ (P ^ Q) _ (P ^ R) P _ (Q ^ R) ≡ (P _ Q) ^ (P _ R) This is important in programming. Set theory: \ and [ can be distributed over each other. Given sets P, Q, and R, P \ (Q [ R) ≡ (P \ Q) [ (P \ R) P [ (Q \ R) ≡ (P [ Q) \ (P [ R) Alice E. Fischer Laws of Logic. 11/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 4. Identity Laws The identity laws are based on the definitions of and and or. P ^ t ≡ P P _ c ≡ P Set Theory: The set identity laws are based on definitions of the Universal set and the empty set. Given set A, A \ U ≡ A A [ ; ≡ A Alice E. Fischer Laws of Logic. 12/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 5. Negation Laws The negation laws are based on the definitions of and, or, and not. P _ ∼P ≡ t P ^ ∼P ≡ c Set Theory: Complement Laws The set complement laws are based on definitions of the Universal set, empty set, and complement. Given set A, A [ Ac ≡ U A \ Ac ≡ ; Alice E. Fischer Laws of Logic. 13/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 6. Double Negative Law The double-negative law is based on the definitions of not. ∼ (∼P) ≡ P Set Theory: Double Complement Law This is based on the definitions of complement. Given set A, (Ac )c ≡ A Alice E. Fischer Laws of Logic. 14/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 7. Idempotent Laws and, or are idempotent, meaning that the trivial computations have no effect and can be repeated without changing the meaning of the expression. P ^ P ≡ P P _ P ≡ P Set Theory: intersection and union are idempotent. Given set A, A \ A ≡ A A [ A ≡ A Alice E. Fischer Laws of Logic. 15/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 8. Universal Bound Laws A contradiction and anything is a contradiction. A tautology or anything is a tautology. P ^ c ≡ c P _ t ≡ t The shortcut evaluation of logical operators in C is based on these. Set Theory: The empty set is as small as you can get and the universal set is as large as you can get. Given set A, A \ ; ≡ ; A [ U ≡ U Alice E. Fischer Laws of Logic. 16/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 9. DeMorgan's Laws To distribute not over and, change the and to or. To distribute not over or, change the or to and. ∼ (P ^ Q) ≡ ∼P _ ∼Q ∼ (P _ Q) ≡ ∼P ^ ∼Q These laws are very important in programming and in databases. Set Theory: To distribute complement over \, change the \ to [. To distribute complement over [, change the [ to \. Given sets A; B, (A \ B)c ≡ Ac [ Bc (A [ B)c ≡ Ac \ Bc Alice E. Fischer Laws of Logic. 17/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 10. Absorption Laws A truth table can be used to verify these absorptions. P _ (P ^ Q) ≡ P P ^ (P _ Q) ≡ P These laws are important in proofs. Set Theory: Given sets A; B, A [ (A \ B) ≡ A That is, A [ a subset of A is still A. A \ (A [ B) ≡ A That is, A \ a superset of A is still A. Alice E. Fischer Laws of Logic. 18/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 11. Negations of t and c The negation of a tautology is a contradiction and vice versa. ∼ t ≡ c ∼ c ≡ t Set Theory: The complement of the Universal set is the empty set, and vice versa. Uc ≡ ; ;c ≡ U Alice E. Fischer Laws of Logic. 19/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary Practice This section contains three logical expressions to simplified by applying the rules, and one law to prove using truth tables. Alice E. Fischer Laws of Logic. 20/34 Outline Properties of Propositions Logical Equivalences Practice with Boolean Operators and Algebra Implication Summary 1. Proving DeMorgan's Law Construct a truth table to prove that ∼(P ^ Q) ≡ ∼P _ ∼Q P Q P ^ Q ∼(P ^ Q) ∼P ∼Q (∼P _ ∼Q) T T T F F F F T F F T F T T F T F T T F T F F F T T T T Compare the contents of the fourth and seventh columns.
Recommended publications
  • An Overview of Logic, Proofs, Set Theory, and Functions Contents
    An Overview of Logic, Proofs, Set Theory, and Functions aBa Mbirika and Shanise Walker Contents 1 Numerical Sets and Other Preliminary Symbols3 2 Statements and Truth Tables5 3 Implications 9 4 Predicates and Quantifiers 13 5 Writing Formal Proofs 22 6 Mathematical Induction 29 7 Quick Review of Set Theory & Set Theory Proofs 33 8 Functions, Bijections, Compositions, Etc. 38 9 Solutions to all exercises 42 Index 51 Preface: This handout is meant primarily for those students who are already familiar with most of the subject matter contained within (that is, those who have taken a proofs class before). Its purpose is to provide a foundation as a proofs refresher when taking classes like Real Analysis I or II, Abstract Algebra I or II, Number Theory, Discrete Mathematics, Linear Algebra, etc. LICENSE Creative Commons License (CC BY-NC-SA): This text, including the art and illustrations, are available under the Creative Commons license (CC BY-NC- SA), allowing anyone to reuse, revise, remix and redistribute the text. To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ Section 1 NUMERICAL SETS AND OTHER PRELIMINARY SYMBOLS Page 3 1 Numerical Sets and Other Preliminary Symbols The following are numerical sets that you should familiarize yourself with: natural numbers 1 N = f1; 2; 3;:::g integers Z = f:::; −3; −2; −1; 0; 1; 2; 3;:::g a rational numbers Q = b j a; b 2 Z and b 6= 0 real numbers R = frational and irrational numbersg p complex numbers C = fa + bi j a; b 2 R and i = −1g p Gaussian integers Z[i] = fa + bi j a; b 2 Z and i = −1g 2πi Eisenstein integers Z[ρ] = fa + bρ j a; b 2 Z and ρ = e 3 g even integers 2Z = f2k j k 2 Zg odd integers 2Z + 1 = f2k + 1 j k 2 Zg arithmetic progression aZ + b = fak + b j k 2 Zg where a; b fixed CULTURAL QUESTION 1: Why are the integers denoted Z? ANSWER: The German word for \numbers" is Zahlen.
    [Show full text]
  • Boolean Logic
    Boolean logic Lecture 12 Contents . Propositions . Logical connectives and truth tables . Compound propositions . Disjunctive normal form (DNF) . Logical equivalence . Laws of logic . Predicate logic . Post's Functional Completeness Theorem Propositions . A proposition is a statement that is either true or false. Whichever of these (true or false) is the case is called the truth value of the proposition. ‘Canberra is the capital of Australia’ ‘There are 8 day in a week.’ . The first and third of these propositions are true, and the second and fourth are false. The following sentences are not propositions: ‘Where are you going?’ ‘Come here.’ ‘This sentence is false.’ Propositions . Propositions are conventionally symbolized using the letters Any of these may be used to symbolize specific propositions, e.g. :, Manchester, , … . is in Scotland, : Mammoths are extinct. The previous propositions are simple propositions since they make only a single statement. Logical connectives and truth tables . Simple propositions can be combined to form more complicated propositions called compound propositions. .The devices which are used to link pairs of propositions are called logical connectives and the truth value of any compound proposition is completely determined by the truth values of its component simple propositions, and the particular connective, or connectives, used to link them. ‘If Brian and Angela are not both happy, then either Brian is not happy or Angela is not happy.’ .The sentence about Brian and Angela is an example of a compound proposition. It is built up from the atomic propositions ‘Brian is happy’ and ‘Angela is happy’ using the words and, or, not and if-then.
    [Show full text]
  • Logic, Proofs
    CHAPTER 1 Logic, Proofs 1.1. Propositions A proposition is a declarative sentence that is either true or false (but not both). For instance, the following are propositions: “Paris is in France” (true), “London is in Denmark” (false), “2 < 4” (true), “4 = 7 (false)”. However the following are not propositions: “what is your name?” (this is a question), “do your homework” (this is a command), “this sentence is false” (neither true nor false), “x is an even number” (it depends on what x represents), “Socrates” (it is not even a sentence). The truth or falsehood of a proposition is called its truth value. 1.1.1. Connectives, Truth Tables. Connectives are used for making compound propositions. The main ones are the following (p and q represent given propositions): Name Represented Meaning Negation p “not p” Conjunction p¬ q “p and q” Disjunction p ∧ q “p or q (or both)” Exclusive Or p ∨ q “either p or q, but not both” Implication p ⊕ q “if p then q” Biconditional p → q “p if and only if q” ↔ The truth value of a compound proposition depends only on the value of its components. Writing F for “false” and T for “true”, we can summarize the meaning of the connectives in the following way: 6 1.1. PROPOSITIONS 7 p q p p q p q p q p q p q T T ¬F T∧ T∨ ⊕F →T ↔T T F F F T T F F F T T F T T T F F F T F F F T T Note that represents a non-exclusive or, i.e., p q is true when any of p, q is true∨ and also when both are true.
    [Show full text]
  • Summary of the Full License, Which Is Available On-Line at to Harmony
    Proofs and Concepts the fundamentals of abstract mathematics by Dave Witte Morris and Joy Morris University of Lethbridge incorporating material by P. D. Magnus University at Albany, State University of New York Preliminary Version 0.78 of May 2009 This book is offered under the Creative Commons license. (Attribution-NonCommercial-ShareAlike 2.0) The presentation of logic in this textbook is adapted from forallx An Introduction to Formal Logic P. D. Magnus University at Albany, State University of New York The most recent version of forallx is available on-line at http://www.fecundity.com/logic We thank Professor Magnus for making forallx freely available, and for authorizing derivative works such as this one. He was not involved in the preparation of this manuscript, so he is not responsible for any errors or other shortcomings. Please send comments and corrections to: [email protected] or [email protected] c 2006–2009 by Dave Witte Morris and Joy Morris. Some rights reserved. Portions c 2005–2006 by P. D. Magnus. Some rights reserved. Brief excerpts are quoted (with attribution) from copyrighted works of various authors. You are free to copy this book, to distribute it, to display it, and to make derivative works, under the following conditions: (1) Attribution. You must give the original author credit. (2) Noncommercial. You may not use this work for commercial purposes. (3) Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one. — For any reuse or distribution, you must make clear to others the license terms of this work.
    [Show full text]
  • DISPOSITION CONCEPTS and EXTENSIONAL LOGIC ------ARTHUR PAP------Not Be "Contrary-To-Fact") : If I Pull the Trigger, the Gun Will Fire
    DISPOSITION CONCEPTS AND EXTENSIONAL LOGIC ------ARTHUR PAP------ not be "contrary-to-fact") : if I pull the trigger, the gun will fire. It would be sad if belief in such an implication were warranted only by knowledge of the truth of antecedent and consequent separately, for in that case it would be impossible for man to acquire the power of Disposition Concepts and Extensional Logic even limited control over the course of events by acquiring warranted beliefs about causal connections. Notice further that frequently pre­ sumed knowledge of a causal implication is a means to knowledge of the truth, or at least probability, of the antecedent; if this is an acid then it will turn blue litmus paper red; the reaction occurred; thus the One of the striking differences between natural languages, both con­ hypothesis is confirmed. Knowledge of the consequences of suppositions versational and scientific, and the extensional languages constructed by is independent of knowledge of the truth-values of the suppositions, no logicians is that most conditional statements, i.e., statements of the form matter whether the consequences be logical or causal. "if p, then q", of a natural language are not truth-functional. A state­ The difference between material implication and natural implica­ tion has been widely discussed. The logician's use of "if p, then q" ment compounded out of simpler statements is truth-functional if its in the truth-functional sense of "not both p and not-q", symbolized by truth-value is uniquely determined by the truth-values of the component "p :J q", is fully justified by the objective of constructing an adequate statements.
    [Show full text]
  • On the Pragmatic Approach to Counterpossibles
    Philosophia https://doi.org/10.1007/s11406-018-9979-4 On the Pragmatic Approach to Counterpossibles Maciej Sendłak1 Received: 5 December 2017 /Revised: 6 February 2018 /Accepted: 3 May 2018 # The Author(s) 2018 Abstract Nina Emery and Christopher Hill proposed a pragmatic approach toward the debate about counterpossibles—i.e., counterfactuals with impossible anteced- ents. The core of this approach is to move the burden of the problem from the notion of truth value into the notion of assertion. This is meant to explain our pre- theoretical intuitions about counterpossibles while claiming that each and every counterpossible is vacuously true. The aim of this paper is to indicate a problematic aspect of this view. Keywords Counterpossibles.Counterfactuals.Pragmatics.Assertion.Possibleworlds. Impossible Worlds The subject of this paper is counterpossibles; i.e., subjunctive conditionals of the form ‘If it were the case that A, then it would be the case that C’ (‘A>C’), where ‘A’ expresses impossibility (necessary falseness).1 The problem of counterpossibles is the problem that arises in the face of worlds semantics for counterfactuals, combined with the assumption that there are no impossible worlds. The consequence of these is that every counterfactual with an impossible antecedent is vacuously true. This, however, is difficult to square with pre-theoretical intuitions that some counterpossibles are false. Consequently, there is a question of whether it is justified to introduce a modification of 1Earlier versions of this material were presented in Szczecin (University of Szczecin) at the seminar of “Cognition & Communication Research Group” and in Munich (Ludwig Maximilian University of Munich) at “The ninth European Congress of Analytic Philosophy.” I am grateful to the participants of these meetings for their helpful comments and discussions, especially to Arkadiusz Chrudzimski and Joanna Odrowąż- Sypniewska.
    [Show full text]
  • Mathematical Vocabulary
    CS103 Handout 08 Winter 2016 January 8, 2016 Mathematical Vocabulary “You keep using that word. I do not think it means what you think it means.” - Inigo Montoya, from The Princess Bride Consider the humble while loop in most programming languages. Here's an example of a while loop in a piece of Java code: int x = 10; while (x > 0) { x = x - 1; println(x); } There's something subtle in this loop. Notice that in the very last iteration of the loop, x will drop to zero, so the println call will print the value 0. This might seem strange, since the loop explicitly states that it runs while x is greater than 0. If you've been programming for a while (pun not intended), you might not think much of this obser- vation. “Of course,” you might say, “that's just how while loops work. The condition is only checked at the top of the loop, so even if the condition becomes false in the middle of the loop, the loop keeps running.” To many first-time programmers, though, this might seem completely counter- intuitive. If the loop is really supposed to run while x is greater than 0, why doesn't it stop as soon as x becomes zero? The reason this is interesting/tricky is that there's a distinction between the informal use of the word “while” in plain English and the formal use of the keyword while in software engineering. The dic- tionary definition of “while” can help you build a good intuition for how while loops work in actual code, but it doesn't completely capture the semantics of a while loop.
    [Show full text]
  • Part 2 Module 1 Logic: Statements, Negations, Quantifiers, Truth Tables
    PART 2 MODULE 1 LOGIC: STATEMENTS, NEGATIONS, QUANTIFIERS, TRUTH TABLES STATEMENTS A statement is a declarative sentence having truth value. Examples of statements: Today is Saturday. Today I have math class. 1 + 1 = 2 3 < 1 What's your sign? Some cats have fleas. All lawyers are dishonest. Today I have math class and today is Saturday. 1 + 1 = 2 or 3 < 1 For each of the sentences listed above (except the one that is stricken out) you should be able to determine its truth value (that is, you should be able to decide whether the statement is TRUE or FALSE). Questions and commands are not statements. SYMBOLS FOR STATEMENTS It is conventional to use lower case letters such as p, q, r, s to represent logic statements. Referring to the statements listed above, let p: Today is Saturday. q: Today I have math class. r: 1 + 1 = 2 s: 3 < 1 u: Some cats have fleas. v: All lawyers are dishonest. Note: In our discussion of logic, when we encounter a subjective or value-laden term (an opinion) such as "dishonest," we will assume for the sake of the discussion that that term has been precisely defined. QUANTIFIED STATEMENTS The words "all" "some" and "none" are examples of quantifiers. A statement containing one or more of these words is a quantified statement. Note: the word "some" means "at least one." EXAMPLE 2.1.1 According to your everyday experience, decide whether each statement is true or false: 1. All dogs are poodles. 2. Some books have hard covers. 3.
    [Show full text]
  • Draft of August 01, 2021 Matheus Silva
    A CONTEXTUALIST DEFENCE OF THE MATERIAL ACCOUNT OF INDICATIVE CONDITIONALS Draft of August 01, 2021 Matheus Silva ABSTRACT The material account of indicative conditionals faces a legion of counterexamples that are the bread and butter in any entry about the subject. For this reason, the material account is widely unpopular among conditional experts. I will argue that this consensus was not built on solid foundations, since those counterexamples are contextual fallacies. They ignore a basic tenet of semantics according to which when evaluating arguments for validity we need to maintain the context constant, otherwise any argumentative form can be rendered invalid. If we maintain the context fixed, the counterexamples to the material account are disarmed. Throughout the paper I also consider the ramifications of this defence, make suggestions to prevent contextual fallacies, and anticipate some possible misunderstandings and objections. Keywords: Indicative Conditionals. Context. Truth-functionality 1. IT’S ALL ABOUT CONTEXT One of the most dramatic scenes of Shakespeare’s ‘The Merchant of Venice’ is the court battle between Antonio and Shylock. Shylock, the Jewish moneylender, is asked by Antonio to give a loan to his dear friend, Bassanio. Shylock is reluctant, but agrees to grant the loan to Bassanio with the condition that ‘if Bassanio is unable to repay it at the specified date, I may take a pound of Antonio's flesh’. Antonio signs the contract without taking the threat seriously. After an unfortunate turn of events, Antonio’s ships are reported lost at sea, thus leaving Antonio without the means to repay the loan, whereas Shylock’s daughter, Jessica, runs away with a Christian and converts herself, while taking a sizeable part of Shylock’s wealth with her.
    [Show full text]
  • Formal Logic
    Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co. MSCS Slides FlLi Logic: The foundation of reasoning z What is formal logic? Multiple definitions Foundation for organized and careful method of thinking that characterizes reasoned activity The study of reasoning : specifically concerned with whether something is true or false Formal logic focuses on the relationship between statements as opposed to the content of any particular statement. z Applications of formal logic in computer science: Prolog: programming languages based on logic. Circuit Logic: logic governing computer circuitry. Section 1.1 Statements, Symbolic Representations and 1 Statement z Definition of a statement: A statement, also called a proposition, is a sentence that is either true or false, but not both. z Hence the truth value of a statement is T (1) or F (0) z Examples: Which ones are statements? All mathematicians wear sandals. 5 is greater than –2. Where do you live? You are a cool person. Anyone who wears sandals is an algebraist. Section 1.1 Statements, Symbolic Representations and 2 Statements and Logic z An example to illustrate how logic really helps us (3 statements written below): All mathematicians wear sandals. Anyone who wears sandals is an algebraist. Therefore, all mathematicians are algebraists. z Logic is of no help in determining the individual truth of these statements. z However, if the first two statements are true, logic assures the truth of the third statement. z Logical methods are used in mathematics to prove theorems and in computer science to prove that programs do what they are supposed to do.
    [Show full text]
  • Propositional Logic Discrete Mathematics
    Propositional Logic CSE 191, Class Note 01 Propositional Logic Computer Sci & Eng Dept SUNY Buffalo c Xin He (University at Buffalo) CSE 191 Discrete Structures 1 / 37 Discrete Mathematics What is Discrete Mathematics? In Math 141-142, you learn continuous math. It deals with continuous functions, differential and integral calculus. In contrast, discrete math deals with mathematical topics in a sense that it analyzes data whose values are separated (such as integers: integer number line has gaps). Here is a very rough comparison between continuous math and discrete math: consider an analog clock (one with hands that continuously rotate, which shows time in continuous fashion) vs. a digital clock (which shows time in discrete fashion). c Xin He (University at Buffalo) CSE 191 Discrete Structures 3 / 37 Course Topics This course provides some of the mathematical foundations and skills that you will need in your further study of computer science and engineering. These topics include: Logic (propositional and predicate logic) Logical inferences and mathematical proof Counting methods Sets and set operations Functions and sequences Introduction to number theory and Cryptosystem Mathematical induction Relations Introduction to graph theory By definition, computers operate on discrete data (binary strings). So, in some sense, the topics in this class are more relavent to CSE major than calculus. c Xin He (University at Buffalo) CSE 191 Discrete Structures 4 / 37 The Foundations: Logic and Proof The rules of logic specify the precise meanings of mathematical statements. It is the basis of the correct mathematical arguments, that is, the proofs. It also has important applications in computer science: to verify that computer programs produce the correct output for all possible input values.
    [Show full text]
  • Sentential Calculus Revisited: Boolean Algebra
    Sentential Calculus Revisited: Boolean Algebra Modern logic began with the work of George Boole, who treated logic algebraically. Writing “+,” “⋅,” and “-” in place of “or,” “and,” and “not,” he developed the sentential calculus in direct analogy to the familiar theories of groups, rings, and fields. Now that we have the predicate calculus with identity, we can discern the consequences of the axioms Boole wrote down, and we’ll find that Boole’s algebraic formalism got it exactly right. Here are the principles he discovered: Definition. The language of Boolean algebra is the language whose individual constants are “0” and “1,” whose function signs are the unary function sign “-” and the binary function signs “+” and “⋅,” and whose predicates are the binary predicates “=” and “≤.” For readability, we write “(x+y)” and (x⋅y)” in place of “+(x,y)” and “⋅(x,y).” So the terms of the language of Boolean algebra will constitute the smallest class of expressions which contains the variables and “0” and “1,” contains -τ whenever it contains τ , and contains (τ+ρ) whenever it contains τ and ρ. We have unique readability, as usual. Definition. A structure is a Boolean algebra just in case it satisfies the following axioms: Associative laws: (∀x)(∀y)(∀z)((x+y)+z) = (x+(y+z)) (∀x)(∀y)(∀z)((x⋅y)⋅z) = (x⋅(y⋅z)) Commutative laws: (∀x)(∀y)(x+y) = (y+x) (∀x)(∀y)(x⋅y) = (y⋅x) Idempotence: (∀x)(x+x) = x (∀x)(x⋅x) = x Distributive laws: (∀x)(∀y)(∀z)(x + (y⋅z)) = ((x+y)⋅(x+z)) (∀x)(∀y)(∀z)(x⋅(y+z)) = ((x⋅y) + (x⋅z)) Identity elements: (∀x)(x+0) = x (∀x)(x⋅1) = x Complementation laws: (∀x)(x+-x) = 1 (∀x)(x⋅-x) = 0 Boolean algebra, p.
    [Show full text]