fall 2002cmsc 203 - discrete structures1 let’s proceed to… mathematical reasoning

22
Fall 2002 CMSC 203 - Discrete Structures 1 Let’s proceed to… Let’s proceed to… Mathematical Mathematical Reasoning Reasoning

Upload: samson-roberts

Post on 23-Dec-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 1

Let’s proceed to…Let’s proceed to…

Mathematical Mathematical ReasoningReasoning

Page 2: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 2

Mathematical ReasoningMathematical Reasoning

We need We need mathematical reasoningmathematical reasoning to to

• determine whether a mathematical determine whether a mathematical argument is argument is correct or incorrect and correct or incorrect and• construct mathematical arguments.construct mathematical arguments.

Mathematical reasoning is not only important Mathematical reasoning is not only important for conducting for conducting proofsproofs and and program program verificationverification, but also for , but also for artificial artificial intelligenceintelligence systems (drawing inferences). systems (drawing inferences).

Page 3: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 3

TerminologyTerminology

An An axiomaxiom is a basic assumption about is a basic assumption about mathematical structured that needs no proof.mathematical structured that needs no proof.

We can use a We can use a proofproof to demonstrate that a to demonstrate that a particular statement is true. A proof consists of a particular statement is true. A proof consists of a sequence of statements that form an argument.sequence of statements that form an argument.

The steps that connect the statements in such a The steps that connect the statements in such a sequence are the sequence are the rules of inferencerules of inference..

Cases of incorrect reasoning are called Cases of incorrect reasoning are called fallaciesfallacies..

A A theoremtheorem is a statement that can be shown to is a statement that can be shown to be true. be true.

Page 4: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 4

TerminologyTerminology

A A lemmalemma is a simple theorem used as an is a simple theorem used as an intermediate result in the proof of another intermediate result in the proof of another theorem.theorem.

A A corollarycorollary is a proposition that follows is a proposition that follows directly from a theorem that has been proved.directly from a theorem that has been proved.

A A conjectureconjecture is a statement whose truth is a statement whose truth value is unknown. Once it is proven, it value is unknown. Once it is proven, it becomes a theorem.becomes a theorem.

Page 5: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 5

Rules of InferenceRules of Inference

Rules of inferenceRules of inference provide the justification of provide the justification of the steps used in a proof.the steps used in a proof.

One important rule is called One important rule is called modus ponensmodus ponens or the or the law of detachmentlaw of detachment. It is based on the . It is based on the tautology tautology (p(p(p(pq)) q)) q. We write it in the following way: q. We write it in the following way:

ppp p q q________ qq

The two The two hypotheseshypotheses p and p p and p q are q are

written in a column, and the written in a column, and the conclusionconclusionbelow a bar, where below a bar, where means means “therefore”.“therefore”.

Page 6: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 6

Rules of InferenceRules of Inference

The general form of a rule of inference is:The general form of a rule of inference is:

pp11

pp22 .. .. .. ppnn________ qq

The rule states that if pThe rule states that if p11 andand p p22 andand … … andand p pnn are all true, then q is true as are all true, then q is true as well.well.

These rules of inference can be used These rules of inference can be used in any mathematical argument and do in any mathematical argument and do not not require any proof.require any proof.

Page 7: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 7

Rules of InferenceRules of Inference

pp__________ ppqq AdditionAddition

ppqq__________ pp SimplificatioSimplificatio

nn

pp qq__________ ppqq

ConjunctionConjunction

qq ppq q __________ pp

Modus Modus tollenstollens

ppqq qqr r __________ ppr r

Hypothetical Hypothetical syllogismsyllogism

ppqq pp__________ q q

Disjunctive Disjunctive syllogismsyllogism

Page 8: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 8

ArgumentsArguments

Just like a rule of inference, an Just like a rule of inference, an argument argument consists of one or more hypotheses and a consists of one or more hypotheses and a conclusion. conclusion.

We say that an argument isWe say that an argument is valid valid, if whenever , if whenever all its hypotheses are true, its conclusion is all its hypotheses are true, its conclusion is also true.also true.

However, if any hypothesis is false, even a However, if any hypothesis is false, even a valid argument can lead to an incorrect valid argument can lead to an incorrect conclusion. conclusion.

Page 9: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 9

ArgumentsArgumentsExample:Example:

““If 101 is divisible by 3, then 101If 101 is divisible by 3, then 10122 is divisible is divisible by 9. 101 is divisible by 3. Consequently, 101by 9. 101 is divisible by 3. Consequently, 10122 is divisible by 9.”is divisible by 9.”

Although the argument is Although the argument is validvalid, its conclusion , its conclusion is is incorrectincorrect, because one of the hypotheses is , because one of the hypotheses is false (“101 is divisible by 3.”).false (“101 is divisible by 3.”).

If in the above argument we replace 101 with If in the above argument we replace 101 with 102, we could correctly conclude that 102102, we could correctly conclude that 10222 is is divisible by 9.divisible by 9.

Page 10: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 10

ArgumentsArgumentsWhich rule of inference was used in the last Which rule of inference was used in the last argument?argument?

p: “101 is divisible by 3.”p: “101 is divisible by 3.”

q: “101q: “10122 is divisible by 9.” is divisible by 9.”

pp ppq q __________ qq

Modus Modus ponensponens

Unfortunately, one of the hypotheses (p) is Unfortunately, one of the hypotheses (p) is false.false.Therefore, the conclusion q is incorrect.Therefore, the conclusion q is incorrect.

Page 11: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 11

ArgumentsArguments

Another example:Another example:

““If it rains today, then we will not have a If it rains today, then we will not have a barbeque today. If we do not have a barbeque barbeque today. If we do not have a barbeque today, then we will have a barbeque today, then we will have a barbeque tomorrow.tomorrow.Therefore, if it rains today, then we will have a Therefore, if it rains today, then we will have a barbeque tomorrow.”barbeque tomorrow.”

This is a This is a validvalid argument: If its hypotheses are argument: If its hypotheses are true, then its conclusion is also true.true, then its conclusion is also true.

Page 12: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 12

ArgumentsArguments

Let us formalize the previous argument:Let us formalize the previous argument:

p: “It is raining today.”p: “It is raining today.”

q: “We will not have a barbecue today.”q: “We will not have a barbecue today.”

r: “We will have a barbecue tomorrow.”r: “We will have a barbecue tomorrow.”

So the argument is of the following form:So the argument is of the following form:

ppqq qqr r __________ ppr r

Hypothetical Hypothetical syllogismsyllogism

Page 13: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 13

ArgumentsArguments

Another example:Another example:

Gary is either intelligent or a good actor.Gary is either intelligent or a good actor.If Gary is intelligent, then he can count If Gary is intelligent, then he can count from 1 to 10.from 1 to 10.Gary can only count from 1 to 2.Gary can only count from 1 to 2.Therefore, Gary is a good actor.Therefore, Gary is a good actor.

i: “Gary is intelligent.”i: “Gary is intelligent.”a: “Gary is a good actor.”a: “Gary is a good actor.”c: “Gary can count from 1 to 10.”c: “Gary can count from 1 to 10.”

Page 14: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 14

ArgumentsArguments

i: “Gary is intelligent.”i: “Gary is intelligent.”a: “Gary is a good actor.”a: “Gary is a good actor.”c: “Gary can count from 1 to 10.”c: “Gary can count from 1 to 10.”

Step 1:Step 1: cc HypothesisHypothesisStep 2:Step 2: i i c c HypothesisHypothesisStep 3:Step 3: i i Modus tollens Steps 1 & 2Modus tollens Steps 1 & 2Step 4:Step 4: a a i i HypothesisHypothesisStep 5:Step 5: a a Disjunctive SyllogismDisjunctive Syllogism

Steps 3 & 4Steps 3 & 4

Conclusion: Conclusion: aa (“Gary is a good actor.”) (“Gary is a good actor.”)

Page 15: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 15

ArgumentsArguments

Yet another example:Yet another example:

If you listen to me, you will pass CS 320.If you listen to me, you will pass CS 320.You passed CS 320.You passed CS 320.Therefore, you have listened to me.Therefore, you have listened to me.

Is this argument valid?Is this argument valid?

NoNo, it assumes ((p, it assumes ((pq)q) q) q) p. p.

This statement is not a tautology. It is This statement is not a tautology. It is falsefalse if p if p is false and q is true.is false and q is true.

Page 16: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 16

Rules of Inference for Quantified Rules of Inference for Quantified StatementsStatements

x P(x)x P(x)____________________ P(c) if P(c) if ccUU

Universal Universal instantiationinstantiation

P(c) for an arbitrary cP(c) for an arbitrary cUU______________________________________ x P(x)x P(x)

Universal Universal generalizatiogeneralizationn

x P(x)x P(x)____________________________________________ P(c) for some element cP(c) for some element cUU

Existential Existential instantiationinstantiation

P(c) for some element cP(c) for some element cUU________________________________________ x P(x) x P(x)

Existential Existential generalizatiogeneralizationn

Page 17: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 17

Rules of Inference for Quantified Rules of Inference for Quantified StatementsStatements

Example:Example:

Every UMB student is a genius. Every UMB student is a genius. George is a UMB student.George is a UMB student.Therefore, George is a genius.Therefore, George is a genius.

U(x): “x is a UMB student.”U(x): “x is a UMB student.”G(x): “x is a genius.”G(x): “x is a genius.”

Page 18: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 18

Rules of Inference for Quantified Rules of Inference for Quantified StatementsStatements

The following steps are used in the argument:The following steps are used in the argument:

Step 1:Step 1: x (U(x) x (U(x) G(x)) G(x)) HypothesisHypothesisStep 2:Step 2: U(George) U(George) G(George) G(George) Univ. Univ. instantiation instantiation using Step 1using Step 1

x P(x)x P(x)____________________ P(c) if P(c) if ccUU

Universal Universal instantiationinstantiation

Step 3:Step 3: U(George) U(George) HypothesisHypothesisStep 4:Step 4: G(George) G(George) Modus ponensModus ponens

using Steps 2 & 3using Steps 2 & 3

Page 19: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 19

Proving TheoremsProving Theorems

Direct proof:Direct proof:

An implication pAn implication pq can be proved by showing q can be proved by showing that if p is true, then q is also true.that if p is true, then q is also true.

Example:Example: Give a direct proof of the theorem Give a direct proof of the theorem “If n is odd, then n“If n is odd, then n22 is odd.” is odd.”

Idea:Idea: Assume that the hypothesis of this Assume that the hypothesis of this implication is true (n is odd). Then use rules of implication is true (n is odd). Then use rules of inference and known theorems to show that q inference and known theorems to show that q must also be true (nmust also be true (n22 is odd). is odd).

Page 20: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 20

Proving TheoremsProving Theorems

n is odd.n is odd.

Then n = 2k + 1, where k is an integer.Then n = 2k + 1, where k is an integer.

Consequently, nConsequently, n22 = (2k + 1) = (2k + 1)22.. = 4k= 4k22 + 4k + 1 + 4k + 1 = 2(2k= 2(2k22 + 2k) + 1 + 2k) + 1

Since nSince n22 can be written in this form, it is odd. can be written in this form, it is odd.

Page 21: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 21

Proving TheoremsProving Theorems

Indirect proof:Indirect proof:

An implication pAn implication pq is equivalent to its q is equivalent to its contra-contra-positivepositive q q p. Therefore, we can prove pp. Therefore, we can prove pq q by showing that whenever q is false, then p is by showing that whenever q is false, then p is also false.also false.

Example:Example: Give an indirect proof of the theorem Give an indirect proof of the theorem

“If 3n + 2 is odd, then n is odd.”“If 3n + 2 is odd, then n is odd.”

Idea:Idea: Assume that the conclusion of this Assume that the conclusion of this implication is false (n is even). Then use rules of implication is false (n is even). Then use rules of inference and known theorems to show that p inference and known theorems to show that p must also be false (3n + 2 is even).must also be false (3n + 2 is even).

Page 22: Fall 2002CMSC 203 - Discrete Structures1 Let’s proceed to… Mathematical Reasoning

Fall 2002 CMSC 203 - Discrete Structures 22

Proving TheoremsProving Theoremsn is even.n is even.

Then n = 2k, where k is an integer.Then n = 2k, where k is an integer.

It follows that 3n + 2 = 3(2k) + 2 It follows that 3n + 2 = 3(2k) + 2 = 6k + 2= 6k + 2= 2(3k + 1)= 2(3k + 1)

Therefore, 3n + 2 is even.Therefore, 3n + 2 is even.

We have shown that the contrapositive of the We have shown that the contrapositive of the implication is true, so the implication itself is implication is true, so the implication itself is also true also true (If 2n + 3 is odd, then n is odd).(If 2n + 3 is odd, then n is odd).