Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in.

Similar presentations


Presentation on theme: "CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in."— Presentation transcript:

1 CS1001 Lecture 23

2 Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in Artificial Intelligence

3 Reading Brookshear – Chapters 10 and 11 Brookshear – Chapters 10 and 11

4 Functions Computer Science is concerned with implementing and evaluating mathematical functions Computer Science is concerned with implementing and evaluating mathematical functions There is now a practical concern – how to actually produce an output given an input There is now a practical concern – how to actually produce an output given an input –Functions can be classified as “computable” or “non-computable”

5 Turing Machines A theoretical device A theoretical device –Tape (memory) –A head (for reading/writing the tape) –Instructions for moving/reading/writing based on a current state –As powerful as any modern machine (in other words, it can compute everything a modern computer can compute) –http://wap03.informatik.fh-wiesbaden.de/weber1/turing/tm.html http://wap03.informatik.fh-wiesbaden.de/weber1/turing/tm.html

6 Example The “successor” function The “successor” function –A function that takes an input and returns its value plus 1 –Succ(x) = x + 1 –Succ(5) is equal to 6

7 Turing Computable Succ is Turing Computable because it can be computed using a turing machine Succ is Turing Computable because it can be computed using a turing machine How? How? –Start with the number (input) in binary on the tape –Go to the rightmost bit, if 0, change to 1 and halt –Otherwise, set to 0 and enter the “carry” state. Then, move backwards trying to find a 0…

8 Church-Turing Thesis “Turing-Computable” means the same thing as Algorithmically computable. “Turing-Computable” means the same thing as Algorithmically computable. In other words, if you can prove a function computable on a turing machine, it must also be computable by a definite algorithm In other words, if you can prove a function computable on a turing machine, it must also be computable by a definite algorithm The converse also holds The converse also holds

9 Computable vs Unknown Key Point: A non computable function is one where there is a definite correct answer and we have enough information to find it. However, actually getting the answer from the inputs is not feasible due to the complexity of the problem. Key Point: A non computable function is one where there is a definite correct answer and we have enough information to find it. However, actually getting the answer from the inputs is not feasible due to the complexity of the problem. This is not like asking “will the human race exist in 5,000 years” – we do not have enough information to answer that This is not like asking “will the human race exist in 5,000 years” – we do not have enough information to answer that

10 Traveling Salesman Problem http://www.math.princeton.edu/tsp/cpapp/us41.html http://www.math.princeton.edu/tsp/cpapp/us41.html http://www.math.princeton.edu/tsp/cpapp/us41.html

11 The Halting Problem Given a program and inputs, is it possible to write another program to predict whether the initial program will terminate or loop for ever? Given a program and inputs, is it possible to write another program to predict whether the initial program will terminate or loop for ever? No! No!

12 Public Key Cryptography


Download ppt "CS1001 Lecture 23. Overview Incompleteness and the Halting Problem Incompleteness and the Halting Problem Methods in Artificial Intelligence Methods in."

Similar presentations


Ads by Google