(残り・復習)

https://www.sw.it.aoyama.ac.jp/2019/Math1/lecture15.html

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

- Remaining Schedule
- Summary and homework for last lecture
- Mathematical Induction
- Commutativity of Addition
- Fibonacci numbers

- Repetition
- Outlook

January 31, **11:10**-12:35: Term final exam

- Digit sum and digital root are helpful when checking calculations using casting out nines
- 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, consisting of two steps: Base and induction

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} 2 ⇒ wrong

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:

- 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.

- Assumption:

Read the handout

[a small number of copies is still available in this lecture or in front of room O-529]

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) ∧ (∀

For comparison: Inductive proof:

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

In other words, Peano axiom 5 states that mathematical induction works for
natural numbers.

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 = 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`[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. 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)

This definition directly leads to a very simple (but slow) recursive implementation.

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:

情報確率統計 (二年前期、楽先生)

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

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

情報総合プログラミング実習II: ウェブ技術 (3年前期, Dürst)

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

卒業研究 (4年通年)

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
- 黄金比