530 likes | 642 Views
Computable Problems. Computability. What does it mean to be computable?. Computability. What does it mean to be computable? Can decide an answer using Finite number of steps Finite list of instructions. Alan Turing. Father of Computer Science. Proof By Contradiction.
E N D
Computability • What does it mean to be computable?
Computability • What does it mean to be computable? • Can decide an answer using • Finite number of steps • Finite list of instructions
Alan Turing • Father of Computer Science
Proof By Contradiction • Proof by contradiction: • Assume something is true • Show it leads to a contradiction • Conclude the opposite
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11…
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5, …pn
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1 • Thus q must be prime… but it isn't!!!
Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1 • Thus q must be prime… but it isn't!!! • Conclude there are NOT a finite number of prime numbers
Programs Running Programs • We can force a program to run another program as its input:
Yes On Self YES: If it outputs Yes thenYes On Self is Yes
Yes On Self NO: If it outputs No thenYes On Self is No
Yes On Self Yes / No both valid… but has to stick with one
Anti Yes On Self YES: If it outputs Yes thenit must have output No
Anti Yes On Self YES: If it outputs Yes thenit must have output No NO: If it outputs No thenit must have output Yes
Anti Yes On Self Anti Yes On Self Can'tAnswer YES or NO YES: If it outputs Yes thenit must have output No NO: If it outputs No thenit must have output Yes
Chain: • If I can write Always Yes
Chain: • If I can write Always Yes • Then I can write Yes On Self
Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self
Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self • But Anti Yes On SelfCan't Exist
Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self • But Anti Yes On SelfCan't Exist • I can NOT write AlwaysYes
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed
Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed No: If it outputs No thenit must not have crashed
Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed No: If it outputs No thenit must not have crashed
Crash Detection • What about detecting possible bugs?
Crash Detection • What about detecting possible bugs? • Impossible to do perfectly • Must settle for pretty good most of the time
Alan Turing • Father of Computer Science
The Turing Machine • Hypothetical device • Reads and write symbols on a tape • Decides what to do based on list of rules
Universal Turing Machine • Universal Turing Machine • Turing machine that can simulate other Turing machines
Real Turing Machines http://www.youtube.com/watch?feature=player_embedded&v=E3keLeMwfHY
Turing Machine Running • Web page simulator: http://morphett.info/turing/turing.html • Google doodle: http://www.google.com/doodles/alan-turings-100th-birthday
Computers • Turing machine can computer anything a state of the art PC can
Computers • Turing machine can computer anything a state of the art PC can • Anything a quantum computer can