(残り・復習)

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

© 2006-16 Martin J. Dürst Aoyama Gakuin University

- Remaining Schedule
- Homewory and summary for last lecture
- Mathematical Induction (continued)
- Repetition
- Lookout

January 27 (Friday), 11:10～12:35: Final exam

- Proofs are the most important tool of Mathematics,

and very useful for Information Technology - There are many different proof methods:

Deductive proof, inductive proof, proof by contradiction, proof by counterexample, proof about sets, proof by enumeration - Mathematical induction is an important proof method

from Peano Axioms

In lecture 2, we proved associativity of addition (`a` +
(`b`+`c`) = (`a`+`b`) + `c`) from
the Peano Axioms.

This was a (very informal) proof by mathematical induction.

Here we prove commutativity of addition (`a`+`b` =
`b`+`a`), also by mathematical induction.

Reminder: axioms of addition (expressed in predicate logic)

- ∀
`a`∈ℕ^{+}:`a`+ 1 = s(`a`) - ∀
`a`,`b`∈ℕ^{+}:`a`+ s(`b`) = s(`a`+`b`)

Induction for Peano arithmetic (Peano axiom 5):

`P`(1) ∧ (∀`k`∈ℕ^{+}:
`P`(`k`) → `P`(s(`k`)) ⇒
∀`n∈ℕ ^{+}`:

[for comparison: Inductive proof: `S`(0) ∧
(∀`k`∈ℕ: `S`(`k`) →
`S`(`k`+1)) ⇒ (∀`n∈ℕ`:
`S`(`n`))]

Lemma: 1+`a` = s(`a`) = `a`+1

(a lemma is a minor theorem, used as a stepping stone)

Proof:

- Base case (
`a`=1):

1+1 [axiom of addition 1]

= s(1) [axiom of addition 1]

= 1+1 - Inductive step: Proof of 1+s(
`k`) = s(s(`k`)) = s(`k`)+1- Inductive assumption: For any
`k`≧1, 1+`k`= s(`k`) =`k`+1 - 1 + s(
`k`) [axiom of addition 1]

= 1 + (`k`+1) [associativity of addition]

= (1+`k`) + 1 [assumption]

= s(`k`) + 1 [axiom of addition 1]

= s(s(`k`)) Q.E.D.

- Inductive assumption: For any

Theorem: `a`+`b` = `b`+`a`

Method: Use induction over `b.`

[General remark: if there are two or more variables, try induction over one of them.]

- Base case (
`b`=1):

`a`+1 = 1+`a`from Lemma on previous slide - Inductive step: Proof of
`a`+s(`k`)`= s(``k`)`+``a`- Inductive assumption: For any
`k`≧1,`a`+`k`=`k`+`a` `a`+ s(`k`) [axiom of addition 1]

=`a`+ (`k`+1) [associativity of addition]

= (`a`+`k`) + 1 [assumption]

= (`k`+`a`) + 1 [associativity of addition]

=`k`+ (`a`+1) [lemma on previous slide]

=`k`+ (1+`a`) [associativity of addition]

= (`k`+1) +`a`[axiom of addition 1]

= s(`k`) +`a`Q.E.D.

- Inductive assumption: For any

Comment: The commutative law is simpler than the associative law. However, proving the commutative law was more difficult. Actually, we used the associative law (four times) to prove the commutative law.

Number sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89,...

Definition of Fibonacci function `fib`(`n`):

`fib`(0) = 0`fib`(1) = 1- ∀
`n`>1:`fib`(`n`) =`fib`(`n`-1) +`fib`(`n`-2)

Wide range of applications:

- Number of rabbits after
`n`months - Golden ratio
- Number of sunflower seeds

Wide range of mathematical properties

Property: `fib`(`n`+`m`) =
`fib`(`m`) · `fib`(`n`+1) +
`fib`(`m`-1) · `fib`(`n`)
(∀`n`≥0, `m`≥1)

Proof by induction over `n`:

- Base case (
`n`=0):

`fib`(0+`m`) =`fib`(`m`) ·`fib`(0+1) +`fib`(`m`-1) ·`fib`(0)

`fib`(`m`) =`fib`(`m`) · 1 +`fib`(`m`-1) · 0 - Inductive step: Proof of
`fib`(`k`+1+`m`) =`fib`(`m`) ·`fib`(`k`+2) +`fib`(`m`-1) ·`fib`(`k`+1)- Inductive assumption:
`fib`(`k`+`p``) =``fib`(`p`) ·`fib`(`k`+1) +`fib`(`p`-1) ·`fib`(`k`) (∀`p`≥1) - (Hint: Start with more difficult side)

`fib`(`m`) ·`fib`(`k`+2) +`fib`(`m`-1) ·`fib`(`k`+1) [Definition of`fib`(`k`>0)]

=`fib`(`m`) · (`fib`(`k`+1)+`fib`(`k`)) +`fib`(`m`-1) ·`fib`(`k`+1) [arithmetic]

= (`fib`(`m`)+`fib`(`m`-1)) ·`fib`(`k`+1) +`fib`(`m`) ·`fib`(`k`) [Definition of`fib`(`m`>1)]

=`fib`(`m`+1) ·`fib`(`k`+1) +`fib`(`m`) ·`fib`(`k`) [assumption,`p`=`m`+1]

=`fib`(`k`+`m`+1) [arithmetic]

=`fib`(`k`+1+`m`) Q.E.D.

- Inductive assumption:

- Theorem to be proved:

In a binary tree with`l`leaves, the number of nodes is`n`= 2`l`-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

We start with a very small tree consisting only of the root, and grow it step by step. We can create any shape of binary tree this way.

- Base case: In a tree with only the root node,
`n`=1 and`l`=1, therefore`n`= 2`l`-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`' = 2`l`'-1.- Inductive assumption:
`n`= 2`l`-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]

= 2`l`-1+2 [(2)]

= 2(`l`'-1)-1+2 [arithmetic]

= 2`l`'-1 Q.E.D.

- Inductive assumption:

情報数学 II: 情報理論、グラフ理論など (二年前期、大原先生)

計算機実習 I (二年前期, Dürst)

データ構造とアルゴリズム (二年後期, Dürst)

言語理論とコンパイラ (三年前期, Dürst)

卒業研究 (四年通年)

Homework 4 from last lecture: Find a question regarding past examinations that you can ask in the next lecture.

- commutativity
- 可換性 (注: 交換性ではない)
- associativity
- 結合性
- (in)formal
- (非)形式的
- lemma
- 補題 (補助定理)
- golden ratio
- 黄金比
- 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
- 内部節