Chapter2 1
Chapter2 1
Structures
CS113
Chapter 2
PROOFS
Homework
Axiom Counterexample
As I mentioned the first day of class, a lot of
what we will do involves proving something to
be correct
This section is about the vocabulary of proof
PLACES TO BEGIN
All reasoning is based on some assumptions
Names for assumptions are axioms and postulates
Reasoning also relies on definitions
Sometimes we have undefined terms
These are ideas that we all agree on, but can’t prove
PROVEN STATEMENTS
Again, there are several names for proven statements
One you are familiar with is theorem
There are two more
A lemma is a proven statement that is used in the proof
of a theorem
A corollary is a proven statement that follows easily form
a theorem
COUNTEREXAMPLES
This is a carry-over form the last chapter
A counterexample is a way to disprove a statement
“Disprove” means to prove something false
The statement we are disproving is a “∀ statement”
A COUNTEREXAMPLE
Suppose someone says that 2n + 3 is prime for all n > 0
You check:
21 + 3 = 5, 22 + 3 = 4 + 3 = 7, 23 + 3 = 8 + 3 =11,
24 + 3 = 16 + 3 = 19
The statement might be true
But 25 + 3 = 32 + 3 = 35, and 35 is not prime
You have found a counterexample
METHODS OF PROOF
We will see different ways to prove something
to be true
The techniques we will talk about are
Direct Proof
Proof by Contradiction (Indirect Proof)
Proof by Contrapositive
Proof by Cases
METHODS OF PROOF: DIRECT PROOF
This is the type of proof you find most often
You just start at the beginning and progress to the end
People like direct proof because it “makes sense”
Unfortunately, often direct proof is too hard
Then we resort to other methods of proof
METHODS OF PROOF: INDIRECT PROOF
Again, if you can’t prove something directly, you try
another approach
This approach is indirect proof
This is when we assume that what we are trying to
prove is false
We then derive a contradiction
This method is also called proof by contradiction
THODS OF PROOF: PROOF BY CONTRADICTI
The third method of proof is called proof by
contrapositive
You prove the contrapositive of the original statement
Recall that in Chapter 1 we learned that a statement and
its contrapositive have the same truth value
So, proving the contrapositive is equivalent to proving
the original statement
METHODS OF PROOF: PROOF BY CASES
This technique is frequently used when it’s easy to
break a statement into cases
Then you just prove the statement for the individual
cases
OTHER TYPES OF PROOF
The book has two other types of proof
These are not general types of proof
They are ways to prove specific statements
PROVING A STATEMENT TRUE-RESOLUTION
It’s based on the idea that
If p ∨ q and (-p) ∨ r are each true, then q ∨ r is also true
Resolution allows the use of only OR in the reasoning
process
For example, p → q is logically equivalent to q ∨ (-p)
The letters (or their negations) are called clauses
Resolution is popular in programs that prove theorems
RESOLUTION-REASONS FOR ITS USE
Resolution is correct
This means that it will only arrive at a contradiction if the
clauses are inconsistent
It is also refutation complete
This means if the clauses are inconsistent it will arrive at
a contradiction
INDUCTION-ANOTHER METHOD OF PROOF
This is a limited method of proof
It can only prove something true for a counting-type
subset of the integers
Induction is like a row of dominos
You knock over the first one
The first one (all by itself) knocks over the second one
The second one (all by itself) knocks over the third one
This continues until they all fall over
THE PRINCIPLE OF MATH INDUCTION
Suppose you want to prove S(n), for n=1, 2, 3, …
To use induction, you first show
S(1) (This is called the base step)
You then show
S(n) implies S(n+1) (This is called the inductive step)
You can then conclude that S(n) is true for all positive
integers n
AN EXAMPLE
let’s try to prove that the sum of the first n odd numbers
is n2 using induction, for n=1, 2, 3, …
So here, S(n) is
The sum of the first n odd numbers is n2
THE BASE STEP
First, we check the base step, which is S(1).
You have to show
The sum of the first 1 odd number(s) is 12.
The first 1 odd number is 1. Adding it up (What?) gives
the sum to be 1.
Also, 12 is 1.
These two values are equal
We have completed the base step.
THE INDUCTIVE STEP
We now have to show that if S(n) is true, then so is
S(n+1)
This means we will assume that S(n) is true.
In other words, we will assume that the sum of the first n
odd integers is n2
As a formula, we assume 1 + 3 + 5 + … + 2n-1 = n2
We have to show that P(n+1) is true.
This is 1 + 3 + 5 + … + 2(n+1)-1 = (n+1)2
ACTUALLY PROVING THAT FORMULA
1+3+5+ … + 2(n+1)-1
= 1 + 3 + 5 + … + 2n-1 + 2(n+1)-1 Inserting the previous number
= 1 + 3 + 5 + … + 2n-1 + 2n + 2 -1 Distributing
= n2 + 2n + 1 Using the inductive hypothesis
= (n+1)2 By algebra
We have shown what we need to show. The proof is complete.
NECESSARY PARTS OF AN INDUCTION PROOF
These parts must be present in any inductive proof
You must state that the proof is a proof by induction
You must write “Base Step”
You then prove the base step
You must write “Inductive Step”
You must write “Assume: _____” and fill in the blank
You must write “To prove: _____” and fill in the blank
You then prove the inductive step
A PROBLEM TO TRY
Let’s do Problem 15 on p. 97
TWO FORMS OF MATHEMATICAL INDUCTION
There are actually two forms of induction
The weak form uses S(n) to prove S(n+1)
The strong form uses S(1), S(2), …, S(n) to prove
S(n+1)
They are equivalent, so you can use either form
Thank
you