Lecture 13: Foundations of Math and Kolmogorov Complexity

Size: px
Start display at page:

Download "Lecture 13: Foundations of Math and Kolmogorov Complexity"

Transcription

1 6.045 Lecture 13: Foundations of Math and Kolmogorov Complexity 1

2 Self-Reference and the Recursion Theorem 2

3 Lemma: There is a computable function q : Σ* Σ* such that for every string w, q(w) is the description of a TM P w that on every input, prints out w and then accepts Proof Define a TM Q: s w Q P w w 3

4 Theorem: There is a Self-Printing TM Proof: First define a TM B which does this: M B w P M M M Now consider the TM that looks like this: w B w P B B P B B B No explicit self-reference here! QED 4

5 The Recursion Theorem Theorem: For every TM T computing a function t : Σ* Σ* Σ* there is a Turing machine R computing a function r : Σ* Σ*, such that for every string w, r(w) = t(r, w) (a,b) T t(a,b) w R t(r,w) 5

6 Proof: (a,b) T t(a,b) Define M = N B N w B Y w T w P N N w N Define R: What is S? w P M M B S w T t(s,w) 6

7 Proof: (a,b) Define M = T M t(a,b) B What is M(M,w)? N w B Y w T w P M M w M Define R: S M S w P B T t(s,w) M w 7

8 Proof: (a,b) T t(a,b) M B w M PM w B Y w T Define R: S S = Y = R. QED M S w P B T t(s,w) M w 8

9 FOO x (y) := Output x and halt. BAR(M) := Output N(w) = Run FOO M outputting M. Run M on (M, w) Q(N, w) := Run BAR(N) outputting S. Run T on (S, w) R(w) := Run FOO Q outputting Q. Run BAR(Q) outputting S. Run T on (S, x) Claim: S is a description of R itself! S(w) = Run FOO Q outputting Q. Run Q on (Q, w)

10 FOO x (y) := Output x and halt. BAR(M) := Output N(w) = Run FOO M outputting M. Run M on (M, w) Q(N, w) := Run BAR(N) outputting S. Run T on (S, w) R(w) := Run FOO Q outputting Q. Run BAR(Q) outputting S. Run T on (S, w) Claim: S is a description of R itself! S(w) = Run FOO Q outputting Q. Run BAR(Q) outputting S. Run T on (S, w) Therefore R(w) = T(R, w)

11 For every computable t, there is a computable r such that r(w) = t(r,w) where R is a description of r Suppose we can design a TM T of the form: On input (x,w), do bla bla with x, do bla bla bla with w, etc. etc. We can then find a TM R with the behavior: On input w, do bla bla with R, do bla bla bla with w, etc. etc. We can use the operation: Obtain your own description in Turing machine pseudocode! 11

12 Theorem: A TM is undecidable Proof (using the recursion theorem) Assume H decides A TM Construct machine B such that on input w: 1. Obtains its own description B 2. Runs H on (B, w) and flips the output Running B on input w always does the opposite of what H says it should! A formalization of free will paradoxes! No single machine can predict behavior of all others 12

13 Turing Machine Minimization MIN = {M M is a minimal-state Turing machine} Theorem: MIN is unrecognizable! Proof: Suppose we could recognize MIN with TM M M(x) := Obtain description of M. For k = 1,2,, Run M on the TMs M 1, M k for k steps, until M accepts some M i with Q(M i ) > Q(M). Output M i (x). We have: 1. L M = L M i [by construction] 2. M has fewer states than M i 3. M i is minimal [by definition of MIN] CONTRADICTION! 13

14 Computability and the Foundations of Mathematics 17

15 Formal Systems of Mathematics A formal system describes a formal language for - writing (finite) mathematical statements, - has a definition of a proof of a statement Example: Every TM M defines some formal system F - {Mathematical statements in F } = * String w represents the statement M halts on w - A proof that M halts on w can be defined to be the computation history of M on w: the sequence of configurations C 0 C 1 C t that M goes through while computing on w Could sometimes prove M doesn t halt on w 18

16 Interesting Systems of Mathematics Define a formal system F to be interesting if: 1. Any mathematical statement about computation can be (computably) described as a statement of F. Given (M, w), there is a (computable) S M,w of F such that S M,w is true in F if and only if M accepts w. 2. Proofs are convincing a TM can check that a candidate proof of a theorem is correct This set is decidable: {(S, P) P is a proof of S in F } 3. If S is in F and there is a proof of S describable as a computation, then there s a proof of S in F. If M halts on w, then there s either a proof P of S M,w or a proof P of S M,w 19

17 Consistency and Completeness A formal system F is inconsistent if there is a statement S in F such that both S and S are provable in F F is consistent if it is NOT inconsistent A formal system F is incomplete if there is a statement S in F such that neither S nor S are provable in F F is complete if it is NOT incomplete 20

18 Limitations on Mathematics! For every consistent and interesting F, Theorem 1. (Gödel 1931) F must be incomplete! There are mathematical statements that are true but cannot be proved. Theorem 2. (Gödel 1931) The consistency of F cannot be proved in F. Theorem 3. (Church-Turing 1936) The problem of checking whether a given statement in F has a proof is undecidable. 21

19 Unprovable Truths in Mathematics (Gödel) Every consistent interesting F is incomplete: there are statements that cannot be proved or disproved. Let S M, w in F be true if and only if M accepts w Proof: Define TM G(w): 1. Obtain own description G [Recursion Theorem!] 2. For all strings P in lexicographical order, If (P is a proof of S G, w in F ) then reject If (P is a proof of S G, w in F ) then accept Note: If F is complete then G cannot run forever! 1. If (G accepts w) then have proof P of G doesn t accept w 2. If (G rejects w) then found proof P of G accepts w In either case, F is inconsistent! Proof of S G, w and S G, w 22

20 (Gödel 1931) The consistency of F cannot be proved within any interesting consistent F Proof: Assume we can prove F is consistent in F We constructed :S G, w = G does not accept w which is true, but has no proof in F G does not accept w There is no proof of :S G, w in F But if there s a proof of F is consistent in F, then there is a proof of :S G, w in F (here s the proof): If S G, w is true, then there is a proof in F of S G, w and a proof in in F of :S G, w But since F is consistent, this cannot be true. Therefore, :S G, w is true This contradicts the previous theorem! 23

21 Undecidability in Mathematics PROVABLE F = {S there s a proof in F of S, or there s a proof in F of :S} (Church-Turing 1936) For every interesting consistent F, PROVABLE F is undecidable Proof: Suppose PROVABLE F is decidable with TM P. Then we can decide A TM with the following procedure: On input (M, w), run the TM P on input S M,w If P accepts, examine all proofs in lex order If a proof of S M,w is found then accept If a proof of :S M,w is found then reject If P rejects, then reject. Why does this work? 24

22 Kolmogorov Complexity: A Universal Theory of Data Compression 25

23 The Church-Turing Thesis: Everyone s Intuitive Notion of Algorithms = Turing Machines This is not a theorem it is a falsifiable scientific hypothesis. A Universal Theory of Computation 26

24 A Universal Theory of Information? Can we quantify how much information is contained in a string? A = B = Idea: The more we can compress a string, the less information it contains. 27

25 Information as Description Thesis: The amount of information in a string x is the length of the shortest description of x Let x 2 {0,1}* How should we describe strings? Use Turing machines with inputs! Def: A description of x is a string <M,w> such that M on input w halts with only x on its tape. Def: The shortest description of x, denoted as d(x), is the lexicographically shortest string <M,w> such that M(w) halts with only x on its tape. 28

26 A Specific Pairing Function Theorem. There is a 1-1 computable function <,> : Σ* x Σ* Σ* and computable functions 1 and 2 : Σ* Σ* such that: z = <M,w> iff 1 (z) = M and 2 (z) = w Define: <M,w> := 0 M 1 M w (Example: <10110,101> = ) Note that <M,w> = 2 M + w

27 Kolmogorov Complexity (1960 s) Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string <M,w> such that M(w) halts with only x on its tape. Definition: The Kolmogorov complexity of x, denoted as K(x), is d(x). EXAMPLES?? Let s first determine some properties of K. Examples will fall out of this. 30

28 A Simple Upper Bound Theorem: There is a fixed c so that for all x in {0,1}* K(x) x + c The amount of information in x isn t much more than x Proof: Define a TM M = On input w, halt. On any string x, M(x) halts with x on its tape. Observe that <M,x> is a description of x. Let c = 2 M +1 Then K(x) <M,x> 2 M + x + 1 x + c 31

29 Repetitive Strings have Low K-Complexity Theorem: There is a fixed c so that for all n 2, and all x ϵ {0,1}*, K(x n ) K(x) + c log n The information in x n isn t much more than that in x Proof: Define the TM N = On input <n,<m,w>>, Let x = M(w). Print x for n times. Let <M,w> be the shortest description of x. Then K(x n ) K(<N,<n,<M,w>>>) 2 N + d log n + K(x) c log n + K(x) for some constants c and d 32

30 Repetitive Strings have Low K-Complexity Theorem: There is a fixed c so that for all n 2, and all x ϵ {0,1}*, K(x n ) K(x) + c log n The information in x n isn t much more than that in x Recall: A = For w = (01) n, we have K(w) K(01) + c log n So for all n, K((01) n ) d + c log n for a fixed c, d 33

31 Does The Computational Model Matter? Turing machines are one programming language. If we use other programming languages, could we get significantly shorter descriptions? An interpreter is a semi-computable function p : Σ* Σ* Takes programs as input, and (may) print their outputs Definition: Let x ϵ {0,1}*. The shortest description of x under p, called d p (x), is the lexicographically shortest string w for which p(w) = x. Definition: The K p complexity of x is K p (x) := d p (x). 34

32 Does The Computational Model Matter? Theorem: For every interpreter p, there is a fixed c so that for all x ϵ {0,1}*, K(x) K p (x) + c Moral: Using another programming language would only change K(x) by some additive constant Proof: Define M = On w, simulate p(w) and write its output to tape Then <M,d p (x)> is a description of x, so K(x) <M,d p (x)> 2 M + K p (x) + 1 c + K p (x) 35

33 There Exist Incompressible Strings Theorem: For all n, there is an x ϵ {0,1} n such that K(x) n There are incompressible strings of every length Proof: (Number of binary strings of length n) = 2 n but (Number of descriptions of length < n) (Number of binary strings of length < n) = n-1 = 2 n 1 Therefore, there is at least one n-bit string x that does not have a description of length < n 36

34 Random Strings Are Incompressible! Theorem: For all n and c 1, Pr x ϵ {0,1} n[ K(x) n-c ] 1 1/2 c Most strings are highly incompressible Proof: (Number of binary strings of length n) = 2 n but (Number of descriptions of length < n-c) (Number of binary strings of length < n-c) = 2 n-c 1 Hence the probability that a random x satisfies K(x) < n-c is at most (2 n-c 1)/2 n < 1/2 c. 37

35 KOLMOGOROV DIRECTIONS 38

36 Kolmogorov Complexity: Try it! Give short algorithms for generating the strings:

37 Kolmogorov Complexity: Try it! Give short algorithms for generating the strings:

38 Kolmogorov Complexity: Try it! Give short algorithms for generating the strings:

39 Kolmogorov Complexity: Try it! Give short algorithms for generating the strings: This seems hard to determine in general. Why? 42

40 Computing Compressibility? Can an algorithm perform optimal compression? Can algorithms tell us if a given string is compressible? COMPRESS = { (x,c) K(x) c} Theorem: COMPRESS is undecidable! Idea: If decidable, we could design an algorithm that prints the shortest incompressible string of length n But such a string could then be succinctly described, by providing the algorithm code and n in binary! Berry Paradox: The smallest integer that cannot be defined in less than thirteen words. 43

41 Computing Compressibility? COMPRESS = {(x,c) K(x) c} Theorem: COMPRESS is undecidable! Proof: Suppose it s decidable. Consider the TM: M = On input x ϵ {0,1}*, let N = 2 x. For all y ϵ {0,1}* in lexicographical order, If (y,n) COMPRESS then print y and halt. M(x) prints the shortest string y with K(y ) > 2 x. <M,x> is a description of y, and <M,x> d + x So 2 x < K(y ) d + x. CONTRADICTION for large x! 44

42 Yet Another Proof that A TM is Undecidable! COMPRESS = {(x,c) K(x) c} Theorem: A TM is undecidable. Proof: Reduction from COMPRESS to A TM. Given a pair (x,c), our reduction constructs a TM: M x,c = On input w, For all pairs <M,w > with <M,w > c, simulate each M on w in parallel. If some M halts and prints x, then accept. K(x) c M x,c accepts ε 45

43 More on Interesting Formal Systems A formal system F is interesting if it is finite and: 1. Any mathematical statement about computation can also be effectively described within F. For all strings x and integers c, there is a S x,c in F that is equivalent to K(x) c 2. Proofs are convincing: it should be possible to check that a proof of a theorem is correct This set is decidable: { (S,P) P is a proof of S in F } 46

44 The Unprovable Truth About K-Complexity Theorem: For every interesting consistent F, There is a t s.t. for all x, K(x) > t is unprovable in F Proof: Define an M that treats its input as an integer: M(k) := Search over all strings x and proofs P for a proof P in F that K(x) > k. Output x if found Suppose M(k) halts. It must print some output x Then K(x ) = K(<M,k>) c + k c + log k for some c Because F is consistent, K(x ) > k is true But k < c + log k only holds for small enough k If we choose t to be greater than these k then M(t) cannot halt, so K(x) > t has no proof! 47

45 Random Unprovable Truths Theorem: For every interesting consistent F, There is a t s.t. for all x, K(x) > t is unprovable in F For a randomly chosen x of length t+100, K(x) > t is true with probability at least 1-1/2 100 We can randomly generate true statements in F which have no proof in F, with high probability! For every interesting formal system F there is always some finite integer (say, t=10000) so that you ll never be able to prove in F that a random bit string requires a bit program! 48

46 Proving Theorems With K-Complexity Theorem: L = {x x x 0, 1 } is not regular. Proof: Suppose L is recognized by a DFA D. Let n 0 and choose an x 0, 1 such that K x n Let q x be the state of D reached after reading in x Define a TM M(D, q, n): Find a path P in D of length n that starts from state q and ends in an accept state. Print the n-bit string along path P, and halt. Claim: The pair <M,(D, q x, n)> is a description of x! So n K x <M,(D, q x, n)> O log n CONTRADICTION! 50

47 Next Episode: Complexity Theory! 51

48 Repetitive Strings have Low Information Theorem: There is a fixed c so that for all x ϵ {0,1}* K(xx) K(x) + c The information in xx isn t much more than that in x Proof: Let N = On <M,w>, let s = M(w). Print ss. Suppose <M,w> is the shortest description of x. Then <N,<M,w>> is a description of xx Therefore K(xx) <N,<M,w>> 2 N + <M,w> N + K(x) + 1 c + K(x) 57

49 Information as Description Thesis: The amount of information in a string x is the length of the smallest description of x Let x 2 {0,1}* How should we describe strings? Use Turing Machines! Def. The shortest description of x, denoted d(x), is the lexicographically shortest string M such that the TM M on input ε halts with only x on its tape. 58

50 Kolmogorov Complexity (1960 s) Def. The shortest description of x, denoted d(x), is the lexicographically shortest string M such that the TM M on input ε halts with only x on its tape. Definition: The Kolmogorov complexity of x, denoted as K(x), is d(x). EXAMPLES?? Let s first determine some properties of K. Examples will fall out of this. 59

51 A Simple Upper Bound Theorem: There is a fixed c so that for all x in {0,1}* K(x) x + c The amount of information in x isn t much more than x Proof: For any string x, define a TM M x = On input w, overwrite w with x, and halt. Then M x on ε halts with just x on its tape. We have K(x) M x x + c 60

CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression

CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression CS154, Lecture 12: Kolmogorov Complexity: A Universal Theory of Data Compression Rosencrantz & Guildenstern Are Dead (Tom Stoppard) Rigged Lottery? And the winning numbers are: 1, 2, 3, 4, 5, 6 But is

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY KOLMOGOROV-CHAITIN (descriptive) COMPLEXITY TUESDAY, MAR 18 CAN WE QUANTIFY HOW MUCH INFORMATION IS IN A STRING? A = 01010101010101010101010101010101

More information

Finish K-Complexity, Start Time Complexity

Finish K-Complexity, Start Time Complexity 6.045 Finish K-Complexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8 Definition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a

More information

Computability Theory

Computability Theory Computability Theory Cristian S. Calude May 2012 Computability Theory 1 / 1 Bibliography M. Sipser. Introduction to the Theory of Computation, PWS 1997. (textbook) Computability Theory 2 / 1 Supplementary

More information

q FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring L. Blum. REVIEW for Midterm 2 TURING MACHINE

q FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring L. Blum. REVIEW for Midterm 2 TURING MACHINE FLAC (15-45) Spring 214 - L. Blum THURSDAY APRIL 15-45 REVIEW or Midterm 2 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY TUESDAY April 8 Deinition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ,, q, q accept,

More information

Introduction to Languages and Computation

Introduction to Languages and Computation Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014

More information

TURING MAHINES

TURING MAHINES 15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2018 http://cseweb.ucsd.edu/classes/sp18/cse105-ab/ Today's learning goals Sipser Ch 5.1, 5.3 Define and explain core examples of computational problems, including

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

,

, Kolmogorov Complexity Carleton College, CS 254, Fall 2013, Prof. Joshua R. Davis based on Sipser, Introduction to the Theory of Computation 1. Introduction Kolmogorov complexity is a theory of lossless

More information

CS154, Lecture 10: Rice s Theorem, Oracle Machines

CS154, Lecture 10: Rice s Theorem, Oracle Machines CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable

More information

Computability and Complexity

Computability and Complexity Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition

More information

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem

Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Lecture 11: Gödel s Second Incompleteness Theorem, and Tarski s Theorem Valentine Kabanets October 27, 2016 1 Gödel s Second Incompleteness Theorem 1.1 Consistency We say that a proof system P is consistent

More information

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff

Decidability. Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff Decidability Linz 6 th, Chapter 12: Limits of Algorithmic Computation, page 309ff 1 A property P of strings is said to be decidable if the set of all strings having property P is a recursive set; that

More information

Turing Machine Recap

Turing Machine Recap Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

Decidability and Undecidability

Decidability and Undecidability Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an

More information

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch

6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 10 Nancy Lynch 6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 10 Nancy Lynch Today Final topic in computability theory: Self-Reference and the Recursion

More information

CSE 555 Homework Three Sample Solutions

CSE 555 Homework Three Sample Solutions CSE 555 Homework Three Sample Solutions Question 1 Let Σ be a fixed alphabet. A PDA M with n states and stack alphabet of size σ may recognize the empty language; if its language is non-empty then denote

More information

Section 14.1 Computability then else

Section 14.1 Computability then else Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible algorithms. Example (Turing machines). Associate

More information

CpSc 421 Homework 9 Solution

CpSc 421 Homework 9 Solution CpSc 421 Homework 9 Solution Attempt any three of the six problems below. The homework is graded on a scale of 100 points, even though you can attempt fewer or more points than that. Your recorded grade

More information

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information

Theory of Computation Lecture Notes. Problems and Algorithms. Class Information Theory of Computation Lecture Notes Prof. Yuh-Dauh Lyuu Dept. Computer Science & Information Engineering and Department of Finance National Taiwan University Problems and Algorithms c 2004 Prof. Yuh-Dauh

More information

Theory of Computation

Theory of Computation Theory of Computation Lecture #6 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 39 Lecture 6: Overview Prove the equivalence of enumerators and TMs. Dovetailing

More information

V Honors Theory of Computation

V Honors Theory of Computation V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant

More information

CISC 876: Kolmogorov Complexity

CISC 876: Kolmogorov Complexity March 27, 2007 Outline 1 Introduction 2 Definition Incompressibility and Randomness 3 Prefix Complexity Resource-Bounded K-Complexity 4 Incompressibility Method Gödel s Incompleteness Theorem 5 Outline

More information

Chap. 4,5 Review. Algorithms created in proofs from prior chapters

Chap. 4,5 Review. Algorithms created in proofs from prior chapters Chap. 4,5 Review Algorithms created in proofs from prior chapters (p. 55) Theorem 1.39: NFA to DFA (p. 67) Lemma 1.55: Regex to NFA (p. 69) Lemma 1.60: DFA to regex (through GNFA) (p. 112) Lemma 2.21:

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

Theory of Computation (IX) Yijia Chen Fudan University

Theory of Computation (IX) Yijia Chen Fudan University Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and

More information

Lecture Notes: The Halting Problem; Reductions

Lecture Notes: The Halting Problem; Reductions Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings

More information

CSCI3390-Lecture 6: An Undecidable Problem

CSCI3390-Lecture 6: An Undecidable Problem CSCI3390-Lecture 6: An Undecidable Problem September 21, 2018 1 Summary The language L T M recognized by the universal Turing machine is not decidable. Thus there is no algorithm that determines, yes or

More information

Theory of Computation

Theory of Computation Theory of Computation Dr. Sarmad Abbasi Dr. Sarmad Abbasi () Theory of Computation 1 / 33 Lecture 20: Overview Incompressible strings Minimal Length Descriptions Descriptive Complexity Dr. Sarmad Abbasi

More information

Turing Machines. Lecture 8

Turing Machines. Lecture 8 Turing Machines Lecture 8 1 Course Trajectory We will see algorithms, what can be done. But what cannot be done? 2 Computation Problem: To compute a function F that maps each input (a string) to an output

More information

Computable Functions

Computable Functions Computable Functions Part I: Non Computable Functions Computable and Partially Computable Functions Computable Function Exists a Turing Machine M -- M Halts on All Input -- M(x) = f (x) Partially Computable

More information

CSE 105 Theory of Computation

CSE 105 Theory of Computation CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A Non-TR Language Reminders and announcements: HW 7 (Last!!)

More information

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012

Decision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012 Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM

More information

Large Numbers, Busy Beavers, Noncomputability and Incompleteness

Large Numbers, Busy Beavers, Noncomputability and Incompleteness Large Numbers, Busy Beavers, Noncomputability and Incompleteness Food For Thought November 1, 2007 Sam Buss Department of Mathematics U.C. San Diego PART I Large Numbers, Busy Beavers, and Undecidability

More information

Lecture 16: Time Complexity and P vs NP

Lecture 16: Time Complexity and P vs NP 6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language

More information

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable

SD & Turing Enumerable. Lecture 33: Reductions and Undecidability. Lexicographically Enumerable. SD & Turing Enumerable SD & Turing Lecture 33: Reductions and Undecidability CSCI 81 Spring, 2012 Kim Bruce Theorem: A language is SD iff it is Turing enumerable. Proof: Spose L is Turing enumerable. Show L is SD. Let w be input.

More information

Computation. Some history...

Computation. Some history... Computation Motivating questions: What does computation mean? What are the similarities and differences between computation in computers and in natural systems? What are the limits of computation? Are

More information

17.1 The Halting Problem

17.1 The Halting Problem CS125 Lecture 17 Fall 2016 17.1 The Halting Problem Consider the HALTING PROBLEM (HALT TM ): Given a TM M and w, does M halt on input w? Theorem 17.1 HALT TM is undecidable. Suppose HALT TM = { M,w : M

More information

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018 CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts

More information

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever.   ETH Zürich (D-ITET) October, Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free

More information

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2

Turing Machines. Reading Assignment: Sipser Chapter 3.1, 4.2 Reading Assignment: Sipser Chapter 31, 42 Turing Machines 41 covers algorithms for decidable problems about DFA, NFA, RegExp, CFG, and PDAs, eg slides 17 & 18 below I ve talked about most of this in class

More information

Reading Assignment: Sipser Chapter 3.1, 4.2

Reading Assignment: Sipser Chapter 3.1, 4.2 Turing Machines 1 Reading Assignment: Sipser Chapter 3.1, 4.2 4.1 covers algorithms for decidable problems about DFA, NFA, RegExp, CFG, and PDAs, e.g. slides 17 & 18 below. I ve talked about most of this

More information

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5.

1 Reducability. CSCC63 Worksheet Reducability. For your reference, A T M is defined to be the language { M, w M accepts w}. Theorem 5. CSCC63 Worksheet Reducability For your reference, A T M is defined to be the language { M, w M accepts w}. 1 Reducability Theorem 5.1 HALT TM = { M, w M is a T M that halts on input w} is undecidable.

More information

Gödel s Incompleteness Theorem. Overview. Computability and Logic

Gödel s Incompleteness Theorem. Overview. Computability and Logic Gödel s Incompleteness Theorem Overview Computability and Logic Recap Remember what we set out to do in this course: Trying to find a systematic method (algorithm, procedure) which we can use to decide,

More information

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)

Undecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb) We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb) CS /55 Theory of Computation The is A TM = { M,w M is a TM and w L(M)} A TM is Turing-recognizable. Proof Sketch:

More information

CS20a: Turing Machines (Oct 29, 2002)

CS20a: Turing Machines (Oct 29, 2002) CS20a: Turing Machines (Oct 29, 2002) So far: DFA = regular languages PDA = context-free languages Today: Computability 1 Church s thesis The computable functions are the same as the partial recursive

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Turing Machines, diagonalization, the halting problem, reducibility

Turing Machines, diagonalization, the halting problem, reducibility Notes on Computer Theory Last updated: September, 015 Turing Machines, diagonalization, the halting problem, reducibility 1 Turing Machines A Turing machine is a state machine, similar to the ones we have

More information

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis

Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harvard CS 121 and CSCI E-121 Lecture 14: Turing Machines and the Church Turing Thesis Harry Lewis October 22, 2013 Reading: Sipser, 3.2, 3.3. The Basic Turing Machine The Basic Turing Machine a a b a

More information

Kolmogorov complexity and its applications

Kolmogorov complexity and its applications Spring, 2009 Kolmogorov complexity and its applications Paul Vitanyi Computer Science University of Amsterdam http://www.cwi.nl/~paulv/course-kc We live in an information society. Information science is

More information

Turing Machines Part III

Turing Machines Part III Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's

More information

Computational Models Lecture 9, Spring 2009

Computational Models Lecture 9, Spring 2009 Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 9, Spring 2009 Reducibility among languages Mapping reductions More undecidable

More information

CSCE 551 Final Exam, Spring 2004 Answer Key

CSCE 551 Final Exam, Spring 2004 Answer Key CSCE 551 Final Exam, Spring 2004 Answer Key 1. (10 points) Using any method you like (including intuition), give the unique minimal DFA equivalent to the following NFA: 0 1 2 0 5 1 3 4 If your answer is

More information

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now

Peano Arithmetic. CSC 438F/2404F Notes (S. Cook) Fall, Goals Now CSC 438F/2404F Notes (S. Cook) Fall, 2008 Peano Arithmetic Goals Now 1) We will introduce a standard set of axioms for the language L A. The theory generated by these axioms is denoted PA and called Peano

More information

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

CS 125 Section #10 (Un)decidability and Probability November 1, 2016 CS 125 Section #10 (Un)decidability and Probability November 1, 2016 1 Countability Recall that a set S is countable (either finite or countably infinite) if and only if there exists a surjective mapping

More information

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson

Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem. Michael Beeson Lecture 14 Rosser s Theorem, the length of proofs, Robinson s Arithmetic, and Church s theorem Michael Beeson The hypotheses needed to prove incompleteness The question immediate arises whether the incompleteness

More information

Decidability: Church-Turing Thesis

Decidability: Church-Turing Thesis Decidability: Church-Turing Thesis While there are a countably infinite number of languages that are described by TMs over some alphabet Σ, there are an uncountably infinite number that are not Are there

More information

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4 Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form: A BC A a S ε B and C aren t start variables a is

More information

Kolmogorov complexity and its applications

Kolmogorov complexity and its applications CS860, Winter, 2010 Kolmogorov complexity and its applications Ming Li School of Computer Science University of Waterloo http://www.cs.uwaterloo.ca/~mli/cs860.html We live in an information society. Information

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Chomsky Normal Form and TURING MACHINES TUESDAY Feb 4 CHOMSKY NORMAL FORM A context-free grammar is in Chomsky normal form if every rule is of the form:

More information

Decidability (What, stuff is unsolvable?)

Decidability (What, stuff is unsolvable?) University of Georgia Fall 2014 Outline Decidability Decidable Problems for Regular Languages Decidable Problems for Context Free Languages The Halting Problem Countable and Uncountable Sets Diagonalization

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 4.1, 5.1 Define reductions from one problem to another. Use reductions to prove

More information

CSE 311: Foundations of Computing. Lecture 27: Undecidability

CSE 311: Foundations of Computing. Lecture 27: Undecidability CSE 311: Foundations of Computing Lecture 27: Undecidability Last time: Countable sets A set is countable iff we can order the elements of as = {,,, Countable sets: N-the natural numbers Z - the integers

More information

2 Plain Kolmogorov Complexity

2 Plain Kolmogorov Complexity 2 Plain Kolmogorov Complexity In this section, we introduce plain Kolmogorov Complexity, prove the invariance theorem - that is, the complexity of a string does not depend crucially on the particular model

More information

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines

More information

Introduction to Turing Machines

Introduction to Turing Machines Introduction to Turing Machines Deepak D Souza Department of Computer Science and Automation Indian Institute of Science, Bangalore. 12 November 2015 Outline 1 Turing Machines 2 Formal definitions 3 Computability

More information

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable? } We ll now take a look at Turing Machines at a high level and consider what types of problems can be solved algorithmically and what types can t: What languages are Turing-decidable? What languages are

More information

Computation Histories

Computation Histories 208 Computation Histories The computation history for a Turing machine on an input is simply the sequence of configurations that the machine goes through as it processes the input. An accepting computation

More information

CSE 105 Theory of Computation

CSE 105 Theory of Computation CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review: The TM Acceptance problem, A TM The Halting Problem for TM s Other problems

More information

Reducability. Sipser, pages

Reducability. Sipser, pages Reducability Sipser, pages 187-214 Reduction Reduction encodes (transforms) one problem as a second problem. A solution to the second, can be transformed into a solution to the first. We expect both transformations

More information

The Turing machine model of computation

The Turing machine model of computation The Turing machine model of computation For most of the remainder of the course we will study the Turing machine model of computation, named after Alan Turing (1912 1954) who proposed the model in 1936.

More information

Gödel s First Incompleteness Theorem (excerpted from Gödel s Great Theorems) Selmer Bringsjord Intro to Logic May RPI Troy NY USA

Gödel s First Incompleteness Theorem (excerpted from Gödel s Great Theorems) Selmer Bringsjord Intro to Logic May RPI Troy NY USA Gödel s First Incompleteness Theorem (excerpted from Gödel s Great Theorems) Selmer Bringsjord Intro to Logic May 2 2016 RPI Troy NY USA Thursday: Can a machine match Gödel? Grade roundup (not today; let

More information

7.1 The Origin of Computer Science

7.1 The Origin of Computer Science CS125 Lecture 7 Fall 2016 7.1 The Origin of Computer Science Alan Mathison Turing (1912 1954) turing.jpg 170!201 pixels On Computable Numbers, with an Application to the Entscheidungsproblem 1936 1936:

More information

16.1 Countability. CS125 Lecture 16 Fall 2014

16.1 Countability. CS125 Lecture 16 Fall 2014 CS125 Lecture 16 Fall 2014 16.1 Countability Proving the non-existence of algorithms for computational problems can be very difficult. Indeed, we do not know how to prove P NP. So a natural question is

More information

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009

Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as

More information

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y

problem X reduces to Problem Y solving X would be easy, if we knew how to solve Y CPS220 Reducibility A reduction is a procedure to convert one problem to another problem, in such a way that a solution to the second problem can be used to solve the first problem. The conversion itself

More information

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM

An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Turing Machines Review An example of a decidable language that is not a CFL Implementation-level description of a TM State diagram of TM Varieties of TMs Multi-Tape TMs Nondeterministic TMs String Enumerators

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Intro to Theory of Computation

Intro to Theory of Computation Intro to Theory of Computation LECTURE 14 Last time Turing Machine Variants Church-Turing Thesis Today Universal TM Decidable languages Designing deciders Sofya Raskhodnikova 3/1/2016 Sofya Raskhodnikova;

More information

Turing machines and linear bounded automata

Turing machines and linear bounded automata and linear bounded automata Informatics 2A: Lecture 29 John Longley School of Informatics University of Edinburgh jrl@inf.ed.ac.uk 25 November, 2011 1 / 13 1 The Chomsky hierarchy: summary 2 3 4 2 / 13

More information

1 The decision problem for First order logic

1 The decision problem for First order logic Math 260A Mathematical Logic Scribe Notes UCSD Winter Quarter 2012 Instructor: Sam Buss Notes by: James Aisenberg April 27th 1 The decision problem for First order logic Fix a finite language L. Define

More information

Computability Theory. CS215, Lecture 6,

Computability Theory. CS215, Lecture 6, Computability Theory CS215, Lecture 6, 2000 1 The Birth of Turing Machines At the end of the 19th century, Gottlob Frege conjectured that mathematics could be built from fundamental logic In 1900 David

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use

More information

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus

More information

CSCE 551: Chin-Tser Huang. University of South Carolina

CSCE 551: Chin-Tser Huang. University of South Carolina CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Computation History A computation history of a TM M is a sequence of its configurations C 1, C 2,, C l such

More information

Computer Sciences Department

Computer Sciences Department Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable 15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, 2016 Turing & the Uncomputable Comparing the cardinality of sets A B if there is an injection (one-to-one map) from

More information

Decidable and undecidable languages

Decidable and undecidable languages The Chinese University of Hong Kong Fall 2011 CSCI 3130: Formal languages and automata theory Decidable and undecidable languages Andrej Bogdanov http://www.cse.cuhk.edu.hk/~andrejb/csc3130 Problems about

More information

Decidability (intro.)

Decidability (intro.) CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The

More information

Undecidable Problems and Reducibility

Undecidable Problems and Reducibility University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.

More information

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015

Undecidability and Rice s Theorem. Lecture 26, December 3 CS 374, Fall 2015 Undecidability and Rice s Theorem Lecture 26, December 3 CS 374, Fall 2015 UNDECIDABLE EXP NP P R E RECURSIVE Recap: Universal TM U We saw a TM U such that L(U) = { (z,w) M z accepts w} Thus, U is a stored-program

More information

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY RYAN DOUGHERTY If we want to talk about a program running on a real computer, consider the following: when a program reads an instruction,

More information

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936

ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM. Turing 1936 ON COMPUTAMBLE NUMBERS, WITH AN APPLICATION TO THE ENTSCHENIDUGSPROBLEM Turing 1936 Where are We? Ignoramus et ignorabimus Wir mussen wissen Wir werden wissen We do not know We shall not know We must know

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information