Presentation is loading. Please wait.

Presentation is loading. Please wait.

November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 1 Languages Accepted by Turing Machines Example 2: Language L =

Similar presentations


Presentation on theme: "November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 1 Languages Accepted by Turing Machines Example 2: Language L ="— Presentation transcript:

1 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 1 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/B a/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R

2 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 2 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BaabbB… ↑

3 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 3 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

4 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 4 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

5 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 5 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

6 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 6 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

7 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 7 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

8 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 8 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabbB… ↑

9 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 9 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabBB… ↑

10 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 10 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabBB… ↑

11 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 11 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabBB… ↑

12 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 12 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabBB… ↑

13 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 13 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBabBB… ↑

14 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 14 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBbBB… ↑

15 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 15 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBbBB… ↑

16 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 16 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBbBB… ↑

17 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 17 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBbBB… ↑

18 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 18 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBBBB… ↑

19 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 19 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 B/Ba/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBBBB… ↑

20 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 20 Languages Accepted by Turing Machines Example 2: Language L = {a [n] b [n] | n > 0} on the alphabet {a, b}. q7q7q7q7 q1q1q1q1 q2q2q2q2 Accept!a/B q3q3q3q3 q8q8q8q8 q6q6q6q6 q5q5q5q5b/L a/L b/L B/L q4q4q4q4b/B B/R a/R b/R B/L B/R … BBBBBB… ↑

21 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 21 TMs as Computers So what languages can Turing machines accept? This class of languages is called the recursively enumerable languages. For example, it includes the language L = {a [n] b [n] | n > 0}, which is not a regular language. This shows that the unlimited memory leads to increased computational capabilities. But what about the functions that Turing machines can compute? (After the TM halts, the symbols on the tape can be regarded as the output of the TM, or the result of the function it computes.)

22 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 22 Church’s Thesis Church’s thesis: Any function that can be algorithmically computed can also be computed by a Turing machine. Why is it only a thesis? There is no general mathematical definition of algorithm – it is always specific to a particular scheme, i.e., a programming language. Therefore, Church’s thesis cannot be proved. However, no counterexample has been found, and no scientist seriously doubts that Church’s thesis is correct.

23 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 23 The Halting Problem Are there any functions that cannot be computed? Yes! The most famous of those is the halting problem. Let us enumerate all possible Turing machines, i.e., give them numbers 1, 2, 3, … Then the function HALT(x, y) is true if Turing machine y terminates when given input x, and is false otherwise. Here comes a surprise: HALT(x, y) is not a computable function.

24 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 24 The Halting Problem Because of Church’s thesis, we can state the halting problem in a more general form: There exists no algorithm that can decide for any other algorithm whether its computation will ever halt for a given input.

25 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 25 The Halting Problem It may surprise you that there is no algorithm for solving the halting problem. But did we not assume that the Theory of Computation applies to all things that compute, including our brains? And is it not possible for a computer scientist to analyze a given program and find out whether it will terminate for a particular input or not (even if this analysis takes a very long time)? No, actually we can devise a very simple Turing machine or computer program for which to date nobody is able to tell whether it will ever terminate.

26 November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 26 The Halting Problem This program is based on Goldbach’s conjecture, which assumes that every even number  4 is the sum of two prime numbers. For example, 4 = 2 + 2, 6 = 3 + 3, 48 = 41 + 7. It was first stated by Goldbach in 1742, and despite great efforts, nobody has ever been able to prove or disprove it. It would be easy to build a Turing machine or write a C, Java, or Basic program that searches for a counterexample to this conjecture. Nobody knows whether this program will ever halt.


Download ppt "November 3, 2009Introduction to Cognitive Science Lecture 15: Theory of Computation II 1 Languages Accepted by Turing Machines Example 2: Language L ="

Similar presentations


Ads by Google