LOGIC & PROPOSITIONAL EQUIVALENCE

Similar documents
Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

CSC Discrete Math I, Spring Propositional Logic

Compound Propositions

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

Chapter 1, Section 1.1 Propositional Logic

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

Boolean Logic. CS 231 Dianna Xu

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

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

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

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

Definition 2. Conjunction of p and q

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

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

2/13/2012. Logic: Truth Tables. CS160 Rosen Chapter 1. Logic?

1.1 Statements and Compound Statements

EECS 1028 M: Discrete Mathematics for Engineers

UNIT-I: Propositional Logic

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

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

software design & management Gachon University Chulyun Kim

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

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

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

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

DISCRETE MATHEMATICS BA202

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

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

Propositional Logic 1

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

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

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

PROPOSITIONAL CALCULUS

Introduction Propositional Logic. Discrete Mathematics Andrei Bulatov

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

THE LOGIC OF COMPOUND STATEMENTS

Math.3336: Discrete Mathematics. Propositional Equivalences

Propositional Logic. Spring Propositional Logic Spring / 32

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

Discrete Mathematics and Applications COT3100

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

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

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

MAT2345 Discrete Math

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

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

Introduction to Sets and Logic (MATH 1190)

Propositional logic ( ): Review from Mat 1348

Propositional Equivalence

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

ICS141: Discrete Mathematics for Computer Science I

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

Introduction to Decision Sciences Lecture 2

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

1 The Foundation: Logic and Proofs

The statement calculus and logic

1.1 Language and Logic

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

2. Find all combinations of truth values for p, q and r for which the statement p (q (p r)) is true.

1.1 Language and Logic

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

ECOM Discrete Mathematics

1 The Foundation: Logic and Proofs

Chapter 4, Logic using Propositional Calculus Handout

1.3 Propositional Equivalences

Chapter 1 Elementary Logic

2.2: Logical Equivalence: The Laws of Logic

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

Section 1.1: Logical Form and Logical Equivalence

Tautologies, Contradictions, and Contingencies

HANDOUT AND SET THEORY. Ariyadi Wijaya

Today s Topic: Propositional Logic

THE LOGIC OF COMPOUND STATEMENTS

Discrete Structures of Computer Science Propositional Logic I

The Logic of Compound Statements cont.

ANALYSIS EXERCISE 1 SOLUTIONS

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

LOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.

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

Logic of Sentences (Propositional Logic) is interested only in true or false statements; does not go inside.

Proving logical equivalencies (1.3)

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

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

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

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

Mat 243 Exam 1 Review

Announcements CompSci 102 Discrete Math for Computer Science

Solutions to Homework I (1.1)

Discrete Mathematics and Its Applications

CSE 240 Logic and Discrete Mathematics

CSCI Homework Set 1 Due: September 11, 2018 at the beginning of class

Propositional Logic: Semantics

Logic and Proofs. (A brief summary)

Discrete Mathematics

Formal Logic. Critical Thinking

TRUTH TABLES LOGIC (CONTINUED) Philosophical Methods

2/18/14. What is logic? Proposi0onal Logic. Logic? Propositional Logic, Truth Tables, and Predicate Logic (Rosen, Sections 1.1, 1.2, 1.

Propositional Logic: Equivalence

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.

Transcription:

KS091201 MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) LOGIC & PROPOSITIONAL EQUIVALENCE Discrete Math Team

2 -- KS091201 MD W-02 Outline Logic Proposition Propositional Variables Logical Operators Presedence of Operators Translating English Sentences Tautology, Contradiction, Equivalance Logical Equivalance Using Logical Equivalece for Proofing

3 -- KS091201 MD W-02 Logic Logic is the foundation of Mathematical reasoning (penjabaran Matematika). The rules of logic are used to distinguish between valid and invalid Mathematical arguments. Logic has numerous application in Computer Sciences such as in the design of computer circuits, the construction of computer programs, the verification of correctness of programs, etc.

4 -- KS091201 MD W-02 Proposition Proposition is a statement that can be either true or false, but not both. Washington DC is the capital of the USA. Kuala Lumpur is a city in Indonesia. 3 = 2 + 1 3 = 2 + 2 Not propositions: is Cameron Diaz a Prime Minister? x = 7 I am good student

5 -- KS091201 MD W-02 Proposition (cont.) The following are not proposition Instruction (Kalimat perintah) Question (Kalimat pertanyaan) Amazement (Kalimat keheranan) Expectancy (Kalimat harapan)

6 -- KS091201 MD W-02 Propositional Variables We use propositional variables to refer to propositions Usually are lower case letters starting with p (i.e. p, q, r, s, etc.) A propositional variable can have one of two values: true (T) or false (F) A proposition can be A single variable: p An operation of multiple variables: p (q r)

7 -- KS091201 MD W-02 Logical Operators Many mathematical statements are constructed by combining one or more propositions. New propositions, called compound propositions (pernyataan gabungan/ pernyataan majemuk), are formed from existing propositions using logical operators. Consider the following examples: p = Today is Sep, 11 q = Today is my birthday

8 -- KS091201 MD W-02 Logical Operator: Not A not operation switches (negates) the truth value Symbol: or ~ p = Today is not Sep, 11 p T F p F T

9 -- KS091201 MD W-02 Logical Operator: And An and operation is true if both operands are true Symbol: p q = Today is Sep, 11 and today is my birthday p q p q T T T T F F F T F F F F

10 -- KS091201 MD W-02 Logical Operator: Or An or operation is true if either operands or both are true Symbol: p q = Today is Sep, 11 or today is my birthday (or possibly both) p q p q T T T T F T F T T F F F

11 -- KS091201 MD W-02 Logical Operator: XOR An xor operation is true when exactly one of p and q is true, and false otherwise. Symbol: p q p q = Either today is Sep, 11 or today is my birthday (not both) p q p q T T F T F T F T T F F F

12 -- KS091201 MD W-02 Logical Operator: XOR (cont) When two simple propositions are combined using or, context will often provide the clue as to whether the inclusive or exclusive sense is intended. For instance, Tomorrow I will go swimming or play golf seems to suggest that I will not do both in the same time and therefore points to an exclusive interpretation.

13 -- KS091201 MD W-02 Logical Operator: Conditional A conditional means if p then q Symbol: p q = If today is Sep, 11, then today is my birthday p q= p q p q p q T T T Antecedent/ hypothesis/ premise Consequence/ conclusion T F F F T T F F T

14 -- KS091201 MD W-02 Logical Operator: Conditional (cont) Let p = I pass my exams and q = I will get drunk I state: p q = If I pass my exams then I will get drunk Note that if p is false, then the conditional is true regardless of whether q is true or false The above statement says nothing about what I will do if I don t pass my exams. I may get drunk or I may not, but in either case you could not accuse me of having made a false statement. The only circumstances in which I could be accused of uttering a falsehood is if I pass my exams and don t get drunk.

15 -- KS091201 MD W-02 Logical Operator: Conditional (cont) Alternate ways of stating a conditional: p implies q If p, q p only if q p is sufficient for q q if p q whenever p q is necessary for p

16 -- KS091201 MD W-02 Logical Operator: Conditional (cont) Conditional statement: If you use Ms. Word, then Windows is the operating system. Alternatively: Ms. Word is sufficient for Windows Windows is necessary for Ms. Word Ms. Word adalah syarat cukup bagi Windows, sedangkan Windows adalah syarat perlu bagi Ms. Word Ms. Word tidak dapat digunakan tanpa Windows tetapi Windows dapat digunakan tanpa Ms. Word

17 -- KS091201 MD W-02 Logical Operator: Conditional (cont) Propositions Conditional Inverse Converse Contrapositive p q p q p q p q q p q p T T F F T T T T T F F T F T T F F T T F T F F T F F T T T T T T Two contrapositive propositions have the same truth values (equivalent) Inverse and converse are the opposite of the conditional, both of them have the same truth values These rules are useful in proofing

18 -- KS091201 MD W-02 Logical Operator: Bi-Conditional A bi-conditional means p if and only if q Symbol: Alternatively, it means (if p then q) and (if q then p) Note that a bi-conditional has the opposite truth values of the exclusive or p q p q T T T T F F F T F F F T

19 -- KS091201 MD W-02 Logical Operator: Bi-Conditional Let p = You can take the flight and q = You buy a ticket Then p q means You can take the flight if and only if you buy a ticket Alternatively, it means If you can take the flight, then you buy a ticket and if you buy a ticket then you take the flight

20 -- KS091201 MD W-02 Boolean Operator Summary not not and or xor conditional Bi-conditional p q p q p q p q p q p q p q T T F F T T F T T T F F T F T T F F F T T F F T T T F F F T T F F F T T Try to understand what they mean, don t just memorize the table

21 -- KS091201 MD W-02 Presedence of Operators Just as in algebra, operators have precedence 4+3*2 = 4+(3*2), not (4+3)*2 Precedence order (from highest to lowest): This means that p q r s t yields: (p (q ( r)) s) (t) Not is always performed before any other operation

22 -- KS091201 MD W-02 Translating English Sentences Question 7 from Rosen, p. 17 p = It is below freezing q = It is snowing It is below freezing and it is snowing o p q It is below freezing but not snowing o p q It is not below freezing and it is not snowing o p q It is either snowing or below freezing (or both) o p q If it is below freezing, it is also snowing o p q It is either below freezing or it is snowing, o ((p q) (p q) but it is not snowing if it is below freezing That it is below freezing is necessary and o p q sufficient for it to be snowing

23 -- KS091201 MD W-02 Translating English Sentences I have neither given nor received help on this exam Let p = I have given help on this exam Let q = I have received help on this exam p q

24 -- KS091201 MD W-02 Translating English Sentences You can access the Internet from campus only if you are a computer science major or you are not a freshman. a (c f) You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old. (f s) r r ( f s)

25 -- KS091201 MD W-02 Practice Some Students from Discrete Math (KS091201) went together to see cinema at Galaxy Mall last Sunday. From the clues below, can you determine the order in which they stood in the ticket queue? Yahya was in front of Andhino. Anggoro was behind Adityo and Dyah. Dyah was in front of Adi and Rani. Hendra was behind Anggoro, Dian and Rani. Rani was in front of Hendra, Dian and Harlen. Harlen was behind Dian, Adi and Hendra. Adityo was in front of Andhino. Dian was in front of Yahya, Anggoro and Adityo. Andhino was in front of Adi. Hendra was in front of Yahya and Harlen. Andhino was behind Adityo, Dyah and Hendra. Anggoro was in front of Andhino. Dian was behind Dyah.

26 -- KS091201 MD W-02 Answer Dyah-Rani-Dian-Adityo-Anggoro-Hendra- Yahya-Andhino-Adi-Harlen

27 -- KS091201 MD W-02 Practice If p, q, r are T, F, F respectively. What is the value (T or F) of: (p r q p r) (p r) FALSE

28 -- KS091201 MD W-02 Tautology, Contradiction, Equivalence Tautology: a statement (compound props.) that s always true no matter what the truth values of the propositions p p will always be true Contradiction: a statement (compound props.) that s always false p p will always be false Contingency: a statement (compound props.) that s neither a tautology nor contradiction. A logical equivalence means that the two sides always have the same truth values. Or in other word p q is tautology Symbol is or (we ll use )

29 -- KS091201 MD W-02 Logical Equivalence Identity law p T p p T p T T T T F T F Commutative law p q q p p q p q q p T T T T T F F F F T F F F F F F

30 -- KS091201 MD W-02 Logical Equivalence (cont.) Associative law (p q) r p (q r) p q r p q (p q) r q r p (q r) T T T T T T T T T F T F F F T F T F F F F T F F F F F F F T T F F T F F T F F F F F F F T F F F F F F F F F F F

31 -- KS091201 MD W-02 Summary of Logical Equivalence p T p p F p Identity Laws (p q) r p (q r) (p q) r p (q r) Associative laws p T T p F F Domination Law p (q r) (p q) (p r) p (q r) (p q) (p r) Distributive laws p p p p p p Idempotent Laws (p q) p q (p q) p q De Morgan s laws ( p) p Double negation law p (p q) p p (p q) p Absorption laws p q q p p q q p Commutative Laws p p T p p F Negation laws p q p q Definition of Implication p q (p q) (q p) Definition of Biconditional

The Liar Paradox This statement is false. (A) 32 -- KS091201 MD W-02 If (A) is true, then "This statement is false" is true. Therefore (A) must be false. The hypothesis that (A) is true leads to the conclusion that (A) is false, a contradiction. If (A) is false, then "This statement is false" is false. Therefore (A) must be true. The hypothesis that (A) is false leads to the conclusion that (A) is true, another contradiction. Either way, (A) is both true and false, which is a paradox. http://en.wikipedia.org/wiki/liar_paradox

33 -- KS091201 MD W-02 Proof using Logical Equivalence (p r) (q r) ( p r) ( q r) p r q r p q r r ( p q) (r r) (p q) r (p q) r Definition of implication Associative Commutative Associative De Morgan, Idempotent Definition of implication

34 -- KS091201 MD W-02 Proof using Logical Equivalence Show that (p q) (p q) is a Tautology. (Proof) (p q) (p q) (p q) (p q) Def. of Implication ( p q) (p q) ( p p) ( q q) T T T De Morgan Commutative, Associative Negation Identity