Review: Potential stumbling blocks

Similar documents
Discrete Structures for Computer Science

Rules Build Arguments Rules Building Arguments

CS 2336 Discrete Mathematics

KS MATEMATIKA DISKRIT (DISCRETE MATHEMATICS ) RULES OF INFERENCE. Discrete Math Team

Rules of Inference. Arguments and Validity

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

CSCI-2200 FOUNDATIONS OF COMPUTER SCIENCE

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

Readings: Conjecture. Theorem. Rosen Section 1.5

software design & management Gachon University Chulyun Kim

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

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Methods of Proof. 1.6 Rules of Inference. Argument and inference 12/8/2015. CSE2023 Discrete Computational Structures

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

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

Discrete Structures of Computer Science Propositional Logic III Rules of Inference

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

CS0441 Discrete Structures Recitation 3. Xiang Xiao

Introduction Logic Inference. Discrete Mathematics Andrei Bulatov

Discrete Structures for Computer Science

Intro to Logic and Proofs

ECOM Discrete Mathematics

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

DISCRETE MATHEMATICS BA202

Predicate Logic & Quantification

The Foundations: Logic and Proofs. Chapter 1, Part III: Proofs

Logic and Proof. Aiichiro Nakano

Mathacle. PSet ---- Algebra, Logic. Level Number Name: Date: I. BASICS OF PROPOSITIONAL LOGIC

Predicate Logic. Andreas Klappenecker

Sec$on Summary. Valid Arguments Inference Rules for Propositional Logic. Inference Rules for Quantified Statements. Building Arguments

Discrete Mathematics Logics and Proofs. Liangfeng Zhang School of Information Science and Technology ShanghaiTech University

ICS141: Discrete Mathematics for Computer Science I

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

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

1 The Foundation: Logic and Proofs

1 The Foundation: Logic and Proofs

Why Learning Logic? Logic. Propositional Logic. Compound Propositions

Math.3336: Discrete Mathematics. Nested Quantifiers/Rules of Inference

Discrete Mathematics for CS Spring 2006 Forbes HW 1 Solutions

With Question/Answer Animations. Chapter 1, Part III: Proofs

Lecture 4. Predicate logic

Predicate Logic. Example. Statements in Predicate Logic. Some statements cannot be expressed in propositional logic, such as: Predicate Logic

(Refer Slide Time: 02:20)

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

Outline. Rules of Inferences Discrete Mathematics I MATH/COSC 1056E. Example: Existence of Superman. Outline

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

Solutions to Exercises (Sections )

Mat 243 Exam 1 Review

COMP232 - Mathematics for Computer Science

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

First order Logic ( Predicate Logic) and Methods of Proof

Full file at Chapter 1

MATH 22 INFERENCE & QUANTIFICATION. Lecture F: 9/18/2003

Mat2345 Week 2. Chap 1.5, 1.6. Fall Mat2345 Week 2. Chap 1.5, 1.6. Week2. Negation. 1.5 Inference. Modus Ponens. Modus Tollens. Rules.

Agenda. Introduction to Proofs Dr Patrick Chan School of Computer Science and Engineering South China University of Technology

Formal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures

2. Use quantifiers to express the associative law for multiplication of real numbers.

Discrete Mathematics

Review for Midterm 1. Andreas Klappenecker

Propositional Logic Not Enough

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

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

CSI30. Chapter 1. The Foundations: Logic and Proofs Nested Quantifiers

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.

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

DISCRETE MATH: LECTURE Chapter 3.3 Statements with Multiple Quantifiers If you want to establish the truth of a statement of the form

THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DISCRETE MATHMATICS DISCUSSION ECOM Eng. Huda M.

Propositional Functions. Quantifiers. Assignment of values. Existential Quantification of P(x) Universal Quantification of P(x)

Full file at

SRI VENKATESWARA COLLEGE OF ENGINEERING AND TECHNOLOGY MA DISCRETE MATHEMATICS

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

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

CS 2740 Knowledge Representation. Lecture 4. Propositional logic. CS 2740 Knowledge Representation. Administration

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

Proofs: A General How To II. Rules of Inference. Rules of Inference Modus Ponens. Rules of Inference Addition. Rules of Inference Conjunction

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

Proofs. Introduction II. Notes. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Fall 2007

COMP 2600: Formal Methods for Software Engineeing

1.3 Predicates and Quantifiers

Discrete Structures CRN Test 3 Version 1 CMSC 2123 Autumn 2013

Do not start until you are given the green signal

Manual of Logical Style

Section Summary. Section 1.5 9/9/2014

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Predicate Logic Thursday, January 17, 2013 Chittu Tripathy Lecture 04

Chapter 4, Logic using Propositional Calculus Handout

Propositional Logic. Spring Propositional Logic Spring / 32

Lecture Predicates and Quantifiers 1.5 Nested Quantifiers

Math 3336: Discrete Mathematics Practice Problems for Exam I

Rules of Inference. Agenda. Rules of Inference Dr Patrick Chan. p r. p q. q r. Rules of Inference for Quantifiers. Hypothetical Syllogism

Mathematical Reasoning Rules of Inference & Mathematical Induction. 1. Assign propositional variables to the component propositional argument.

ICS141: Discrete Mathematics for Computer Science I

CSE 20 DISCRETE MATH. Winter

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

EECS 1028 M: Discrete Mathematics for Engineers

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1

Logic and Propositional Calculus

Math.3336: Discrete Mathematics. Nested Quantifiers

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

Topic #3 Predicate Logic. Predicate Logic

Transcription:

Review: Potential stumbling blocks Whether the negation sign is on the inside or the outside of a quantified statement makes a big difference! Example: Let T(x) x is tall. Consider the following: x T(x) It is not the case that all people are tall. x T(x) For all people x, it is not the case that x is tall. Note: x T(x) = x T(x) x T(x) Recall: When we push negation into a quantifier, DeMorgan s law says that we need to switch the quantifier! Review: Potential stumbling blocks Let: C(x) x is enrolled in CS441 S(x) x is smart. Question: The following two statements look the same, what s the difference? There is a smart student in CS441. x [C(x) S(x)] x [C(x) S(x)] There exists a student x such that if x is in CS441, then x is smart. Subtle note: The second statement is true if there exists even one smart person on Earth, because F T.

Review: Translation Suppose: Variables x,y denote people L(x,y) denotes "x loves y" Translate: Everybody loves Raymond Everybody loves somebody. There is somebody whom everybody loves. There is somebody who Raymond doesn't love. There is somebody whom no one loves. Everybody loves himself. Review: Evaluate Domain of discourse = positive integers. Let Q(x,y) denote x*x = 2*y Let T(x,y) denote x^2 = x*y Q(4,8) x Q(x,50) x Q(x,x) x y Q(x,y) x y Q(x,y) x y Q(x,y) x y Q(x,y)

Today s topic Rules of inference What have we learned? Where are we going? Propositional logic (representation) Predicate logic (refined representation) Quantifiers (generalization) Inference and proof (deriving new knowledge!)

Writing valid proofs is a subtle art This is called research Step 1: Discover and formalize the property that you wish to prove Step 2: Formalize the ground truths (axioms) that you will use to prove this property Subtle, but not terribly difficult Step 3: Show that the property in question follows from the truth of your axioms Oh, the errors you will make What is science without jargon? A conjecture is a statement that is thought to be true. A proof is a valid argument that establishes the truth of a given statement (i.e., a conjecture) The truth of the conclusion follows from the truth of the preceding statements A sequence of statements ending with a conclusion After a proof has been found for a given conjecture, it becomes a theorem

A tale of two proof techniques In a formal proof, each step of the proof clearly follows from the postulates and axioms assumed in the conjecture. Statements that are assumed to be true In an informal proof, one step in the proof may consist of multiple derivations, portions of the proof may be skipped or assumed correct, and axioms may not be explicitly stated. How can we formalize an argument? Consider the following argument: If you have an account, you can access the network You have an account Therefore, You can access the network Premises Conclusion This argument seems valid, but how can we demonstrate this formally??

Let s analyze the form of our argument p q If you have an account, then you can access the network You have an account Therefore, You can access the network p q p This is called a rule of inference q Rules of inference allow us to make valid arguments Many times, we can determine whether an argument is valid by using a truth table, but this is often a cumbersome approach Instead, we can apply a sequence of rules of inference to draw valid conclusions from a set of premises p q p q

Let s analyze the form of our argument If you have an account, you can access the network You have an account Therefore, You can access the network p q p This form is equivalent to the statement ((p q) p) q q Since ((p q) p) q is a tautology, we know that our argument is valid! Rules of inference are logically valid ways to draw conclusions when constructing a formal proof The previous rule is called modus ponens Rule of inference: p q p q Informally: Given an implication p q, if we know that p is true, then q is also true But why can we trust modus ponens? Tautology: ((p q) p) q Truth table: p q p q T T T T F F F T T F F T Any time that p q and p are both true, q is also true!

There are lots of other rules of inference that we can use! Addition Tautology: p (p V q) Rule of inference: p Example: It is raining now, therefore it is raining now or it is snowing now. Simplification Tautology: p q p Rule of inference: p V q p q p Example: It is cold outside and it is snowing. Therefore, it is cold outside. There are lots of other rules of inference that we can use! Modus tollens Tautology: [ q (p q)] p Rule of inference: p q q p Example: If I am hungry, then I will eat. I am not eating. Therefore, I am not hungry. Hypothetical syllogism Tautology: [(p q) (q r)] (p r) Rule of inference: (p q) (q r) (p r) Example: If I eat a big meal, then I feel full. If I feel full, then I am happy. Therefore, if I eat a big meal, then I am happy.

There are lots of other rules of inference that we can use! Disjunctive syllogism Tautology: [ p (p V q)] q Rule of inference: p q p q Example: Either the heat is broken, or I have a fever. The heat is not broken, therefore I have a fever. Conjunction Tautology: [(p) (q)] (p q) Rule of inference: p q \ (p q) Example: Jack is tall. Jack is skinny. Therefore, Jack is tall and skinny. There are lots of other rules of inference that we can use! Resolution Tautology: [(p V q) ( p V r)] (q V r) Rule of inference: p q p r q r Example: If it is not raining, I will ride my bike. If it is raining, I will lift weights. Therefore, I will either ride my bike or lift weights Special cases: 1. If r = q, we get 2. If r = F, we get p q p q q p q p q

We can use rules of inference to build valid arguments If it is raining, I will stay inside. If am inside, Stephanie will come over. If Stephanie comes over and it is a Saturday, then we will play Scrabble. Today is Saturday. It is raining. Let: r It is raining i I am inside s Stephanie will come over c we will play Scrabble a it is Saturday Hypotheses: r i i s s a c a r We can use rules of inference to build valid arguments Let: r It is raining i I am inside s Stephanie will come over c we will play Scrabble a it is Saturday Hypotheses: r i i s s a c a r Step: 1. r i hypothesis 2. i s hypothesis 3. r s hypothetical syllogism with 1 and 2 4. r hypothesis 5. s modus ponens with 3 and 4 6. a hypothesis 7. s a conjunction of 5 and 6 8. s a c hypothesis 9. c modus ponens with 7 and 8 I will play Scrabble!

We also have rules of inference for statements with quantifiers Universal Instantiation Intuition: If we know that P(x) is true for all x, then P(c) is true for a particular c Rule of inference: x P(x) P(c) Universal Generalization Intuition: If we can show that P(c) is true for an arbitrary c, then we can conclude that P(x) is true for any x Rule of inference: P(c) xp(x) Note that arbitrary does not mean randomly chosen. It means that we cannot make any assumptions about c other than the fact that it comes from the appropriate domain. We also have rules of inference for statements with quantifiers Existential Instantiation Intuition: If we know that P(x) is true, then we know that P(c) is true for some c Rule of inference: x P(x) P(c) Again, we cannot make assumptions about c other than the fact that it exists and is from the appropriate domain. Existential Generalization Intuition: If we can show that P(c) is true for a particular c, then we can conclude that P(x) is true Rule of inference: P(c) xp(x)

Hungry dogs redux M(Kody) Given: Kody is one of my dogs Given: All of my dogs like peanut butter M(x) P(x) 1. x [M(x) P(x)] hypothesis 2. M(Kody) hypothesis 3. M(Kody) P(Kody) universial instantiation from 1 4. P(Kody) modus ponens from 2 and 3 Reasoning about our class Show that the premises A student in this class has not read the book and everyone in this class turned in HW1 imply the conclusion Someone who turned in HW1 has not read the book. Let: C(x) x is in this class B(x) x has read the book T(x) x turned in HW1 Premises: x [C(x) B(x)] x [C(x) T(x)]

Reasoning about our class Let: C(x) x is in this class B(x) x has read the book T(x) x turned in HW1 Premises: x [C(x) B(x)] x [C(x) T(x)] Steps: 1. x [C(x) B(x)]hypothesis 2. C(a) B(a) existential instantiation from 1 3. C(a) simplification from 2 4. x [C(x) T(x)]hypothesis 5. C(a) T(a) universal instantiation from 4 6. T(a) modus ponens from 5 and 3 7. B(a) simplification from 2 8. T(a) B(a) conjunction of 6 and 7 9. x [T(x) B(x)]existential generalization from 8 Group work! Problem 1: Which rules of inference were used to make the following arguments? Kangaroos live in Australia and are marsupials. Therefore, kangaroos are marsupials. Linda is an excellent swimmer. If Linda is an excellent swimmer, then she can work as a lifeguard. Therefore, Linda can work as a lifeguard. Problem 2: Show that the premises Everyone in this discrete math class has taken a course in computer science and Melissa is a student in this discrete math class lead to the conclusion Melissa has taken a course in computer science.

We can t always use formal proof techniques Formal proofs are precise and easy for machines to construct but are often tedious for humans to construct, interpret, or verify. Result: Most mathematical proofs are actually constructed using informal proof techniques! Another Example 1. It is not sunny this afternoon and it is colder than yesterday. 2. We will go swimming only if it is sunny. 3. If we do not go swimming then we will take a canoe trip. 4. If we take a canoe trip, then we will be home by sunset. Prove: We will be home by sunset.

What are the characteristics of an informal proof? In an informal proof The statements making up the proof are typically not written in any formal language (e.g., propositional logic) Steps of the proof and derivations are often argued using English or mathematical formulas Multiple derivations may occur in a single step Axioms are often not all stated up front As a result, it is sometimes easy to make mistakes writing informal proofs. Final Thoughts Until today, we had look at representing different types of logical statements Rules of inference allow us to derive new results by reasoning about known truths Next lecture: Proof techniques