Discrete Mathematics and Applications COT3100

Similar documents
Propositional logic ( ): Review from Mat 1348

ICS141: Discrete Mathematics for Computer Science I

ARTIFICIAL INTELLIGENCE

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

The Fundamentals of Logic. Foundations of Logic. Foundations of Logic. CMSC 302 Propositional Logic. In Rosen, ~98 slides, ~3 lectures

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

CSC Discrete Math I, Spring Propositional Logic

Chapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.

Proposition/Statement. Boolean Logic. Boolean variables. Logical operators: And. Logical operators: Not 9/3/13. Introduction to Logical Operators

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

Compound Propositions

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

Example. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives

Sec$on Summary. Propositions Connectives. Truth Tables. Negation Conjunction Disjunction Implication; contrapositive, inverse, converse Biconditional

Definition 2. Conjunction of p and q

Propositional Logic. Propositional Equivalences. Agenda. Yutaka HATA, IEEE Fellow. Ch1.1 Propositional Logic. Ch1.2 Propositional Equivalences

Chapter 1, Section 1.1 Propositional Logic

Chapter 1, Part I: Propositional Logic. With Question/Answer Animations

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

Bits and Bit Operations. Today s topics

Boolean Logic. CS 231 Dianna Xu

1 Propositional Logic

ICS141: Discrete Mathematics for Computer Science I

Propositional Logic 1

Discrete Mathematics and Its Applications

An Introduction to Logic 1.1 ~ 1.4 6/21/04 ~ 6/23/04

Section 1.1 Propositional Logic. proposition : true = T (or 1) or false = F (or 0) (binary logic) the moon is made of green cheese

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

DISCRETE STRUCTURES WEEK5 LECTURE1

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

Discrete Structures of Computer Science Propositional Logic I

Propositional Equivalence

Mathematical Logic Part One

Overview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions

Propositional Logic. Spring Propositional Logic Spring / 32

Introduction. Applications of discrete mathematics:

software design & management Gachon University Chulyun Kim

HW1 graded review form? HW2 released CSE 20 DISCRETE MATH. Fall

Truth-Functional Logic

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

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

1 The Foundations. 1.1 Logic. A proposition is a declarative sentence that is either true or false, but not both.

Section 1.1: Logical Form and Logical Equivalence

UNIT-I: Propositional Logic

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

The Foundations: Logic and Proofs. Part I

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Equivalence and Implication

Functions. Lecture 4: Truth functions, evaluating compound statements. Arithmetic Functions. x y x+y

EECS 1028 M: Discrete Mathematics for Engineers

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies

Discrete Structures for Computer Science

Propositional Logic. Fall () Propositional Logic Fall / 30

13.3 Truth Tables for the Conditional and the Biconditional

Today s Topic: Propositional Logic

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

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

AMTH140 Lecture 8. Symbolic Logic

Artificial Intelligence Knowledge Representation I

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

CHAPTER 1. MATHEMATICAL LOGIC 1.1 Fundamentals of Mathematical Logic

Section 3.1. Statements and Logical Connectives. Copyright 2013, 2010, 2007, Pearson, Education, Inc.

1.1 Language and Logic

CSE 20 DISCRETE MATH. Fall

Logic and Proof. Aiichiro Nakano

CSE 240 Logic and Discrete Mathematics

MAT2345 Discrete Math

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

PROPOSITIONAL CALCULUS

CSCE 222 Discrete Structures for Computing. Propositional Logic. Dr. Hyunyoung Lee. !!!!!! Based on slides by Andreas Klappenecker

THE LOGIC OF COMPOUND STATEMENTS

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

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

1.1 Language and Logic

Introduction to Decision Sciences Lecture 2

LING 106. Knowledge of Meaning Lecture 3-1 Yimei Xiang Feb 6, Propositional logic

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

CSE 311: Foundations of Computing. Lecture 2: More Logic, Equivalence & Digital Circuits

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

Topic 1: Propositional logic

Mathematical Logic Part One

PHI Propositional Logic Lecture 2. Truth Tables

DISCRETE MATHEMATICS BA202

Propositional Languages

THE LOGIC OF COMPOUND STATEMENTS

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Discrete Mathematics

Mathematical Logic Part One

Logic. Def. A Proposition is a statement that is either true or false.

We last time we began introducing equivalency laws.

Logic and Proofs. (A brief summary)

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.

Logic and Propositional Calculus

Introduction to Sets and Logic (MATH 1190)

LOGIC & PROPOSITIONAL EQUIVALENCE

It is not the case that ϕ. p = It is not the case that it is snowing = It is not. r = It is not the case that Mary will go to the party =

Propositions. Frequently, we will use the word statement instead of proposition.

Transcription:

Discrete Mathematics and Applications CO3100 Dr. Ungor Sources: Slides are based on Dr. G. Bebis material. uesday, January 7, 2014

oundations of Logic: Overview Propositional logic: (Sections 1.1-1.3) Basic definitions. Equivalence rules & derivations. Predicate logic (Section 1.4) Predicates. Quantified predicate expressions. Equivalences & derivations. CO3100 - Dr. Ungor 2 uesday, January 7, 2014

Propositional Logic Propositional Logic is the logic of compound statements built from simpler statements using Boolean connectives. Applications: Design of digital electronic circuits. Expressing conditions in computer programs. Queries to databases & search engines. CO3100 - Dr. Ungor 3 uesday, January 7, 2014

Propositional Logic Propositional Logic is the logic of compound statements built from simpler statements using Boolean connectives. What are Propositions? What are Boolean connectors? CO3100 - Dr. Ungor uesday, January 7, 2014

Definition of a Proposition CO3100 - Dr. Ungor 5 uesday, January 7, 2014

Definition of a Proposition A proposition (p, q, r, ) is simply a statement (i.e., a declarative sentence) with a definite meaning, having a truth value thatʼs either true () or false () (never both, neither, or somewhere in between). CO3100 - Dr. Ungor 5 uesday, January 7, 2014

Definition of a Proposition A proposition (p, q, r, ) is simply a statement (i.e., a declarative sentence) with a definite meaning, having a truth value thatʼs either true () or false () (never both, neither, or somewhere in between). In probability theory, we assign degrees of certainty to propositions. or now: rue/alse only! CO3100 - Dr. Ungor 5 uesday, January 7, 2014

Examples of Propositions CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: Whoʼs there? (interrogative, question) CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: Whoʼs there? (interrogative, question) La la la la la. (meaningless interjection) CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: Whoʼs there? (interrogative, question) La la la la la. (meaningless interjection) Just do it! (imperative, command) CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: Whoʼs there? (interrogative, question) La la la la la. (meaningless interjection) Just do it! (imperative, command) Yeah, I sorta dunno, whatever... (vague) CO3100 - Dr. Ungor 6 uesday, January 7, 2014

Examples of Propositions It is raining. (Given a situation.) Beijing is the capital of China. 1 + 2 = 5 he following are NO propositions: uesday, January 7, 2014 Whoʼs there? (interrogative, question) La la la la la. (meaningless interjection) Just do it! (imperative, command) Yeah, I sorta dunno, whatever... (vague) CO3100 - Dr. Ungor 1 + 2 (expression with a non-true/false value) 6

Boolean operators Negation (NO) Implication (I) Conjunction (AND) Disjunction (OR) Exclusive-Or (XOR) Bi-conditional (I) CO3100 - Dr. Ungor uesday, January 7, 2014

Operators / Connectives An operator or connective combines one or more operand expressions into a larger expression. (e.g., + in numeric exprs.) Unary operators take 1 operand (e.g., -3); binary operators take 2 operands (e.g., 3 4). Propositional or Boolean operators operate on propositions or truth values instead of on numbers. CO3100 - Dr. Ungor 8 uesday, January 7, 2014

he Negation Operator he unary negation operator (NO) transforms a prop. into its logical negation. Example: If p = I have brown hair., then p = I do not have brown hair. ruth table for NO: CO3100 - Dr. Ungor 9 uesday, January 7, 2014

he Conjunction Operator he binary conjunction operator (AND) combines two propositions to form their logical conjunction. E.g., If p= I will have salad for lunch. and q= I will have steak for dinner., then p q= I will have salad for lunch and I will have steak for dinner. CO3100 - Dr. Ungor 10 uesday, January 7, 2014

Conjunction ruth able CO3100 - Dr. Ungor 11 uesday, January 7, 2014

Conjunction ruth Note that a conjunction p 1 p 2 p n of n propositions will have 2 n rows in its truth table. able and operations together are universal, i.e., sufficient to express any truth table! CO3100 - Dr. Ungor 11 uesday, January 7, 2014

he Disjunction Operator he binary disjunction operator (OR) combines two propositions to form their logical disjunction. p= hat car has a bad engine. q= hat car has a bad carburetor. p q= Either that car has a bad engine, or that car has a bad carburetor. CO3100 - Dr. Ungor 12 uesday, January 7, 2014

Disjunction ruth able CO3100 - Dr. Ungor 13 uesday, January 7, 2014

Disjunction ruth Note that p q means that p is true, or q is true, or both are true! So this operation is also called inclusive or, because it includes the able possibility that both p and q are true. and together are also universal. CO3100 - Dr. Ungor 13 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = r p = r p q = CO3100 - Dr. Ungor 14 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = It didn t rain last night. r p = r p q = CO3100 - Dr. Ungor 14 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = r p = r p q = CO3100 - Dr. Ungor 14 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = r p = he lawn was wet this morning, and it didn t rain last night. r p q = CO3100 - Dr. Ungor 14 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = r p = r p q = CO3100 - Dr. Ungor 14 uesday, January 7, 2014

A Simple Exercise Let p= It rained last night, q= he sprinklers came on last night, r= he lawn was wet this morning. ranslate each of the following into English: p = r p = r p q = CO3100 - Dr. Ungor Either the lawn wasn t wet this morning, or it rained last night, or the sprinklers came on last night. 14 uesday, January 7, 2014

he Exclusive Or Operator he binary exclusive-or operator (XOR) combines two propositions to form their logical exclusive or (exjunction?). p = I will earn an A in this course, q = I will drop this course, p q = I will either earn an A for this course, or I will drop it (but not both!) CO3100 - Dr. Ungor 15 uesday, January 7, 2014

Exclusive-Or ruth Note that p q means that p is true, or q is true, but not both! his operation is called exclusive or, able because it excludes the possibility that both p and q are true. and together are not universal. CO3100 - Dr. Ungor 16 uesday, January 7, 2014

Natural Language is Ambiguous Note that in English or is by itself ambiguous regarding the both case! Pat is a singer or Pat is a writer. - Pat is rich or Pat is poor. - Need context to disambiguate the meaning! or this class, assume or means inclusive. CO3100 - Dr. Ungor 17 uesday, January 7, 2014

Natural Language is Ambiguous Note that in English or is by itself ambiguous regarding the both case! Pat is a singer or Pat is a writer. - Pat is rich or Pat is poor. - Need context to disambiguate the meaning! or this class, assume or means inclusive. CO3100 - Dr. Ungor 17 uesday, January 7, 2014

Natural Language is Ambiguous Note that in English or is by itself ambiguous regarding the both case! Pat is a singer or Pat is a writer. - Pat is rich or Pat is poor. - Need context to disambiguate the meaning! or this class, assume or means inclusive. CO3100 - Dr. Ungor 17 uesday, January 7, 2014

he Implication Operator he implication p q states that p implies q. It is ALSE only in the case that p is RUE but q is ALSE. e.g., p= I am elected. q= axes will be lowered. p q = If I am elected, then taxes will be lowered (else it could go either way) CO3100 - Dr. Ungor 18 uesday, January 7, 2014

he Implication Operator erminology for the structure of implication p q p: Hypothesis (antecedent or premise) q: Conclusion (consequence) CO3100 - Dr. Ungor 19 uesday, January 7, 2014

Implication ruth able CO3100 - Dr. Ungor 20 uesday, January 7, 2014

Implication ruth able p q is false only when p is true but q is not true. CO3100 - Dr. Ungor 20 uesday, January 7, 2014

Implication ruth able p q is false only when p is true but q is not true. p q does not imply that p causes q! CO3100 - Dr. Ungor 20 uesday, January 7, 2014

Implication ruth able p q is false only when p is true but q is not true. p q does not imply that p causes q! p q does not imply that p or q are ever true! CO3100 - Dr. Ungor 20 uesday, January 7, 2014

Implication ruth able p q is false only when p is true but q is not true. p q does not imply that p causes q! p q does not imply that p or q are ever true! E.g. (1=0) pigs can fly is RUE! CO3100 - Dr. Ungor 20 uesday, January 7, 2014

Examples of Implications If this lecture ends, then the sun will rise tomorrow. rue or alse? If Monday is a day of the week, then I am a not teacher. rue or alse? If 1+1=6, then George passed the exam. rue or alse? If the moon is made of green cheese, then I am richer than Bill Gates. rue or alse? CO3100 - Dr. Ungor 21 uesday, January 7, 2014

Examples of Implications If this lecture ends, then the sun will rise tomorrow. rue or alse? If Monday is a day of the week, then I am a not teacher. rue or alse? If 1+1=6, then George passed the exam. rue or alse? If the moon is made of green cheese, then I am richer than Bill Gates. rue or alse? CO3100 - Dr. Ungor 21 uesday, January 7, 2014

Examples of Implications If this lecture ends, then the sun will rise tomorrow. rue or alse? If Monday is a day of the week, then I am a not teacher. rue or alse? If 1+1=6, then George passed the exam. rue or alse? If the moon is made of green cheese, then I am richer than Bill Gates. rue or alse? CO3100 - Dr. Ungor 21 uesday, January 7, 2014

Examples of Implications If this lecture ends, then the sun will rise tomorrow. rue or alse? If Monday is a day of the week, then I am a not teacher. rue or alse? If 1+1=6, then George passed the exam. rue or alse? If the moon is made of green cheese, then I am richer than Bill Gates. rue or alse? CO3100 - Dr. Ungor 21 uesday, January 7, 2014

Examples of Implications If this lecture ends, then the sun will rise tomorrow. rue or alse? If Monday is a day of the week, then I am a not teacher. rue or alse? If 1+1=6, then George passed the exam. rue or alse? If the moon is made of green cheese, then I am richer than Bill Gates. rue or alse? CO3100 - Dr. Ungor 21 uesday, January 7, 2014

Inverse, Converse, Contrapositive Some terminology: he inverse of p q is: p q he converse of p q is: q p. he contrapositive of p q is: q p. CO3100 - Dr. Ungor 22 uesday, January 7, 2014

Inverse, Converse, Contrapositive Some terminology: he inverse of p q is: p q he converse of p q is: q p. he contrapositive of p q is: q p. One of these has the same meaning (same truth table) as p q. Can you figure out which? CO3100 - Dr. Ungor 22 uesday, January 7, 2014

Inverse, Converse, Contrapositive Some terminology: he inverse of p q is: p q he converse of p q is: q p. he contrapositive of p q is: q p. One of these has the same meaning (same truth table) as p q. Can you figure out which? CO3100 - Dr. Ungor Contrapositive 22 uesday, January 7, 2014

How do we know for sure? Proving the equivalence of p q and its contrapositive using truth tables: CO3100 - Dr. Ungor 23 uesday, January 7, 2014

he biconditional operator CO3100 - Dr. Ungor 24 uesday, January 7, 2014

he biconditional operator he biconditional p q states that p is true if and only if (I) q is true. CO3100 - Dr. Ungor 24 uesday, January 7, 2014

he biconditional operator he biconditional p q states that p is true if and only if (I) q is true. It is RUE only when both p q and q p are RUE. CO3100 - Dr. Ungor 24 uesday, January 7, 2014

he biconditional operator he biconditional p q states that p is true if and only if (I) q is true. It is RUE only when both p q and q p are RUE. p = It is raining. CO3100 - Dr. Ungor 24 uesday, January 7, 2014

he biconditional operator he biconditional p q states that p is true if and only if (I) q is true. It is RUE only when both p q and q p are RUE. p = It is raining. q = he home team wins. CO3100 - Dr. Ungor 24 uesday, January 7, 2014

he biconditional operator he biconditional p q states that p is true if and only if (I) q is true. It is RUE only when both p q and q p are RUE. p = It is raining. q = he home team wins. p q = If and only if it is raining, the home team wins. CO3100 - Dr. Ungor 24 uesday, January 7, 2014

Biconditional ruth able CO3100 - Dr. Ungor 25 uesday, January 7, 2014

Biconditional ruth able p q means that p and q have the same truth value. CO3100 - Dr. Ungor 25 uesday, January 7, 2014

Biconditional ruth able p q means that p and q have the same truth value. Note this truth table is the exact opposite of ʼs! CO3100 - Dr. Ungor 25 uesday, January 7, 2014

Biconditional ruth able p q means that p and q have the same truth value. Note this truth table is the exact opposite of ʼs! p q means (p q) CO3100 - Dr. Ungor 25 uesday, January 7, 2014

Biconditional ruth able p q means that p and q have the same truth value. Note this truth table is the exact opposite of ʼs! p q means (p q) p q does not imply p and q are true, or cause each other. CO3100 - Dr. Ungor 25 uesday, January 7, 2014

Boolean Operations Summary We have seen 1 unary operator and 5 binary operators. CO3100 - Dr. Ungor 26 uesday, January 7, 2014

Precedence of Logical Operators Operator Precedence 1 2 3 4 5 CO3100 - Dr. Ungor 27 uesday, January 7, 2014

Nested Propositional Expressions Use parentheses to group sub-expressions: I just saw my old friend, and either heʼs grown or Iʼve shrunk. = f (g s) (f g) s would mean something different f g s would be ambiguous By convention, takes precedence over both and. s f means ( s) f, not (s f) CO3100 - Dr. Ungor 28 uesday, January 7, 2014

Some Alternative Notations CO3100 - Dr. Ungor 29 uesday, January 7, 2014

Bits and Bit Operations A bit is a binary (base 2) digit: 0 or 1. By convention: 1 represents true ; Bits may be used to represent truth values. 0 represents false. Boolean algebra is like ordinary algebra except that variables stand for bits, + means or, and multiplication means and. CO3100 - Dr. Ungor 30 uesday, January 7, 2014

Bit Strings A Bit string of length n is an ordered series or sequence of n 0 bits. By convention, bit strings are written left to right: e.g. the first bit of 1001101010 is 1. When a bit string represents a base-2 number, by convention the first bit is the most significant bit. Ex. 1101 2 =8+4+1=13. CO3100 - Dr. Ungor 31 uesday, January 7, 2014

Bitwise Operations Boolean operations can be extended to operate on bit strings as well as single bits. E.g.: 01 1011 0110 11 0001 1101 11 1011 1111 Bit-wise OR 01 0001 0100 Bit-wise AND 10 1010 1011 Bit-wise XOR CO3100 - Dr. Ungor 32 uesday, January 7, 2014

Propositional Equivalences CO3100 - Dr. Entezari uesday, January 7, 2014

Propositional Equivalence wo syntactically (i.e., textually) different compound propositions may be semantically identical (i.e., have the same meaning). We call them equivalent. NEX: Learn about various equivalence rules or laws. Learn how to prove equivalences using symbolic derivations. CO3100 - Dr. Ungor 34 uesday, January 7, 2014

autologies and Contradictions CO3100 - Dr. Ungor 35 uesday, January 7, 2014

autologies and Contradictions A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! CO3100 - Dr. Ungor 35 uesday, January 7, 2014

autologies and Contradictions A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! Ex. p p [What is its truth table?] CO3100 - Dr. Ungor 35 uesday, January 7, 2014

autologies and Contradictions A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! Ex. p p [What is its truth table?] A contradiction is a comp. prop. that is false no matter what! Ex. p p [ruth table?] CO3100 - Dr. Ungor 35 uesday, January 7, 2014

autologies and Contradictions A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are! Ex. p p [What is its truth table?] A contradiction is a comp. prop. that is false no matter what! Ex. p p [ruth table?] Other comp. props. are contingencies. CO3100 - Dr. Ungor 35 uesday, January 7, 2014

Proving Equivalences CO3100 - Dr. Ungor 36 uesday, January 7, 2014

Proving Equivalences Compound propositions P and Q are logically equivalent to each other I P and Q contain the same truth values as each other in all rows of their truth tables. CO3100 - Dr. Ungor 36 uesday, January 7, 2014

Proving Equivalences Compound propositions P and Q are logically equivalent to each other I P and Q contain the same truth values as each other in all rows of their truth tables. Compound proposition P is logically equivalent to compound proposition Q, written P Q, I the compound proposition P Q is a tautology. CO3100 - Dr. Ungor 36 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Proving Equivalence via ruth ables P Q Ex. Prove that } } p q ( p q). Ex Ex. Prove that p q ( p q). Ex. Prove that p q ( p q).. Prove thex. Prove that pq ( p q). at p q ( p q). CO3100 - Dr. Ungor 37 uesday, January 7, 2014

Equivalence Laws hese are similar to the arithmetic identities you may have learned in algebra, but for propositional equivalences instead. hey provide a pattern or template that can be used to match much more complicated propositions and to find equivalences for them. CO3100 - Dr. Ungor 38 uesday, January 7, 2014

Equivalence Laws - Examples Identity: p p p p Domination: p p Idempotent: p p p p p p Double negation: p p Commutative: p q q p p q q p Associative: (p q) r p (q r) (p q) r p (q r) CO3100 - Dr. Ungor 39 uesday, January 7, 2014

More Equivalence Laws Distributive: p (q r) (p q) (p r) p (q r) (p q) (p r) De Morgan s: " (p q) p q " (p q) p q CO3100 - Dr. Ungor 40 uesday, January 7, 2014

More Equivalence Laws Absorption: " p (p q) p p (p q) p rivial tautology/contradiction: p p p p CO3100 - Dr. Ungor 41 uesday, January 7, 2014

Defining Operators via Equivalences Using equivalences, we can define operators in terms of other operators. Implication: p q p q Biconditional: p q (p q) (q p) p q (p q) Exclusive or: p q (p q) (p q) p q (p q) (q p) CO3100 - Dr. Ungor 42 uesday, January 7, 2014

An Example Problem CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) [Expand definition of ] (p q) (p r) CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) [Expand definition of ] (p q) (p r) [Defn. of ] (p q) ((p r) (p r)) CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) [Expand definition of ] (p q) (p r) [Defn. of ] (p q) ((p r) (p r)) [DeMorganʼs Law] CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) [Expand definition of ] (p q) (p r) [Defn. of ] (p q) ((p r) (p r)) [DeMorganʼs Law] ( p q) ((p r) (p r)) CO3100 - Dr. Ungor 43 uesday, January 7, 2014

An Example Problem Check using a symbolic derivation whether (p q) (p r) p q r. (p q) (p r) [Expand definition of ] (p q) (p r) [Defn. of ] (p q) ((p r) (p r)) [DeMorganʼs Law] ( p q) ((p r) (p r)) CO3100 - Dr. Ungor 43 uesday, January 7, 2014

Example Continued... CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] q ((( p (p r)) ( p (p r))) CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] q ((( p (p r)) ( p (p r))) [assoc.] q ((( p p) r) ( p (p r))) CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] q ((( p (p r)) ( p (p r))) [assoc.] q ((( p p) r) ( p (p r))) [trivial taut.] q (( r) ( p (p r))) CO3100 - Dr. Ungor 44 uesday, January 7, 2014

Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] q ((( p (p r)) ( p (p r))) [assoc.] q ((( p p) r) ( p (p r))) [trivial taut.] q (( r) ( p (p r))) [domination] q ( ( p (p r))) CO3100 - Dr. Ungor 44 uesday, January 7, 2014

CO3100 - Dr. Ungor Example Continued... ( p q) ((p r) (p r)) [ commutes] (q p) ((p r) (p r)) [ associative] q ( p ((p r) (p r))) [distrib. over ] q ((( p (p r)) ( p (p r))) [assoc.] q ((( p p) r) ( p (p r))) [trivial taut.] q (( r) ( p (p r))) [domination] q ( ( p (p r))) [identity] uesday, January 7, 2014 q ( p (p r)) cont. 44

End of Long Example CO3100 - Dr. Ungor 45 uesday, January 7, 2014

q ( p (p r)) End of Long Example CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) [Assoc.] q (( p p) r) CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) [Assoc.] q (( p p) r) [Idempotent] q ( p r) CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) [Assoc.] q (( p p) r) [Idempotent] q ( p r) [Assoc.] (q p) r CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) [Assoc.] q (( p p) r) [Idempotent] q ( p r) [Assoc.] (q p) r [Commut.] p q r CO3100 - Dr. Ungor 45 uesday, January 7, 2014

End of Long Example q ( p (p r)) [DeMorganʼs] q ( p ( p r)) [Assoc.] q (( p p) r) [Idempotent] q ( p r) [Assoc.] (q p) r [Commut.] p q r Q.E.D. (quod erat demonstrandum) CO3100 - Dr. Ungor 45 uesday, January 7, 2014