Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Halting Problem and You!
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
blbradley
March 30, 2013
Programming
67
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Halting Problem and You!
A simple(st) proof of the halting problem and why it's important to you!
blbradley
March 30, 2013
Other Decks in Programming
See All in Programming
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
250
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
400
OSもどきOS
arkw
0
580
ふつうのFeature Flag実践入門
irof
8
4.1k
Contextとはなにか
chiroruxx
1
350
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
280
スマートグラスで並列バイブコーディング
hyshu
0
240
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.7k
1B+ /day規模のログを管理する技術
broadleaf
0
100
RTSPクライアントを自作してみた話
simotin13
0
620
Oxcを導入して開発体験が向上した話
yug1224
4
320
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
Featured
See All Featured
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Music & Morning Musume
bryan
47
7.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Limits of Empathy - UXLibs8
cassininazir
1
360
The Spectacular Lies of Maps
axbom
PRO
1
820
A better future with KSS
kneath
240
18k
The Language of Interfaces
destraynor
162
27k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
ラッコキーワード サービス紹介資料
rakko
1
3.7M
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Transcript
The Halting Problem and You! Brandon Bradley tweet: @crixdev github:
blbradley freenode: bbradley
The Problem
“... there is no algorithm for deciding whether any given
machine, when started from any given initial situation, eventually stops.” - Stephen Kleene
decision problem
unsolvable with real and abstract computing machines
The Proof (by contradiction)
suppose we could write a program to solve it
let’s call it oracle(p)
input - any program code output - halts or does
not
oracle p yes no halts?
some trivial examples
p = while(true) oracle p yes no halts?
p = pass, nop oracle p yes no halts?
sure, but it must work for ANY program
let’s make another program!
call it deceiver(p)
deceiver(p) def deceiver(p): if (oracle(p) == true): while(true): pass else:
return true
oracle yes no halts? while(true) true p
the creative part: refer the deceiver to himself
two cases: deceiver loops and deceiver halts
oracle yes no halts? while(true) true p p = deceiver
loops
oracle yes no halts? while(true) true p p = deceiver
halts
halts => loops loops => halts
WAT?
deceiver(p) provides a contradiction
what’s wrong with this? def deceiver(p): if (oracle(p) == true):
while(true): pass else: return true
this! def deceiver(p): if (oracle(p) == true): while(true): pass else:
return true
so, our initial assumption is wrong
program oracle(p) can’t be written
QED
“and You!”
there are simple, well- defined problems which exist that can’t
be solved
many of them ‘reduce’ to the halting problem
the ‘canonical’ unsolvable problem
intuition is simply not enough
algorithms are fun!
other undecidable problems • do two compilers/interpreters accept the same
languages? • the dead-code problem
questions?
References & Thanks • Craig Kaplan, Understanding the Halting Problem
• Stephen Kleene - Introduction to Metamathematics. 1952. Chapter XIII - Computable Functions. • The Matrix, Warner Bros, © 1999 Thanks to Jason, Emma, all of our speakers, and the rest of our great community!