discrete structures introduction to proofs

31
Discrete Structures Introduction to Proofs Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore. [email protected] https://sites.google.com/a/ciitlahore.edu.pk/d struct/ Some material is taken from Dr. Atif’s slides 1

Upload: naida

Post on 23-Feb-2016

101 views

Category:

Documents


3 download

DESCRIPTION

Discrete Structures Introduction to Proofs. Dr. Muhammad Humayoun Assistant Professor COMSATS Institute of Computer Science, Lahore. [email protected] https://sites.google.com/a/ciitlahore.edu.pk/dstruct/ Some material is taken from Dr. Atif’s slides. Terminology. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Discrete Structures Introduction to Proofs

1

Discrete StructuresIntroduction to Proofs

Dr. Muhammad HumayounAssistant Professor

COMSATS Institute of Computer Science, [email protected]

https://sites.google.com/a/ciitlahore.edu.pk/dstruct/Some material is taken from Dr. Atif’s slides

Page 2: Discrete Structures Introduction to Proofs

2

Terminology• Theorem: a statement that can be shown true.

Sometimes called facts.• Proof: Demonstration that a theorem is true.• Axiom: A statement that is assumed to be true.• Lemma: a less important theorem that is useful

to prove a theorem.• Corollary: a theorem that can be proven directly

from a theorem that has been proved.• Conjecture: a statement that is being proposed to

be a true statement.

Page 3: Discrete Structures Introduction to Proofs

3

Stating Theorems

• Theorem. If , where x and y are positive real numbers, then .

• Theorem. For all positive real numbers x and y, if , then .

Page 4: Discrete Structures Introduction to Proofs

4

Methods of Proving Theorems

Page 5: Discrete Structures Introduction to Proofs

5

Trivial Proofs

• Consider an implication:

• If it can be shown that p is true, then the implication is always true– By definition of an implication

• Note that you are showing that the conclusion is true

Page 6: Discrete Structures Introduction to Proofs

6

Trivial Proof Example

Consider the statement:• If you are in CSC102 then you are a student.

• Since all people in CSC102 are students, the implication is true.

Page 7: Discrete Structures Introduction to Proofs

7

Vacuous proofs

• Consider an implication:

• If it can be shown that is false, then the implication is always true.– By definition of an implication

• Note that you are showing that the hypothesis is false

Page 8: Discrete Structures Introduction to Proofs

8

Example

Consider the statement:• Every student snooze during class when he is

tired.• Rephrased: If a student is tired then he snoozes

during class

• Since there is no such student who is snoozing, (the hypothesis is false), the implication is true

Page 9: Discrete Structures Introduction to Proofs

9

Methods of Proving Theorems

Important ones

Page 10: Discrete Structures Introduction to Proofs

10

Methods of Proving Theorems

Direct Proofs• Consider an implication: – If p is false, then the implication is always true– Thus, show that if p is true, then q is true

• To perform a direct proof, assume that p is true, and show that q must therefore be true

Page 11: Discrete Structures Introduction to Proofs

11

Example Direct Proof

Theorem. Show that the square of an even number is an even number.For every number , if is even, then is even.

Page 12: Discrete Structures Introduction to Proofs

12

Example Direct Proof

Theorem. Show that the square of an even number is an even number.For every number , if is even, then is even.

Page 13: Discrete Structures Introduction to Proofs

13

Example Direct Proof

Theorem. Show that the square of an even number is an even number.For every number , if is even, then is even.

Proof. Usual convention: Universal instantiation is not explicitly used and it is directly showed that implies .

Page 14: Discrete Structures Introduction to Proofs

14

Example Direct Proof

Theorem. Show that the square of an even number is an even number.For every number , if is even, then is even.

Proof. Usual convention: Universal instantiation is not explicitly used and it is directly showed that implies .

Assume is even.Thus, , for some (definition of even numbers).

As is 2 times an integer, is thus even.

Page 15: Discrete Structures Introduction to Proofs

15

Example Direct Proof

Theorem. Show that the square of an even number is an even number.For every number , if is even, then is even.

Proof. Usual convention: Universal instantiation is not explicitly used and it is directly showed that implies .

Assume is even.Thus, , for some (definition of even numbers).

As is 2 times an integer, is thus even.

Page 16: Discrete Structures Introduction to Proofs

16

Proof by Contraposition(or Indirect proofs)

– If the antecedent is false, then the contrapositive is always true

– Thus, show that if is true, then is true

• To perform an indirect proof, do a direct proof on the contrapositive

Page 17: Discrete Structures Introduction to Proofs

17

Indirect proof exampleTheorem. If is an odd integer then is an odd integerProof (by contrapositive). We show that the contrapositive of the theorem statement holds, therefore the theorem statement hold. Contrapositive: If is an even integer, then is an even integer.

Page 18: Discrete Structures Introduction to Proofs

18

Indirect proof exampleTheorem. If is an odd integer then is an odd integerProof (by contrapositive). We show that the contrapositive of the theorem statement holds, therefore the theorem statement hold. Contrapositive: If is an even integer, then is an even integer.Assume that is even. Then by the definition of even numbers: for some integer .

Page 19: Discrete Structures Introduction to Proofs

19

Indirect proof exampleTheorem. If is an odd integer then is an odd integerProof (by contrapositive). We show that the contrapositive of the theorem statement holds, therefore the theorem statement hold. Contrapositive: If is an even integer, then is an even integer.Assume that is even. Then by the definition of even numbers: for some integer . Thus

Since is 2 times an integer, it is even. Hence our proof by contraposition succeeds.

Page 20: Discrete Structures Introduction to Proofs

20

Selecting a Proof method

Theorem. If is an integer and is odd, then is even.Proof. (Via direct proof). Assume that is odd. Then by the definition of odd numbers for some integer k. Thus

… ???Direct proof doesn’t seem to work.

Page 21: Discrete Structures Introduction to Proofs

21

Selecting a Proof method

Theorem. If is an integer and is odd, then is even.Proof. (Via direct proof). Assume that is odd. Then by the definition of odd numbers for some integer k. Thus

… ???Direct proof doesn’t seem to work.

Page 22: Discrete Structures Introduction to Proofs

22

Selecting a Proof methodTheorem. If is an integer and is odd, then is even.

Indirect proof. Contrapositive: If is odd, then is even.Assume is odd, and show that is even.By the definition of odd numbers for some integer .

As is times an integer, it is even

Page 23: Discrete Structures Introduction to Proofs

23

Selecting a Proof methodTheorem. If is an integer and is odd, then is even.

Indirect proof. Contrapositive: If is odd, then is even.Assume is odd, and show that is even.By the definition of odd numbers for some integer .

As is times an integer, it is even

Page 24: Discrete Structures Introduction to Proofs

24

Selecting a Proof methodTheorem. If is an integer and is odd, then is even.

Indirect proof. Contrapositive: If is odd, then is even.Assume is odd, and show that is even.By the definition of odd numbers for some integer .

As is times an integer, it is even

Page 25: Discrete Structures Introduction to Proofs

25

Selecting a Proof methodTheorem. If is an integer and is odd, then is even.

Indirect proof. Contrapositive: If is odd, then is even.Assume is odd, and show that is even.By the definition of odd numbers for some integer .

As is times an integer, it is even

Page 26: Discrete Structures Introduction to Proofs

26

Proof by contradiction (another type of indirect proofs)

• Given a statement of the form

• Assume p is true and q is false–Assume

• Then prove that cannot occur–A contradiction exists

Page 27: Discrete Structures Introduction to Proofs

27

Proof by contradiction exampleTheorem. If is an integer and is odd, then is even.Rephrased: If is odd, then is evenProof. Assume p is true and q is false (Assume . Assume )

Assume that is odd, and is odd.

Page 28: Discrete Structures Introduction to Proofs

28

Proof by contradiction exampleTheorem. If is an integer and is odd, then is even.Rephrased: If is odd, then is evenProof. Assume p is true and q is false (Assume . Assume )

Assume that is odd, and is odd.By the definition of odd numbers for some integer k.

Page 29: Discrete Structures Introduction to Proofs

29

Proof by contradiction exampleTheorem. If is an integer and is odd, then is even.Rephrased: If is odd, then is evenProof. Assume p is true and q is false (Assume . Assume )

Assume that is odd, and is odd.By the definition of odd numbers for some integer k.

Page 30: Discrete Structures Introduction to Proofs

30

Proof by contradiction exampleTheorem. If is an integer and is odd, then is even.Rephrased: If is odd, then is evenProof. Assume p is true and q is false (Assume . Assume )Assume that is odd, and is odd.By the definition of odd numbers for some integer k.

As is 2 times an integer, it must be even.Contradiction!

Page 31: Discrete Structures Introduction to Proofs

31

End