Mathematical Induction and Other Proof
Methods
(数学的帰納法などの証明方法)
Discrete Mathematics I
14th lecture, January 6, 2023
https://www.sw.it.aoyama.ac.jp/2022/Math1/lecture14.html
Martin J. Dürst
© 2006-23 Martin
J. Dürst Aoyama Gakuin
University
Today's Schedule
- Remaining Schedule
- Homework and summary of last lecture
- Proof Methods
- Mathematical Induction
- Student Survey
Remaining Schedule
- January 6: this lecture
- January 13: 15th lecture
- January 27, 11:10-12:35: Term final exam (85 minutes)
Summary of Last Lecture
- Congruence (≡) is at the core of Modular
Arithmetic
- Two integers are congruent (modulo n) if they have
the same remainder when divided by n
- The Congruence Relation is an equivalence relation, with the
remainder as the class representative
- Congruence relations and modulo operations have many useful
properties
- The result of the modulo operation for negative operands depends on the
definition (programming language). In this lecture, we use the Mathematical
definition.
- Modular division is defined as multiplication by the modular
multiplicative inverse (where defined)
- Digit sum and digital root are helpful when checking calculations using
casting out nines
Homework from Last Lecture
- Create some addition problems in different bases, and then solve them
(see lecture 2). Check your results using
casting out nines (or b-1). Also, check your results by
converting the numbers to decimal notation.
- Create some subtraction problems in different bases, and figure out how
to do subtraction in bases other than 10. Check your results as above.
- Create some problems for remainder calculation using congruence, and
solve them. Check your results using a calculator.
- Prepare for final exam
How to Prepare for Final Exam
- Use past exams for training and review
- Submit one question about past exams or lecture content as homework
- Use Q&A
Forum for questions about lecture content
- Check Q&A
Forum for answers on questions from others
- Ask questions now!
More Homework from Last Lecture
Only one of the two equations below is correct. Which one?
1346021 · 6292041 = 8469219318861
dr(1346021) · dr(6292041) ≡? dr(8469219318861)
8 · 6 ≡mod 9 3 ⇒ maybe
correct
3615137 · 8749019 = 31628902349603
dr(3615137) · dr(8749019) ≡? dr(31628902349603)
8 · 2 ≡mod 9 7 ≠ 2 ⇒ wrong
Homework about Groups
- Homework due December 15, 2022
- Returning this homework after this lecture
- Some very nice results, but also some very bad results
- Advice to improve:
- Read question carefully, and follow it:
- Symmetric group of order 3 ⇒ group of size 3! (=6)
- Use lexical order for the permutations. Use the notation
introduced in this lecture.
- Check all the conditions (axioms) for a group.
(closure, identity, inverse, associativity)
- If you don't understand something, consult a book or the web, or come
to ask
Homework about Groups: Frequent Errors
- 3-element group instead of symmetric group of order 3 (size 6)
- Missing rows or columns (not a Caley table)
- Different row and column headings (not a group), or different order (not
a Caley table)
- Results in table that are not part of group (not a group)
- Duplicate elements in same row or column (not a group)
- Identity element not in first row/column (not a Caley table)
- See examples on handout
Homework about Boolean Algebras: Frequent Errors
(Homework due December 22, 2022)
- {∅}: Empty set is {} or ∅, but not {∅}
- Sets written as sequences ({a, b, c} ≠ (a, b, c))
- Hasse diagrams do not use arrows
- Hasse diagrams have no horizontal lines
- Duplications:
- {a, b, c, d}: 6 cases
- {s, t, u, v}: 3 cases
- (0110}: 5 cases
- 11, 13, 17, 19: 3 cases
About the Handout
- Sections 1.2-1.4 of Introduction to Automata Theory, Languages, and
Computation
by John E. Hopcroft, Rajeev Motwani, and Jeffrey D. Ullman
- Please ignore pieces about language theory and automata theory
- Language theory is part of 3rd-year course Language Theory and
Compilers
- Selected because it is general and easily readable
- Sometimes, uses a different mathematical "dialect"
- Contents is part of the final exam
- For this lecture only; do not distribute
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
Ways to Express a Proof
- Mostly textual proof
- Proof using formulæ
- Automatically verified proof
- Mixtures of the above
How Detailled Should a Proof Be?
- Intuition is not a proof
- (Program) test: Individual test cases are not enough for a proof
- Rough proof: Steps are grouped, general arithmetic knowledge is
assumed
Example (one step): x + y + 1 = 1 + x +
y
- Detailled proof: Every small step is documented and justified
Example: x + (y + 1) = (commutativity of
addition)
x + (1 + y) = (associativity of
addition)
(x + 1) + y = (commutativity of
addition)
(1 + x) + y
- Required details depend on topic and assumed knowledge
Proof Methods
- Deductive proof (proof by deduction)
- Inductive proof (proof by induction)
- Proof by contradiction
- Proof by counterexample
- Proof about sets
- Proof by enumeration
Proofs and Symbolic Logic
(S is the theorem to be proven, expressed as a proposition or
predicate)
- Deductive proof: (H ∧
(H→S)) ⇒ S, etc.
- Inductive proof: see later slide
- Proof by contradiction: (¬S→S) ⇒ 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 natural numbers are the most frequent "structure", but also tree
structures,...
- Mathematical induction is actually a kind of deduction, not
induction
- Applications of mathematical induction in information technology:
- Design and proof of properties of algorithms and data structures
- Proofs about programs:
Simple Example of Mathematical Induction
Look at the following equations:
0 = (adding up no numbers results in 0)
1 = 1
4 = 1 + 3
9 = 1 + 3 + 5
16 = 1 + 3 + 5 + 7
25 = 1 + 3 + 5 + 7 + 9
...
Express the general rule contained in the above additions as a
hypothesis.
Prove the hypothesis using Mathematical induction.
Hypothesis
- The left side of the equations is n2
(n≥0)
- The right side of the equations is the sum of the (consecutive)
n smallest odd numbers (n≥0)
- Hypothesis: The sum of the n smallest odd numbers is
n2 for n≥0:
∀n≥0: n2 =
∑ni=1 2i-1
- Property to prove for all n≥0: S(n):
n2 =
∑ni=1 2i-1
Proof
1. Basis:
Prove the property for n = 0:
∑0i=1 2i-1 = 0 =
02
2. Induction:
a. Inductive assumption: Assume that the property is true for some
k≥0: k2 =
∑ki=1 2i-1
b. Show that the property is true for k + 1:
We need to prove that (k+1)2 =
∑(k+1)i=1 2i-1
[start with left side]
(k+1)2 [expansion]
= k2 + 2k + 1 [arithmetic]
= k2 + 2k + 2 - 1 [arithmetic]
= k2 + 2(k+1) - 1 [use
assumption]
= ∑ki=12i-1 +
2(k+1) - 1 [property of ∑]
= ∑k+1i=1 2i-1
Both the basis and the induction are true. This proves the hypothesis.
Q.E.D.
Important: In exam, follow this structure, including final sentence.
The Two steps of Mathematical Induction
- Base case (basis (step)): Proof of S(0)
- Inductive step (induction, inductive case): Proof of
∀k∈ℕ: S(k) →
S(k+1)
- (inductive) Assumption: clearly state S(k)
- Actual proof of inductive step
Method: Formula manipulation so that the assumption can be used
Mathematical induction in symbolic logic:
S(0) ∧ (∀k∈ℕ: S(k) →
S(k+1)) ⇒ ∀n∈ℕ:
S(n)
Variations of Mathematical Induction
- Start with S(1) or S(2),... instead of
S(0)
S(b) ∧ (∀k∈ℕ, k≥b:
S(k) → S(k+1)) ⇒
(∀n∈ℕ, n≥b:
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 some or all S(j)
where 0≤ j≤k
(this is called strong induction or complete
induction)
S(0) ∧ (∀k∈ℕ: (∀i
(0≤i≤k): S(i)) →
S(k+1)) ⇒ ∀n∈ℕ:
S(n)
- Limit the proof to some subset of natural numbers (examples: even numbers
only, 2m only)
We can interpret this as proving T(n/2) or
T(m = log2 n)
- Proof not about natural numbers, but about something that can be ordered
using natural numbers
- Branching tree structure or other structure (e.g. (half) order,
lattice,...): structural induction
Example of Structural Induction on Trees
- Theorem to be proven:
In a binary tree with l leaves, the number of nodes is
n = 2l-1
- Definition of binary tree:
Directed graph with the following conditions:
- No cycles
- If there is a directed edge (arrow) from node a to node
b, then a is the parent of b,
and b is the child of a
- All nodes except the root have a parent
- There are two types of nodes:
- Leaves, which have no children
- Internal nodes, which have exactly two children
- Theorem is helpful, shows that about half of nodes in a binary tree are
leaves.
Proof of the Relation between the Number of Nodes and Leaves in a Binary
Tree
We start with a very small tree consisting only of the root, and grow it
step by step.
We can create a binary tree of any shape..
- Base case: In a tree with only the root node, n=1 and
l=1, therefore n = 2l-1 is correct.
- Inductive step: Grow the tree one step by replacing a leaf with an
internal node with two leaves.
Denote the number of nodes before growing by n, the number of
leaves before growing by l, the number of nodes after growth by
n', and the number of leaves after growth by l'. We
need to prove n' = 2l'-1.
- Inductive assumption: n = 2l-1
- In one growth step, the number of nodes increases by two:
n'=n+2 (1)
In one growth step, the number of leaves increases by two but is
reduced by one: l'=l+2-1=l+1;
l = l'-1 (2)
n' [(1)]
= n+2 [assumption]
= 2l-1+2 [(2)]
= 2(l'-1)-1+2 [arithmetic]
= 2l'-1
Both the basis and the induction are true. This proves the hypothesis.
Q.E.D.
Homework
- Read the handout (Formal Proof, English or Japanese, some paper handouts
available)
- Find a question regarding past examinations or lecture content.
Deadline: January 11, 2023 (Wednesday),
22:00.
Where to submit: Moodle
quiz
Caution: Do not submit the same question as another student
- Prove the closed formula for combinations (see lecture 7) by structural
induction (no need to submit)
- Find the problem in the following proof (no need to submit):
Theorem: All n lines on a plane that are not parallel to each
other will cross in a single point.
Proof:
- Base case: Obviously true for n=2
- Induction:
- Assumption: k lines cross in a single point.
- 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.
Student Survey
(授業改善のための学生アンケート)
WEB Survey
お願い:
自由記述に必ず良かった点、問題点を具体的に書きましょう
(悪い例: 発音が分かりにくい; 良い例:
さ行が濁っているかどうか分かりにくい)
Glossary
- (formal) language theory
- 言語理論
- automata theory
- オートマトン理論
- proof
- 証明
- to prove
- 証明する
- data structure
- データ構造
- intuition
- 直感
- test case
- テスト・ケース
- deductive proof
- 演繹的証明
- inductive proof
- 帰納的証明
- proof by contradiction
- 背理法
- proof by counterexample
- 反例による証明
- proof about sets
- 集合についての証明
- proof by enumeration
- 列挙による「証明」
- mathematical induction
- 数学的帰納法
- structure
- 構造
- loop
- 繰返し
- base case
- 基底
- inductive step
- 帰納
- inductive assumption
- (帰納の) 仮定
- recursion
- 再帰
- hypothesis
- 仮説
- equation
- 方程式
- consecutive
- 連続的な
- odd (number)
- 奇数
- inductive assumption
- (帰納の) 仮定
- strong induction
- 完全帰納法 (または累積帰納法)
- structural induction
- 構造的帰納法
- binary tree
- 二分木
- node (of a tree/graph)
- 節
- leaf (of a tree)
- 葉
- directed graph
- 有効グラフ
- cycle (of a graph)
- 閉路
- parent (in a tree)
- 親
- child (in a tree)
- 子
- root (of a tree)
- 根
- internal node
- 内部節
- parallel
- 平行