Definition 2. Conjunction of p and q

Similar documents
CSC Discrete Math I, Spring Propositional Logic

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

Compound Propositions

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

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

Boolean Logic. CS 231 Dianna Xu

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

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

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

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

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

Propositional Logic 1

2.2: Logical Equivalence: The Laws of Logic

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

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

EECS 1028 M: Discrete Mathematics for Engineers

Math.3336: Discrete Mathematics. Applications of Propositional Logic

Chapter 1, Section 1.1 Propositional Logic

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

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

Propositional Logic: Semantics

CSE 20 DISCRETE MATH. Fall

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

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

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Logic and Proofs. Jan COT3100: Applications of Discrete Structures Jan 2007

The Logic of Compound Statements cont.

Discrete Mathematics and Applications COT3100

1.1 Language and Logic

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

Propositional Logic. Spring Propositional Logic Spring / 32

UNIT-I: Propositional Logic

Chapter 4, Logic using Propositional Calculus Handout

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

1.1 Language and Logic

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

The Foundations: Logic and Proofs. Part I

CSE 240 Logic and Discrete Mathematics

Mathematical Logic Part One

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

Logic and Proof. Aiichiro Nakano

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

Announcements CompSci 102 Discrete Math for Computer Science

Propositional Equivalence

LOGIC & PROPOSITIONAL EQUIVALENCE

1 Propositional Logic

Propositional Logic: Equivalence

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

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

Formal Logic. Critical Thinking

COM S 330 Homework 02 Solutions. Type your answers to the following questions and submit a PDF file to Blackboard. One page per problem.

Truth-Functional Logic

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

Propositional logic ( ): Review from Mat 1348

Packet #1: Logic & Proofs. Applied Discrete Mathematics

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

Discrete Mathematics and Its Applications

Logic and Proofs. (A brief summary)

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

Today s Topic: Propositional Logic

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

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

Proofs. Joe Patten August 10, 2018

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

13.3 Truth Tables for the Conditional and the Biconditional

Discrete Mathematics and Its Applications

Discrete Structures for Computer Science

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.

Topic 1: Propositional logic

Propositional Logic. Logical Expressions. Logic Minimization. CNF and DNF. Algebraic Laws for Logical Expressions CSC 173

Homework assignment 1: Solutions

1.3 Propositional Equivalences

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

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 =

Logic, Sets, and Proofs

Propositional Languages

Recitation Week 3. Taylor Spangler. January 23, 2012

1 Propositional Logic

Deduction by Daniel Bonevac. Chapter 3 Truth Trees

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

Artificial Intelligence Knowledge Representation I

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

MAT2345 Discrete Math

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

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

PROPOSITIONAL CALCULUS

Discrete Mathematics

Discrete Mathematics I Tutorial 01 - Answer

~ p is always false. Based on the basic truth table for disjunction, if q is true then p ~

Tautologies, Contradictions, and Contingencies

CSE 20 DISCRETE MATH WINTER

Solutions to Homework I (1.1)

Logical Agents. Chapter 7

Logic and Proofs. (A brief summary)

Section 3.1 Statements, Negations, and Quantified Statements

CS 220: Discrete Structures and their Applications. Propositional Logic Sections in zybooks

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

We last time we began introducing equivalency laws.

1 The Foundation: Logic and Proofs

1.1 Statements and Compound Statements

Transcription:

Proposition Propositional Logic CPSC 2070 Discrete Structures Rosen (6 th Ed.) 1.1, 1.2 A proposition is a statement that is either true or false, but not both. Clemson will defeat Georgia in football this fall. 1+1 = 2 3+1 = 5 What will be my grade in CPSC 2070? LOGICAL We can define operations on propositions! Definition 1. Negation of p Let p be a proposition. he statement It is not the case that p is also a proposition, called the negation of p or p (read not p ) p = he sky is blue. p = It is not the case that the sky is blue. p = he sky is not blue. able 1. he ruth able for the Negation of a Proposition p p Definition 2. Conjunction of p and q propositions. he proposition p and q, denoted by p q is true when both p and q are true and is false otherwise. his is called the conjunction of p and q. able 2. he ruth able for the Conjunction of two propositions p q p q Definition 3. Disjunction of p and q able 3. he ruth able for the Disjunction of two propositions p q p q propositions. he proposition p or q, denoted by p q, is the proposition that is false when p and q are both false and true otherwise. 1

Definition 4. Exclusive or of p and q able 4. he ruth able for the Exclusive OR of two propositions p q p q propositions. he exclusive or of p and q, denoted by p q, is the proposition that is true when exactly one of p and q is true and is false otherwise. Definition 5. Implication p q propositions. he implication p q is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequence). Politician Example able 5. he ruth able for the Implication of p q. p q p q Implications Related Implications If p, then q p implies q if p,q p is sufficient for q q if p q whenever p q is necessary for p Not the same as the if-then construct used in programming languages such as If p then S Converse of p q is the proposition q p Inverse of p q is the proposition p q Contrapositive of p q is the proposition q p Definition 6. Biconditional able 6. he ruth able for the biconditional p q. p q p q propositions. he biconditional p q is the proposition that is true when p and q have the same truth values and is false otherwise. p if and only if q, p is necessary and sufficient for q Compound Propositions We can also combine operations to create compound propositions such as: (p q) q est all possible combinations of / Don t try to do it all in your head! p q (p q) (p q) (p q) q 2

Special ypes of Compound Propositions Contradiction: Compound proposition that is always false regardless of the truth values of the propositions in it. p p is a contradiction autology: compound proposition that is always true regardless of the truth values of the propositions in it. p p is a tautology Practice with English Sentences p: You learn the simple things well. q: he difficult things become easy. You do not learn the simple things well. If you learn the simple things well then the difficult things become easy. If you do not learn the simple things well, then the difficult things will not become easy. he difficult things become easy but you did not learn the simple things well. You learn the simple things well but the difficult things did not become easy. Practice with English Sentences p: You learn the simple things well. q: he difficult things become easy. You do not learn the simple things well. p If you learn the simple things well then the difficult things become easy. p q If you do not learn the simple things well, then the difficult things will not become easy. p q he difficult things become easy but you did not learn the simple things well. q p You learn the simple things well but the difficult things did not become easy. p q Some Applications of Propositional Logic ruth able Puzzle Steve would like to determine the relative salaries of three coworkers using two facts: If red is not the highest paid of the three, then Janice is. If Janice is not the lowest paid, then Maggie is paid the most. Who is paid the most and who is paid the least? p : Janice is paid the most. q: Maggie is paid the most. r: red is paid the most. s: Janice is paid the least. p q r s r p s q ( r p) ( s q) red, Maggie, Janice If Janice is not the lowest If red is not the paid, then Maggie is paid highest paid of the the most. three, then Janice is. 3

Knights and Knaves Puzzles On a remote island there live Knights and Knaves. Knights always tell the truth and Knaves always lie. You meet two people on the island A and B. A says: B and I are both Knights. B says: A is a Knave. Determine, if possible, which group A and B belong to. Let a be the statement that A is a Knight and b be the statement that B is a Knight. A says B and I are both Knights. If A is a Knight then a is true and the statement (a b) is true. If A is a Knave, then a is false and the statement is false. hese are the two cases that are true in that they are possible solutions to the puzzle. We can code this with the biconditional operator. (Recall that p q is true when both propositions are true or both propositions are false.) B says A is a Knave. Using the same logic add b a to the table. a (A is a Knight) b (B is a Knight) (a b) a (a b) b a A says At least one of us is a Knave and B says nothing. a (A is a Knight) b (B is a Knight) a b a ( a b) he Hat Puzzle hree students who made an A in CPSC 2070 are told to stand in a straight line, one in front of the other. A hat is put on each of their heads. hey are told that each of these hats was selected from a group of five hats: two black hats and three white hats. he first student, standing at the front of the line, can t see either of the students behind her or their hats. he second student, in the middle, can see only the first student and her hat. he last student, at the rear, can see both other students and their hats. None of them can see the hat on their own head. hey are asked to deduce its color. he last student in line is asked if he knows the color of his hat and says he cannot be sure. he second student in line is asked if he knows the color of his hat and says he cannot be sure. he student at the front of the line then says: My hat is white. She is correct. How did she come to this conclusion? Bit Operations Last Second irst W W W W W B W B W W B B B W W B W B B B W A computer bit has two possible values: 0 (false) and 1 (true). A variable is called a Boolean variable is its value is either true or false. Bit operations correspond to the logical connectives: OR AND XOR Information can be represented by bit strings, which are sequences of zeroes and ones, and manipulated by operations on the bit strings. 4

ruth tables for the bit operations OR, AND, and XOR 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 1 0 1 0 0 1 1 1 0 Binary Math Review Decimal has digits 0-9 0 0 1 3 10 3 10 2 10 1 10 0 Binary has digits 0-1 1 1 0 1 2 3 2 2 2 1 2 0 0+1 = 1 1+0 = 1 1+1 = 10 10 + 1 = 11 11 + 1 = 100 Program to add 3 binary digits p q r Output 1 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 Output 1 = (p q) (p r) (q r) Output 2 Output 2 = p q r Logically Equivalent Compound propositions P and Q are logically equivalent if P Q is a tautology. In other words, P and Q have the same truth values for all combinations of truth values of simple propositions. his is denoted: P Q ull Adder: Computers contain switches (logic gates) corresponding to our logic operations Example: DeMorgans Prove that (p q) ( p q) p q (p q) (p q) p q ( p q) Example: Distribution Prove that: p (q r) (p q) (p r) p q r q r p (q r) p q p r (p q) (p r) 5

Prove: p q (p q) (q p) p q p q p q q p (p q) (q p) We call this biconditional equivalence. List of Logical Equivalences able 6 in Section 1.2 p p; p p Identity Laws p ; p Domination Laws p p p; p p p Idempotent Laws ( p) p Double Negation Law p q q p; p q q p Commutative Laws (p q) r p (q r); (p q) r p (q r) Associative Laws List of Equivalences p (q r) (p q) (p r) Distributive Laws p (q r) (p q) (p r) (p q) ( p q) (p q) ( p q) De Morgan s Laws p (p q) p Absorption Laws p (p q) p p p p p (p q) ( p q) Negation Laws Or autology; And Contradiction Implication Equivalence 6