Advanced Discrete Mathematics Jim Skon - PowerPoint PPT Presentation

1 / 75
About This Presentation
Title:

Advanced Discrete Mathematics Jim Skon

Description:

axioms (statements which are given to be true) and ... which is also not a tautology and hence not a rule of inference. Proofs. 31 ... – PowerPoint PPT presentation

Number of Views:311
Avg rating:3.0/5.0
Slides: 76
Provided by: james276
Category:

less

Transcript and Presenter's Notes

Title: Advanced Discrete Mathematics Jim Skon


1
Proofs
  • Advanced Discrete MathematicsJim Skon

2
Proofs
  • Definition A theorem is a valid logical
    assertion whichcan be proved using
  • other theorems
  • axioms (statements which are given to be true)
    and
  • rules of inference (logical rules which allow the
    deduction of conclusions from premises).

3
Proofs
  • A lemma (not a lemon) is a 'pre-theorem' or a
    result which is needed to prove a theorem.
  • A corollary is a 'post-theorem' or a result which
    followsdirectly from a theorem.

4
Valid reasoning in proofs
  • A mathematical proof is a sequence of statements,
    such that each statement
  • 1. is an assumption, or
  • 2. is a proposition already proved, or
  • 3. Follow logically from one or more previous
    statements in proof.

5
Valid Inference
  • Consider H1 Ù H2 Ù..... ÙHn C
  • where
  • Hi are called the hypothesesand
  • C is the conclusion.

6
Valid Inference Argument
  • Argument - consists of a collection of
    statements, called premises of the argument,
    followed by a conclusion statement.
  • A1
  • A2
  • An
  • ? A
  • where \ means 'therefore' or 'it follows that.'


Premises
Conclusion
7
Valid reasoning in proofs
  • Example modus ponens
  • P Ù (P Q) Þ Q modus ponensP The car is
    running
  • Q The car has gas.
  • If we know that the car is running (P), we can
    prove that (Q) it has gas.

8
Rules of Inference
  • Rules of Inference - used in proofs, or
    arguments, to move from what is known to what we
    want to prove.
  • modus ponens is a valid rule of inference.

9
Valid Argument
  • An argument is said to be valid if whenever all
    the premises are true, the conclusion is also
    true.
  • If the premises are true, but the conclusion
    false, the argument is said to be invalid.

10
Rules of Inference
  • Other famous rules of inference P\P Ú Q
    Addition____________________________________P Ù
    Q\PSimplification

11
Rules of Inference
  • ØQP Q\ØPModus Tollens________________________
    ____________ P QQ R\P RHypothetical
    syllogism

12
Rules of Inference
  • P ÚQØP\QDisjunctive syllogism
    ____________________________________ PQ\P
    ÙQConjunction

13
Rules of Inference
  • (P Q) Ù (R S)P Ú R\QÚ SConstructive
    dilemma

14
Proofs
  • Three Techniques
  • Show true using logical inference
  • Assume the hypotheses are true
  • Use the rules of inference and logical
    equivalences to determine that the conclusion is
    true.
  • Show true by showing that no way exists to make
    all premises true but conclusion false
  • Show false by finding a way to make premises true
    but conclusion false.

15
Formal Proofs
  • To prove an argument is valid or the conclusion
    followslogically from the hypotheses
  • Assume the hypotheses are true
  • Use the rules of inference and logical
    equivalences to determine that the conclusion is
    true.

16
Proof Example
  • Consider the following logical argument
  • If horses fly or cows eat artichokes, then the
    mosquito is the national bird. If the mosquito is
    the national bird then peanut butter takes good
    on hot dogs. But peanut butter tastes terrible on
    hot dogs. Therefore, cows don't eat artichokes.

17
Proof Example
  • F Horses fly
  • A Cows eat artichokes
  • M The mosquito is the national bird
  • P Peanut butter tastes good on hot dogs

18
Proof Example
  • Represent the formal argument using the variables
  • 1.(FÚ A) M
  • 2.M P
  • 3.ØP
  • \ØA

19
Proof Example
  • Use the hypotheses 1., 2., and 3. and the above
    rules of inference and any logical equivalencies
    to construct the proof.

20
Proof Example
  • Assertion Reasons
  • 1.(FÚ A) M Hypothesis 1.
  • 2.M P Hypothesis 2.
  • 3.(F Ú A) P steps 1 and 2 and hypothetical
    syll.
  • 4.ØP Hypothesis 3.
  • 5.Ø(F Ú A) steps 3 and 4 and modus tollens
  • 6.ØF Ù ØA step 5 and DeMorgan
  • 7.ØA Ù ØF step 6 and commutativity of 'and'
  • 8.ØA step 7 and simplification
  • Q. E. D.

21
Proof Example
  • Consider
  • p ? (q ? r)
  • q
  • ?p ? r

22
Proof by contradiction
  • Consider
  • r ? s
  • p ??s
  • r ? q
  • ?p ? q

23
Rules of Inference for Quantifiers
  • "xP(x)
  • \P(c) Universal Instantiation (UI)
  • _______________________________
  • P(x)
  • \"xP(x) Universal Generalization (UG)

24
Rules of Inference for Quantifiers
  • P(c)
  • \xP(x) Existential Generalization (EG)
  • _______________________________
  • xP( x)
  • \P(c) Existential Instantiation (EI)

25
Example
  • Every man has two legs. John Smith is a man.
  • Therefore, John Smith has two legs.

26
Example
  • Define the predicatesM(x) x is a manL(x) x
    has two legsJ John Smith, a member of the
    universe
  • The argument becomes1."xM(x) L(x)2.M( J
    )\L( J)

27
Example
  • The proof is1."xM(x) L(x) Hypothesis 12.M( J
    ) L(J ) step 1 and UI3.M(J) Hypothesis 24. L(
    J) steps 2 and 3 and modus ponensQ. E. D.

28
Fallacies
  • Fallacies are incorrect inferences.
  • Some common fallacies
  • The Fallacy of Affirming the Consequent
  • The Fallacy of Denying the Antecedent
  • Begging the question or circular reasoning

29
The Fallacy of Affirming the Consequent
  • If the butler did it he has blood on his
    hands.The butler had blood on his
    hands.Therefore, the butler did it.
  • This argument has the formP QQ or (P Q) Ù
    Q P \P
  • which is not a tautology and therefore not a rule
    of inference!

30
The Fallacy of Denying the Antecedent (or the
hypothesis)
  • If the butler is nervous, he did it.The butler
    is really mellow.Therefore, the butler didn't do
    it.
  • This argument has the formP QØP or (P Q) Ù
    ØP ØQ \ØQwhich is also not a tautology and
    hence not a rule of inference.

31
Begging the question or circular reasoning
  • This occurs when we use the truth of statement
    being proved (or something equivalent) in the
    proof itself.
  • ExampleConjecture if x2 is even then x is
    even.Proof If x2 is even then x2 2k for some
    k. Then x 2l for some l. Hence, x must be even.

32
Proof Example
  • If the law is sufficient, then Christ died in
    vain
  • The law is sufficient
  • Therefore Christ died in vain.

33
Example
  • Babies are illogical
  • Nobody is despised who can manage a crocodile
  • Illogical persons are despised
  • Therefore, babies cannot manage crocodiles

34
Methods of Proof
  • We wish to establish the truth of the 'theorem
  • P Q
  • P may be a conjunction of other hypotheses.
  • P Q is a conjecture until a proof is produced.

35
Types of proof
  • Vacuous Proof of P Q
  • The truth value of P Q is true if P is false.
    If P can be shown false, then P Q holds.
  • Thus prove P Q by showing P is false.
  • Example
  • If I am both rich and poor then hurricane Fran
    was a mild breeze.
  • This is of the form (P Ù ØP) Q
  • and the hypotheses form a contradiction.

36
Trivial Proof of P Q
  • If we know Q is true then P Q is true!
  • Example
  • If it's raining today then the empty set is a
    subset of every set.
  • The assertion is trivially true independent of
    the truth of P.

37
Direct Proof of P Q
  • Prove Q, using P as an assumption.
  • Thus prove P Q by showing Q is true whenever P
    is true.
  • assume the hypotheses are true
  • use the rules of inference, axioms and any
    logical equivalences to establish the truth of
    the conclusion.
  • Example the Cows dont eat artichokes proof above

38
Direct Proof of P Q
  • Theorem If 6x 9y 101, then x or y is not an
    integer.
  • Proof (Direct)
  • Assume 6x 9y 101 is true.
  • Then from the rules of algebra 3(2x 3y) 101.
  • But 101/3 is not an integer so it must be the
    case that one
  • of 2x or 3y is not an integer (maybe both).
  • Therefore, one of x or y must not be an integer.
  • Q.E.D.

39
Indirect Proof of P Q
  • Prove the contrapositive, e.g. ØQ ØP is true,
    using a direct proof methods.

40
Indirect Proof of P Q
  • Example
  • A perfect number is one which is the sum of all
    its divisors except itself. For example, 6 is
    perfect since 1 2 3 6. So is 28.
  • Theorem A perfect number is not a prime.
  • Proof (Indirect). We assume the number p is a
    prime and show it is not perfect.
  • But the only divisors of a prime are 1 and
    itself.
  • Hence the sum of the divisors less than p is 1
    which is not equal to p.
  • Hence p cannot be perfect. Q. E. D..

41
Proof by contradiction(reductio ad absurdum)
  • Assume the negation of the proposition is true,
    then derive a contradiction.
  • Thus to prove of P Q, assume P Ù ØQ is true,
    then derive a contradiction.

42
Proof by contradiction
  • Theorem ?2 is irrational.
  • Proof Let P be the proposition ?2 is
    irrational
  • Assume ?P or ?2 is rational
  • Then ?2 a/b, where a and b are integers and
    have no common factors (lowest terms).
  • Then (?2)2 (a/b)2 is 2 a2/b2.
  • Thus 2b2 a2. Thus a2 is even, implying a is
    even. Since a is even, a 2c for some integer
    c.
  • Thus 2b2 4c2, so b2 2c2. Hence b is even.
  • Contradiction! A and b are both even, so
    divisible by 2!

43
Proof by cases of P Q
  • To prove P Q, find a set of propositions P1,
    P2, ..., Pn, n?2, in which at least one Pj must
    be true for P to be true. P P1? P2 ?
    ... ? Pn
  • Then prove the n propositions P1 Q, P2
    Q, ..., Pn Q.

44
Proof by cases of P Q
  • Let Ä be the operation 'max' on the set of
    integers
  • if a ³ b then aÄb maxa, b a bÄa.
  • Theorem The operation Ä is associative.
  • For all a, b, c
  • (aÄb)Äc a Ä(bÄc).

45
Proof by casesThe operation Ä is associative
  • Let a, b, c be arbitrary integers.
  • Then one of the following 6 cases must hold (are
    exhaustive)
  • 1. a ³ b ³ c
  • 2. a ³ c ³ b
  • 3. b ³ a ³ c
  • 4. b ³ c ³ a
  • 5. c ³ a ³ b
  • 6. c ³ b ³ a

46
Proof by casesThe operation Ä is associative
  • Case 1 aÄb a, aÄc a, and bÄc b.
  • Hence
  • (aÄb)Äc a aÄ(bÄc).
  • Therefore the equality holds for the first case.
  • The proofs of the remaining cases are similar.
  • Q. E. D.

47
Vacuous Proof
  • Consider the proposition
  • If you your grandfather dies as a baby then you
    will get an A in this class.
  • Proof of this statement
  • Your grandfather didnt die, thus thus the
    premise must be false. Thus P Q must be true.

48
Trivial Proof
  • Consider the proposition
  • If 3n2 5n -2 ? 2n2 7n - 16 then n n2.
    P(n).
  • Proof of P(0)
  • 0 02, thus P(0) is trivially true. QED.

49
Direct Proof
  • Consider The sum of two even numbers is even.
  • Restate as
  • "x"y (x is even and y is even) x y is even
  • Proof
  • 1. Remember x is even ax 2a (definition)
  • 2. Assume x is even and y is even (assume
    hypothesis)
  • 3. x y 2a 2b (from 1 and 2)
  • 4. 2a 2b 2(ab)
  • 5. By 1, 2(ab) is even - QED.

50
Direct Proof
  • Consider Every multiple of 6 is also a multiple
    of 3.
  • Rewrite "x zy(6x y 3z y)
  • Proof
  • 1. Assume 6x y (hypothesis)
  • 2. 6x y can be rewritten as 3 2x y
  • 3. Let z 2x, then 3z y holds. QED.

51
Indirect Proofs
  • Prove the contrapositive, e.g. Prove that
  • ØQ ØP
  • is true

52
Indirect Proofs
  • Prove If x2 is even, then x is even.
  • Rewrite "x (EVEN(x2) EVEN(x))

53
Indirect Proofs
  • Prove If x2 is even, then x is even
  • 1. "x (ODD(x) ODD(x2)) (contrapositive)
  • 2. Assume 1 ODD(n) true for some n (hypothesis)
  • 3. x is odd ax 2a 1 (definition)
  • 4. n 2a 1 for some a (2 3)
  • 5. n2 (2a 1)2 (substitution)
  • 6. (2a 1)2 (2a 1)(2a 1)
  • 4a 2 4a 1
  • 2 (2a2 2a) 1
  • 7. 2 (2a2 2a) 1 is odd (3 6) QED

54
Proof by contradiction
  • To prove of P Q, assume Ø(P Q), derive a
    contradiction.
  • Recall that P Q ? ØP ? Q
  • Then Ø(P Q) ? Ø(ØP ? Q) ?
    P Ù ØQ (Demorgans)
  • Thus to prove P Q we assume P Ù ØQ and show a
    contradiction.

55
Proof by contradiction
  • Consider Theorem There is no largest prime
    number.
  • This can be stated as
  • "If x is a prime number, then there exists
    another prime y which is greater"
  • Formally "x y (PRIME(x) Ù PRIME(y) x lt
    y)

56
Proof by contradiction
  • There is no largest prime number
  • Assume largest prime number does exist. Call
    this number p.
  • Restate implication as p is prime, and there
    does not exist a prime which is greater.
  • 1. Form a product r 2 3 5 ... p)
  • (e.g. r is the product of all primes)
  • 2. If we divide r1 by any prime, it will have
    remainder 1
  • 3. r1 is prime, since any number not divisible
    by any prime which is less must be prime.
  • 4. but r1 gt p , which contradicts that p is the
    greatest prime number. QED.

57
Proof by cases
  • To prove P Q, find a set of propositions P1,
    P2, ..., Pn, n?2, in which at least one Pj must
    be true for P to be true. P P1? P2 ?
    ... ? PnThen prove the n propositions
    P1 Q, P2 Q, ..., Pn Q.
  • ThusP(P1ÚP2Ú...ÚPn) and (P1Q)Ù(P2Q)Ù...Ù(PnQ
    )Þ(PQ)

58
Proof by cases
  • Consider For every nonzero integer x ,x2 gt 0.
  • LetP "x is a nonzero integerQ x2 gt 0
  • We want to prove P Q

59
Proof by cases
  • If P "x is a nonzero integer Q x2 gt 0
  • Prove P Q
  • P can be broken up into two cases
  • P1 x gt 0
  • P2 x lt 0
  • Note that P (P1 Ú P2).

60
Proof by cases
  • For every nonzero integer x ,x2 gt 0.
  • Prove each case -
  • Prove P1 Q
  • If x gt 0, then x2 gt 0, since the product of
    two positive numbers is always positive.
  • Prove P2 QIf x lt 0, then x2 gt 0, since the
    product of two negative numbers is always
    positive. QED.

61
Existence Proofs
  • We wish to establish the truth of xP( x).
  • Constructive existence proof
  • Establish P(c) is true for some c in the
    universe.
  • Then xP( x) is true by Existential
    Generalization (EG).

62
Constructive Existence Proofs
  • Theorem There exists an integer solution to the
    equation
  • x2 y2 z2 .
  • Proof Choose x 3, y 4, z 5.

63
Constructive Existence Proofs
  • Theorem There exists a bijection from A 0,1
    to B 0, 2.
  • Proof We build two injections and conclude there
    must be a bijection without ever exhibiting the
    bijection.
  • Let f be the identity map from A to B.
  • Then f is an injection (and we conclude that A
    B ).
  • Define the function g from B to A as g(x) x/4.
  • Then g is an injection.
  • Therefore, B A .
  • We now apply a previous theorem which states that
  • if A B and B A then A
    B .
  • Hence, there must be a bijection from A to B.
  • (Note that we could have chosen g(x) x/2 and
    obtained a
  • bijection directly).
  • Q. E. D.

64
Nonconstructive existence proof
  • Assume no c exists which makes P(c) true and
    derive a contradiction.
  • Example
  • Theorem There exists an irrational number.
  • Proof
  • Assume there doesnt exist an irrational number.
  • Then all numbers must be rational.
  • Then the set of all numbers must be countable.
  • Then the real numbers in the interval 0, 1 is a
    countable set.
  • But we have already shown this set is not
    countable.
  • Hence, we have a contradiction (The set 0,1 is
    countable
  • and not countable).
  • Therefore, there must exist an irrational number.
  • Q. E. D.
  • Note we have not produced such a number!

65
" Disproof by Counterexample
  • Recall that xØP(x) Ø"xP(x ).
  • To establish that Ø"xP(x ) is true (or "xP(x) is
    false) construct a c such that ØP(c) is true or
    P(c) is false.
  • In this case c is called a counterexample to the
    assertion "xP(x)

66
Nonexistence Proofs
  • We wish to establish the truth of ØxP( x)
    (which is equivalent to "xØP(x) ).
  • Use a proof by contradiction by assuming there is
    a c which makes P(c) true.

67
The (infamous) Halting Problem
  • We wish to establish the nonexistence of a
    universal debugging program.Theorem There does
    not exist a program which will always determine
    if an arbitrary program P halts.We say the
    Halting Problem is undecidable.

Yes (Halts)
P1
UDP
P2
No (Infinite Loop)
P3
68
Halting Problem
  • Proof Suppose there is such a program called
    HALT which will determine if any input-free
    program P halts.
  • HALT(P) prints 'yes' and halts if P halts,
  • otherwise,
  • HALT(P) prints 'no' and halts.
  • We now construct another procedure as follows
  • procedure ABSURD
  • if HALT(ABSURD) 'yes' then
  • while true do print 'ha'
  • (Note that ABSURD is input-free.)

69
Halting Problem
  • If ABSURD halts then we execute the loop which
    prints unending gales of laughter and thus the
    procedure does not halt.
  • If ABSURD does not halt then we will exit the
    program and halt.
  • Hence, ABSURD halts if it doesn't
  • and doesn't halt if it does
  • which is an obvious contradiction.
  • Hence such a program does not exist.
  • Q. E. D.

70
Universally Quantified Assertions
  • We wish to establish the truth of
  • "xP(x)
  • We assume that x is an arbitrary member of the
    universe and show P(x) must be true. Using UG it
    follows that "xP(x) .

71
Universally Quantified Assertions
  • Example
  • Theorem For the universe of integers, x is even
    iff x2 is even.
  • Proof The quantified assertion is
  • "xx is even x2 is even

72
Universally Quantified Assertions
  • Proof
  • We assume x is arbitrary.
  • Recall that P Q is equivalent to (P Q) Ù (Q
    P).
  • Case 1. We show if x is even then x2 is even
    using a direct
  • proof (the only if part or necessity).
  • If x is even then x 2k for some integer k.
  • Hence, x2 4k2 2(2k2 ) which is even since it
    is an
  • integer which is divisible by 2.
  • This completes the proof of case 1.

73
Universally Quantified Assertions
  • Case 2. We show that if x 2 is even then x must
    be even
  • (the if part or sufficiency) .
  • We use an indirect proof
  • Assume x is not even and show x2 is not even.
  • If x is not even then it must be odd.
  • So, x 2k 1 for some k.
  • Then
  • x2 (2k 1)2 4k2 4k 1 2(2k2 2k) 1
  • which is odd and hence not even.
  • This completes the proof of the second case.
  • Therefore we have shown x is even iff x2 is even.
  • Since x was arbitrary, the result follows by UG.
  • Q.E.D.

74
(No Transcript)
75
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com