David Evans CS200: Computer Science University of Virginia Computer Science Class 25: Computability Halting Problems Hockey.

Slides:



Advertisements
Similar presentations
Complexity. P=NP? Who knows? Who cares? Lets revisit some questions from last time – How many pairwise comparisons do I need to do to check if a sequence.
Advertisements

David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
ICE1341 Programming Languages Spring 2005 Lecture #6 Lecture #6 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
David Evans CS200: Computer Science University of Virginia Computer Science Class 27: Modeling Computation.
Limitations. Limitations of Computation Hardware precision Hardware precision Software - we’re human Software - we’re human Problems Problems –complex.
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 3: Rules of Evaluation.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 19: Minding Ps & Qs: Axiomatic.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
CS1001 Lecture 22. Overview Mechanizing Reasoning Mechanizing Reasoning G ö del ’ s Incompleteness Theorem G ö del ’ s Incompleteness Theorem.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
Lecture 24: Gödel’s Proof CS150: Computer Science
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 28: Implementing Interpreters.
Class 36: Proofs about Unprovability David Evans University of Virginia cs1120.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
David Evans CS200: Computer Science University of Virginia Computer Science Class 24: Gödel’s Theorem.
Class 37: Uncomputability David Evans University of Virginia cs1120 Halting Problems Hockey Team.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 2: Orders of Growth
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
The Recursion Theorem Pages 217– ADVANCED TOPICS IN C O M P U T A B I L I T Y THEORY.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
Lecture 18. Unsolvability Before the 1930’s, mathematics was not like today. Then people believed that “everything true must be provable”. (More formally,
CS 345: Chapter 8 Noncomputability and Undecidability Or Sometimes You Can’t Get It Done At All.
Course Overview and Road Map Computability and Logic.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 3: Rules of Evaluation.
ISBN Chapter 3 Describing Semantics.
Chapter 3 Part II Describing Syntax and Semantics.
Great Theoretical Ideas in Computer Science.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 36: Modeling Computing.
Great Theoretical Ideas in Computer Science.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 25: Gödel and Computability Halting.
Thinking in Methodologies Class Notes. Gödel’s Theorem.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
David Evans Class 16: NP-Completeness / The Story so Far CS150: Computer Science University of Virginia Computer Science.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 15: Intractable Problems (Smiley.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
8.1 8 Algorithms Foundations of Computer Science  Cengage Learning.
David Evans Class 15: P vs. NP (Smiley Puzzles and Curing Cancer) CS150: Computer Science University of Virginia Computer.
CS216: Program and Data Representation University of Virginia Computer Science Spring 2006 David Evans Lecture 8: Crash Course in Computational Complexity.
Lecture 3: Rules of Evaluation CS150: Computer Science
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
David Evans CS200: Computer Science University of Virginia Computer Science Lecture 23: Intractable Problems (Smiley Puzzles.
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
David Evans CS200: Computer Science University of Virginia Computer Science Class 19: Computability Halting Problems Hockey.
Class 30: Models of Computation CS200: Computer Science
Great Theoretical Ideas in Computer Science
ASU 101: The ASU Experience Computer Science Perspective
CSCE 411 Design and Analysis of Algorithms
Class 14: Intractable Problems CS150: Computer Science
Lecture 22: Gödel’s Theorem CS200: Computer Science
Lecture 25: Metalinguistics > (meval '((lambda (x) (* x x)) 4)
Lecture 24: Metalinguistics CS200: Computer Science
Class 24: Computability Halting Problems Hockey Team Logo
Class 34: Models of Computation CS200: Computer Science
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

David Evans CS200: Computer Science University of Virginia Computer Science Class 25: Computability Halting Problems Hockey Team Logo

22 March 2004CS 200 Spring Menu Quiz Answers Review: –Gödel’s Theorem –Proof in Axiomatic Systems Computability: Are there some problems that it is impossible to write a program to solve?

22 March 2004CS 200 Spring Quiz Answers

22 March 2004CS 200 Spring How far have you read in GEB? –Not through Chapter 5: 6 –Through Ch 5: 2 –Through Ch 6: 2, Through Ch 7: 2 –All of Part I: 3, Beyond Part I: 1 Reading GEB might not be necessary to get a good grade in this class, but I really hope you will read it and enjoy reading it! Ch 13 is the last assigned reading in it for this class (but I hope you’ll read the rest during your summer vacation!)

22 March 2004CS 200 Spring Problem Set 7 ─More practical (“Illiberal Students”)12 ─More theoretical (“Liberal students”) 2 ─Write-in: both (“Jeffersonian students”) 1 Problem Set 7 will be both, but will include learning some tools you will use to build dynamic web sites in PS8.

22 March 2004CS 200 Spring So far, class is going: –Way too fast 0 –Too fast 6.5 –Just about right 9.5 –Too slow 0

22 March 2004CS 200 Spring How far have you gotten in PS6: –Finished0 –Question 62 –Question 45 –Question 21 –Started1 –Read it 5 –Haven’t started2

22 March 2004CS 200 Spring What should be different? “Maybe deal with stuff similar to our PS's more in class???” “Notes more applicable to problem sets.” “Just use more concrete examples. I get very lost on the abstract stuff, and can't put it together with what we're learning until I sit in the lab for 5 hours staring at the screen.” “I generally like how the class is going. More discussion of GEB would be nice though (but perhaps not "practically" useful).”

22 March 2004CS 200 Spring “I mean the thing is, I always FEEL like I don't know what's going on, so I think "ahhh! slow down!" but, at the end of the day (or a PS), I'm amazed at what I can do. So should you do anything? I'm learning a lot, so maybe it's good I'm confused. I do like language stuff a lot though - I like it when we talk about that. Sometimes it's hard for me to pick it right up in class, though. I have to go home and digest it.”

22 March 2004CS 200 Spring Perhaps a little less slower and a means for practicing concepts beyond the problem sets, on a smaller scale. Do more ourselves. Have simpler problems but have us do more of them. One can struggle through a PS without really understanding what's going on; whereas if we write it all ourselves, we must know what's happening. Compensate for this challenge with simpler problems to solve. Just a thought; I'm actually quite content.

22 March 2004CS 200 Spring What is Computer Science? A method of thinking about solving problems using machines. Using machines (you can define that as you will) to solve problems. A way of thinking about problems and their solutions, then using computers to solve those problems which are solvable. The engineering of problem solving strategies by way of computer programs. Applying techniques of computer programming to solve real world problems Mechanized problem solving

22 March 2004CS 200 Spring Applying a system of thought or logic according to its stated rules. Solving problems via a systematic way of thinking The study of the science of computation: the ways in which we find solutions for problems. Solving problems the simplest way possible using a language. It is the study of command-based languages that solve a problem and the examination of how these problems are solves. Basically, the study of solving problems in the most efficient and accurate manner, generally using languages created for this purpose. The application of multiple disciplines to design and construct formalized systems of logic and evaluation. 6. What is Computer Science? Language/logic problem solving

22 March 2004CS 200 Spring What is Computer Science? I'm more confused about its definition now than I was before this class! A way of life A painstakingly annoying subject that uses crazy computer languages that leave you endlessly frustrated for hours, until you figure out the last part of the code and feel like a genius or realize you have parentheses in the wrong spot and feel like an idiot. But it's still ok I guess. (Possibly) true statements, but not definitions

22 March 2004CS 200 Spring What is Computer Science? My answer would be: “Study of ways to describe procedures and reason about the processes they produce.” “Study of mechanized ways to solve symbolic problems.” Today’s topic fits, since it concerns reasoning about whether or not a procedure will terminate.

22 March 2004CS 200 Spring Barber paradox In Charlottansville, there is a barber who shaves every man who does not shave himself, and no one else. Who shaves the barber? Possible answers: 1. MU! Charlottansville doesn’t exist, there is a paradox since either the barber shaves himself in which case he can’t shave himself, or he doesn’t in which case he must. 2. The barber is a woman. She shaves herself just fine. Link to Hofstadter’s satire on sexist language on today’s notes. (Read it after you catch up on the GEB reading.)

22 March 2004CS 200 Spring Computer Scientists Everyone should know these: –Ada Byron, Countess of Lovelace First person to think about programming –John Backus FORTRAN, replacement (BNF) grammars for describing languages –Admiral Grace Murray Hopper First compiler –C. A. R. (Tony) Hoare Quicksort, language designer, verification –Alan Turing (today) Everyone should list themselves too! –2 of you did on the quiz

22 March 2004CS 200 Spring Review Axiomatic System –Set of axioms –Set of inference rules Example: MIU-System from GEB –Axioms: MI –Inference rules: 4 rules for making new strings An axiomatic system is a formal system where the string we can generate are meant to represent “true theorems”

22 March 2004CS 200 Spring Proof A proof of S in an axiomatic system is a sequence of strings, T 0, T 1, …, T n where: –The first string is the axioms –For all i from 1 to n, T n is the result of applying one of the inference rules to T n-1 –T n is S How much work is it to check a proof?

22 March 2004CS 200 Spring Proof Checking Problem Input: an axiomatic system (a set of axioms and inference rules), a statement S, and a proof P containing n steps of S Output: true if P is a valid proof of S false otherwise How much work is a proof-checking procedure? We can write a proof-checking procedure that is  (n)

22 March 2004CS 200 Spring Finite-Length Proof Finding Problem Input: an axiomatic system (a set of axioms and inference rules), a statement S, n (the maximum number of proof steps) Output: A valid proof of S with no more then n steps if there is one. If there is no proof of S with <= n steps, unprovable. How much work? At worst, we can try all possible proofs: r inference rules, 0 - n steps ~ r n possible proofs Checking each proof is  (n) So, there is a procedure that is  (nr n ) but, it might not be the best one.

22 March 2004CS 200 Spring Proof Finding Problem Input: an axiomatic system, a statement S Output: If S is true, output a valid proof. If S is not true, output false. How much work? It is impossible! “It might take infinite work.” Gödel’s theorem says it cannot be done.

22 March 2004CS 200 Spring Gödel’s Statement G: This statement of number theory does not have any proof in the system of Principia Mathematica. G is unprovable, but true!

22 March 2004CS 200 Spring What does it mean for an axiomatic system to be complete and consistent? Derives all true statements, and no false statements starting from a finite number of axioms and following mechanical inference rules.

22 March 2004CS 200 Spring What does it mean for an axiomatic system to be complete and consistent? It means the axiomatic system is weak. Its is so weak, it cannot express “This statement has no proof.”

22 March 2004CS 200 Spring Computability

22 March 2004CS 200 Spring Algorithms What’s an algorithm? A procedure that always terminates. What’s a procedure? A precise (mechanizable) description of a process. Question 6 answer: “Using algorithms to solve problems”

22 March 2004CS 200 Spring Computability Is there an algorithm that solves a problem? Decidable (computable) problems: –There is an algorithm that solves the problem. –Make a photomosaic, sorting, drug discovery, winning chess (it doesn’t mean we know the algorithm, but there is one) Undecidable problems: –There is no algorithm that solves the problem. There might be a procedure, but it doesn’t always terminate.

22 March 2004CS 200 Spring Are there any undecidable problems? The Proof-Finding Problem: Input: an axiomatic system, a statement S Output: If S is true, output a valid proof. If S is not true, output false.

22 March 2004CS 200 Spring Any others? How would you prove a problem is undecidable?

22 March 2004CS 200 Spring Undecidable Problems We can prove a problem is undecidable by showing it is at least as hard as the proof- finding problem Here’s a famous one: Halting Problem Input: a procedure P (described by a Scheme program) and its input I Output: true if executing P on I halts (finishes execution), false otherwise.

22 March 2004CS 200 Spring Charge Wednesday: Why does this mean there cannot be a perfect computer virus scanner?