T45 episteme

えぴ 福田
えぴ 福田NEC通信システム
このプログラムは停止するだろうか?
   ── 数理パズルで小手調べ ──


     わんくま同盟茶藝部顧問
     Microsoft MVP for VC++ 2004~
     episthmh episteme@cppll.jp

      わんくま同盟 東京勉強会 #45
「鳩ノ巣原理」

問:「一辺が70cmの正方形の的に50発の弾
痕がある。このとき、弾痕間の距離が15cm
以下である二つの弾痕の組が少なくともひと
つあることを証明せよ」




       わんくま同盟 東京勉強会 #45
「鳩ノ巣原理」

問:「一辺が70cmの正方形の的に50発の弾
痕がある。このとき、弾痕間の距離が15cm
以下である二つの弾痕の組が少なくともひと
つあることを証明せよ」
一辺が10cmの
7×7 = 49個の箱
その中に50個の弾痕が
あるのだから
少なくとも一つの箱には
二つ以上の弾痕がある。

              わんくま同盟 東京勉強会 #45
「対角線論法」

問:「0以上1未満の実数と自然数との間で
一対一の対応を付けることはできない(前者
がはるかにたくさんある)ことを証明せよ」




       わんくま同盟 東京勉強会 #45
「対角線論法」

問:「0以上1未満の実数と自然数との間で
一対一の対応を付けることはできない(前者
がはるかにたくさんある)ことを証明せよ」

「自然数との間で一対一の対応を付ける」と
は、
「無限の長さを持つ表のどこかにその数が現
れる(列挙可能)」ということに等しい。


       わんくま同盟 東京勉強会 #45
「対角線論法」

二進数表記にして     0.   0   0   0   0   0   0   0   0   0   0
テキトーに列挙してみた。
             0.   1 1 1 1 1 1 1 1 1 1
(実際は縦/横とも無限)
             0.   0   1   0   1   0   1   0   1   0   1
0以上1未満の実数は
             0.   1   0   1   0   0   1 1     0   1   0
すべてこの表に現れる
だろうか。        0.   1   0   1 1 1 1 1 1 1 1
             0. 0     1 1 1 1         0   1   0   1   0
             0. 1 1 1 1 1 1 1 1 1 1
             0. 0     1 1     0   1 1 1 1 1           0
             0. 1 1       0   1 1 1 1 1           0   1
             0. 0     1 1 1 1         0   1 1 1 1




             わんくま同盟 東京勉強会 #45
「対角線論法」

             0. 0   0   0   0   0   0   0   0   0   0
対角線上に並ぶ
             0. 1 1 1 1 1 1 1 1 1 1
0/1をそれぞれ
             0. 0   1   0   1   0   1   0   1   0   1
反転して作られ
             0. 1   0   1   0   0   1 1     0   1   0
る
             0. 1   0   1 1 1 1 1 1 1 1
数はこの表には
                    1 1 1 1             1       1
存在しない
── すなわち ──
             0. 0                   0       0       0
             0. 1 1 1 1 1 1 1 1 1 1
どんなに大きな表
を用意しても、      0. 0   1 1     0   1 1 1 1 1           0
その中に存在しな     0. 1 1     0   1 1 1 1 1           0   1
い実数がある。      0. 0   1 1 1 1         0   1 1 1 1
→ 列挙不能!

             わんくま同盟 東京勉強会 #45
「チューリングマシンの停止性問題」

問:「プログラムPにデータdを与えて実行
する
ことをP(d)と表すことにする。

如何なるPとdの組み合わせに対しても、
P(d)が有限時間内に停止するか否かを判定す
るプログラム S(P,d) は存在しないことを証
明せよ」


        わんくま同盟 東京勉強会 #45
「チューリングマシンの停止性問題」

以下のようなプログラムF(x)を書くことがで
きる
F(x) {
  if ( S(x,x)の答 が”停止する” ) {
    loop: goto loop; // 停止しない無限ループ
  } else {
    return; // 停止する
  }
                  さて、F(F)は停止するだろうか?
}

            わんくま同盟 東京勉強会 #45
「チューリングマシンの停止性問題」

さて、F(F)は停止するだろうか?
F(F) {
  if ( S(F,F)の答 が”停止する” ) {
    loop: goto loop; // 停止しない無限ループ
  } else {
    return; // 停止する
  }
}        S(F,F)はF(F)が停止するかを判定するはず

            わんくま同盟 東京勉強会 #45
「チューリングマシンの停止性問題」

さて、F(F)は停止するだろうか?
F(F) {
  if ( F(F) が”停止する” ) {
    loop: goto loop; // 停止しない無限ループ
  } else {
    return; // 停止する S(P,d)は存在しない!
  } F(F)は停止するなら停止せず、
}      停止しないなら停止する。

           わんくま同盟 東京勉強会 #45
1 de 11

Recomendados

ぱっと見でわかるC++11 por
ぱっと見でわかるC++11ぱっと見でわかるC++11
ぱっと見でわかるC++11えぴ 福田
1.6K vistas16 diapositivas
T77 episteme por
T77 epistemeT77 episteme
T77 epistemeえぴ 福田
663 vistas14 diapositivas
Episteme unique_ptr por
Episteme unique_ptrEpisteme unique_ptr
Episteme unique_ptrえぴ 福田
836 vistas10 diapositivas
T69 episteme por
T69 epistemeT69 episteme
T69 epistemeえぴ 福田
484 vistas29 diapositivas
Episteme variadic template por
Episteme variadic templateEpisteme variadic template
Episteme variadic templateえぴ 福田
989 vistas13 diapositivas
Yokohama6 epi por
Yokohama6 epiYokohama6 epi
Yokohama6 epiえぴ 福田
594 vistas12 diapositivas

Más contenido relacionado

Destacado

ChatGPT and the Future of Work - Clark Boyd por
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
27.1K vistas69 diapositivas
Getting into the tech field. what next por
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
6.4K vistas22 diapositivas
Google's Just Not That Into You: Understanding Core Updates & Search Intent por
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
6.8K vistas99 diapositivas
How to have difficult conversations por
How to have difficult conversations How to have difficult conversations
How to have difficult conversations Rajiv Jayarajah, MAppComm, ACC
5.5K vistas19 diapositivas
Introduction to Data Science por
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data ScienceChristy Abraham Joy
82.5K vistas51 diapositivas
Time Management & Productivity - Best Practices por
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
169.8K vistas42 diapositivas

Destacado(20)

ChatGPT and the Future of Work - Clark Boyd por Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd27.1K vistas
Getting into the tech field. what next por Tessa Mero
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero6.4K vistas
Google's Just Not That Into You: Understanding Core Updates & Search Intent por Lily Ray
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray6.8K vistas
Time Management & Productivity - Best Practices por Vit Horky
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky169.8K vistas
The six step guide to practical project management por MindGenius
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius36.7K vistas
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright... por RachelPearson36
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson3612.7K vistas
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present... por Applitools
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools55.5K vistas
12 Ways to Increase Your Influence at Work por GetSmarter
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter401.7K vistas
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G... por DevGAMM Conference
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference3.6K vistas
Barbie - Brand Strategy Presentation por Erica Santiago
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago25.1K vistas
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well por Saba Software
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software25.3K vistas
Introduction to C Programming Language por Simplilearn
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn8.4K vistas
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr... por Palo Alto Software
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
The Pixar Way: 37 Quotes on Developing and Maintaining a Creative Company (fr...
Palo Alto Software88.4K vistas
9 Tips for a Work-free Vacation por Weekdone.com
9 Tips for a Work-free Vacation9 Tips for a Work-free Vacation
9 Tips for a Work-free Vacation
Weekdone.com7.2K vistas
I Rock Therefore I Am. 20 Legendary Quotes from Prince por Empowered Presentations
I Rock Therefore I Am. 20 Legendary Quotes from PrinceI Rock Therefore I Am. 20 Legendary Quotes from Prince
I Rock Therefore I Am. 20 Legendary Quotes from Prince
Empowered Presentations142.9K vistas
How to Map Your Future por SlideShop.com
How to Map Your FutureHow to Map Your Future
How to Map Your Future
SlideShop.com275.1K vistas

T45 episteme