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
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
AgentCoreとHuman in the Loop
har1101
5
240
AI時代の認知負荷との向き合い方
optfit
0
160
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
710
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
240
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
140
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
CSC307 Lecture 05
javiergs
PRO
0
500
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
CSC307 Lecture 08
javiergs
PRO
0
670
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Balancing Empowerment & Direction
lara
5
890
Exploring anti-patterns in Rails
aemeredith
2
250
Being A Developer After 40
akosma
91
590k
Utilizing Notion as your number one productivity tool
mfonobong
3
220
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
120
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.7k
Ethics towards AI in product and experience design
skipperchong
2
190
Art, The Web, and Tiny UX
lynnandtonic
304
21k
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!