reading and writing mathematical proofs spring 2015 lecture 2: basic proving techniques

64
Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Upload: rosalyn-craig

Post on 16-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Reading and Writing Mathematical Proofs

Spring 2015

Lecture 2: Basic Proving Techniques

Page 2: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Previously on Reading and Writing

Mathematical Proofs

Proofs in Textual Form

Page 3: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Definition

Mathematical proof A convincing argument for the reader to establish the correctness of a mathematical statement without any doubt

Page 4: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Two Proof Formats

Theorem

If x is odd, then x2 is odd

Proof

Since x is odd, there exists a k ϵ ℤ such that x = 2k + 1. Then, x2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1. Thus, x2 is odd. □

This is what you should write down

This should be in the back of your mind

Page 5: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Proof Detail

When is a proof detailed enough?

Depends on what the reader will accept as true statements

A proof with more detail has “more obvious” statements…

… but is also much longer

A good proof must find the right balance

Page 6: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Proving Tips

Tips for writing proofs

1. State the proof techniques you’re using (see this lecture)

2. Keep a linear flow Proving process different from written proof

3. Describe every step clearly in words Or draw a figure

4. Don’t use complicated notation

5. Keep your proof as simple as possible

6. Make sure your axioms are actually “obvious” What is obvious to you may not be obvious to the reader

7. Finish your proof Connect everything with what you were trying to prove

Page 7: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Basic Proving Techniques

Today…

Page 8: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Overview

Basic Proving Techniques

1. Forward-backward method (or direct method)

2. Case analysis

3. Proof by contradiction

4. Mathematical induction

Page 9: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Forward-Backward Method

Page 10: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Forward-Backward Method

Forward-Backward Method

The most basic approach

Logically combine axioms, definitions, and earlier theorems (forward)

Simplify the goal (backward)

This is the approach we have been using so far

This should always be your default approach

Page 11: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Usage

When to use?

Generally used for statements of the form: If P then Q

Reason forward from the premise Reason backward from the goal Follow the rules from Logic and Set Theory (2IT60)

Note Reasoning backward is part of the proving process In a written proof you generally reason forward to keep the flow

Premise Goal

Page 12: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

If 0 ≤ x ≤ 2, then –x3 + 4x + 1 > 0

Page 13: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

If 0 ≤ x ≤ 2, then –x3 + 4x + 1 > 0Proof

Perhaps it helps if we first plot the function –x3 + 4x + 1.

It seems that the function is smallest around x = 0 and x

= 2. But -03 + 4 x 0 + 1 = 1, and -23 + 4 x 2 + 1 = 1.

It seems that –x3 + 4x + 1 ≥ 1 for 0 ≤ x ≤ 2 .Simplify goal: -x3 + 4x ≥ 0 for 0 ≤ x ≤ 2.

Page 14: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

If 0 ≤ x ≤ 2, then –x3 + 4x + 1 > 0Proof

Let’s simplify further: -x3 + 4x = x (4 – x2) ≥ 0Also, x (4 – x2) ≥ 0 if x ≥ 0 and 4 – x2 ≥ 0.I think we’re ready for the proof…

Page 15: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

If 0 ≤ x ≤ 2, then –x3 + 4x + 1 > 0Proof

We first show that –x3 + 4x ≥ 0. We can rewrite the function as –x3 + 4x = x (4 – x2) = x (2 – x) (2 + x). Since x, (2 - x), and (2 + x) are all nonnegative for 0 ≤ x ≤ 2, it follows that x (2 – x) (2 + x) = –x3 + 4x ≥ 0 for 0 ≤ x ≤ 2. By adding 1 to both sides we obtain –x3 + 4x + 1 ≥ 1 > 0. □

Page 16: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Another Example

Theorem

If f1(n) = O(g1(n)) and f2(n) = O(g2(n)), then f1(n)f2(n) = O(g1(n)g2(n))

Page 17: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Another Example

Theorem

If f1(n) = O(g1(n)) and f2(n) = O(g2(n)), then f1(n)f2(n) = O(g1(n)g2(n))

Proof

What does f(n) = O(g(n)) mean again?

There exist positive constants c and n0 such that f(n) ≤ c g(n)

for all n ≥ n0.

Let’s write this as a logical formula:

∃c,n0[c > 0 ⋀ n0 > 0: ∀n[n ≥ n0 : f(n) ≤ c g(n)]]

We must be very careful with our variables! Use different names!

Page 18: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Another Example

Theorem

If f1(n) = O(g1(n)) and f2(n) = O(g2(n)), then f1(n)f2(n) = O(g1(n)g2(n))

Proof

By definition there exist positive constants c’ and n0’ such that

f1(n) ≤ c’ g1(n) for all n ≥ n0’. Similarly, there exist positive constants c’’ and n0’’ such that f2(n) ≤ c’’ g1(n) for all n ≥ n0’’. We need to show that there exist positive constants c and n0 such that

f1(n)f2(n) ≤ c g1(n)g2(n) for all n ≥ n0.

To establish this result, we need to find values for c and n0 such that the above is true. We already have constants c’, c’’, n0’, and n0’’, so we can use these values to compute c and n0.

Note that f1(n)f2(n) ≤ c’g1(n) c’’g2(n) = c’ c’’ g1(n)g2(n) , but only if n ≥ n0’ and n ≥ n0’’ . So n ≥ n0 should imply n ≥ n0’ and n ≥ n0’’ .

Page 19: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Another Example

Theorem

If f1(n) = O(g1(n)) and f2(n) = O(g2(n)), then f1(n)f2(n) = O(g1(n)g2(n))

Proof

By definition there exist positive constants c’ and n0’ such that

f1(n) ≤ c’ g1(n) for all n ≥ n0’. Similarly, there exist positive constants c’’ and n0’’ such that f2(n) ≤ c’’ g1(n) for all n ≥ n0’’. We need to show that there exist positive constants c and n0 such that

f1(n)f2(n) ≤ c g1(n)g2(n) for all n ≥ n0. Let n0 = max(n0’, n0’’) and c = c’ c’’. Then, for all n ≥ n0 (which implies n ≥ n0’ and n ≥ n0’’),

f1(n)f2(n) ≤ c’ g1(n) c’’ g2(n) = c’ c’’ g1(n) g2(n) = c g1(n) g2(n). Thus, f1(n)f2(n) = O(g1(n)g2(n)). □

If the reasoning is confusing to you, try making a logical derivation using techniques from Logic and Set Theory (2IT60)

Page 20: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Case Analysis

Page 21: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Case Analysis

Case analysis

Prove the theorem by considering a small number of cases

Say you want to prove Q, then you can also prove: P1 ⇒ Q : if P1 then Q

P2 ⇒ Q : if P2 then Q

P3 ⇒ Q : if P3 then Q

P1 ⋁ P2 ⋁ P3 : P1 or P2 or P3

P1, P2, and P3 describe the different cases

Using P1, P2, or P3 as premise might make proof easier

Don’t forget to prove: P1 or P2 or P3 (one of the cases must hold)!

helps forward reasoning

Page 22: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Usage

When to use?

Generally useful for a “for all”-quantifier If it can be broken down into a small number of configurations

Examples An integer is odd or even An integer is positive, negative, or zero x ≤ y or y < x A quadrilateral is convex or not

Also useful for proving correctness if-statement (see next lecture)

Page 23: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any integer x, x(x+1) is even

Page 24: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any integer x, x(x+1) is even

Proof

Right now we know nothing about x, which makes it hard to prove that x(x+1) is even (we have nothing to work with).

What happens if x is odd?

In that case (x+1) is even, and hence the multiplication must be even.

What happens if x is even?

Doesn’t really matter, the multiplication will be even.

Page 25: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any integer x, x(x+1) is even

Proof

We consider two cases:

Case (1): x is oddThen there exists an integer k such that x = 2k+1. Hence,

x(x+1) = (2k+1) (2k + 2) = 2 (2k + 1) (k + 1).

Thus, x(x+1) is even.

Case (2): x is evenThen there exists an integer k such that x = 2k. Hence,

x(x+1) = 2k (2k + 1) = 2 (2k2 + k).

Thus, x(x+1) is even.

Since an integer is either odd or even, this concludes the proof. □

Often omitted

Page 26: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

Among any 6 people there are 3 mutual friends or 3 mutual strangers.

Page 27: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any graph G=(V,E) with |V| = 6 vertices there is a complete subgraph of size 3 or an independent set of size 3.

Page 28: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any graph G=(V,E) with |V| = 6 vertices there is a complete subgraph of size 3 or an independent set of size 3.

Proof

Consider any vertex x ϵ V. We consider the following cases:

Case (1): x is connected to at least three other vertices in Gx could be part of a complete subgraph. When is this not the case?

Case (2): x is connected to at most two other vertices of Gx could be part of an independent set. When is this not the case?

Page 29: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For any graph G=(V,E) with |V| = 6 vertices there is a complete subgraph of size 3 or an independent set of size 3.

Proof

Consider any vertex x ϵ V. We consider the following cases:

Case (1): x is connected to at least three other vertices in GLet these vertices be u, v, and w. We again consider two cases:

Case (a): u, v, and w are independent. Then {u, v, w} is our indep. set.

Case (b): u, v, and w are not independent. Without loss of generality, let u and v be connected. Then {x, u, v} is our complete subgraph.

Case (2): x is connected to at most two other vertices of GLet u, v, and w be three vertices not connected to x. More cases:

Case (a): u, v, and w form a complete subgraph. Done!

Case (b): u, v, and w do not form a complete subgraph. Without loss of generality, let u and v be independent. Then {x, u, v} is our indep. set. □

Page 30: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Case Analysis

Dealing with Cases

Cases can be nested! (as in example)

Proofs should not have too many cases Proofs with many cases are hard to check

Reducing the number of cases can be helpful to the reader If proofs of two cases are essentially the same, you only need to

give it once Some cases can be avoided with “without loss of generality”

Examples In the previous proof we had to consider (u, v) ϵ E, (v, w) ϵ E or

(u, w) ϵ E. We can swap letters to always make (u, v) ϵ E. For cases x ≤ y and y ≤ x we can assume the former

w.l.o.g.

Page 31: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Proof by Contradiction

Page 32: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Contradiction

Proof by Contradiction

Assume the negation and show that “it is impossible”

To prove Q: Assume ¬Q and derive contradiction (false) by forward

reasoning

To prove ¬Q: Assume Q and derive contradiction…

Very powerful technique!

“When you have eliminated the

impossible, whatever remains, however

improbable, must be the truth”

Page 33: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Usage

When to use?

Useful when the negation of the statement is easier to work with

Useful when the negation as a premise gives more information E.g. when the negation has a “there exists”-quantifier

Always try this method if you’re stuck!

Page 34: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Rational Numbers

Definition

A number x is rational if there exists integers a and b such that

x = a/b

Examples 6, ⅓, and -⅝ are rational π and e are irrational (not rational)

Page 35: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

√2 is irrational

Page 36: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

√2 is irrational

Proof

Ok, so we need to prove that there exist no integers a and b such that √2 = a/b. What can we do with that? Not sure…

How about a proof by contradiction?

That means we can assume that such a and b do exist. So what is wrong with that?

Page 37: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

√2 is irrational

Proof

For the sake of contradiction, assume there exist integers a and b such that √2 = a/b. Without loss of generality we can assume that

b > 0 (why?). Square both sides and rewrite to obtain 2b2 = a2. This means that a2 is even and thus a is even (we have proved the contraposition in the previous lecture). Hence there exists a k such that a = 2k. But then 2b2 = a2 = 4k2 or b2 = 2k2, and thus b is also even.

Ok, so both a and b are even. In principle there is nothing wrong with that. However, if b = 2m, then a/b = k/m = √2. Also, k and m are smaller integers. Applying the same argument to k and m leads to even smaller integers. This cannot go on forever!

Page 38: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

√2 is irrational

Proof

For the sake of contradiction, let a and b be the smallest positive integers such that √2 = a/b. Square both sides and rewrite to obtain 2b2 = a2. This means that a2 is even and thus a is even (we have proved the contraposition in the previous lecture). Hence there exists a k such that a = 2k. But then 2b2 = a2 = 4k2 or b2 = 2k2, and thus there exists an integer m such that b = 2m. We get that

k/m = a/b = √2. But k and m are smaller than a and b, which contradicts the assumption that a and b are smallest.

Thus, √2 is irrational. □

Page 39: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem (pigeonhole principle)

If n items are put into m containers and n > m, then there must exist a container that contains more than one item

pigeons pigeonholes

Page 40: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem (pigeonhole principle)

If n items are put into m containers and n > m, then there must exist a container that contains more than one item

Proof

For the sake of contradiction, assume that every container contains at most one item. Let ci be the number of items in container i for

1 ≤ i ≤ m (so ci ≤ 1 for all i). Then,

n = Σ1≤i≤m ci ≤ Σ1≤i≤m 1 = m < n

This is a contradiction. Thus there must exist a container that contains more than one item. □

Can we say something about more than one container?

Page 41: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

n2 log n ≠ O(n2)

Page 42: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

n2 log n ≠ O(n2)Proof

For the sake of contradiction, assume that there exist positive constants c and n0 such that n2 log n ≤ c n2 for all n ≥ n0. By dividing both sides by n2, we obtain that log n ≤ c for all n ≥ n0. This is false for n = max(2c+1, n0), since then log n ≥ log 2c+1 = c+1 > c.This contradicts that log n ≤ c for all n ≥ n0. Thus, n2 log n ≠ O(n2). □

Usually it is sufficient to say that the function f(n) (in this case: log n) is unbounded. This automatically implies that, for any constant c, there exists an n large enough such that f(n) > c.

Page 43: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Mathematical Induction

Page 44: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Mathematical induction

Mathematical Induction

Proving something about all positive integers using a chain of implications

Say we want to prove P(n) for all positive integers: Base case: Prove P(1) (or P(0) if for n ≥ 0) Step: Prove that P(n) implies P(n+1) for all n ≥ 1

P(1) ⇒ P(2) ⇒ P(3) ⇒ P(4) ⇒ P(5) ⇒ …

P(n) is called the induction hypothesis Sometimes you need to come up with one…

Again a very powerful technique!

Page 45: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Usage

When to use?

Whenever you encounter a statement of the form: ∀n[n ϵ ℕ: P(n)] or P(n) holds for all positive integers n

Or if it holds only for n ≥ c for some constant c Then the base case is P(c)

That’s all … for now

Page 46: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For all positive integers n, Σ1≤k≤n k = n(n+1)/2

Page 47: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For all positive integers n, Σ1≤k≤n k = n(n+1)/2

ProofWe use induction on n.Base case (n = 1):

Σ1≤k≤n k = Σ1≤k≤1 k = 1 = 1(1+1)/2 = n(n+1)/2

Step (n ≥ 1):Suppose that Σ1≤k≤n k = n(n+1)/2. (Induction hypothesis or IH)

We need to show that Σ1≤k≤n+1 k = (n+1)(n+2)/2.

We have:Σ1≤k≤n+1 k = (Σ1≤k≤n k) + (n+1) = n(n+1)/2 + (n+1) = (n+1)(n+2)/2

Note that we use the IH in the second equality.

So it follows by induction that Σ1≤k≤n k = n(n+1)/2 for all positive integers n. □

Page 48: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For every integer n ≥ 5, 2n > n2

Page 49: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

For every integer n ≥ 5, 2n > n2

Proof

We use induction on n.

Base case (n = 5): 2n = 25 = 32 > 25 = 52 = n2

Step (n ≥ 5):Suppose that 2n > n2 (IH).

We need to show that 2n+1 > (n+1)2 .

We have:

2n+1 = 2 x 2n > 2n2 (by IH)So it is sufficient to show that 2n2 ≥ (n+1)2 = n2 + 2n + 1 for n ≥ 5. This can be simplified to n2 – 2n – 1 ≥ 0 or (n – 1)2 ≥ 2. This is clearly true for n ≥ 5.

So it follows by induction that 2n > n2 for n ≥ 5. □

Page 50: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

A set of n ≥ 1 elements has 2n subsets including the empty set.

Page 51: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

A set of n ≥ 1 elements has 2n subsets including the empty set.

Proof

We use induction on n.

Base case (n = 1):If a set S has only one element x, then we have 2 subsets {} and {x}. Since 21 = 2, the base case holds.

Step (n ≥ 1):Suppose that every set of n elements has 2n subsets. (IH)

We need to show that any set S of n+1 elements has 2n+1 subsets.

Pick some element x ϵ S (possible since n+1 ≥ 1). Let S’ = S\{x}.

By the IH, S’ has 2n subsets A1, …, Ak (k = 2n). The subsets of S’ are exactly the subsets of S that do not contain x. On the other hand, the sets A’i = Ai U {x} are the subsets of S’ that contain x. A subset of S’ must either contain x or not. Thus, S has 2 x 2n = 2n+1 subsets. □

Page 52: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Induction issues

Be careful with induction!

Theorem

All horses have the same color

Page 53: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Induction issues

Be careful with induction!

Theorem

In every set of n ≥ 1 horses, all horses have the same color

Proof

We use induction on n.

Base case (n = 1):There is only one horse, so it must be true.

Step (n ≥ 1):Suppose that in every set of n horses, all horses have the same color (IH).

We need to show that any set of n+1 horses share the same color.

By the IH, the first n horses have the same color. Similarly, by the IH,

the last n horses have the same color. Thus all horses have the same

color. □

Page 54: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Induction issues

Be careful with induction!

Theorem

In every set of n ≥ 1 horses, all horses have the same color

Proof

We use induction on n.

Base case (n = 1):There is only one horse, so it must be true.

Step (n ≥ 1):Suppose that in every set of n horses, all horses have the same color (IH).

We need to show that any set of n+1 horses share the same color.

By the IH, the first n horses have the same color. Similarly, by the IH,

the last n horses have the same color. Thus all horses have the same

color. □

What happens if n = 1?

Page 55: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Induction issues

Be careful with induction!

Theorem

In every set of n ≥ 1 horses,

all horses have the same color

We are missing P(1) ⇒ P(2) This breaks everything!

Can be remedied by additionally proving P(2) as extra base case But in this case we can’t…

Step argument must work for all n ≥ 1 (or n ≥ c)! Otherwise these cases must be proved as extra base cases

Page 56: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Strong Induction

Strong Induction

Normally we must prove P(n+1) using P(n)

What if we need P(i) (i < n) to prove P(n+1)? After all, P(i) should also already hold

Instead of P(n) ⇒ P(n+1) we prove P(1) ⋀ … ⋀ P(n) ⇒ P(n+1) More information in the premise! Still correct: strong induction

Not always useful, but sometimes very convenient…

Page 57: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

It takes n – 1 breaks to break a chocolate bar with n ≥ 1 squares into individual squares

Page 58: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

It takes n – 1 breaks to break a chocolate bar with n ≥ 1 squares into individual squares

Proof

We use strong induction on n.

Base case (n = 1):It’s just 1 square, so 0 breaks is correct.

Step (n ≥ 1):Suppose it takes i – 1 breaks to break a chocolate bar with i squares

for 1 ≤ i ≤ n (IH). We need to show that it takes n breaks to break a

chocolate bar with n+1 squares. Suppose the chocolate bar is broken into 2 pieces with a and

b squares, where 1 ≤ a, b ≤ n and a + b = n+1. By the IH it

takes a – 1 breaks for the first piece and b – 1 for the second piece.

Thus, weneed 1 + (a – 1) + (b – 1) = a + b – 1 = n breaks in total. □

Page 59: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

It takes n – 1 breaks to break a chocolate bar with n ≥ 1 squares into individual squares

Proof

We use strong induction on n.

Base case (n = 1):It’s just 1 square, so 0 breaks is correct.

Step (n ≥ 2):Consider a chocolate bar with n squares. Suppose the chocolate bar is broken into 2 pieces with a and

b squares, where 1 ≤ a, b < n and a + b = n. By the IH it takes

a – 1 breaks for the first piece and b – 1 for the second piece.

Thus, weneed 1 + (a – 1) + (b – 1) = a + b – 1 = n – 1 breaks in total.

Page 60: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

With 4-cent and 5-cent coins we can make any amount n ≥ 12

Page 61: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

With 4-cent and 5-cent coins we can make any amount n ≥ 12

Proof

We use strong induction on n.

Base case (n = 12): We can use three 4-cent coins.

Step (n ≥ 12): Suppose we can make any amount i with 4-cent and 5-cent coins for

12 ≤ i ≤ n. We need to show that we can make the amount n+1.

If we use one 4-cent coin, then the remainder is n – 3. By the IH we

can make the amount n – 3, so that means we can make n+1. □

Page 62: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

With 4-cent and 5-cent coins we can make any amount n ≥ 12

Proof

We use strong induction on n.

Base case (n = 12): We can use three 4-cent coins.

Step (n ≥ 12): Suppose we can make any amount i with 4-cent and 5-cent coins for

12 ≤ i ≤ n. We need to show that we can make the amount n+1.

If we use one 4-cent coin, then the remainder is n – 3. By the IH we

can make the amount n – 3, so that means we can make n+1. □

Can we apply the IH to n – 3? For n = 12, n – 3 = 9 and we haven’t

proved anything for n = 9! The step only works for n ≥ 15. We need

more base cases!

Page 63: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Example

Theorem

With 4-cent and 5-cent coins we can make any amount n ≥ 12

Proof

We use strong induction on n.

Base case (12 ≤ n ≤ 15):(n = 12): three 4-cent coins.

(n = 13): two 4-cent coins and one 5-cent coin.

(n = 14): one 4-cent coin and two 5-cent coins.

(n = 15): three 5-cent coins.

Step (n ≥ 15): Suppose we can make any amount i with 4-cent and 5-cent coins for

12 ≤ i ≤ n. We need to show that we can make the amount n+1.

If we use one 4-cent coin, then the remainder is n – 3. By the IH we

can make the amount n – 3, so that means we can make n+1. □

Page 64: Reading and Writing Mathematical Proofs Spring 2015 Lecture 2: Basic Proving Techniques

Strong induction

Final notes on strong induction

When you apply the IH to P(i), make sure that i ≤ n. Otherwise you may be proving P(n+1) with P(n+1)…

As with standard induction, make sure that the step works for all n If not, you may need more base cases

Theorem6n = 0 for all n ≥ 0

ProofBase case (n = 0): 6 x 0 = 0Step (n ≥ 0): n + 1 = a + b. By the IH, 6a = 0 and 6b = 0.

Thus, 6 (n+1) = 6 (a + b) = 6a + 6b = 0 + 0 = 0. □

What’s wrong with this proof?