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

Similar documents
def: An axiom is a statement that is assumed to be true, or in the case of a mathematical system, is used to specify the system.

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

DISCRETE MATH: LECTURE 3

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

Handout #1: Mathematical Reasoning

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Math 3000 Section 003 Intro to Abstract Math Homework 2

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Logic in general. Inference rules and theorem proving

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

Beyond Propositional Logic Lukasiewicz s System

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

3. Mathematical Induction

CHAPTER 7 GENERAL PROOF SYSTEMS

Chapter 1. Use the following to answer questions 1-5: In the questions below determine whether the proposition is TRUE or FALSE

Predicate Logic. For example, consider the following argument:

Hypothetical Syllogisms 1

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

Logic Appendix. Section 1 Truth Tables CONJUNCTION EXAMPLE 1

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

1.2 Forms and Validity

Solutions Q1, Q3, Q4.(a), Q5, Q6 to INTLOGS16 Test 1

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

Invalidity in Predicate Logic

A Few Basics of Probability

Formal Engineering for Industrial Software Development

The last three chapters introduced three major proof techniques: direct,

Lecture 13 of 41. More Propositional and Predicate Logic

The Mathematics of GIS. Wolfgang Kainz

Examination paper for MA0301 Elementær diskret matematikk

p: I am elected q: I will lower the taxes

CS510 Software Engineering

INTRODUCTORY SET THEORY

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

PHILOSOPHY 101: CRITICAL THINKING

Gödel s Ontological Proof of the Existence of God

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

6.080/6.089 GITCS Feb 12, Lecture 3

If an English sentence is ambiguous, it may allow for more than one adequate transcription.

Boolean Design of Patterns

Lecture 16 : Relations and Functions DRAFT

Introduction to Logic: Argumentation and Interpretation. Vysoká škola mezinárodních a veřejných vztahů PhDr. Peter Jan Kosmály, Ph.D

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

A Logic Study Guide Structure of English, 2006

The History of Logic. Aristotle ( BC) invented logic.

Mathematical Induction

Logic and Reasoning Practice Final Exam Spring Section Number

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Conjunction is true when both parts of the statement are true. (p is true, q is true. p^q is true)

Formalization of the CRM: Initial Thoughts

Copyright 2012 MECS I.J.Information Technology and Computer Science, 2012, 1, 50-63

Sentence Semantics. General Linguistics Jennifer Spenader, February 2006 (Most slides: Petra Hendriks)

Digital Design Verification

COURSE DESCRIPTION FOR THE COMPUTER INFORMATION SYSTEMS CURRICULUM

Basic Proof Techniques

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

P1. All of the students will understand validity P2. You are one of the students C. You will understand validity

Development of a computer system to support knowledge acquisition of basic logical forms using fairy tale "Alice in Wonderland"

196 Chapter 7. Logical Agents

15-381: Artificial Intelligence. Probabilistic Reasoning and Inference

Math Week in Review #4. A proposition, or statement, is a declarative sentence that can be classified as either true or false, but not both.

Logic in Computer Science: Logic Gates

Logical Agents. Explorations in Artificial Intelligence. Knowledge-based Agents. Knowledge-base Agents. Outline. Knowledge bases

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

Predicate Logic Review

CSE 459/598: Logic for Computer Scientists (Spring 2012)

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

Cartesian Products and Relations

Automated Theorem Proving - summary of lecture 1

10.4 Traditional Subject Predicate Propositions

High School Geometry Test Sampler Math Common Core Sampler Test

Math 55: Discrete Mathematics

Computer-Assisted Theorem Proving for Assuring the Correct Operation of Software

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

So let us begin our quest to find the holy grail of real analysis.

A Tutorial Program for Propositional Logic with Human/Computer Interactive Learning

Geometry Chapter 2 Study Guide

DEDUCTIVE & INDUCTIVE REASONING

Vocabulary. Term Page Definition Clarifying Example. biconditional statement. conclusion. conditional statement. conjecture.

Introduction to formal semantics -

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

Formal Software Development

1 Propositions. mcs-ftl 2010/9/8 0:40 page 5 #11. Definition. A proposition is a statement that is either true or false.

CS 3719 (Theory of Computation and Algorithms) Lecture 4

EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * ABSTRACT

InvGen: An Efficient Invariant Generator

alternate interior angles

Logic is a systematic way of thinking that allows us to deduce new information

Formal Logic, Algorithms, and Incompleteness! Robert Stengel! Robotics and Intelligent Systems MAE 345, Princeton University, 2015

Lecture 2: Moral Reasoning & Evaluating Ethical Theories

Computational Logic and Cognitive Science: An Overview

Correspondence analysis for strong three-valued logic

Introducing Formal Methods. Software Engineering and Formal Methods

Reasoning and Proof Review Questions

ON ADDING A CRITICAL THINKING MODULE TO A DISCRETE STRUCTURES COURSE *

Transcription:

Discrete Math Review Discrete Math Review (Rosen, Chapter 1.1 1.6) TOPICS Propositional Logic Logical Operators Truth Tables Implication Logical Equivalence Inference Rules What you should know about propositional and predicate logic before the next midterm! Less theory, more problem solving, will be repeated in recitation and homework. 10/1/12 CS160 Fall Semester 2012 2 Propositional Logic A proposition is a statement that is either true or false Examples: Fort Collins is in Nebraska (false) Java is case sensitive (true) We are not alone in the universe (?) Every proposition is true or false, but its truth value may be unknown Logical Operators logical not (negation) logical or (disjunction) logical and (conjunction) logical exclusive or logical implication (conditional) logical bi-implication (biconditional) 10/1/12 CS160 Fall Semester 2012 3 10/1/12 CS160 Fall Semester 2012 4 1

Truth Tables p q p q T T T T F F F T F F F F p q p q T T T T F F F T T F F T (1) You should be able to write out the truth table for all logical operators, from memory. 10/1/12 CS160 Fall Semester 2012 5 Compound Propositions Propositions and operators can be combined into compound propositions. (2) You should be able to make a truth table for any compound proposition: p q p p q p (p q) T T F T F T F F F F F T T T T F F T T T 10/1/12 CS160 Fall Semester 2012 6 (3) You should be able to translate natural language to logic (can be ambiguous!): English: If the car is out of gas, then it will stop Logic: English to Propositional Logic p equals the car is out of gas q equals the car will stop p q Propositional Logic to English (4) You should be able to translate propositional logic to natural language: Logic: p equals it is raining p q English: q equals the grass will be wet If it is raining, the grass will be wet. 10/1/12 CS160 Fall Semester 2012 7 10/1/12 CS160 Fall Semester 2012 8 2

Logical Equivalences: Definition Certain propositions are equivalent (meaning they share exactly the same truth values): For example: (p q) p q De Morgan s (p T) p Identity Law (p p) F Negation Law Logical Equivalences: Truth Tables (5) And you should know how to prove logical equivalence with a truth table For example: (p q) p q p q p q (p q) (p q) p q T T F F T F F T F F T F T T F T T F F T T F F T T F T T 10/1/12 CS160 Fall Semester 2012 9 10/1/12 CS160 Fall Semester 2012 10 Logical Equivalences: Review (6) You should understand the logical equivalences and laws on the course web site. You should be able to prove any of them using a truth table that compares the truth values of both sides of the equivalence. Memorization of the logical equivalences is not required in this class. Logical Equivalences (Rosen) 10/1/12 CS160 Fall Semester 2012 11 10/1/12 CS160 Fall Semester 2012 12 3

Transformation via Logical Equivalences Vocabulary (7) You should be able to transform propositions using logical equivalences. Prove: p (p q) (p q) p (p q) ( p p) ( p q) T ( p q) ( p q) (p q) Distributive law Negation law Domination law De Morgan s Law 10/1/12 CS160 Fall Semester 2012 13 (8) You should memorize the following vocabulary: A tautology is a compound proposition that is always true. A contradiction is a compound proposition that is always false. A contingency is neither a tautology nor a contradiction. And know how to decide the category for a compound proposition. 10/1/12 CS160 Fall Semester 2012 14 Examples Logical Proof p p p p p p T F T F F T T F Result is always true, no matter what A is Therefore, it is a tautology Result is always false, no matter what A is Therefore, it is a contradiction Given a set of axioms Statements asserted to be true Prove a conclusion Another propositional statement In other words: Show that the conclusion is true whenever the axioms are true 10/1/12 CS160 Fall Semester 2012 15 10/1/12 CS160 Fall Semester 2012 16 4

Logical Proof (9) You should be able to perform a logical proof via truth tables. (10) You should be able to perform a logical proof via inference rules. Both methods are described in the following slides. Method 1: Proof by Truth Table Prove that p q, given p p q p p q T T F T T F F F F T T T F F T T For all rows in which axiom is true, conclusion is true Thus the conclusion follows from axiom 10/1/12 CS160 Fall Semester 2012 17 10/1/12 CS160 Fall Semester 2012 18 Method 2: Proof using Rules of Inference A rule of inference is a proven relation: when the left hand side (LHS) is true, the right hand side (RHS) is also true. Therefore, if we can match an axiom to the LHS by substituting propositions, we can assert the (substituted) RHS Applying rules of inference Example rule: p, p q q Read as p and p q, therefore q This rule has a name: modus ponens If you have axioms r, r s Substitute r for p, s for q Apply modus ponens Conclude s 10/1/12 CS160 Fall Semester 2012 19 10/1/12 CS160 Fall Semester 2012 20 5

Modus Ponens If p, and p implies q, then q Example: p = it is sunny, q = it is hot p q, it is hot whenever it is sunny Given the above, if it is sunny, it must be hot. Modus Tollens If not q and p implies q, then not p Example: p = it is sunny, q = it is hot p q, it is hot whenever it is sunny Given the above, if it is not hot, it cannot be sunny. 10/1/12 CS160 Fall Semester 2012 21 10/1/12 CS160 Fall Semester 2012 22 Rules of Inference (Rosen) A Simple Proof: Problem Statement Example of a complete proof using inference rules, from English to propositional logic and back: If you don t go to the store, then you cannot not cook dinner. (axiom) If you cannot cook dinner or go out, you will be hungry tonight. (axiom) You are not hungry tonight, and you didn t go to the store. (axiom) You must have gone out to dinner. (conclusion) 10/1/12 CS160 Fall Semester 2012 23 10/1/12 CS160 Fall Semester 2012 24 6

A Simple Proof: Logic Translation A Simple Proof: Applying Inference p: you go to the store q: you can cook dinner r: you will go out s: you will be hungry AXIOMS: p q, (q r) s, s, p CONCLUSION: r p q, (q r) s, s, p p, p q q modus ponens s, (q r) s q r modus tollens q, q r r disjunctive syllogism CONCLUSION: r You must have gone out to dinner! 10/1/12 CS160 Fall Semester 2012 25 10/1/12 CS160 Fall Semester 2012 26 Predicate Logic Predicate Logic (cont d) (11) You should recognize predicate logic symbols, i.e. quantifications. Quantification express the extent to which a predicate is true over a set of elements: Universal, for all Existential, there exists (12) You should able to translate between predicate logic and English, in both directions. Specifies a proposition (and optionally a domain), for example: x N, -10 < x < -5 x N, x > -1 // False, since no negative x // True, since no negative x Predicate logic has similar equivalences and inference rules (De Morgan s): x: P(x) = x : P(x) // True for all = false for none x: P(x) = x : P(x) // Not true for all = false for some 10/1/12 CS160 Fall Semester 2012 27 10/1/12 CS160 Fall Semester 2012 28 7