# Mathematical Induction and Other Proof Methods

(数学的帰納法などの証明方法)

## Discrete Mathematics I

### 14th lecture, Jan. 13, 2016

http://www.sw.it.aoyama.ac.jp/2016/Math1/lecture14.html

# Today's Schedule

• Remaining Schedule
• Digit sums and digital roots
• Proof Methods
• Mathematical Induction
• Student Survey

# Remaining Schedule

• January 13: this lecture (makeup class)
• January 20: 15th lecture
• January 27, 11:10-12:35: Final exam

# Remainder Calculation: More Examples

318 mod 7 = ?

318 = (33)6 = 276 (mod 7) (-1)6 = 1

4110 mod 37 = ?

4110 (mod 37) 410 = 220 = 324 (mod 37) (-5)4 = 252 (mod 37) (-12)2 = (6 · 2)2 = 36 · 4 (mod 37) (-1) · 4 = -4 (mod 37) 33

# Digit Sum and Digital Root

Digit sum: Sum of all of the digits of a number

Digital root: Single-digit result of repeatedly calculating the digit sum

Example in base 10:
The digit sum of 1839275 is 1+8+3+9+2+7+5 = 35
The digit sum of 35 is 3+5 = 8
The digital root of 1839275 is 8

Example in base 16:
The digit sum of A8FB is A+8+F+B (10+8+15+11) = (44) 2C
The digit sum of 2C is 2+C (2+12) = (14) E
The digital root of A8FB is E

# Application of Congruence: Casting out Nines

• The digital root of a number n in base b is equal to n mod (b-1)
(dr(nb) = n mod (b-1))
• Reason: For n = dk...d1d0 = dk×bk+ d (k-1)×b (k-1)+...+d1×b1+d0×b0,
because bm(mod (b-1)) 1m = 1, n(mod (b-1)) dk+ d(k-1)+...+d1+d0

• If b=10, then b-1=9
• Example in base 10: 1839275 mod 9 = 8
• Example in base 16: A8FB mod F = E
• This can be used for cross-checking the result of an arithmetic operation:
a · b = c ⇒ dr(dr(a) · dr(b)) = dr(c)
a · bc ⇐ dr(dr(a) · dr(b)) ≠ dr(c)
• Example (homework): Only one of the two equations below is correct. Which one?
2485938 · 4962483 = 12336425064054
2354987 · 2498472 = 5883469079864

• From a (famous) book about (formal) language theory
• Selected because it is general and easily readable
• Sometimes, is uses a different mathematical "dialect"
• The contents is part of the final exam

# Importance of Proofs

• Very important tool for Mathematics
(the goal of Mathematics is to prove as many useful and interesting theorems and properties from very few axioms and definitions)
• For computer science and information technology:
• Proofs of properties of data structures
• Proofs of correctness or other properties of algorithms
• Proofs of correctness or other properties (e.g. speed) of a program
• Proofs of correctness of program transformations

# How Detailled Should a Proof Be?

• Intuition
• (Program) test: Individual test cases
• Level of detail of a proof:
• Rough proof
Example: x + (y + 1) = (x + 1) + y
• Detailled proof
Example: x + (y + 1) = (commutativity of addition)
x + (1 + y) =(associativity of addition) (x + 1) + y
• How to express proofs:
• Mostly textual proof
• Proof using formulæ
• Automatically verified proof

# Proof Methods

• Deductive proof (proof by deduction)
• Inductive proof (proof by induction)
• Proof by counterexample
• Proof by enumeration

# Proofs and Symbolic Logic

(S is the the theorem to be proven, expressed as a proposition or predicate)

• Deductive proof: (H ∧ (HS)) ⇒ S, etc.
• Inductive proof: S(0) ∧ (∀k∈ℕ: S(k) → S(k+1)) ⇒ (∀n∈ℕ: S(n))
• Proof by contradiction: (¬SS) ⇒ S

Confirmation:

 S ¬S ¬S→S (¬S→S) → S F T F T T F T T
• Proof by counterexample:
(∃x:¬S(x)) ⇒ ¬∀x: S(x)
• Proof by enumeration: example: truth table

# Deduction and Induction

• Deduction: Conclude some specific fact from some general law
• Induction: Infer some general law from some sample observations
• Mathematical induction
• Goal: Proof of some property about (almost) all parts of some structure
• The integers are the most frequent "structure", but also tree structures,...
• Mathematical induction can actually be classified as some kind of deduction, not induction

# Applications of Mathematical Induction

Applications of mathematical induction in information technology:

• Design and proof of properties of algorithms and data structures
• Loops
• Recursion

# The Two steps of Mathematical Induction

S(0) ∧ (∀k∈ℕ: S(k) → S(k+1)) ⇒ (∀n∈ℕ: S(n))

1. Base case (basis (step): proof of S(0)
2. Inductive step (induction, inductive case): proof of ∀k∈ℕ: S(k) → S(k+1)
1. (inductive) Assumption: clearly state S(k)
2. Actual proof of inductive step

Method: Formula manipulation so that the assumption can be used

# Simple Example of Mathematical Induction

Look at the following equations:

1 = 1

1 + 3 = 4

1 + 3 + 5 = 9

1 + 3 + 5 + 7 = 16

1 + 3 + 5 + 7 + 9 = 25

Express the general rule contained in the above additions as a hypothesis.

Prove the hypothesis using Mathematical induction.

# Hypothesis

• The right side of the equations is m2
• The left side is the equations is the sum of the m smallest (consecutive) odd numbers
• Hypothesis: The sum of the m smallest odd numbers is m2
n≥0: ∑ni=0 2i+1 = (n+1)2

# Proof

## Basis:

Prove the property for n = 0: ∑0i=0 2i+1 = 1 = 12

## Induction:

Inductive assumption: Assume that the property is true for some k≥0: ∑ki=0 2i+1 = (k+1)2

Show that the property is true for k + 1:
(k+1)i=0 2i+1 = (k+2)2

(k+2)2 [expansion]
= k2 + 4k + 4 [arithmetic]
= k2 + 2k +1 + 2k + 3 [arithmetic]
= (k+1)2 + 2(k+1) + 1 [use assumption]
= ∑ki=0 (2i+1) + 2(k+1) + 1 [property of ∑]
= ∑(k+1)i=0 2i+1 Q.E.D.

# Variations of Mathematical Induction

S(b) ∧ (∀k∈ℕ, kb: S(k) → S(k+1)) ⇒ (∀n∈ℕ, nb: S(n))
We can interpret this as proving T(n-b) = S(n), so that we again start at 0
• In the proof of step 2 for S(k+1), use not only
S(k), but also some or all S(j) where jk
(this is called strong induction or complete induction)
S(0) ∧ (∀k∈ℕ: (∀i (0≤ik): S(i)) → S(k+1)) ⇒ ∀n∈ℕ: S(n)
• Limit the proof to some subset of integers (examples: even numbers only, 2m only)
• Proof not about integers, but about something that can be ordered using integers
• Branching tree structure or some other structure (e.g. (half) order)

# Homework

(no need to submit)

1. Answer the question on the slide "Application of Congruence: Casting out Nines"
2. Find out the problem in the following proof:

Theorem: All n lines on a plane that are not parallel to each other will cross in a single point.

Proof:

1. Base case: Obviously true for n=2
2. Induction:
1. Assumption: k lines cross in a single point.
2. For k+1 lines, both the first k lines and the last k lines will cross in a single point, and this point will have to be the same because it is shared by k-1 lines.
4. Find a question regarding past examinations that you can ask in the next lecture.

# Student Survey

(授業改善のための学生アンケート)

WEB Survey

お願い: 自由記述に必ず良かった点、問題点を具体的に書きましょう

(例: 「英語をやめてほしい」のではなく、「Glossary を ... に改善してください」)

# Glossary

digit

digit sum

digital root

casting out nines

(formal) language theory

automata theory
オートマトン理論
proof

to prove

data structure
データ構造
intuition

test case
テスト・ケース
deductive proof

inductive proof

proof by counterexample

proof by enumeration

mathematical induction

structure

loop

base case

inductive step

inductive assumption
(帰納の) 仮定
recursion

hypothesis

equation

consecutive

odd (number)

inductive assumption
(帰納の) 仮定
strong induction

parallel