情報数学 I

第十五回 (2014年1月24日)

残り・復習
Remainder, Repetition

Martin J. Dürst

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

AGU

© 2006-14 Martin J. Dürst 青山学院大学

今日の予定

これからの予定

1月31日(金曜日2限、11:10-12:35): 期末試験

前回の演習問題

[本年度のために削除]

 

Proving Commutativity of Addition
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 with predicate logic)

  1. (∀a∈ℕ+: a + 1 = s(a))
  2. (∀a, b∈ℕ+: a + s(b) = s(a + b))

Note: Induction for Peano arithmetic is:
S(1) ∧ (∀k∈ℕ+: S(k) → S(s(k)) ⇒ (∀n∈ℕ+, n: S(n))

Lemma: Commutativity of Addition for 1

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 = s(1) [axiom of addition 1]
= s(1) [axiom of addition 1]
= 1+1

Induction hypothesis: 1+k = s(k) = k+1

We need to prove 1+s(k) = s(s(k)) = s(k)+1

1 + s(k) [axiom of addition 1]
1 + (k +1) [associativity of addition]
= (1+k)+1 [hypothesis]
= s(k)+1 [axiom of addition 1]
= s(s(k)) Q.E.D.

 

Proof of Main Theorem

Theorem: a+b = b+a

Method: Use induction over b.

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

Base case (b=1):
a+1 = 1+a from Lemma on previous slide

Induction hypothesis: a+k = k+a

We need to prove a+s(k) = s(k)+a

a+s(k) [axiom of addition 1]
= a+(k+1) [associativity of addition]
= (a+k)+1 [hypothesis]
= (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.

 

Fibonacci Numbers

Number sequence: 0, 1, 1, 2, 3, 5, 8, 13, 23, 34, 57,...

Definition of Fibonacci function fib(n):

Wide range of applications:

Wide range of mathematical properties

 

Proof of a property of Fibonacci Numbers

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

Induction hypothesis: fib(k+m) = fib(m) · fib(k+1) + fib(m-1) · fib(k) (∀m≥1)

We need to prove fib(k+1+m) = fib(m) · fib(k+2) + fib(m-1) · fib(k+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) [arithmetic]
= fib(m+1) · fib(k+1) + fib(m) · fib(k) [hypothesis, m = m+1]
= fib(k+m+1) [arithmetic]
= fib(k+1+m) Q.E.D.

 

構造的帰納法の例

二文木の節と葉の数の関係の証明

根だけの非常に小さい木から少しずつ伸ばせば、どんな形の二分木でも作れる。伸ばし方の一歩として、ある葉の代わり二つの新しい葉が伸びる内部節にする方法を取る。

基底: 根だけの木の場合、節の数が 1 (n=1) で、葉の数も 1 (l=1) なので n = 2l-1 が明らか。

帰納: 伸びる前の節の数を n, 葉の数を l、一歩伸びる後の節の数を n', 葉の数を l' とする。

仮定: n = 2l-1

証明すべき: n' = 2l'-1

一歩伸びると節の数が n から n+2 に増える: n'=n+2 (1)

一歩伸びると葉の数が 2個増で一個減: l'=l+2-1=l+1; l = l'-1 (2)

n' [(1)]
= n+2 [仮定]
= 2l-1+2 [(2)]
= 2(l'-1)-1+2 [算数]
= 2l'-1 Q.E.D.

 

展望

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

計算機実習 I (二年前期)

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

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

卒業研究 (四年通年、デモ)

復習

質問、疑問などなんでも結構

Glossary

commutativity
可換性 (注: 交換性ではない)
associativity
結合性
(in)formal
(非)形式的
lemma
補題 (補助定理)
golden ratio
黄金比