Packet #1: Logic & Proofs. Applied Discrete Mathematics

Similar documents
Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

PROPOSITIONAL CALCULUS

Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.

Part I: Propositional Calculus

2.2: Logical Equivalence: The Laws of Logic

CSC Discrete Math I, Spring Propositional Logic

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

Tribhuvan University Institute of Science and Technology Micro Syllabus

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics. Introductory Notes in Discrete Mathematics Solution Guide

The Logic of Compound Statements cont.

Propositional Logic. Spring Propositional Logic Spring / 32

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

EECS 1028 M: Discrete Mathematics for Engineers

software design & management Gachon University Chulyun Kim

Compound Propositions

Logic Overview, I. and T T T T F F F T F F F F

Logic, Sets, and Proofs

Propositional Calculus

10/5/2012. Logic? What is logic? Propositional Logic. Propositional Logic (Rosen, Chapter ) Logic is a truth-preserving system of inference

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

1 The Foundation: Logic and Proofs

Readings: Conjecture. Theorem. Rosen Section 1.5

A. Propositional Logic

Equational Logic: Part 2. Roland Backhouse March 6, 2001

1 The Foundation: Logic and Proofs

WUCT121. Discrete Mathematics. Logic. Tutorial Exercises

1.1 Language and Logic

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Logic and Proof. Aiichiro Nakano

What is Logic? Introduction to Logic. Simple Statements. Which one is statement?

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination II (Fall 2007)

A statement is a sentence that is definitely either true or false but not both.

586 Index. vertex, 369 disjoint, 236 pairwise, 272, 395 disjoint sets, 236 disjunction, 33, 36 distributive laws

Chapter 1, Logic and Proofs (3) 1.6. Rules of Inference

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

Logic and Proof. On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes!

MACM 101 Discrete Mathematics I. Exercises on Propositional Logic. Due: Tuesday, September 29th (at the beginning of the class)

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

On my first day of school my parents dropped me off at the wrong nursery. There I was...surrounded by trees and bushes! 26-Aug-2011 MA

The following techniques for methods of proofs are discussed in our text: - Vacuous proof - Trivial proof

Logic and Proofs. (A brief summary)

Manual of Logical Style (fresh version 2018)

1.1 Statements and Compound Statements

Propositional Logic: Equivalence

Reexam in Discrete Mathematics

Learning Goals of CS245 Logic and Computation

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

UNIT-I: Propositional Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

Chapter 1 Elementary Logic

Math 10850, fall 2017, University of Notre Dame

MAT 243 Test 1 SOLUTIONS, FORM A

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Mat 243 Exam 1 Review

Logic. Logic is a discipline that studies the principles and methods used in correct reasoning. It includes:

5. Use a truth table to determine whether the two statements are equivalent. Let t be a tautology and c be a contradiction.

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

Logic - recap. So far, we have seen that: Logic is a language which can be used to describe:

Department of Computer Science University at Albany, State University of New York Solutions to Sample Discrete Mathematics Examination I (Spring 2008)

Chapter 1: The Logic of Compound Statements. January 7, 2008

Boolean Algebra and Proof. Notes. Proving Propositions. Propositional Equivalences. Notes. Notes. Notes. Notes. March 5, 2012

Proofs. Example of an axiom in this system: Given two distinct points, there is exactly one line that contains them.

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

CS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)

Propositional logic (revision) & semantic entailment. p. 1/34

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Section 1.1 Propositions

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

Section 1.2 Propositional Equivalences. A tautology is a proposition which is always true. A contradiction is a proposition which is always false.

Propositional Logic, Predicates, and Equivalence

Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9

Tutorial Obtain the principal disjunctive normal form and principal conjunction form of the statement

Language of Propositional Logic

Informal Statement Calculus

Proofs. Joe Patten August 10, 2018

THE LOGIC OF COMPOUND STATEMENTS

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

Definition 2. Conjunction of p and q

Review 3. Andreas Klappenecker

CSE 311: Foundations of Computing. Lecture 3: Digital Circuits & Equivalence

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

CSCE 222 Discrete Structures for Computing. Review for the Final. Hyunyoung Lee

Section 1.2: Propositional Logic

Equivalence and Implication

Discrete Structures & Algorithms. Propositional Logic EECE 320 // UBC

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

Propositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.

1.1 Language and Logic

PHI Propositional Logic Lecture 2. Truth Tables

Natural Deduction for Propositional Logic

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Problem 1: Suppose A, B, C and D are finite sets such that A B = C D and C = D. Prove or disprove: A = B.

Discrete Mathematics for M.Sc.CS

Lecture Notes on DISCRETE MATHEMATICS. Eusebius Doedel

EECS 1028 M: Discrete Mathematics for Engineers

Transcription:

Packet #1: Logic & Proofs Applied Discrete Mathematics Table of Contents Course Objectives Page 2 Propositional Calculus Information Pages 3-13

Course Objectives At the conclusion of this course, you should be able to 1. Represent logical statements in propositional and predicate calculus, and use truth tables and formal proofs to determine their truth values. 2. Create a truth table for a logical expression. Derive a logical expression from a given truth table. Design a circuit to perform a simple task. 3. Construct a circuit from a logical expression using AND, OR, and NOT gates. Simplify logical expressions. Derive a logical expression from a given circuit. 4. Describe set notations using predicate calculus. Determine the power of a set. Use predicate calculus to prove set theoretic propositions. 5. Describe and use the first, second, and general principles of proof by induction. Derive closed form representations for recursively defined sequences; prove their correctness by induction. Derive recursive sequences from closed form functions and prove their equivalence by induction. 6. Describe asymptotic growth of functions, compare functions using big-oh notation. Compare asymptotic growth and prove inequalities by induction. Determine and solve recurrences arising from algorithms. Determine big-oh running times for algorithms. 7. Define binary relations and their properties using predicate calculus. Represent binary relations as ordered pairs, matrices, predicates, or graphs. Combine binary relations by union, intersection, and composition using matrix operations. Find the reflexive, symmetric, and transitive closures of a binary relation. 8. Describe and calculate permutations and combinations with and without replacement and with and without distinguishable objects. Describe and apply the pigeonhole principle. 9. Describe and determine the existence of Euler circuits and paths and Hamilton circuits and paths in graphs. Determine the minimum spanning tree of a graph. Construct and analyze Hasse diagrams for partially ordered sets. 2

Propositional Calculus Outline I. Proposition (Sections 1.1 and 1.2) A. Definition B. Compound 1. Connectives:,,,,,,, 2. Variables II. Truth Tables (Sections 1.1 and 1.2) A. Table of compound results using all combinations of input variables B. Definitions 1. 2. 3. 4. 5. 6. 7. 8. C. Tautology and Contradiction - using truth tables for short proofs D. Logical Implications E. Logical Equivalences III. Formal Proofs using statements and reasons (Section 3.1) A. Axioms of Logical Implications B. Axioms of Logical Equivalences C. Two substitution rules IV. Types of formal proofs (Section 3.1) A. Direct B. Indirect 1. Contradiction 2. Other V. Hints for Attacking a propositional calculus proof 3

VI. Logic Functions (Section 9.1) A. Number of cases B. Disjunctive Normal Form C. Generation of logic statements from truth table VII. Logic Circuits (Section 9.3) A. Finding logic circuit for given logic function B. Finding logic function for given logic circuit C. Manipulating the logic function for specific characteristics and designing new logic circuit D. Creating logic function from input-output specifications 4

Propositional Calculus A. Proposition - a sentence or statement which is either true or false but NOT BOTH. It cannot be unspecified (ambiguous) or vacuous. 1. n 2 > n for all integers n>1 2. n 2 = n (ambiguous) 3. How are you? (vacuous) B. Compound propositions 1. lower case letters stand for propositions -- q, p, r, etc. 2. connectives between propositions not or negative and or (inclusive) implies if and only if or (exclusive) Examples: Converse: p q (p q) (s t ) At this time we will consider only a finite number of connectives. p q q p is converse Contrapositive: p q q p is contrapositive Truth Tables: 1. Simple propositions are input (independent) variables that are either true or false. 2. Compound proposition (output) is either true or false. 3. 1 = true; 0 = false 4. Must consider all combinations of input variables. 5

Example 1.1: p q; that is p q q p (Equivalence rule) p q p q q p 0 0 1 1 1 0 1 1 0 0 1 0 0 0 1 1 1 1 1 1 If p q is true (=1) then p = q Tautology A proposition that is always true independent of input values (e.g. p p). Contradiction A proposition that is always false independent of input values (e.g. p p). Tautology Contradiction p p p p p p 0 1 1 0 1 0 1 0 6

Truth Tables for Connectives p q: p q: p q p q p q p q 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 1 p: p q: p p p q p q 0 1 0 0 1 1 0 0 1 1 1 0 0 1 1 1 p q: p q: p q p q p q p q 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 0 7

Example 1.2: (p r) ( p r) (implication rule) p r (p r) ( p r) p 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 Logical equivalences Example 1.3: (p q) (q r) (p r) (Hypothetical Syllogism) p q r (p q) (q r) (p r) 0 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 ok not true Note that this rule works only from LEFT to RIGHT and not vice-versa. It is called a Logical implication, whose symbol is. P logically implies Q is writtenp Q. 8

Example 1.4: (p q) s p s (Implication) p q s (p q) s p s 0 0 0 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 Formal Proof for (p q) s p s: Statement Reason 1. (p q) s Hypothesis 2. p p q Addition 3. p s 1,2; Hypothetical Syllogism Class Lemma: if (p q) s then p s and q s 9

Example 1.5: [(s g) p] (p a) a g s g p a (s g) p (p a) a g g a 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 1 0 0 0 1 1 0 1 1 0 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 Formal Proof: Statements Reasons 1. (s g) p Hypothesis 2. p a Hypothesis 3. g p 1; Class Lemma 4. g a 2, 3; Hypothetical Syllogism 5. a g 4; Contrapositive 10

Example 1.6: Formal Proof Given: p q Prove: s r q s p r Direct Proof: Statements Reasons 1. p q Assumption 2. q s Assumption 3. p r Assumption 4. (p q) (r s) 2, 3; 26a Constructive Dilemma 5. r s 1, 4; Modus Ponens 6. s r 5; Commutative In a direct proof one needs to show that given p then q, i.e. p q. For an indirect proof one can use any logically equivalent method. A common type of indirect proof is proof by contradiction. One assumes the negation of the conclusion along with the assumptions and shows a contradiction. i.e. (p q) 0 p q p q c (p q) 0 p q p q 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 1 1 1 1 logically equivalent 11

Example 1.7: Proof by Contradiction: Statements Reasons 1. p q Assumption 2. q s Assumption 3. p r Assumption 4. (s r) Negation of Conclusion 5. s r 4; DeMorgan 6. s 5; Simplification 7. q 2, 6; Modus Tollens 8. r s 5; Commutative 9. r 8; Simplification 10. p 3, 9; Modus Tollens 11. p q 7, 10; Conjunction 12. (p q) 11; DeMorgan 13. (p q) (p q) 1, 12; Conjunction 14. Contradiction 13; Rule 7b Two Substitution Rules 1. If a compound proposition P is a tautology and if all occurrences of some variable of P, say a, are replaced by the same proposition E, then the resulting compound proposition P * is also a tautology. [Does not necessarily give same proposition.] a q a q is a tautology. If for all occurrences of p we substitute (s r). (s r) q (s r) q is also a tautology. 2. If compound proposition P contains a proposition Q and if Q is replaced by a logically equivalent proposition Q *, then the resulting compound proposition P * is logically equivalent to P. p q q p is a proposition. p q p q i.e., p q is logically equivalent to p q. Therefore, p q q p is logically equivalent to p q q p. 12

Logic Circuits X Y and XY X Y nand (XY) X Y or X+Y X Y nor (X+Y) X Y (X+Y)(XY) XY +X Y xor X X X X X X invertor nor invertor nand invertor De Morgan's: (X + Y)' = X'Y' (XY)' = X' + Y' [P + (QR)] = (P + Q)(P + R) P(Q + R) = PQ + PR Useful reduction rules: 13