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
blbradley
March 30, 2013
Programming
71
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
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
570
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
230
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
130
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
720
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
490
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
490
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
3
1.9k
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
1
2k
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
120
複数の Claude Code が"放置"されてしまう問題をCLI ダッシュボードを自作して解決した話
sumihiro3
1
730
Introducing Stack Pull Request in GitHub
kkamegawa
0
100
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
150
Featured
See All Featured
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
580
How STYLIGHT went responsive
nonsquared
100
6.2k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
180
Leo the Paperboy
mayatellez
8
2.2k
How GitHub (no longer) Works
holman
316
150k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
620
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
WENDY [Excerpt]
tessaabrams
11
39k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
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!