Predicate Logic & Proofs Lecture 3

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

If n is odd, then 3n + 7 is even.

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

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

Predicate Logic. For example, consider the following argument:

Math 3000 Section 003 Intro to Abstract Math Homework 2

3. Mathematical Induction

WRITING PROOFS. Christopher Heil Georgia Institute of Technology

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.

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

DISCRETE MATH: LECTURE 3

Solutions for Practice problems on proofs

Handout #1: Mathematical Reasoning

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

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

Full and Complete Binary Trees

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

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

Lecture 16 : Relations and Functions DRAFT

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

Basic Proof Techniques

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

3. Logical Reasoning in Mathematics

Indiana State Core Curriculum Standards updated 2009 Algebra I

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

Mathematical Induction. Lecture 10-11

Variables in Mathematics Education

Examination paper for MA0301 Elementær diskret matematikk

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

Answer Key for California State Standards: Algebra I

Copy in your notebook: Add an example of each term with the symbols used in algebra 2 if there are any.

Math 55: Discrete Mathematics

SECTION 10-2 Mathematical Induction

CS 103X: Discrete Structures Homework Assignment 3 Solutions

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

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

of Nebraska - Lincoln

PUTNAM TRAINING POLYNOMIALS. Exercises 1. Find a polynomial with integral coefficients whose zeros include

An Innocent Investigation

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

A Second Course in Mathematics Concepts for Elementary Teachers: Theory, Problems, and Solutions

s = s = s =

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

Welcome to Math Video Lessons. Stanley Ocken. Department of Mathematics The City College of New York Fall 2013

Lecture Notes on Polynomials

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Mathematical Induction

Solutions to Homework 6 Mathematics 503 Foundations of Mathematics Spring 2014

PYTHAGOREAN TRIPLES KEITH CONRAD

Properties of Real Numbers

A Few Basics of Probability

Solving Rational Equations

Real Roots of Univariate Polynomials with Real Coefficients

Math 223 Abstract Algebra Lecture Notes

Integer roots of quadratic and cubic polynomials with integer coefficients

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

1.3 Polynomials and Factoring

Mathematical Induction. Mary Barnes Sue Gordon

Mathematical Induction

WHAT ARE MATHEMATICAL PROOFS AND WHY THEY ARE IMPORTANT?

Curriculum Alignment Project

Undergraduate Notes in Mathematics. Arkansas Tech University Department of Mathematics

2.1. Inductive Reasoning EXAMPLE A

2.1 Increasing, Decreasing, and Piecewise Functions; Applications

5.1 Radical Notation and Rational Exponents

Solutions Manual for How to Read and Do Proofs

Predicate Logic Review

Applications of Fermat s Little Theorem and Congruences

6.2 Permutations continued

3.1. RATIONAL EXPRESSIONS

Chapter 7. Functions and onto. 7.1 Functions

Cubes and Cube Roots

6.080/6.089 GITCS Feb 12, Lecture 3

23. RATIONAL EXPONENTS

This is a square root. The number under the radical is 9. (An asterisk * means multiply.)

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

Basic Set Theory. 1. Motivation. Fido Sue. Fred Aristotle Bob. LX Semantics I September 11, 2008

Algebra I. In this technological age, mathematics is more important than ever. When students

Sample Induction Proofs

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Pigeonhole Principle Solutions

Order of Operations More Essential Practice

Incenter Circumcenter

Invalidity in Predicate Logic

Question: What is the probability that a five-card poker hand contains a flush, that is, five cards of the same suit?

INTRODUCTORY SET THEORY

Math 4310 Handout - Quotient Vector Spaces

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Math 115 Spring 2011 Written Homework 5 Solutions

1.6 The Order of Operations

6 EXTENDING ALGEBRA. 6.0 Introduction. 6.1 The cubic equation. Objectives

CONTENTS 1. Peter Kahn. Spring 2007

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

Student Outcomes. Lesson Notes. Classwork. Discussion (10 minutes)

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

Lecture 13 - Basic Number Theory.

Cartesian Products and Relations

CS510 Software Engineering

Continued Fractions and the Euclidean Algorithm

Transcription:

Topics for Today Necessary & sufficient conditions, Only if, If and only if CPRE 310 Discrete Mathematics Predicate Logic & Proofs Lecture 3 Quantified statements: predicates, quantifiers, truth values, negations Arguments with quantified statements Introduction to mathematical proof Homework & Quiz 2 Problems: Page 46-48: 5, 9, 11, 39, 55 Page 72-74: 3, 9, 19, 23 Page 85: 5, 7, 11, 17 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 2 Necessary and Sufficient Conditions Ex: What do the following sentences mean? Passing all the tests is a sufficient condition for passing the course. If a person passes all the tests, then the person will pass the course. Passing all the tests is a necessary condition for passing the course. If a person doesn t pass all the tests, then the person won t pass the course. Or: If a person passes the course, then the person will have passed all the tests. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 3 Definition A is a sufficient condition for B means if A then B (The occurrence of A guarantees the occurrence of B.) A is a necessary condition for B means if ~A then ~B (If A didn t occur, then B didn t occur either.) Or, equivalently, it means if B then A (If B occurred then A also had to occur.) January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 4 Class Exercises Write each of the following using if-then statements: 1. Making it to the final four is a necessary condition for the Blue Demons to win the championship. 2. Being appropriately dressed for a job interview is necessary (but not sufficient) for getting the job. 3. Getting all A's is sufficient (but not necessary) for graduating with honors. 4. Suppose a teacher says: Getting 100% correct on all the exams is both necessary and sufficient for earning an A in the course. What does this mean? Exercises, continued Write each of the following using if-then statements: 1. Making it to the final four is a necessary condition for the Blue Demons to win the championship. If the B.D. don t make it to the final four, they won t win the championship. If the B.D. win the championship, then they made it to the final four. 2. Being appropriately dressed for a job interview is necessary (but not sufficient) for getting the job. If a person is not appropriately dressed for a job interview, then the person won t get the job, but it can happen that a person is appropriately dressed and still doesn t get the job. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 5 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 6 1

Only if and the Biconditional 3. Getting all A's is sufficient (but not necessary) for graduating with honors. If a person gets all A s then they will graduate with honors, but it s possible to graduate with honors even if a person doesn t get all A s. 4. Suppose a teacher says: Getting 100% correct on all the exams is both necessary and sufficient for earning an A in the course. What does this mean? If a person earns an A in the course, then the person got 100% correct on all the exams, and if a person got 100% correct on all the exams, then the person got an A in the course. Ex: Write the following as an if-then statement: The Blue Demons will win the championship only if they make it to the final four. If the B.D. do not make it to the final four, then they will not win the championship. Or : If the B.D. win the championship, then they will have made it to the final four. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 7 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 8 Definition: Only If r only if s means if ~s then ~r (If s didn t occur, then r didn t occur either.) Or, equivalently, if r then s (If r occurred then s also had to occur.) Interpretation of If and Only If So: r only if s means if r then s and r if s means if s then r Thus: r if and only if s means r only if s and which means if r then s and r if s if s then r Fact: r s (r s) (s r) January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 9 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 10 Quantified Statements What is a predicate? A sentence that is not a statement but contains one or more variables and becomes a statement if specific values are substituted for the variables. The domain of a predicate variable is the set of allowable values for the variable. Ex: Let P(x) be the sentence x 2 > 4 where the domain of x is understood to be the set of all real numbers. Then P(x) is a predicate. Question: For what numbers x is P(x) true? Ans: The set of all real numbers for which x > 2 or x < -2. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 11 Truth Set of a Predicate The truth set of a predicate P(x) is the set of elements in the domain D of x for which P(x) is true. We write truth set of P(x) = {x D P(x)} and we read this as the set of all x in D such that P of x Note: The vertical line denotes the words such that for the set-bracket notation only. In other contexts, the words such that are symbolized by s.t. or s. th. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 12 2

Quantifiers How do we read the symbol? for all What is this symbol called? the universal quantifier How do we read the symbol? there exists What is this symbol called? the existential quantifier Consider: students x in this class, x has studied calculus. What would make this true? false? Also consider: a student x in this class such that x has studied calculus. What would make this true? false? January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 13 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 14 Truth Values of Universal and Existential Statements Class Exercises Universal statement: x in D, Q(x) is true if, and only if, Q(x) is true for each individual x in D. It is false if, and only if, Q(x) is false for at least one x in D. A value of x for which Q(x) is false is called a counterexample to the statement x in D, Q(x). Existential statement: x in D such that Q(x) is true if, and only if, Q(x) is true for at least one x in D. It is false if, and only if, Q(x) is false for each individual x in D. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 15 Indicate, if possible, which of the following statements are true and which are false, and rewrite them formally using a quantifier and a variable: 1. All even integers are positive. (False: -2 is a counterexample; it is even but not positive.) even integers n, n is positive. integers n, if n is even, then n is positive. n, if n is an even integer, then n is positive. 2. Some integers have integer square roots. (True: The number 4 has a square root of 2, which is an integer) an integer n such that n has an integer square root. n such that n is an integer and n has an integer square root. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 16 More Class Exercises Indicate, if possible, which of the following statements are true and which are false, and rewrite them formally using a quantifier and a variable: 3. No prime numbers are even. (False: The number 2 is even and prime.) prime numbers p, p is not even. integers p, if p is prime then p is not even. 4. If a person is a student in this class, then that person is at least 18 years old. (Implicit Quantification) (True?) people P, if P is a student in this class then P is at least 18 years old. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 17 Universal Conditional Statements Definition: Any statement of the following form is called a universal conditional statement: x in D, if P(x) then Q(x). January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 18 3

Example real numbers x, if x > 2 then x 2 > 4. More formal versions: 1. x R, if x > 2 then x 2 > 4. (R denotes the set of all real numbers) 2. x > 2 x 2 > 4. Notation: The symbol denotes a universalized if-then. So x > 2 x 2 > 4 means x R, x > 2 x 2 > 4 Quantified Statements Set Notation: x A means that x is an element of the set A, or x is in A. Important sets: R, the set of all real numbers (on paper: ) Q, the set of all rational numbers (on paper: ) Z, the set of all integers (on paper: ) R +, the set of all positive real numbers Z nonneg, the set of all nonnegative integers Etc. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 19 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 20 Negations of Quantified Statements Summary Write negations for the following statements. 1. students x in this class, x is at least 30 years old. Negation: a student x in this class such that x is less than 30 years old. 2. a student x in this class such that x is at least 70 years old. Negation: students x in this class, x is less than 70 years old. ( x in D, P(x)) x in D such that P(x) ( x in D such that P(x)) x in D, P(x) Note that the negation of a for all statement is a there exists statement, and the negation of a there exists statement is a for all statement. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 21 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 22 More Negations 3. real numbers x, x 2 > 0. x R, x 2 > 0. x, if x R, then x 2 > 0. x R x 2 > 0 Negation: a real number x such that x 2 0. Or: x R such that x 2 0. 4. a real number x such that x 2 = -1. x R such that x 2 = -1. x such that x R and x 2 = -1. Negation: real numbers x, x 2-1. Or: x R, x 2-1. Question ( x in D, if P(x) then Q(x))? x in D such that P(x) and ~Q(x) Ex: Write a negation for the following statement: real numbers x, if x 2 > 4 then x > 2. x R, if x 2 > 4 then x > 2. Negation: a real number x such that x 2 > 4 and x 2. Or: x R such that x 2 > 4 and x 2. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 23 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 24 4

A Weird Example Arguments with Quantified Statements True or false? All the elephants on this desk have two heads. What is the negation? Is there an elephant on this desk?? This statement is not false; so it has to be true! We call this vacuous truth or say that the statement is true by default. Universal instantiation: If a property is true for all the elements in a set, then it is true for each individual element of the set. Ex: For all real numbers a, b, and c, a(b + c) = ab + ac. Thus: 7 106 = 7(100 + 6) = 7 100 + 7 6 (= 742) And: If k is a real number, then 2 k 3 + 2 k 5 = 2 k (3 + 5) (= 2 k 8 = 2 k 2 3 = 2 k +3 ) January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 25 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 26 Universal M.P. and M.T. Universal Modus Ponens: Ex: All men are mortal. ( x, if x is a man then x is mortal. So by universal instantiation: If Socrates is a man then Socrates is mortal.) Socrates is a man. Socrates is mortal. Universal Modus Tollens: Ex: All men are mortal. (So: If Zeus is a man then Zeus is mortal.) Zeus is not mortal. Zeus is not a man. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 27 Introduction to Number Theory and Methods of Proof Assumptions: Properties of the real numbers (Appendix A) basic algebra Logic Properties of equality: A = A If A = B, then B = A. If A = B and B = C, then A = C. Integers are 0, 1, 2, 3,, -1, -2,. Any sum, difference, or product of integers is an integer. Notation: refers to the universalized if and only if January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 28 Definition of Even and Odd An integer is even it can be expressed as 2 times some integer. An integer is odd it can be expressed as 2 times some integer plus 1. What it means for a definition to be : If an integer, say n, is even then an integer, say k, such that n = 2k, AND If an integer, say n, can be expressed as 2k, for some integer k, then n is even. Class Exercise Question: If k is an integer, is 2k 1 an odd integer? Reference: An integer is odd it can be expressed as 2 times some integer plus 1. Scratch work: Answer: Yes. Want: 2k 1 = 2( ) + 1 Note that k 1 is an integer because it is a difference of an integer integers. And Call the integer m. So we want: 2k 1 = 2m + 1 2(k 1) + 1 = 2k 2 + 1 2k 2 = 2m = 2k 1 k 1 = m January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 29 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 30 5

Question Some people say that an integer is even if it equals 2k. Are they right? Is 1 an even number? Let s Prove! Question: Is the sum of an even integer plus an odd integer always even? always odd? sometimes even and sometimes odd? Does 1 = 2k? 1 Yes: 1= 2 ( ) 2 So it s pretty important for k to be an integer! January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 31 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 32 Proving a Universal Statement Direct Proof Method of Generalizing from the Generic Particular: If a property can be shown to be true for a particular but arbitrarily chosen element of a set, then it is true for every element of the set. Direct Proof: Based on the Method of Generalizing from the Generic Particular To prove a statement of the form x in D, if <hypothesis> then <conclusion>, suppose x is a particular but arbitrarily chosen element in D such that <hypothesis> is true, and show that <conclusion> is true. January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 33 January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 34 Prove: integers x and y, if x is even and y is odd, then x + y is odd. Proof: Suppose x and y are any [particular but arbitrarily chosen] integers such that x is even and y is odd. [We must show that x + y is odd.] By definition of even and odd, x = 2a and y = 2b + 1 for some integers a and b. Then x + y = 2a + (2b +1) by substitution = 2(a + b ) + 1 by algebra. Let t = a + b. Then t is an integer because it is a sum of integers. Hence x + y = 2t + 1, where t is an integer, and thus by definition of odd, x + y is odd. [This is what we needed to show, and so we are done.] QED (QED stands for quod erat demonstrandum, Latin for which was to be shown. ) January 20, 2009 Lecture Notes Copyright 2009 S.C. Kothari all rights reserved. 35 6