Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
AIの誤りが許されない業務システムにおいて“信頼されるAI” を目指す / building-trusted-ai-systems
yuya4
6
4k
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
590
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
Jetpack XR SDKから紐解くAndroid XR開発と技術選定のヒント / about-androidxr-and-jetpack-xr-sdk
drumath2237
1
190
AtCoder Conference 2025
shindannin
0
670
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
170
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
470
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
900
複雑なUI設計への銀の弾丸 「オブジェクト指向UIデザイン」
teamlab
PRO
2
100
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
140
Cap'n Webについて
yusukebe
0
150
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
190
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
30
Designing for humans not robots
tammielis
254
26k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
51
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
190
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
70k
Heart Work Chapter 1 - Part 1
lfama
PRO
3
35k
Docker and Python
trallard
47
3.7k
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!