Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Halting Problem and You!
Search
blbradley
March 30, 2013
Programming
1
62
The Halting Problem and You!
A simple(st) proof of the halting problem and why it's important to you!
blbradley
March 30, 2013
Tweet
Share
Other Decks in Programming
See All in Programming
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
450
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
160
Flutter On-device AI로 완성하는 오프라인 앱, 박제창 @DevFest INCHEON 2025
itsmedreamwalker
1
160
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
AIコーディングエージェント(Manus)
kondai24
0
220
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
gunshi
kazupon
1
120
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
800
ゲームの物理 剛体編
fadis
0
370
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
240
愛される翻訳の秘訣
kishikawakatsumi
3
350
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
61
43k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Thoughts on Productivity
jonyablonski
73
5k
Code Reviewing Like a Champion
maltzj
527
40k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
310
Un-Boring Meetings
codingconduct
0
160
The Curse of the Amulet
leimatthew05
0
4.8k
We Are The Robots
honzajavorek
0
120
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.4k
Designing for humans not robots
tammielis
254
26k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
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!